Merge lp:~henninge/launchpad/bug-510611-person-karma into lp:launchpad

Proposed by Henning Eggers
Status: Merged
Approved by: Curtis Hovey
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~henninge/launchpad/bug-510611-person-karma
Merge into: lp:launchpad
Diff against target: 44 lines (+8/-3)
3 files modified
lib/lp/registry/browser/person.py (+6/-1)
lib/lp/registry/browser/tests/person-karma-views.txt (+1/-1)
lib/lp/registry/stories/person/xx-person-karma.txt (+1/-1)
To merge this branch: bzr merge lp:~henninge/launchpad/bug-510611-person-karma
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email: mp+17810@code.launchpad.net

Commit message

Added page_title to PersonKarmaView.

To post a comment you must log in.
Revision history for this message
Henning Eggers (henninge) wrote :

= Bug 510611 =

Mechanical change that must have been missed in the 3.0 rush.

== Test ==

bin/test -vvct karma

== Demo/QA ==

Look at your own karma page, verify it is headed "Your Launchpad Karma" and the bread crumbs end with just "Karma". Look at somebody else's karma page, it should be headed "Launchpad Karma for ..."

= Launchpad lint =

Tons in lib/lp/registry/browser/person.py but nothing on PersonKarmaView.

Revision history for this message
Curtis Hovey (sinzui) wrote :

Thanks for this fix.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/browser/person.py'
2--- lib/lp/registry/browser/person.py 2010-01-11 20:07:17 +0000
3+++ lib/lp/registry/browser/person.py 2010-01-29 14:03:19 +0000
4@@ -2556,9 +2556,14 @@
5 class PersonKarmaView(LaunchpadView):
6 """A view class used for ~person/+karma."""
7
8+ page_title = 'Karma'
9+
10 @property
11 def label(self):
12- return 'Launchpad Karma for ' + cgi.escape(self.context.displayname)
13+ if self.user == self.context:
14+ return 'Your Launchpad Karma'
15+ else:
16+ return 'Launchpad Karma for %s' % self.context.displayname
17
18 @cachedproperty
19 def has_karma(self):
20
21=== modified file 'lib/lp/registry/browser/tests/person-karma-views.txt'
22--- lib/lp/registry/browser/tests/person-karma-views.txt 2009-11-13 13:06:50 +0000
23+++ lib/lp/registry/browser/tests/person-karma-views.txt 2010-01-29 14:03:19 +0000
24@@ -11,7 +11,7 @@
25 The view's label shows the person who's karma we're looking at...
26
27 >>> print view.label
28- Launchpad Karma for Geddy Lee
29+ Your Launchpad Karma
30
31 ...even when the logged in user is looking at someone else's karma.
32
33
34=== modified file 'lib/lp/registry/stories/person/xx-person-karma.txt'
35--- lib/lp/registry/stories/person/xx-person-karma.txt 2009-09-18 15:24:30 +0000
36+++ lib/lp/registry/stories/person/xx-person-karma.txt 2010-01-29 14:03:19 +0000
37@@ -19,7 +19,7 @@
38
39 >>> anon_browser.getLink('138').click()
40 >>> print anon_browser.title
41- Launchpad Karma for Sample Person...
42+ Karma : Sample Person
43
44 Any user can see the categories that a user has earned karma in.
45