Merge lp:~julian-edwards/launchpad/related-software-30 into lp:launchpad

Proposed by Julian Edwards
Status: Merged
Merged at revision: not available
Proposed branch: lp:~julian-edwards/launchpad/related-software-30
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~julian-edwards/launchpad/related-software-30
Reviewer Review Type Date Requested Status
Michael Nelson (community) ui Approve
Brad Crittenden (community) code Approve
Review via email: mp+11354@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) wrote :

= Summary =
Convert ~person/+related-software and associated pages to 3.0

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
heck was it doing there!) into the xx-person-related-software doctest. I also
removed unnecessary testing from the stories/foaf equivalent test since it was
just duplicating the soyuz story.

== Tests ==
bin/test -cvvt xx-person-related-software

== Demo and Q/A ==
https://launchpad.dev/~mark/+related-software
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:
  lib/lp/soyuz/templates/person-ppa-packages.pt
  lib/canonical/launchpad/pagetitles.py
  lib/lp/soyuz/templates/person-maintained-packages.pt
  lib/lp/soyuz/templates/person-uploaded-packages.pt
  lib/lp/soyuz/stories/soyuz/xx-person-packages.txt
  lib/lp/registry/templates/person-related-software.pt
  lib/lp/registry/templates/person-related-projects.pt
  lib/lp/soyuz/stories/ppa/xx-ppa-navigation.txt
  lib/lp/registry/stories/foaf/xx-person-packages.txt
  lib/lp/registry/browser/person.py

== Pylint notices ==

lib/lp/registry/browser/person.py
    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.interface' (No module named
restful)

Revision history for this message
Brad Crittenden (bac) wrote :
Download full text (5.3 KiB)

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/launchpad/pagetitles.py'
--- lib/canonical/launchpad/pagetitles.py 2009-09-05 07:03:47 +0000
> +++ lib/canonical/launchpad/pagetitles.py 2009-09-07 20:32:50 +0000
> @@ -747,8 +747,6 @@
>
> person_karma = ContextDisplayName(smartquote("%s's karma in Launchpad"))
>
> -person_maintained_packages = ContextDisplayName('Software maintained by %s')
> -
> person_mentoringoffers = ContextTitle('Mentoring offered by %s')
>
> def person_mergeproposals(context, view):
> @@ -765,12 +763,6 @@
>
> person_participation = ContextTitle("Team participation by %s")
>
> -person_ppa_packages = ContextDisplayName('PPA packages related to %s')
> -
> -person_related_projects = ContextDisplayName('Projects related to %s')
> -
> -person_related_software = ContextDisplayName('Software related to %s')
> -
> person_review = ContextDisplayName("Review %s")
>
> person_specfeedback = ContextDisplayName('Feature feedback requests for %s')
> @@ -786,8 +778,6 @@
>
> person_teamhierarchy = ContextDisplayName('Team hierarchy for %s')
>
> -person_uploaded_packages = ContextDisplayName('Software uploaded by %s')
> -
> pofile_filter = FilteredTranslationsTitle(
> smartquote('Translations by %(person)s in "%(title)s"'))
>

> === modified file 'lib/lp/registry/browser/person.py'
> --- lib/lp/registry/browser/person.py 2009-09-05 03:33:24 +0000
> +++ lib/lp/registry/browser/person.py 2009-09-07 20:32:50 +0000
> @@ -4834,6 +4834,10 @@
>
> max_results_to_display = config.launchpad.default_batch_size
>
> + @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_projects(self):
> """Return a list of project dicts owned or driven by this person.
> === modified file 'lib/lp/registry/stories/foaf/xx-person-packages.txt'
> --- lib/lp/registry/stories/foaf/xx-person-packages.txt 2009-08-13 15:12:16 +0000
> +++ lib/lp/registry/stories/foaf/xx-person-packages.txt 2009-09-08 10:49:20 +0000
> @@ -5,18 +5,10 @@
>
> >>> anon_browser.open('http://launchpad.dev/~mark')
> >>> anon_browser.getLink('Related Software').click()
> - >>> print_navigation_links(anon_browser.contents)
> - Profile: ...
> - Related Software
> - Karma: ...
>
> >>> print anon_browser.title
> Software related to Mark Shuttleworth
> >>> print anon_browser.url
> http://launchpad.dev/~mark/+related-software
>
> -That page displays a table, the with list of 'Maintained'packages as
> -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/soyuz/xx-person-packages.txt for details.

> === modified file 'lib/lp/registry/templates/person-related-projects.pt'
> --- lib/lp/registry...

Read more...

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

> > + <div class="top-portlet" id="navlinks">
> > + <ul class="horizontal">
> > + <li>
> > + <a tal:replace="structure
> view/menu:navigation/summary/render"/></li>
> > + <li>
> > + <a tal:replace="structure
> view/menu:navigation/maintained/render"/></li>
> > + <li>
> > + <a tal:replace="structure
> view/menu:navigation/uploaded/render"/></li>
> > + <li>
> > + <a tal:replace="structure view/menu:navigation/ppa/render"/></li>
> > + </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="structure view/menu:navigation/summary/render"/></li>
> <li>
> <a tal:replace="structure
> view/menu:navigation/maintained/render"/></li>
> <li>
> <a tal:replace="structure view/menu:navigation/uploaded/render"/></li>
> <li>
> <a tal:replace="structure view/menu:navigation/ppa/render"/></li>
> <li>
> <a tal:replace="structure view/menu:navigation/projects/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/uploaded/enabled"

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.

Revision history for this message
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="structure view/menu:navigation/summary/
>> render"/></li>
>> <li>
>> <a tal:replace="structure
>> view/menu:navigation/maintained/render"/></li>
>> <li>
>> <a tal:replace="structure view/menu:navigation/uploaded/
>> render"/></li>
>> <li>
>> <a tal:replace="structure view/menu:navigation/ppa/render"/
>> ></li>
>> <li>
>> <a tal:replace="structure view/menu:navigation/projects/
>> 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/uploaded/enabled"

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://launchpad.dev/~mark/+related-software"
      class="menu-link-summary sprite info">Summary</a></li>
       <li>
         <a href="https://launchpad.dev/~mark/+maintained-packages"
      class="menu-link-maintained sprite info">Maintained Packages</
a></li>
       <li>
         <a href="https://launchpad.dev/~mark/+uploaded-packages"
      class="menu-link-uploaded sprite info">Uploaded Packages</a></li>
       <li>
         <a href="https://launchpad.dev/~mark/+ppa-packages"
      class="menu-link-ppa sprite info">PPA Packages</a></li>
       <li>
         <span class="menu-link-projects nolink
               sprite info">Related Projects</span></li>
     </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.

Revision history for this message
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:

https://code.edge.launchpad.net/~adeuring/launchpad/bug-426241-bugnomination-edit.pt-3.0-layout/+merge/11364

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.

review: Approve (ui)
Revision history for this message
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

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
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
6 person_karma = ContextDisplayName(smartquote("%s's karma in Launchpad"))
7
8-person_maintained_packages = ContextDisplayName('Software maintained by %s')
9-
10 person_mentoringoffers = ContextTitle('Mentoring offered by %s')
11
12 def person_mergeproposals(context, view):
13@@ -765,12 +763,6 @@
14
15 person_participation = ContextTitle("Team participation by %s")
16
17-person_ppa_packages = ContextDisplayName('PPA packages related to %s')
18-
19-person_related_projects = ContextDisplayName('Projects related to %s')
20-
21-person_related_software = ContextDisplayName('Software related to %s')
22-
23 person_review = ContextDisplayName("Review %s")
24
25 person_specfeedback = ContextDisplayName('Feature feedback requests for %s')
26@@ -786,8 +778,6 @@
27
28 person_teamhierarchy = ContextDisplayName('Team hierarchy for %s')
29
30-person_uploaded_packages = ContextDisplayName('Software uploaded by %s')
31-
32 pofile_filter = FilteredTranslationsTitle(
33 smartquote('Translations by %(person)s in "%(title)s"'))
34
35
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 def summary(self):
41 target = '+related-software'
42 text = 'Summary'
43- return Link(target, text)
44+ return Link(target, text, icon='info')
45
46 def maintained(self):
47 target = '+maintained-packages'
48@@ -881,17 +881,17 @@
49 def uploaded(self):
50 target = '+uploaded-packages'
51 text = 'Uploaded Packages'
52- return Link(target, text)
53+ return Link(target, text, icon='info')
54
55 def ppa(self):
56 target = '+ppa-packages'
57 text = 'PPA Packages'
58- return Link(target, text)
59+ return Link(target, text, icon='info')
60
61 def projects(self):
62 target = '+related-projects'
63 text = 'Related Projects'
64- return Link(target, text)
65+ return Link(target, text, icon='info')
66
67
68 class PersonOverviewMenu(ApplicationMenu, CommonMenuLinks):
69@@ -4834,6 +4834,10 @@
70
71 max_results_to_display = config.launchpad.default_batch_size
72
73+ @property
74+ def page_title(self):
75+ return "Software related to " + self.context.title
76+
77 @cachedproperty
78 def related_projects(self):
79 """Return a list of project dicts owned or driven by this person.
80@@ -5057,6 +5061,10 @@
81 packages = self.context.getLatestMaintainedPackages()
82 self.setUpBatch(packages)
83
84+ @property
85+ def page_title(self):
86+ return "Software maintained by " + self.context.title
87+
88
89 class PersonUploadedPackagesView(PersonRelatedSoftwareView):
90 """View for +uploaded-packages."""
91@@ -5066,6 +5074,10 @@
92 packages = self.context.getLatestUploadedButNotMaintainedPackages()
93 self.setUpBatch(packages)
94
95+ @property
96+ def page_title(self):
97+ return "Software uploaded by " + self.context.title
98+
99
100 class PersonPPAPackagesView(PersonRelatedSoftwareView):
101 """View for +ppa-packages."""
102@@ -5082,6 +5094,10 @@
103 packages_batch = self.filterPPAPackageList(packages_batch)
104 self.batch = self._addStatsToPackages(packages_batch)
105
106+ @property
107+ def page_title(self):
108+ return "PPA packages related to " + self.context.title
109+
110
111 class PersonRelatedProjectsView(PersonRelatedSoftwareView):
112 """View for +related-projects."""
113@@ -5092,6 +5108,10 @@
114 self.related_projects, self.request)
115 self.batch = list(self.batchnav.currentBatch())
116
117+ @property
118+ def page_title(self):
119+ return "Projects related to " + self.context.title
120+
121
122 class PersonOAuthTokensView(LaunchpadView):
123 """Where users can see/revoke their non-expired access tokens."""
124
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
130 >>> anon_browser.open('http://launchpad.dev/~mark')
131 >>> anon_browser.getLink('Related Software').click()
132- >>> print_navigation_links(anon_browser.contents)
133- Profile: ...
134- Related Software
135- Karma: ...
136
137 >>> print anon_browser.title
138 Software related to Mark Shuttleworth
139 >>> print anon_browser.url
140 http://launchpad.dev/~mark/+related-software
141
142-That page displays a table, the with list of 'Maintained'packages as
143-well as the list of 'Uploaded' packages. The table also shows the
144-number of open bugs and questions filed against each package.
145-
146 Please see pagetests/soyuz/xx-person-packages.txt for details.
147
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 xmlns:tal="http://xml.zope.org/namespaces/tal"
153 xmlns:metal="http://xml.zope.org/namespaces/metal"
154 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
155- xml:lang="en"
156- lang="en"
157- dir="ltr"
158- metal:use-macro="view/macro:page/onecolumn"
159+ metal:use-macro="view/macro:page/main_only"
160 i18n:domain="launchpad"
161 >
162
163 <body>
164
165+<div metal:fill-slot="heading">
166+ <h1 tal:content="view/page_title"/>
167+</div>
168+
169 <div metal:fill-slot="main">
170-
171- <div id="projects">
172+ <div class="top-portlet" id="navlinks">
173+ <ul class="horizontal">
174+ <li>
175+ <a tal:replace="structure view/menu:navigation/summary/render"/></li>
176+ <li>
177+ <a tal:replace="structure view/menu:navigation/maintained/render"/></li>
178+ <li>
179+ <a tal:replace="structure view/menu:navigation/uploaded/render"/></li>
180+ <li>
181+ <a tal:replace="structure view/menu:navigation/ppa/render"/></li>
182+ </ul>
183+ </div>
184+
185+
186+ <div id="projects" class="top-portlet">
187 <a name="projects" />
188- <h1>Related projects</h1>
189
190 <tal:navigation_top
191 replace="structure view/batchnav/@@+navigation-links-upper" />
192
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 xmlns:tal="http://xml.zope.org/namespaces/tal"
198 xmlns:metal="http://xml.zope.org/namespaces/metal"
199 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
200- xml:lang="en"
201- lang="en"
202- dir="ltr"
203- metal:use-macro="view/macro:page/onecolumn"
204+ metal:use-macro="view/macro:page/main_only"
205 i18n:domain="launchpad"
206 >
207
208 <body>
209
210+<div metal:fill-slot="heading">
211+ <h1 tal:content="view/page_title"/>
212+</div>
213+
214 <div metal:fill-slot="main">
215+ <div class="top-portlet" id="navlinks">
216+ <ul class="horizontal">
217+ Full listings:
218+ <li>
219+ <a tal:replace="structure view/menu:navigation/maintained/render"/></li>
220+ <li>
221+ <a tal:replace="structure view/menu:navigation/uploaded/render"/></li>
222+ <li>
223+ <a tal:replace="structure view/menu:navigation/ppa/render"/></li>
224+ <li>
225+ <a tal:replace="structure view/menu:navigation/projects/render"/></li>
226+ </ul>
227+ </div>
228+
229 <div id="packages">
230
231 <tal:maintained-packages
232 define="sourcepackagereleases view/get_latest_maintained_packages_with_stats"
233 condition="sourcepackagereleases">
234
235- <h1>Maintained packages</h1>
236+ <div class="top-portlet">
237+ <h2>Maintained packages</h2>
238
239 <tal:message replace="view/maintained_packages_header_message"/>
240 <table class="listing">
241@@ -38,13 +54,15 @@
242 <div metal:use-macro="context/@@+person-macros/sourcepackagerelease-rows" />
243 </tbody>
244 </table>
245+ </div>
246 </tal:maintained-packages>
247
248 <tal:uploaded-packages
249 define="sourcepackagereleases view/get_latest_uploaded_but_not_maintained_packages_with_stats"
250 condition="sourcepackagereleases">
251
252- <h1>Uploaded packages</h1>
253+ <div class="top-portlet">
254+ <h2>Uploaded packages</h2>
255
256 <tal:message replace="view/uploaded_packages_header_message"/>
257 <table class="listing">
258@@ -62,13 +80,15 @@
259
260 <div metal:use-macro="context/@@+person-macros/sourcepackagerelease-rows" />
261 </table>
262+ </div>
263 </tal:uploaded-packages>
264
265 <tal:ppa-packages
266 define="sourcepackagereleases view/get_latest_uploaded_ppa_packages_with_stats"
267 condition="sourcepackagereleases">
268
269- <h1>PPA packages</h1>
270+ <div class="top-portlet">
271+ <h2>PPA packages</h2>
272
273 <tal:message replace="view/ppa_packages_header_message"/>
274 <table class="listing">
275@@ -86,13 +106,14 @@
276
277 <div metal:use-macro="template/macros/sourcepackagerelease-ppa-rows" />
278 </table>
279+ </div>
280 </tal:ppa-packages>
281
282- </div>
283+ </div><!--id packages-->
284
285- <div id="projects">
286+ <div id="projects" class="top-portlet">
287 <a name="projects" />
288- <h1>Related projects</h1>
289+ <h2>Related projects</h2>
290
291 <span id="limit-encountered"
292 tal:content="view/projects_header_message" />
293
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 >>> anon_browser.getLink('Previous').url
299 'http://launchpad.dev/%7Ecprov/+archive/ppa/+index?start=1&batch=1'
300
301-== Maintained Packages link ==
302-
303-The Maintained Packages link only appears if the person or team has
304-maintained packages to show. No-priv does not maintain packages.
305-
306- >>> anon_browser.open("http://launchpad.dev/~no-priv")
307- >>> print_tag_with_id(anon_browser.contents, 'ppas')
308- Personal package archives
309- PPA for No Privileges Person
310- >>> anon_browser.open(
311- ... "http://launchpad.dev/~no-priv/+maintained-packages")
312- >>> print extract_text(
313- ... find_tag_by_id(anon_browser.contents, 'packages'))
314- Maintained packages...
315- No Privileges Person does not maintain any packages.
316-
317-Mark has packages that he maintains.
318-
319- >>> anon_browser.open("http://launchpad.dev/~mark")
320- >>> print_tag_with_id(anon_browser.contents, 'ppas')
321- Personal package archives
322- PPA for Mark Shuttleworth
323- Maintained Packages
324- >>> anon_browser.getLink(url="+maintained-packages").click()
325- >>> print extract_text(
326- ... find_tag_by_id(anon_browser.contents, 'packages'))
327- Maintained packages...
328- alsa-utils ... 1.0.9a-4...
329
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
335 This page is just a summary of the user's packages and will only
336 display up to the most recent 30 items in each category. However, it
337-has a navigation sub-menu that takes the user to batched listings in
338-each category where all items can be perused.
339-
340- >>> print_navigation_links(browser.contents)
341- Profile: http://launchpad.dev/~name16
342- Related Software
343- Karma: http://launchpad.dev/~name16/+karma
344- Personal Package Archives: http://launchpad.dev/~name16#ppas
345- Summary
346- Maintained Packages: http://launchpad.dev/~name16/+maintained-packages
347- Uploaded Packages: http://launchpad.dev/~name16/+uploaded-packages
348- PPA Packages: http://launchpad.dev/~name16/+ppa-packages
349- Related Projects: http://launchpad.dev/~name16/+related-projects
350+has more links that take the user to batched listings in each category
351+where all items can be perused.
352+
353+ >>> print extract_text(find_tag_by_id(browser.contents, 'navlinks'))
354+ Full listings:
355+ Maintained Packages
356+ Uploaded Packages
357+ PPA Packages
358+ Related Projects
359+
360+ >>> print browser.getLink("Maintained Packages").url
361+ http://launchpad.dev/~name16/+maintained-packages
362+ >>> print browser.getLink("Uploaded Packages").url
363+ http://launchpad.dev/~name16/+uploaded-packages
364+ >>> print browser.getLink("PPA Packages").url
365+ http://launchpad.dev/~name16/+ppa-packages
366+ >>> print browser.getLink("Related Projects").url
367+ http://launchpad.dev/~name16/+related-projects
368
369 Each category on the summary page has a heading that shows how many
370 packages are being displayed.
371@@ -87,19 +92,31 @@
372 >>> browser.open("http://launchpad.dev/~mark/+related-software")
373 >>> browser.getLink("Maintained Packages").click()
374 >>> print extract_text(find_tag_by_id(browser.contents, 'packages'))
375- Maintained packages
376 1...5 of 7 results
377 ...
378 Name Uploaded to Version When Failures Bugs Questions
379 alsa-utils Debian Sid 1.0.9a-4 2005-07-01 None 0 0
380 ...
381
382+The Maintained Packages page only has data if the person or team has
383+maintained packages to show. No-priv does not maintain packages.
384+
385+ >>> anon_browser.open("http://launchpad.dev/~no-priv")
386+ >>> print_tag_with_id(anon_browser.contents, 'ppas')
387+ Personal package archives
388+ PPA for No Privileges Person
389+ >>> anon_browser.open(
390+ ... "http://launchpad.dev/~no-priv/+maintained-packages")
391+ >>> print extract_text(
392+ ... find_tag_by_id(anon_browser.contents, 'packages'))
393+ Name...
394+ No Privileges Person does not maintain any packages.
395+
396 The navigation link to "Uploaded Packages" takes the user to the
397 page that lists uploaded packages in batches.
398
399 >>> browser.getLink("Uploaded Packages").click()
400 >>> print extract_text(find_tag_by_id(browser.contents, 'packages'))
401- Uploaded packages
402 1...5 of 6 results
403 ...
404 Name Uploaded to Version When Failures Bugs Questions
405@@ -111,7 +128,6 @@
406
407 >>> browser.getLink("PPA Packages").click()
408 >>> print extract_text(find_tag_by_id(browser.contents, 'packages'))
409- PPA packages
410 1...1 of 1 result
411 ...
412 Name Uploaded to Version When Failures
413@@ -122,7 +138,6 @@
414
415 >>> browser.getLink("Related Projects").click()
416 >>> print extract_text(find_tag_by_id(browser.contents, 'projects'))
417- Related projects
418 1...5 of 5 results
419 ...
420 Name Bugs Blueprints Questions
421
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 xmlns:tal="http://xml.zope.org/namespaces/tal"
427 xmlns:metal="http://xml.zope.org/namespaces/metal"
428 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
429- xml:lang="en"
430- lang="en"
431- dir="ltr"
432- metal:use-macro="view/macro:page/onecolumn"
433+ metal:use-macro="view/macro:page/main_only"
434 i18n:domain="launchpad"
435 >
436
437 <body>
438
439+<div metal:fill-slot="heading">
440+ <h1 tal:content="view/page_title"/>
441+</div>
442+
443 <div metal:fill-slot="main">
444- <div id="packages">
445+ <div class="top-portlet" id="navlinks">
446+ <ul class="horizontal">
447+ <li><a tal:replace="structure view/menu:navigation/summary/render"/></li>
448+ <li><a tal:replace="structure view/menu:navigation/uploaded/render"/></li>
449+ <li><a tal:replace="structure view/menu:navigation/ppa/render"/></li>
450+ <li><a tal:replace="structure view/menu:navigation/projects/render"/></li>
451+ </ul>
452+ </div>
453
454- <h1>Maintained packages</h1>
455+ <div id="packages" class="top-portlet">
456
457 <tal:navigation_top
458 replace="structure view/batchnav/@@+navigation-links-upper" />
459
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 xmlns:tal="http://xml.zope.org/namespaces/tal"
465 xmlns:metal="http://xml.zope.org/namespaces/metal"
466 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
467- xml:lang="en"
468- lang="en"
469- dir="ltr"
470- metal:use-macro="view/macro:page/onecolumn"
471+ metal:use-macro="view/macro:page/main_only"
472 i18n:domain="launchpad"
473 >
474
475 <body>
476
477+<div metal:fill-slot="heading">
478+ <h1 tal:content="view/page_title"/>
479+</div>
480+
481 <div metal:fill-slot="main">
482- <div id="packages">
483+ <div class="top-portlet" id="navlinks">
484+ <ul class="horizontal">
485+ <li>
486+ <a tal:replace="structure view/menu:navigation/summary/render"/></li>
487+ <li>
488+ <a tal:replace="structure view/menu:navigation/uploaded/render"/></li>
489+ <li>
490+ <a tal:replace="structure view/menu:navigation/maintained/render"/></li>
491+ <li>
492+ <a tal:replace="structure view/menu:navigation/projects/render"/></li>
493+ </ul>
494+ </div>
495
496- <h1>PPA packages</h1>
497+ <div id="packages" class="top-portlet">
498
499 <tal:navigation_top
500 replace="structure view/batchnav/@@+navigation-links-upper" />
501
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 xmlns:tal="http://xml.zope.org/namespaces/tal"
507 xmlns:metal="http://xml.zope.org/namespaces/metal"
508 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
509- xml:lang="en"
510- lang="en"
511- dir="ltr"
512- metal:use-macro="view/macro:page/onecolumn"
513+ metal:use-macro="view/macro:page/main_only"
514 i18n:domain="launchpad"
515 >
516
517 <body>
518
519+<div metal:fill-slot="heading">
520+ <h1 tal:content="view/page_title"/>
521+</div>
522+
523 <div metal:fill-slot="main">
524- <div id="packages">
525+ <div class="top-portlet" id="navlinks">
526+ <ul class="horizontal">
527+ <li>
528+ <a tal:replace="structure view/menu:navigation/summary/render"/></li>
529+ <li>
530+ <a tal:replace="structure view/menu:navigation/maintained/render"/></li>
531+ <li>
532+ <a tal:replace="structure view/menu:navigation/ppa/render"/></li>
533+ <li>
534+ <a tal:replace="structure view/menu:navigation/projects/render"/></li>
535+ </ul>
536+ </div>
537
538- <h1>Uploaded packages</h1>
539+ <div id="packages" class="top-portlet">
540
541 <tal:navigation_top
542 replace="structure view/batchnav/@@+navigation-links-upper" />