Merge lp://staging/~julian-edwards/launchpad/related-software-30 into lp://staging/launchpad
- related-software-30
- Merge into devel
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp://staging/~julian-edwards/launchpad/related-software-30 |
Merge into: | lp://staging/launchpad |
Diff against target: | None lines |
To merge this branch: | bzr merge lp://staging/~julian-edwards/launchpad/related-software-30 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Nelson (community) | ui | Approve | |
Brad Crittenden (community) | code | Approve | |
Review via email: mp+11354@code.staging.launchpad.net |
Commit message
Description of the change
Julian Edwards (julian-edwards) wrote : | # |
Brad Crittenden (bac) wrote : | # |
Hi Julian,
Thanks for the nice fixes on this branch.
I have one big suggestion for the way the links are put on the page.
Other than that the branch looks good.
> === modified file 'lib/canonical/
--- lib/canonical/
> +++ lib/canonical/
> @@ -747,8 +747,6 @@
>
> person_karma = ContextDisplayN
>
> -person_
> -
> person_
>
> def person_
> @@ -765,12 +763,6 @@
>
> person_
>
> -person_
> -
> -person_
> -
> -person_
> -
> person_review = ContextDisplayN
>
> person_specfeedback = ContextDisplayN
> @@ -786,8 +778,6 @@
>
> person_
>
> -person_
> -
> pofile_filter = FilteredTransla
> smartquote(
>
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -4834,6 +4834,10 @@
>
> max_results_
>
> + @property
> + def page_title(self):
> + return "Software related to " + self.context.title
Minor since they are synonyms but I'd use displayname here as it is
more familiar for a person. Will apply to all.
> @cachedproperty
> def related_
> """Return a list of project dicts owned or driven by this person.
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -5,18 +5,10 @@
>
> >>> anon_browser.open('http://
> >>> anon_browser.
> - >>> print_navigatio
> - Profile: ...
> - Related Software
> - Karma: ...
>
> >>> print anon_browser.title
> Software related to Mark Shuttleworth
> >>> print anon_browser.url
> http://
>
> -That page displays a table, the with list of 'Maintained'
> -well as the list of 'Uploaded' packages. The table also shows the
> -number of open bugs and questions filed against each package.
Spotting typos in deleted code probably isn't helpful, is it? :)
> Please see pagetests/
> === modified file 'lib/lp/
> --- lib/lp/registry...
Curtis Hovey (sinzui) wrote : | # |
> > + <div class="top-portlet" id="navlinks">
> > + <ul class="horizontal">
> > + <li>
> > + <a tal:replace=
> view/menu:
> > + <li>
> > + <a tal:replace=
> view/menu:
> > + <li>
> > + <a tal:replace=
> view/menu:
> > + <li>
> > + <a tal:replace=
> > + </ul>
> > + </div>
>
>
> I'm a bit bothered by the way the horizontal links hop around and are
> inconsistently ordered as you page through them. If you used the
> following code (moved to a macro) for all pages then the link display
> would be fixed in the same order and the active page would have a
> disabled link, which is the way +global-action menus work.
>
> <div class="top-portlet" id="navlinks">
> <ul class="horizontal">
> <li>
> <a tal:replace=
> <li>
> <a tal:replace=
> view/menu:
> <li>
> <a tal:replace=
> <li>
> <a tal:replace=
> <li>
> <a tal:replace=
> </ul>
> </div>
I agree with Brad, but I think we need another change. This approach creates empty <li> elements. Each <li> needs condition=
Since this is already a NavMenu, you could just iterate over the .enabled_links. I recall that the list needs to be gotten from the view, but it may be possible to make the menu do the work.
Brad Crittenden (bac) wrote : | # |
On Sep 8, 2009, at 10:07 , Curtis Hovey wrote:
>>
>> I'm a bit bothered by the way the horizontal links hop around and are
>> inconsistently ordered as you page through them. If you used the
>> following code (moved to a macro) for all pages then the link display
>> would be fixed in the same order and the active page would have a
>> disabled link, which is the way +global-action menus work.
>>
>> <div class="top-portlet" id="navlinks">
>> <ul class="horizontal">
>> <li>
>> <a tal:replace=
>> render"/></li>
>> <li>
>> <a tal:replace=
>> view/menu:
>> <li>
>> <a tal:replace=
>> render"/></li>
>> <li>
>> <a tal:replace=
>> ></li>
>> <li>
>> <a tal:replace=
>> render"/></li>
>> </ul>
>> </div>
>
> I agree with Brad, but I think we need another change. This approach
> creates empty <li> elements. Each <li> needs condition="view/
> menu:navigation
The snipped I suggested does not produce empty <li>. Here is what it
produces for the +related-projects page:
<div class="top-portlet" id="navlinks">
<ul class="horizontal">
<li>
<a href="https:/
class=
<li>
<a href="https:/
class=
a></li>
<li>
<a href="https:/
class=
<li>
<a href="https:/
class=
<li>
<span class="
</ul>
</div>
>
> Since this is already a NavMenu, you could just iterate over
> the .enabled_links. I recall that the list needs to be gotten from
> the view, but it may be possible to make the menu do the work.
Leaving out the enabled links will cause the horizontal menu to leave
out the page we're on. What I have renders it as text, not a link,
which is what we do for +global-actions. Leaving it out may be your
preference.
Michael Nelson (michael.nelson) wrote : | # |
Great to see a general solution for these problem pages!
The horizontal list solves the problem, and doesn't look too out-of-character (it would have been nice if we could have floated a standard 'related pages' menu portlet to the right, but I'm assuming you've discussed all those options with Curtis.
The only thing I'd watch out for is the use of the page_title view property. See the irc paste here:
but basically, I'd remove the page_title view properties and either JDI or wait for barry's branch to land that will calculate the <title> page titles automatically.
Julian Edwards (julian-edwards) wrote : | # |
Thanks for the review Michael!
On Tuesday 08 September 2009 16:21:12 Michael Nelson wrote:
> but basically, I'd remove the page_title view properties and either JDI or
> wait for barry's branch to land that will calculate the <title> page
> titles automatically.
The plan is to fix all our templates in one fell swoop when Barry's branch
lands. I don't think we should be blocking on that right now. I've attempted
to make it as easy as possible in all my branches to convert once it does
land, so in this case I just remove the heading slot in the template and it's
sorted. That's why I added page_title here and am using it manually. :)
Cheers
J
Preview Diff
1 | === modified file 'lib/canonical/launchpad/pagetitles.py' | |||
2 | --- lib/canonical/launchpad/pagetitles.py 2009-09-05 07:03:47 +0000 | |||
3 | +++ lib/canonical/launchpad/pagetitles.py 2009-09-07 20:32:50 +0000 | |||
4 | @@ -747,8 +747,6 @@ | |||
5 | 747 | 747 | ||
6 | 748 | person_karma = ContextDisplayName(smartquote("%s's karma in Launchpad")) | 748 | person_karma = ContextDisplayName(smartquote("%s's karma in Launchpad")) |
7 | 749 | 749 | ||
8 | 750 | person_maintained_packages = ContextDisplayName('Software maintained by %s') | ||
9 | 751 | |||
10 | 752 | person_mentoringoffers = ContextTitle('Mentoring offered by %s') | 750 | person_mentoringoffers = ContextTitle('Mentoring offered by %s') |
11 | 753 | 751 | ||
12 | 754 | def person_mergeproposals(context, view): | 752 | def person_mergeproposals(context, view): |
13 | @@ -765,12 +763,6 @@ | |||
14 | 765 | 763 | ||
15 | 766 | person_participation = ContextTitle("Team participation by %s") | 764 | person_participation = ContextTitle("Team participation by %s") |
16 | 767 | 765 | ||
17 | 768 | person_ppa_packages = ContextDisplayName('PPA packages related to %s') | ||
18 | 769 | |||
19 | 770 | person_related_projects = ContextDisplayName('Projects related to %s') | ||
20 | 771 | |||
21 | 772 | person_related_software = ContextDisplayName('Software related to %s') | ||
22 | 773 | |||
23 | 774 | person_review = ContextDisplayName("Review %s") | 766 | person_review = ContextDisplayName("Review %s") |
24 | 775 | 767 | ||
25 | 776 | person_specfeedback = ContextDisplayName('Feature feedback requests for %s') | 768 | person_specfeedback = ContextDisplayName('Feature feedback requests for %s') |
26 | @@ -786,8 +778,6 @@ | |||
27 | 786 | 778 | ||
28 | 787 | person_teamhierarchy = ContextDisplayName('Team hierarchy for %s') | 779 | person_teamhierarchy = ContextDisplayName('Team hierarchy for %s') |
29 | 788 | 780 | ||
30 | 789 | person_uploaded_packages = ContextDisplayName('Software uploaded by %s') | ||
31 | 790 | |||
32 | 791 | pofile_filter = FilteredTranslationsTitle( | 781 | pofile_filter = FilteredTranslationsTitle( |
33 | 792 | smartquote('Translations by %(person)s in "%(title)s"')) | 782 | smartquote('Translations by %(person)s in "%(title)s"')) |
34 | 793 | 783 | ||
35 | 794 | 784 | ||
36 | === modified file 'lib/lp/registry/browser/person.py' | |||
37 | --- lib/lp/registry/browser/person.py 2009-09-05 03:33:24 +0000 | |||
38 | +++ lib/lp/registry/browser/person.py 2009-09-07 20:32:50 +0000 | |||
39 | @@ -870,7 +870,7 @@ | |||
40 | 870 | def summary(self): | 870 | def summary(self): |
41 | 871 | target = '+related-software' | 871 | target = '+related-software' |
42 | 872 | text = 'Summary' | 872 | text = 'Summary' |
44 | 873 | return Link(target, text) | 873 | return Link(target, text, icon='info') |
45 | 874 | 874 | ||
46 | 875 | def maintained(self): | 875 | def maintained(self): |
47 | 876 | target = '+maintained-packages' | 876 | target = '+maintained-packages' |
48 | @@ -881,17 +881,17 @@ | |||
49 | 881 | def uploaded(self): | 881 | def uploaded(self): |
50 | 882 | target = '+uploaded-packages' | 882 | target = '+uploaded-packages' |
51 | 883 | text = 'Uploaded Packages' | 883 | text = 'Uploaded Packages' |
53 | 884 | return Link(target, text) | 884 | return Link(target, text, icon='info') |
54 | 885 | 885 | ||
55 | 886 | def ppa(self): | 886 | def ppa(self): |
56 | 887 | target = '+ppa-packages' | 887 | target = '+ppa-packages' |
57 | 888 | text = 'PPA Packages' | 888 | text = 'PPA Packages' |
59 | 889 | return Link(target, text) | 889 | return Link(target, text, icon='info') |
60 | 890 | 890 | ||
61 | 891 | def projects(self): | 891 | def projects(self): |
62 | 892 | target = '+related-projects' | 892 | target = '+related-projects' |
63 | 893 | text = 'Related Projects' | 893 | text = 'Related Projects' |
65 | 894 | return Link(target, text) | 894 | return Link(target, text, icon='info') |
66 | 895 | 895 | ||
67 | 896 | 896 | ||
68 | 897 | class PersonOverviewMenu(ApplicationMenu, CommonMenuLinks): | 897 | class PersonOverviewMenu(ApplicationMenu, CommonMenuLinks): |
69 | @@ -4834,6 +4834,10 @@ | |||
70 | 4834 | 4834 | ||
71 | 4835 | max_results_to_display = config.launchpad.default_batch_size | 4835 | max_results_to_display = config.launchpad.default_batch_size |
72 | 4836 | 4836 | ||
73 | 4837 | @property | ||
74 | 4838 | def page_title(self): | ||
75 | 4839 | return "Software related to " + self.context.title | ||
76 | 4840 | |||
77 | 4837 | @cachedproperty | 4841 | @cachedproperty |
78 | 4838 | def related_projects(self): | 4842 | def related_projects(self): |
79 | 4839 | """Return a list of project dicts owned or driven by this person. | 4843 | """Return a list of project dicts owned or driven by this person. |
80 | @@ -5057,6 +5061,10 @@ | |||
81 | 5057 | packages = self.context.getLatestMaintainedPackages() | 5061 | packages = self.context.getLatestMaintainedPackages() |
82 | 5058 | self.setUpBatch(packages) | 5062 | self.setUpBatch(packages) |
83 | 5059 | 5063 | ||
84 | 5064 | @property | ||
85 | 5065 | def page_title(self): | ||
86 | 5066 | return "Software maintained by " + self.context.title | ||
87 | 5067 | |||
88 | 5060 | 5068 | ||
89 | 5061 | class PersonUploadedPackagesView(PersonRelatedSoftwareView): | 5069 | class PersonUploadedPackagesView(PersonRelatedSoftwareView): |
90 | 5062 | """View for +uploaded-packages.""" | 5070 | """View for +uploaded-packages.""" |
91 | @@ -5066,6 +5074,10 @@ | |||
92 | 5066 | packages = self.context.getLatestUploadedButNotMaintainedPackages() | 5074 | packages = self.context.getLatestUploadedButNotMaintainedPackages() |
93 | 5067 | self.setUpBatch(packages) | 5075 | self.setUpBatch(packages) |
94 | 5068 | 5076 | ||
95 | 5077 | @property | ||
96 | 5078 | def page_title(self): | ||
97 | 5079 | return "Software uploaded by " + self.context.title | ||
98 | 5080 | |||
99 | 5069 | 5081 | ||
100 | 5070 | class PersonPPAPackagesView(PersonRelatedSoftwareView): | 5082 | class PersonPPAPackagesView(PersonRelatedSoftwareView): |
101 | 5071 | """View for +ppa-packages.""" | 5083 | """View for +ppa-packages.""" |
102 | @@ -5082,6 +5094,10 @@ | |||
103 | 5082 | packages_batch = self.filterPPAPackageList(packages_batch) | 5094 | packages_batch = self.filterPPAPackageList(packages_batch) |
104 | 5083 | self.batch = self._addStatsToPackages(packages_batch) | 5095 | self.batch = self._addStatsToPackages(packages_batch) |
105 | 5084 | 5096 | ||
106 | 5097 | @property | ||
107 | 5098 | def page_title(self): | ||
108 | 5099 | return "PPA packages related to " + self.context.title | ||
109 | 5100 | |||
110 | 5085 | 5101 | ||
111 | 5086 | class PersonRelatedProjectsView(PersonRelatedSoftwareView): | 5102 | class PersonRelatedProjectsView(PersonRelatedSoftwareView): |
112 | 5087 | """View for +related-projects.""" | 5103 | """View for +related-projects.""" |
113 | @@ -5092,6 +5108,10 @@ | |||
114 | 5092 | self.related_projects, self.request) | 5108 | self.related_projects, self.request) |
115 | 5093 | self.batch = list(self.batchnav.currentBatch()) | 5109 | self.batch = list(self.batchnav.currentBatch()) |
116 | 5094 | 5110 | ||
117 | 5111 | @property | ||
118 | 5112 | def page_title(self): | ||
119 | 5113 | return "Projects related to " + self.context.title | ||
120 | 5114 | |||
121 | 5095 | 5115 | ||
122 | 5096 | class PersonOAuthTokensView(LaunchpadView): | 5116 | class PersonOAuthTokensView(LaunchpadView): |
123 | 5097 | """Where users can see/revoke their non-expired access tokens.""" | 5117 | """Where users can see/revoke their non-expired access tokens.""" |
124 | 5098 | 5118 | ||
125 | === modified file 'lib/lp/registry/stories/foaf/xx-person-packages.txt' | |||
126 | --- lib/lp/registry/stories/foaf/xx-person-packages.txt 2009-08-13 15:12:16 +0000 | |||
127 | +++ lib/lp/registry/stories/foaf/xx-person-packages.txt 2009-09-08 10:49:20 +0000 | |||
128 | @@ -5,18 +5,10 @@ | |||
129 | 5 | 5 | ||
130 | 6 | >>> anon_browser.open('http://launchpad.dev/~mark') | 6 | >>> anon_browser.open('http://launchpad.dev/~mark') |
131 | 7 | >>> anon_browser.getLink('Related Software').click() | 7 | >>> anon_browser.getLink('Related Software').click() |
132 | 8 | >>> print_navigation_links(anon_browser.contents) | ||
133 | 9 | Profile: ... | ||
134 | 10 | Related Software | ||
135 | 11 | Karma: ... | ||
136 | 12 | 8 | ||
137 | 13 | >>> print anon_browser.title | 9 | >>> print anon_browser.title |
138 | 14 | Software related to Mark Shuttleworth | 10 | Software related to Mark Shuttleworth |
139 | 15 | >>> print anon_browser.url | 11 | >>> print anon_browser.url |
140 | 16 | http://launchpad.dev/~mark/+related-software | 12 | http://launchpad.dev/~mark/+related-software |
141 | 17 | 13 | ||
142 | 18 | That page displays a table, the with list of 'Maintained'packages as | ||
143 | 19 | well as the list of 'Uploaded' packages. The table also shows the | ||
144 | 20 | number of open bugs and questions filed against each package. | ||
145 | 21 | |||
146 | 22 | Please see pagetests/soyuz/xx-person-packages.txt for details. | 14 | Please see pagetests/soyuz/xx-person-packages.txt for details. |
147 | 23 | 15 | ||
148 | === modified file 'lib/lp/registry/templates/person-related-projects.pt' | |||
149 | --- lib/lp/registry/templates/person-related-projects.pt 2009-07-17 17:59:07 +0000 | |||
150 | +++ lib/lp/registry/templates/person-related-projects.pt 2009-09-08 11:49:02 +0000 | |||
151 | @@ -3,20 +3,33 @@ | |||
152 | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
153 | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
154 | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
159 | 6 | xml:lang="en" | 6 | metal:use-macro="view/macro:page/main_only" |
156 | 7 | lang="en" | ||
157 | 8 | dir="ltr" | ||
158 | 9 | metal:use-macro="view/macro:page/onecolumn" | ||
160 | 10 | i18n:domain="launchpad" | 7 | i18n:domain="launchpad" |
161 | 11 | > | 8 | > |
162 | 12 | 9 | ||
163 | 13 | <body> | 10 | <body> |
164 | 14 | 11 | ||
165 | 12 | <div metal:fill-slot="heading"> | ||
166 | 13 | <h1 tal:content="view/page_title"/> | ||
167 | 14 | </div> | ||
168 | 15 | |||
169 | 15 | <div metal:fill-slot="main"> | 16 | <div metal:fill-slot="main"> |
172 | 16 | 17 | <div class="top-portlet" id="navlinks"> | |
173 | 17 | <div id="projects"> | 18 | <ul class="horizontal"> |
174 | 19 | <li> | ||
175 | 20 | <a tal:replace="structure view/menu:navigation/summary/render"/></li> | ||
176 | 21 | <li> | ||
177 | 22 | <a tal:replace="structure view/menu:navigation/maintained/render"/></li> | ||
178 | 23 | <li> | ||
179 | 24 | <a tal:replace="structure view/menu:navigation/uploaded/render"/></li> | ||
180 | 25 | <li> | ||
181 | 26 | <a tal:replace="structure view/menu:navigation/ppa/render"/></li> | ||
182 | 27 | </ul> | ||
183 | 28 | </div> | ||
184 | 29 | |||
185 | 30 | |||
186 | 31 | <div id="projects" class="top-portlet"> | ||
187 | 18 | <a name="projects" /> | 32 | <a name="projects" /> |
188 | 19 | <h1>Related projects</h1> | ||
189 | 20 | 33 | ||
190 | 21 | <tal:navigation_top | 34 | <tal:navigation_top |
191 | 22 | replace="structure view/batchnav/@@+navigation-links-upper" /> | 35 | replace="structure view/batchnav/@@+navigation-links-upper" /> |
192 | 23 | 36 | ||
193 | === modified file 'lib/lp/registry/templates/person-related-software.pt' | |||
194 | --- lib/lp/registry/templates/person-related-software.pt 2009-07-17 17:59:07 +0000 | |||
195 | +++ lib/lp/registry/templates/person-related-software.pt 2009-09-08 11:49:02 +0000 | |||
196 | @@ -3,23 +3,39 @@ | |||
197 | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
198 | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
199 | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
204 | 6 | xml:lang="en" | 6 | metal:use-macro="view/macro:page/main_only" |
201 | 7 | lang="en" | ||
202 | 8 | dir="ltr" | ||
203 | 9 | metal:use-macro="view/macro:page/onecolumn" | ||
205 | 10 | i18n:domain="launchpad" | 7 | i18n:domain="launchpad" |
206 | 11 | > | 8 | > |
207 | 12 | 9 | ||
208 | 13 | <body> | 10 | <body> |
209 | 14 | 11 | ||
210 | 12 | <div metal:fill-slot="heading"> | ||
211 | 13 | <h1 tal:content="view/page_title"/> | ||
212 | 14 | </div> | ||
213 | 15 | |||
214 | 15 | <div metal:fill-slot="main"> | 16 | <div metal:fill-slot="main"> |
215 | 17 | <div class="top-portlet" id="navlinks"> | ||
216 | 18 | <ul class="horizontal"> | ||
217 | 19 | Full listings: | ||
218 | 20 | <li> | ||
219 | 21 | <a tal:replace="structure view/menu:navigation/maintained/render"/></li> | ||
220 | 22 | <li> | ||
221 | 23 | <a tal:replace="structure view/menu:navigation/uploaded/render"/></li> | ||
222 | 24 | <li> | ||
223 | 25 | <a tal:replace="structure view/menu:navigation/ppa/render"/></li> | ||
224 | 26 | <li> | ||
225 | 27 | <a tal:replace="structure view/menu:navigation/projects/render"/></li> | ||
226 | 28 | </ul> | ||
227 | 29 | </div> | ||
228 | 30 | |||
229 | 16 | <div id="packages"> | 31 | <div id="packages"> |
230 | 17 | 32 | ||
231 | 18 | <tal:maintained-packages | 33 | <tal:maintained-packages |
232 | 19 | define="sourcepackagereleases view/get_latest_maintained_packages_with_stats" | 34 | define="sourcepackagereleases view/get_latest_maintained_packages_with_stats" |
233 | 20 | condition="sourcepackagereleases"> | 35 | condition="sourcepackagereleases"> |
234 | 21 | 36 | ||
236 | 22 | <h1>Maintained packages</h1> | 37 | <div class="top-portlet"> |
237 | 38 | <h2>Maintained packages</h2> | ||
238 | 23 | 39 | ||
239 | 24 | <tal:message replace="view/maintained_packages_header_message"/> | 40 | <tal:message replace="view/maintained_packages_header_message"/> |
240 | 25 | <table class="listing"> | 41 | <table class="listing"> |
241 | @@ -38,13 +54,15 @@ | |||
242 | 38 | <div metal:use-macro="context/@@+person-macros/sourcepackagerelease-rows" /> | 54 | <div metal:use-macro="context/@@+person-macros/sourcepackagerelease-rows" /> |
243 | 39 | </tbody> | 55 | </tbody> |
244 | 40 | </table> | 56 | </table> |
245 | 57 | </div> | ||
246 | 41 | </tal:maintained-packages> | 58 | </tal:maintained-packages> |
247 | 42 | 59 | ||
248 | 43 | <tal:uploaded-packages | 60 | <tal:uploaded-packages |
249 | 44 | define="sourcepackagereleases view/get_latest_uploaded_but_not_maintained_packages_with_stats" | 61 | define="sourcepackagereleases view/get_latest_uploaded_but_not_maintained_packages_with_stats" |
250 | 45 | condition="sourcepackagereleases"> | 62 | condition="sourcepackagereleases"> |
251 | 46 | 63 | ||
253 | 47 | <h1>Uploaded packages</h1> | 64 | <div class="top-portlet"> |
254 | 65 | <h2>Uploaded packages</h2> | ||
255 | 48 | 66 | ||
256 | 49 | <tal:message replace="view/uploaded_packages_header_message"/> | 67 | <tal:message replace="view/uploaded_packages_header_message"/> |
257 | 50 | <table class="listing"> | 68 | <table class="listing"> |
258 | @@ -62,13 +80,15 @@ | |||
259 | 62 | 80 | ||
260 | 63 | <div metal:use-macro="context/@@+person-macros/sourcepackagerelease-rows" /> | 81 | <div metal:use-macro="context/@@+person-macros/sourcepackagerelease-rows" /> |
261 | 64 | </table> | 82 | </table> |
262 | 83 | </div> | ||
263 | 65 | </tal:uploaded-packages> | 84 | </tal:uploaded-packages> |
264 | 66 | 85 | ||
265 | 67 | <tal:ppa-packages | 86 | <tal:ppa-packages |
266 | 68 | define="sourcepackagereleases view/get_latest_uploaded_ppa_packages_with_stats" | 87 | define="sourcepackagereleases view/get_latest_uploaded_ppa_packages_with_stats" |
267 | 69 | condition="sourcepackagereleases"> | 88 | condition="sourcepackagereleases"> |
268 | 70 | 89 | ||
270 | 71 | <h1>PPA packages</h1> | 90 | <div class="top-portlet"> |
271 | 91 | <h2>PPA packages</h2> | ||
272 | 72 | 92 | ||
273 | 73 | <tal:message replace="view/ppa_packages_header_message"/> | 93 | <tal:message replace="view/ppa_packages_header_message"/> |
274 | 74 | <table class="listing"> | 94 | <table class="listing"> |
275 | @@ -86,13 +106,14 @@ | |||
276 | 86 | 106 | ||
277 | 87 | <div metal:use-macro="template/macros/sourcepackagerelease-ppa-rows" /> | 107 | <div metal:use-macro="template/macros/sourcepackagerelease-ppa-rows" /> |
278 | 88 | </table> | 108 | </table> |
279 | 109 | </div> | ||
280 | 89 | </tal:ppa-packages> | 110 | </tal:ppa-packages> |
281 | 90 | 111 | ||
283 | 91 | </div> | 112 | </div><!--id packages--> |
284 | 92 | 113 | ||
286 | 93 | <div id="projects"> | 114 | <div id="projects" class="top-portlet"> |
287 | 94 | <a name="projects" /> | 115 | <a name="projects" /> |
289 | 95 | <h1>Related projects</h1> | 116 | <h2>Related projects</h2> |
290 | 96 | 117 | ||
291 | 97 | <span id="limit-encountered" | 118 | <span id="limit-encountered" |
292 | 98 | tal:content="view/projects_header_message" /> | 119 | tal:content="view/projects_header_message" /> |
293 | 99 | 120 | ||
294 | === modified file 'lib/lp/soyuz/stories/ppa/xx-ppa-navigation.txt' | |||
295 | --- lib/lp/soyuz/stories/ppa/xx-ppa-navigation.txt 2009-08-31 23:45:11 +0000 | |||
296 | +++ lib/lp/soyuz/stories/ppa/xx-ppa-navigation.txt 2009-09-08 11:39:16 +0000 | |||
297 | @@ -185,31 +185,3 @@ | |||
298 | 185 | >>> anon_browser.getLink('Previous').url | 185 | >>> anon_browser.getLink('Previous').url |
299 | 186 | 'http://launchpad.dev/%7Ecprov/+archive/ppa/+index?start=1&batch=1' | 186 | 'http://launchpad.dev/%7Ecprov/+archive/ppa/+index?start=1&batch=1' |
300 | 187 | 187 | ||
301 | 188 | == Maintained Packages link == | ||
302 | 189 | |||
303 | 190 | The Maintained Packages link only appears if the person or team has | ||
304 | 191 | maintained packages to show. No-priv does not maintain packages. | ||
305 | 192 | |||
306 | 193 | >>> anon_browser.open("http://launchpad.dev/~no-priv") | ||
307 | 194 | >>> print_tag_with_id(anon_browser.contents, 'ppas') | ||
308 | 195 | Personal package archives | ||
309 | 196 | PPA for No Privileges Person | ||
310 | 197 | >>> anon_browser.open( | ||
311 | 198 | ... "http://launchpad.dev/~no-priv/+maintained-packages") | ||
312 | 199 | >>> print extract_text( | ||
313 | 200 | ... find_tag_by_id(anon_browser.contents, 'packages')) | ||
314 | 201 | Maintained packages... | ||
315 | 202 | No Privileges Person does not maintain any packages. | ||
316 | 203 | |||
317 | 204 | Mark has packages that he maintains. | ||
318 | 205 | |||
319 | 206 | >>> anon_browser.open("http://launchpad.dev/~mark") | ||
320 | 207 | >>> print_tag_with_id(anon_browser.contents, 'ppas') | ||
321 | 208 | Personal package archives | ||
322 | 209 | PPA for Mark Shuttleworth | ||
323 | 210 | Maintained Packages | ||
324 | 211 | >>> anon_browser.getLink(url="+maintained-packages").click() | ||
325 | 212 | >>> print extract_text( | ||
326 | 213 | ... find_tag_by_id(anon_browser.contents, 'packages')) | ||
327 | 214 | Maintained packages... | ||
328 | 215 | alsa-utils ... 1.0.9a-4... | ||
329 | 216 | 188 | ||
330 | === modified file 'lib/lp/soyuz/stories/soyuz/xx-person-packages.txt' | |||
331 | --- lib/lp/soyuz/stories/soyuz/xx-person-packages.txt 2009-08-13 15:12:16 +0000 | |||
332 | +++ lib/lp/soyuz/stories/soyuz/xx-person-packages.txt 2009-09-08 11:39:16 +0000 | |||
333 | @@ -10,19 +10,24 @@ | |||
334 | 10 | 10 | ||
335 | 11 | This page is just a summary of the user's packages and will only | 11 | This page is just a summary of the user's packages and will only |
336 | 12 | display up to the most recent 30 items in each category. However, it | 12 | display up to the most recent 30 items in each category. However, it |
350 | 13 | has a navigation sub-menu that takes the user to batched listings in | 13 | has more links that take the user to batched listings in each category |
351 | 14 | each category where all items can be perused. | 14 | where all items can be perused. |
352 | 15 | 15 | ||
353 | 16 | >>> print_navigation_links(browser.contents) | 16 | >>> print extract_text(find_tag_by_id(browser.contents, 'navlinks')) |
354 | 17 | Profile: http://launchpad.dev/~name16 | 17 | Full listings: |
355 | 18 | Related Software | 18 | Maintained Packages |
356 | 19 | Karma: http://launchpad.dev/~name16/+karma | 19 | Uploaded Packages |
357 | 20 | Personal Package Archives: http://launchpad.dev/~name16#ppas | 20 | PPA Packages |
358 | 21 | Summary | 21 | Related Projects |
359 | 22 | Maintained Packages: http://launchpad.dev/~name16/+maintained-packages | 22 | |
360 | 23 | Uploaded Packages: http://launchpad.dev/~name16/+uploaded-packages | 23 | >>> print browser.getLink("Maintained Packages").url |
361 | 24 | PPA Packages: http://launchpad.dev/~name16/+ppa-packages | 24 | http://launchpad.dev/~name16/+maintained-packages |
362 | 25 | Related Projects: http://launchpad.dev/~name16/+related-projects | 25 | >>> print browser.getLink("Uploaded Packages").url |
363 | 26 | http://launchpad.dev/~name16/+uploaded-packages | ||
364 | 27 | >>> print browser.getLink("PPA Packages").url | ||
365 | 28 | http://launchpad.dev/~name16/+ppa-packages | ||
366 | 29 | >>> print browser.getLink("Related Projects").url | ||
367 | 30 | http://launchpad.dev/~name16/+related-projects | ||
368 | 26 | 31 | ||
369 | 27 | Each category on the summary page has a heading that shows how many | 32 | Each category on the summary page has a heading that shows how many |
370 | 28 | packages are being displayed. | 33 | packages are being displayed. |
371 | @@ -87,19 +92,31 @@ | |||
372 | 87 | >>> browser.open("http://launchpad.dev/~mark/+related-software") | 92 | >>> browser.open("http://launchpad.dev/~mark/+related-software") |
373 | 88 | >>> browser.getLink("Maintained Packages").click() | 93 | >>> browser.getLink("Maintained Packages").click() |
374 | 89 | >>> print extract_text(find_tag_by_id(browser.contents, 'packages')) | 94 | >>> print extract_text(find_tag_by_id(browser.contents, 'packages')) |
375 | 90 | Maintained packages | ||
376 | 91 | 1...5 of 7 results | 95 | 1...5 of 7 results |
377 | 92 | ... | 96 | ... |
378 | 93 | Name Uploaded to Version When Failures Bugs Questions | 97 | Name Uploaded to Version When Failures Bugs Questions |
379 | 94 | alsa-utils Debian Sid 1.0.9a-4 2005-07-01 None 0 0 | 98 | alsa-utils Debian Sid 1.0.9a-4 2005-07-01 None 0 0 |
380 | 95 | ... | 99 | ... |
381 | 96 | 100 | ||
382 | 101 | The Maintained Packages page only has data if the person or team has | ||
383 | 102 | maintained packages to show. No-priv does not maintain packages. | ||
384 | 103 | |||
385 | 104 | >>> anon_browser.open("http://launchpad.dev/~no-priv") | ||
386 | 105 | >>> print_tag_with_id(anon_browser.contents, 'ppas') | ||
387 | 106 | Personal package archives | ||
388 | 107 | PPA for No Privileges Person | ||
389 | 108 | >>> anon_browser.open( | ||
390 | 109 | ... "http://launchpad.dev/~no-priv/+maintained-packages") | ||
391 | 110 | >>> print extract_text( | ||
392 | 111 | ... find_tag_by_id(anon_browser.contents, 'packages')) | ||
393 | 112 | Name... | ||
394 | 113 | No Privileges Person does not maintain any packages. | ||
395 | 114 | |||
396 | 97 | The navigation link to "Uploaded Packages" takes the user to the | 115 | The navigation link to "Uploaded Packages" takes the user to the |
397 | 98 | page that lists uploaded packages in batches. | 116 | page that lists uploaded packages in batches. |
398 | 99 | 117 | ||
399 | 100 | >>> browser.getLink("Uploaded Packages").click() | 118 | >>> browser.getLink("Uploaded Packages").click() |
400 | 101 | >>> print extract_text(find_tag_by_id(browser.contents, 'packages')) | 119 | >>> print extract_text(find_tag_by_id(browser.contents, 'packages')) |
401 | 102 | Uploaded packages | ||
402 | 103 | 1...5 of 6 results | 120 | 1...5 of 6 results |
403 | 104 | ... | 121 | ... |
404 | 105 | Name Uploaded to Version When Failures Bugs Questions | 122 | Name Uploaded to Version When Failures Bugs Questions |
405 | @@ -111,7 +128,6 @@ | |||
406 | 111 | 128 | ||
407 | 112 | >>> browser.getLink("PPA Packages").click() | 129 | >>> browser.getLink("PPA Packages").click() |
408 | 113 | >>> print extract_text(find_tag_by_id(browser.contents, 'packages')) | 130 | >>> print extract_text(find_tag_by_id(browser.contents, 'packages')) |
409 | 114 | PPA packages | ||
410 | 115 | 1...1 of 1 result | 131 | 1...1 of 1 result |
411 | 116 | ... | 132 | ... |
412 | 117 | Name Uploaded to Version When Failures | 133 | Name Uploaded to Version When Failures |
413 | @@ -122,7 +138,6 @@ | |||
414 | 122 | 138 | ||
415 | 123 | >>> browser.getLink("Related Projects").click() | 139 | >>> browser.getLink("Related Projects").click() |
416 | 124 | >>> print extract_text(find_tag_by_id(browser.contents, 'projects')) | 140 | >>> print extract_text(find_tag_by_id(browser.contents, 'projects')) |
417 | 125 | Related projects | ||
418 | 126 | 1...5 of 5 results | 141 | 1...5 of 5 results |
419 | 127 | ... | 142 | ... |
420 | 128 | Name Bugs Blueprints Questions | 143 | Name Bugs Blueprints Questions |
421 | 129 | 144 | ||
422 | === modified file 'lib/lp/soyuz/templates/person-maintained-packages.pt' | |||
423 | --- lib/lp/soyuz/templates/person-maintained-packages.pt 2009-07-17 17:59:07 +0000 | |||
424 | +++ lib/lp/soyuz/templates/person-maintained-packages.pt 2009-09-08 11:49:02 +0000 | |||
425 | @@ -4,19 +4,27 @@ | |||
426 | 4 | xmlns:tal="http://xml.zope.org/namespaces/tal" | 4 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
427 | 5 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 5 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
428 | 6 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | 6 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
433 | 7 | xml:lang="en" | 7 | metal:use-macro="view/macro:page/main_only" |
430 | 8 | lang="en" | ||
431 | 9 | dir="ltr" | ||
432 | 10 | metal:use-macro="view/macro:page/onecolumn" | ||
434 | 11 | i18n:domain="launchpad" | 8 | i18n:domain="launchpad" |
435 | 12 | > | 9 | > |
436 | 13 | 10 | ||
437 | 14 | <body> | 11 | <body> |
438 | 15 | 12 | ||
439 | 13 | <div metal:fill-slot="heading"> | ||
440 | 14 | <h1 tal:content="view/page_title"/> | ||
441 | 15 | </div> | ||
442 | 16 | |||
443 | 16 | <div metal:fill-slot="main"> | 17 | <div metal:fill-slot="main"> |
445 | 17 | <div id="packages"> | 18 | <div class="top-portlet" id="navlinks"> |
446 | 19 | <ul class="horizontal"> | ||
447 | 20 | <li><a tal:replace="structure view/menu:navigation/summary/render"/></li> | ||
448 | 21 | <li><a tal:replace="structure view/menu:navigation/uploaded/render"/></li> | ||
449 | 22 | <li><a tal:replace="structure view/menu:navigation/ppa/render"/></li> | ||
450 | 23 | <li><a tal:replace="structure view/menu:navigation/projects/render"/></li> | ||
451 | 24 | </ul> | ||
452 | 25 | </div> | ||
453 | 18 | 26 | ||
455 | 19 | <h1>Maintained packages</h1> | 27 | <div id="packages" class="top-portlet"> |
456 | 20 | 28 | ||
457 | 21 | <tal:navigation_top | 29 | <tal:navigation_top |
458 | 22 | replace="structure view/batchnav/@@+navigation-links-upper" /> | 30 | replace="structure view/batchnav/@@+navigation-links-upper" /> |
459 | 23 | 31 | ||
460 | === modified file 'lib/lp/soyuz/templates/person-ppa-packages.pt' | |||
461 | --- lib/lp/soyuz/templates/person-ppa-packages.pt 2009-07-17 17:59:07 +0000 | |||
462 | +++ lib/lp/soyuz/templates/person-ppa-packages.pt 2009-09-08 11:49:02 +0000 | |||
463 | @@ -4,19 +4,31 @@ | |||
464 | 4 | xmlns:tal="http://xml.zope.org/namespaces/tal" | 4 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
465 | 5 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 5 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
466 | 6 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | 6 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
471 | 7 | xml:lang="en" | 7 | metal:use-macro="view/macro:page/main_only" |
468 | 8 | lang="en" | ||
469 | 9 | dir="ltr" | ||
470 | 10 | metal:use-macro="view/macro:page/onecolumn" | ||
472 | 11 | i18n:domain="launchpad" | 8 | i18n:domain="launchpad" |
473 | 12 | > | 9 | > |
474 | 13 | 10 | ||
475 | 14 | <body> | 11 | <body> |
476 | 15 | 12 | ||
477 | 13 | <div metal:fill-slot="heading"> | ||
478 | 14 | <h1 tal:content="view/page_title"/> | ||
479 | 15 | </div> | ||
480 | 16 | |||
481 | 16 | <div metal:fill-slot="main"> | 17 | <div metal:fill-slot="main"> |
483 | 17 | <div id="packages"> | 18 | <div class="top-portlet" id="navlinks"> |
484 | 19 | <ul class="horizontal"> | ||
485 | 20 | <li> | ||
486 | 21 | <a tal:replace="structure view/menu:navigation/summary/render"/></li> | ||
487 | 22 | <li> | ||
488 | 23 | <a tal:replace="structure view/menu:navigation/uploaded/render"/></li> | ||
489 | 24 | <li> | ||
490 | 25 | <a tal:replace="structure view/menu:navigation/maintained/render"/></li> | ||
491 | 26 | <li> | ||
492 | 27 | <a tal:replace="structure view/menu:navigation/projects/render"/></li> | ||
493 | 28 | </ul> | ||
494 | 29 | </div> | ||
495 | 18 | 30 | ||
497 | 19 | <h1>PPA packages</h1> | 31 | <div id="packages" class="top-portlet"> |
498 | 20 | 32 | ||
499 | 21 | <tal:navigation_top | 33 | <tal:navigation_top |
500 | 22 | replace="structure view/batchnav/@@+navigation-links-upper" /> | 34 | replace="structure view/batchnav/@@+navigation-links-upper" /> |
501 | 23 | 35 | ||
502 | === modified file 'lib/lp/soyuz/templates/person-uploaded-packages.pt' | |||
503 | --- lib/lp/soyuz/templates/person-uploaded-packages.pt 2009-07-17 17:59:07 +0000 | |||
504 | +++ lib/lp/soyuz/templates/person-uploaded-packages.pt 2009-09-08 11:49:02 +0000 | |||
505 | @@ -4,19 +4,31 @@ | |||
506 | 4 | xmlns:tal="http://xml.zope.org/namespaces/tal" | 4 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
507 | 5 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 5 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
508 | 6 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | 6 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
513 | 7 | xml:lang="en" | 7 | metal:use-macro="view/macro:page/main_only" |
510 | 8 | lang="en" | ||
511 | 9 | dir="ltr" | ||
512 | 10 | metal:use-macro="view/macro:page/onecolumn" | ||
514 | 11 | i18n:domain="launchpad" | 8 | i18n:domain="launchpad" |
515 | 12 | > | 9 | > |
516 | 13 | 10 | ||
517 | 14 | <body> | 11 | <body> |
518 | 15 | 12 | ||
519 | 13 | <div metal:fill-slot="heading"> | ||
520 | 14 | <h1 tal:content="view/page_title"/> | ||
521 | 15 | </div> | ||
522 | 16 | |||
523 | 16 | <div metal:fill-slot="main"> | 17 | <div metal:fill-slot="main"> |
525 | 17 | <div id="packages"> | 18 | <div class="top-portlet" id="navlinks"> |
526 | 19 | <ul class="horizontal"> | ||
527 | 20 | <li> | ||
528 | 21 | <a tal:replace="structure view/menu:navigation/summary/render"/></li> | ||
529 | 22 | <li> | ||
530 | 23 | <a tal:replace="structure view/menu:navigation/maintained/render"/></li> | ||
531 | 24 | <li> | ||
532 | 25 | <a tal:replace="structure view/menu:navigation/ppa/render"/></li> | ||
533 | 26 | <li> | ||
534 | 27 | <a tal:replace="structure view/menu:navigation/projects/render"/></li> | ||
535 | 28 | </ul> | ||
536 | 29 | </div> | ||
537 | 18 | 30 | ||
539 | 19 | <h1>Uploaded packages</h1> | 31 | <div id="packages" class="top-portlet"> |
540 | 20 | 32 | ||
541 | 21 | <tal:navigation_top | 33 | <tal:navigation_top |
542 | 22 | replace="structure view/batchnav/@@+navigation-links-upper" /> | 34 | replace="structure view/batchnav/@@+navigation-links-upper" /> |
= Summary = +related- software and associated pages to 3.0
Convert ~person/
Curtis has already approved the UI, I just need a secondary UI review and a
code review please!
== Pre-implementation notes ==
Chatted to Curtis about what to do with the 2nd level nav menus. We decided
to replace them with an <ul class="horizontal"> set of links instead. The
result looks better than expected!
== Implementation details ==
There are five templates converted, which are the +related-software page
itself and the 4 related pages for uploaded, maintained and PPA packages, and
related projects.
I also did some test cleaning by moving a test from the PPA stories (what the related- software doctest. I also
heck was it doing there!) into the xx-person-
removed unnecessary testing from the stories/foaf equivalent test since it was
just duplicating the soyuz story.
== Tests == related- software
bin/test -cvvt xx-person-
== Demo and Q/A == /launchpad. dev/~mark/ +related- software
https:/
Click on the 4 links at the top to see the other pages.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: soyuz/templates /person- ppa-packages. pt /launchpad/ pagetitles. py soyuz/templates /person- maintained- packages. pt soyuz/templates /person- uploaded- packages. pt soyuz/stories/ soyuz/xx- person- packages. txt registry/ templates/ person- related- software. pt registry/ templates/ person- related- projects. pt soyuz/stories/ ppa/xx- ppa-navigation. txt registry/ stories/ foaf/xx- person- packages. txt registry/ browser/ person. py
lib/lp/
lib/canonical
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
== Pylint notices ==
lib/lp/ registry/ browser/ person. py interface' (No module named
118: [F0401] Unable to import 'lazr.delegates' (No module named delegates)
119: [F0401] Unable to import 'lazr.config' (No module named config)
120: [F0401] Unable to import 'lazr.restful.
restful)