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

Proposed by Julian Edwards
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
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
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
=== 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 @@
747747
748person_karma = ContextDisplayName(smartquote("%s's karma in Launchpad"))748person_karma = ContextDisplayName(smartquote("%s's karma in Launchpad"))
749749
750person_maintained_packages = ContextDisplayName('Software maintained by %s')
751
752person_mentoringoffers = ContextTitle('Mentoring offered by %s')750person_mentoringoffers = ContextTitle('Mentoring offered by %s')
753751
754def person_mergeproposals(context, view):752def person_mergeproposals(context, view):
@@ -765,12 +763,6 @@
765763
766person_participation = ContextTitle("Team participation by %s")764person_participation = ContextTitle("Team participation by %s")
767765
768person_ppa_packages = ContextDisplayName('PPA packages related to %s')
769
770person_related_projects = ContextDisplayName('Projects related to %s')
771
772person_related_software = ContextDisplayName('Software related to %s')
773
774person_review = ContextDisplayName("Review %s")766person_review = ContextDisplayName("Review %s")
775767
776person_specfeedback = ContextDisplayName('Feature feedback requests for %s')768person_specfeedback = ContextDisplayName('Feature feedback requests for %s')
@@ -786,8 +778,6 @@
786778
787person_teamhierarchy = ContextDisplayName('Team hierarchy for %s')779person_teamhierarchy = ContextDisplayName('Team hierarchy for %s')
788780
789person_uploaded_packages = ContextDisplayName('Software uploaded by %s')
790
791pofile_filter = FilteredTranslationsTitle(781pofile_filter = FilteredTranslationsTitle(
792 smartquote('Translations by %(person)s in "%(title)s"'))782 smartquote('Translations by %(person)s in "%(title)s"'))
793783
794784
=== 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
@@ -870,7 +870,7 @@
870 def summary(self):870 def summary(self):
871 target = '+related-software'871 target = '+related-software'
872 text = 'Summary'872 text = 'Summary'
873 return Link(target, text)873 return Link(target, text, icon='info')
874874
875 def maintained(self):875 def maintained(self):
876 target = '+maintained-packages'876 target = '+maintained-packages'
@@ -881,17 +881,17 @@
881 def uploaded(self):881 def uploaded(self):
882 target = '+uploaded-packages'882 target = '+uploaded-packages'
883 text = 'Uploaded Packages'883 text = 'Uploaded Packages'
884 return Link(target, text)884 return Link(target, text, icon='info')
885885
886 def ppa(self):886 def ppa(self):
887 target = '+ppa-packages'887 target = '+ppa-packages'
888 text = 'PPA Packages'888 text = 'PPA Packages'
889 return Link(target, text)889 return Link(target, text, icon='info')
890890
891 def projects(self):891 def projects(self):
892 target = '+related-projects'892 target = '+related-projects'
893 text = 'Related Projects'893 text = 'Related Projects'
894 return Link(target, text)894 return Link(target, text, icon='info')
895895
896896
897class PersonOverviewMenu(ApplicationMenu, CommonMenuLinks):897class PersonOverviewMenu(ApplicationMenu, CommonMenuLinks):
@@ -4834,6 +4834,10 @@
48344834
4835 max_results_to_display = config.launchpad.default_batch_size4835 max_results_to_display = config.launchpad.default_batch_size
48364836
4837 @property
4838 def page_title(self):
4839 return "Software related to " + self.context.title
4840
4837 @cachedproperty4841 @cachedproperty
4838 def related_projects(self):4842 def related_projects(self):
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.
@@ -5057,6 +5061,10 @@
5057 packages = self.context.getLatestMaintainedPackages()5061 packages = self.context.getLatestMaintainedPackages()
5058 self.setUpBatch(packages)5062 self.setUpBatch(packages)
50595063
5064 @property
5065 def page_title(self):
5066 return "Software maintained by " + self.context.title
5067
50605068
5061class PersonUploadedPackagesView(PersonRelatedSoftwareView):5069class PersonUploadedPackagesView(PersonRelatedSoftwareView):
5062 """View for +uploaded-packages."""5070 """View for +uploaded-packages."""
@@ -5066,6 +5074,10 @@
5066 packages = self.context.getLatestUploadedButNotMaintainedPackages()5074 packages = self.context.getLatestUploadedButNotMaintainedPackages()
5067 self.setUpBatch(packages)5075 self.setUpBatch(packages)
50685076
5077 @property
5078 def page_title(self):
5079 return "Software uploaded by " + self.context.title
5080
50695081
5070class PersonPPAPackagesView(PersonRelatedSoftwareView):5082class PersonPPAPackagesView(PersonRelatedSoftwareView):
5071 """View for +ppa-packages."""5083 """View for +ppa-packages."""
@@ -5082,6 +5094,10 @@
5082 packages_batch = self.filterPPAPackageList(packages_batch)5094 packages_batch = self.filterPPAPackageList(packages_batch)
5083 self.batch = self._addStatsToPackages(packages_batch)5095 self.batch = self._addStatsToPackages(packages_batch)
50845096
5097 @property
5098 def page_title(self):
5099 return "PPA packages related to " + self.context.title
5100
50855101
5086class PersonRelatedProjectsView(PersonRelatedSoftwareView):5102class PersonRelatedProjectsView(PersonRelatedSoftwareView):
5087 """View for +related-projects."""5103 """View for +related-projects."""
@@ -5092,6 +5108,10 @@
5092 self.related_projects, self.request)5108 self.related_projects, self.request)
5093 self.batch = list(self.batchnav.currentBatch())5109 self.batch = list(self.batchnav.currentBatch())
50945110
5111 @property
5112 def page_title(self):
5113 return "Projects related to " + self.context.title
5114
50955115
5096class PersonOAuthTokensView(LaunchpadView):5116class PersonOAuthTokensView(LaunchpadView):
5097 """Where users can see/revoke their non-expired access tokens."""5117 """Where users can see/revoke their non-expired access tokens."""
50985118
=== 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 @@
55
6 >>> anon_browser.open('http://launchpad.dev/~mark')6 >>> anon_browser.open('http://launchpad.dev/~mark')
7 >>> anon_browser.getLink('Related Software').click()7 >>> anon_browser.getLink('Related Software').click()
8 >>> print_navigation_links(anon_browser.contents)
9 Profile: ...
10 Related Software
11 Karma: ...
128
13 >>> print anon_browser.title9 >>> print anon_browser.title
14 Software related to Mark Shuttleworth10 Software related to Mark Shuttleworth
15 >>> print anon_browser.url11 >>> print anon_browser.url
16 http://launchpad.dev/~mark/+related-software12 http://launchpad.dev/~mark/+related-software
1713
18That page displays a table, the with list of 'Maintained'packages as
19well as the list of 'Uploaded' packages. The table also shows the
20number of open bugs and questions filed against each package.
21
22Please see pagetests/soyuz/xx-person-packages.txt for details.14Please see pagetests/soyuz/xx-person-packages.txt for details.
2315
=== modified file 'lib/lp/registry/templates/person-related-projects.pt'
--- lib/lp/registry/templates/person-related-projects.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/registry/templates/person-related-projects.pt 2009-09-08 11:49:02 +0000
@@ -3,20 +3,33 @@
3 xmlns:tal="http://xml.zope.org/namespaces/tal"3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6 xml:lang="en"6 metal:use-macro="view/macro:page/main_only"
7 lang="en"
8 dir="ltr"
9 metal:use-macro="view/macro:page/onecolumn"
10 i18n:domain="launchpad"7 i18n:domain="launchpad"
11>8>
129
13<body>10<body>
1411
12<div metal:fill-slot="heading">
13 <h1 tal:content="view/page_title"/>
14</div>
15
15<div metal:fill-slot="main">16<div metal:fill-slot="main">
1617 <div class="top-portlet" id="navlinks">
17 <div id="projects">18 <ul class="horizontal">
19 <li>
20 <a tal:replace="structure view/menu:navigation/summary/render"/></li>
21 <li>
22 <a tal:replace="structure view/menu:navigation/maintained/render"/></li>
23 <li>
24 <a tal:replace="structure view/menu:navigation/uploaded/render"/></li>
25 <li>
26 <a tal:replace="structure view/menu:navigation/ppa/render"/></li>
27 </ul>
28 </div>
29
30
31 <div id="projects" class="top-portlet">
18 <a name="projects" />32 <a name="projects" />
19 <h1>Related projects</h1>
2033
21 <tal:navigation_top34 <tal:navigation_top
22 replace="structure view/batchnav/@@+navigation-links-upper" />35 replace="structure view/batchnav/@@+navigation-links-upper" />
2336
=== modified file 'lib/lp/registry/templates/person-related-software.pt'
--- lib/lp/registry/templates/person-related-software.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/registry/templates/person-related-software.pt 2009-09-08 11:49:02 +0000
@@ -3,23 +3,39 @@
3 xmlns:tal="http://xml.zope.org/namespaces/tal"3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6 xml:lang="en"6 metal:use-macro="view/macro:page/main_only"
7 lang="en"
8 dir="ltr"
9 metal:use-macro="view/macro:page/onecolumn"
10 i18n:domain="launchpad"7 i18n:domain="launchpad"
11>8>
129
13<body>10<body>
1411
12<div metal:fill-slot="heading">
13 <h1 tal:content="view/page_title"/>
14</div>
15
15<div metal:fill-slot="main">16<div metal:fill-slot="main">
17 <div class="top-portlet" id="navlinks">
18 <ul class="horizontal">
19 Full listings:
20 <li>
21 <a tal:replace="structure view/menu:navigation/maintained/render"/></li>
22 <li>
23 <a tal:replace="structure view/menu:navigation/uploaded/render"/></li>
24 <li>
25 <a tal:replace="structure view/menu:navigation/ppa/render"/></li>
26 <li>
27 <a tal:replace="structure view/menu:navigation/projects/render"/></li>
28 </ul>
29 </div>
30
16 <div id="packages">31 <div id="packages">
1732
18 <tal:maintained-packages33 <tal:maintained-packages
19 define="sourcepackagereleases view/get_latest_maintained_packages_with_stats"34 define="sourcepackagereleases view/get_latest_maintained_packages_with_stats"
20 condition="sourcepackagereleases">35 condition="sourcepackagereleases">
2136
22 <h1>Maintained packages</h1>37 <div class="top-portlet">
38 <h2>Maintained packages</h2>
2339
24 <tal:message replace="view/maintained_packages_header_message"/>40 <tal:message replace="view/maintained_packages_header_message"/>
25 <table class="listing">41 <table class="listing">
@@ -38,13 +54,15 @@
38 <div metal:use-macro="context/@@+person-macros/sourcepackagerelease-rows" />54 <div metal:use-macro="context/@@+person-macros/sourcepackagerelease-rows" />
39 </tbody>55 </tbody>
40 </table>56 </table>
57 </div>
41 </tal:maintained-packages>58 </tal:maintained-packages>
4259
43 <tal:uploaded-packages60 <tal:uploaded-packages
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"
45 condition="sourcepackagereleases">62 condition="sourcepackagereleases">
4663
47 <h1>Uploaded packages</h1>64 <div class="top-portlet">
65 <h2>Uploaded packages</h2>
4866
49 <tal:message replace="view/uploaded_packages_header_message"/>67 <tal:message replace="view/uploaded_packages_header_message"/>
50 <table class="listing">68 <table class="listing">
@@ -62,13 +80,15 @@
6280
63 <div metal:use-macro="context/@@+person-macros/sourcepackagerelease-rows" />81 <div metal:use-macro="context/@@+person-macros/sourcepackagerelease-rows" />
64 </table>82 </table>
83 </div>
65 </tal:uploaded-packages>84 </tal:uploaded-packages>
6685
67 <tal:ppa-packages86 <tal:ppa-packages
68 define="sourcepackagereleases view/get_latest_uploaded_ppa_packages_with_stats"87 define="sourcepackagereleases view/get_latest_uploaded_ppa_packages_with_stats"
69 condition="sourcepackagereleases">88 condition="sourcepackagereleases">
7089
71 <h1>PPA packages</h1>90 <div class="top-portlet">
91 <h2>PPA packages</h2>
7292
73 <tal:message replace="view/ppa_packages_header_message"/>93 <tal:message replace="view/ppa_packages_header_message"/>
74 <table class="listing">94 <table class="listing">
@@ -86,13 +106,14 @@
86106
87 <div metal:use-macro="template/macros/sourcepackagerelease-ppa-rows" />107 <div metal:use-macro="template/macros/sourcepackagerelease-ppa-rows" />
88 </table>108 </table>
109 </div>
89 </tal:ppa-packages>110 </tal:ppa-packages>
90111
91 </div>112 </div><!--id packages-->
92113
93 <div id="projects">114 <div id="projects" class="top-portlet">
94 <a name="projects" />115 <a name="projects" />
95 <h1>Related projects</h1>116 <h2>Related projects</h2>
96117
97 <span id="limit-encountered"118 <span id="limit-encountered"
98 tal:content="view/projects_header_message" />119 tal:content="view/projects_header_message" />
99120
=== modified file 'lib/lp/soyuz/stories/ppa/xx-ppa-navigation.txt'
--- lib/lp/soyuz/stories/ppa/xx-ppa-navigation.txt 2009-08-31 23:45:11 +0000
+++ lib/lp/soyuz/stories/ppa/xx-ppa-navigation.txt 2009-09-08 11:39:16 +0000
@@ -185,31 +185,3 @@
185 >>> anon_browser.getLink('Previous').url185 >>> anon_browser.getLink('Previous').url
186 'http://launchpad.dev/%7Ecprov/+archive/ppa/+index?start=1&batch=1'186 'http://launchpad.dev/%7Ecprov/+archive/ppa/+index?start=1&batch=1'
187187
188== Maintained Packages link ==
189
190The Maintained Packages link only appears if the person or team has
191maintained packages to show. No-priv does not maintain packages.
192
193 >>> anon_browser.open("http://launchpad.dev/~no-priv")
194 >>> print_tag_with_id(anon_browser.contents, 'ppas')
195 Personal package archives
196 PPA for No Privileges Person
197 >>> anon_browser.open(
198 ... "http://launchpad.dev/~no-priv/+maintained-packages")
199 >>> print extract_text(
200 ... find_tag_by_id(anon_browser.contents, 'packages'))
201 Maintained packages...
202 No Privileges Person does not maintain any packages.
203
204Mark has packages that he maintains.
205
206 >>> anon_browser.open("http://launchpad.dev/~mark")
207 >>> print_tag_with_id(anon_browser.contents, 'ppas')
208 Personal package archives
209 PPA for Mark Shuttleworth
210 Maintained Packages
211 >>> anon_browser.getLink(url="+maintained-packages").click()
212 >>> print extract_text(
213 ... find_tag_by_id(anon_browser.contents, 'packages'))
214 Maintained packages...
215 alsa-utils ... 1.0.9a-4...
216188
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-person-packages.txt'
--- lib/lp/soyuz/stories/soyuz/xx-person-packages.txt 2009-08-13 15:12:16 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-person-packages.txt 2009-09-08 11:39:16 +0000
@@ -10,19 +10,24 @@
1010
11This page is just a summary of the user's packages and will only11This page is just a summary of the user's packages and will only
12display up to the most recent 30 items in each category. However, it12display up to the most recent 30 items in each category. However, it
13has a navigation sub-menu that takes the user to batched listings in13has more links that take the user to batched listings in each category
14each category where all items can be perused.14where all items can be perused.
1515
16 >>> print_navigation_links(browser.contents)16 >>> print extract_text(find_tag_by_id(browser.contents, 'navlinks'))
17 Profile: http://launchpad.dev/~name1617 Full listings:
18 Related Software18 Maintained Packages
19 Karma: http://launchpad.dev/~name16/+karma19 Uploaded Packages
20 Personal Package Archives: http://launchpad.dev/~name16#ppas20 PPA Packages
21 Summary21 Related Projects
22 Maintained Packages: http://launchpad.dev/~name16/+maintained-packages22
23 Uploaded Packages: http://launchpad.dev/~name16/+uploaded-packages23 >>> print browser.getLink("Maintained Packages").url
24 PPA Packages: http://launchpad.dev/~name16/+ppa-packages24 http://launchpad.dev/~name16/+maintained-packages
25 Related Projects: http://launchpad.dev/~name16/+related-projects25 >>> print browser.getLink("Uploaded Packages").url
26 http://launchpad.dev/~name16/+uploaded-packages
27 >>> print browser.getLink("PPA Packages").url
28 http://launchpad.dev/~name16/+ppa-packages
29 >>> print browser.getLink("Related Projects").url
30 http://launchpad.dev/~name16/+related-projects
2631
27Each category on the summary page has a heading that shows how many32Each category on the summary page has a heading that shows how many
28packages are being displayed.33packages are being displayed.
@@ -87,19 +92,31 @@
87 >>> browser.open("http://launchpad.dev/~mark/+related-software")92 >>> browser.open("http://launchpad.dev/~mark/+related-software")
88 >>> browser.getLink("Maintained Packages").click()93 >>> browser.getLink("Maintained Packages").click()
89 >>> print extract_text(find_tag_by_id(browser.contents, 'packages'))94 >>> print extract_text(find_tag_by_id(browser.contents, 'packages'))
90 Maintained packages
91 1...5 of 7 results95 1...5 of 7 results
92 ...96 ...
93 Name Uploaded to Version When Failures Bugs Questions97 Name Uploaded to Version When Failures Bugs Questions
94 alsa-utils Debian Sid 1.0.9a-4 2005-07-01 None 0 098 alsa-utils Debian Sid 1.0.9a-4 2005-07-01 None 0 0
95 ...99 ...
96100
101The Maintained Packages page only has data if the person or team has
102maintained packages to show. No-priv does not maintain packages.
103
104 >>> anon_browser.open("http://launchpad.dev/~no-priv")
105 >>> print_tag_with_id(anon_browser.contents, 'ppas')
106 Personal package archives
107 PPA for No Privileges Person
108 >>> anon_browser.open(
109 ... "http://launchpad.dev/~no-priv/+maintained-packages")
110 >>> print extract_text(
111 ... find_tag_by_id(anon_browser.contents, 'packages'))
112 Name...
113 No Privileges Person does not maintain any packages.
114
97The navigation link to "Uploaded Packages" takes the user to the115The navigation link to "Uploaded Packages" takes the user to the
98page that lists uploaded packages in batches.116page that lists uploaded packages in batches.
99117
100 >>> browser.getLink("Uploaded Packages").click()118 >>> browser.getLink("Uploaded Packages").click()
101 >>> print extract_text(find_tag_by_id(browser.contents, 'packages'))119 >>> print extract_text(find_tag_by_id(browser.contents, 'packages'))
102 Uploaded packages
103 1...5 of 6 results120 1...5 of 6 results
104 ...121 ...
105 Name Uploaded to Version When Failures Bugs Questions122 Name Uploaded to Version When Failures Bugs Questions
@@ -111,7 +128,6 @@
111128
112 >>> browser.getLink("PPA Packages").click()129 >>> browser.getLink("PPA Packages").click()
113 >>> print extract_text(find_tag_by_id(browser.contents, 'packages'))130 >>> print extract_text(find_tag_by_id(browser.contents, 'packages'))
114 PPA packages
115 1...1 of 1 result131 1...1 of 1 result
116 ...132 ...
117 Name Uploaded to Version When Failures133 Name Uploaded to Version When Failures
@@ -122,7 +138,6 @@
122138
123 >>> browser.getLink("Related Projects").click()139 >>> browser.getLink("Related Projects").click()
124 >>> print extract_text(find_tag_by_id(browser.contents, 'projects'))140 >>> print extract_text(find_tag_by_id(browser.contents, 'projects'))
125 Related projects
126 1...5 of 5 results141 1...5 of 5 results
127 ...142 ...
128 Name Bugs Blueprints Questions143 Name Bugs Blueprints Questions
129144
=== modified file 'lib/lp/soyuz/templates/person-maintained-packages.pt'
--- lib/lp/soyuz/templates/person-maintained-packages.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/soyuz/templates/person-maintained-packages.pt 2009-09-08 11:49:02 +0000
@@ -4,19 +4,27 @@
4 xmlns:tal="http://xml.zope.org/namespaces/tal"4 xmlns:tal="http://xml.zope.org/namespaces/tal"
5 xmlns:metal="http://xml.zope.org/namespaces/metal"5 xmlns:metal="http://xml.zope.org/namespaces/metal"
6 xmlns:i18n="http://xml.zope.org/namespaces/i18n"6 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
7 xml:lang="en"7 metal:use-macro="view/macro:page/main_only"
8 lang="en"
9 dir="ltr"
10 metal:use-macro="view/macro:page/onecolumn"
11 i18n:domain="launchpad"8 i18n:domain="launchpad"
12>9>
1310
14<body>11<body>
1512
13<div metal:fill-slot="heading">
14 <h1 tal:content="view/page_title"/>
15</div>
16
16<div metal:fill-slot="main">17<div metal:fill-slot="main">
17 <div id="packages">18 <div class="top-portlet" id="navlinks">
19 <ul class="horizontal">
20 <li><a tal:replace="structure view/menu:navigation/summary/render"/></li>
21 <li><a tal:replace="structure view/menu:navigation/uploaded/render"/></li>
22 <li><a tal:replace="structure view/menu:navigation/ppa/render"/></li>
23 <li><a tal:replace="structure view/menu:navigation/projects/render"/></li>
24 </ul>
25 </div>
1826
19 <h1>Maintained packages</h1>27 <div id="packages" class="top-portlet">
2028
21 <tal:navigation_top29 <tal:navigation_top
22 replace="structure view/batchnav/@@+navigation-links-upper" />30 replace="structure view/batchnav/@@+navigation-links-upper" />
2331
=== modified file 'lib/lp/soyuz/templates/person-ppa-packages.pt'
--- lib/lp/soyuz/templates/person-ppa-packages.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/soyuz/templates/person-ppa-packages.pt 2009-09-08 11:49:02 +0000
@@ -4,19 +4,31 @@
4 xmlns:tal="http://xml.zope.org/namespaces/tal"4 xmlns:tal="http://xml.zope.org/namespaces/tal"
5 xmlns:metal="http://xml.zope.org/namespaces/metal"5 xmlns:metal="http://xml.zope.org/namespaces/metal"
6 xmlns:i18n="http://xml.zope.org/namespaces/i18n"6 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
7 xml:lang="en"7 metal:use-macro="view/macro:page/main_only"
8 lang="en"
9 dir="ltr"
10 metal:use-macro="view/macro:page/onecolumn"
11 i18n:domain="launchpad"8 i18n:domain="launchpad"
12>9>
1310
14<body>11<body>
1512
13<div metal:fill-slot="heading">
14 <h1 tal:content="view/page_title"/>
15</div>
16
16<div metal:fill-slot="main">17<div metal:fill-slot="main">
17 <div id="packages">18 <div class="top-portlet" id="navlinks">
19 <ul class="horizontal">
20 <li>
21 <a tal:replace="structure view/menu:navigation/summary/render"/></li>
22 <li>
23 <a tal:replace="structure view/menu:navigation/uploaded/render"/></li>
24 <li>
25 <a tal:replace="structure view/menu:navigation/maintained/render"/></li>
26 <li>
27 <a tal:replace="structure view/menu:navigation/projects/render"/></li>
28 </ul>
29 </div>
1830
19 <h1>PPA packages</h1>31 <div id="packages" class="top-portlet">
2032
21 <tal:navigation_top33 <tal:navigation_top
22 replace="structure view/batchnav/@@+navigation-links-upper" />34 replace="structure view/batchnav/@@+navigation-links-upper" />
2335
=== modified file 'lib/lp/soyuz/templates/person-uploaded-packages.pt'
--- lib/lp/soyuz/templates/person-uploaded-packages.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/soyuz/templates/person-uploaded-packages.pt 2009-09-08 11:49:02 +0000
@@ -4,19 +4,31 @@
4 xmlns:tal="http://xml.zope.org/namespaces/tal"4 xmlns:tal="http://xml.zope.org/namespaces/tal"
5 xmlns:metal="http://xml.zope.org/namespaces/metal"5 xmlns:metal="http://xml.zope.org/namespaces/metal"
6 xmlns:i18n="http://xml.zope.org/namespaces/i18n"6 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
7 xml:lang="en"7 metal:use-macro="view/macro:page/main_only"
8 lang="en"
9 dir="ltr"
10 metal:use-macro="view/macro:page/onecolumn"
11 i18n:domain="launchpad"8 i18n:domain="launchpad"
12>9>
1310
14<body>11<body>
1512
13<div metal:fill-slot="heading">
14 <h1 tal:content="view/page_title"/>
15</div>
16
16<div metal:fill-slot="main">17<div metal:fill-slot="main">
17 <div id="packages">18 <div class="top-portlet" id="navlinks">
19 <ul class="horizontal">
20 <li>
21 <a tal:replace="structure view/menu:navigation/summary/render"/></li>
22 <li>
23 <a tal:replace="structure view/menu:navigation/maintained/render"/></li>
24 <li>
25 <a tal:replace="structure view/menu:navigation/ppa/render"/></li>
26 <li>
27 <a tal:replace="structure view/menu:navigation/projects/render"/></li>
28 </ul>
29 </div>
1830
19 <h1>Uploaded packages</h1>31 <div id="packages" class="top-portlet">
2032
21 <tal:navigation_top33 <tal:navigation_top
22 replace="structure view/batchnav/@@+navigation-links-upper" />34 replace="structure view/batchnav/@@+navigation-links-upper" />