Merge lp:~cprov/launchpad/bug-416789-distribution-ppas-icons into lp:launchpad

Proposed by Celso Providelo
Status: Merged
Merged at revision: not available
Proposed branch: lp:~cprov/launchpad/bug-416789-distribution-ppas-icons
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~cprov/launchpad/bug-416789-distribution-ppas-icons
Reviewer Review Type Date Requested Status
Gavin Panella (community) code Approve
Review via email: mp+11038@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Celso Providelo (cprov) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

= Summary =

This branch fixes https://bugs.edge.launchpad.net/bugs/416789 by adjusting the style bits (specially icons) lost during the 3.0 redesign.

It also benefits of IPPA/fmt:link and removes the need of pagetitles.py for that page.

== Tests ==

./bin/test -vv -t xx-ubuntu-ppas.txt

== Demo and Q/A ==

https://launchpad.dev/ubuntu/+ppas

= 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/distribution-portlet-ppa-architectures.pt
  lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt
  lib/canonical/launchpad/pagetitles.py
  lib/lp/soyuz/templates/distribution-ppa-list.pt
  lib/lp/registry/browser/distribution.py
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkqeB5EACgkQ7KBXuXyZSjB28wCgrcNAAF9ofH/XEZPcC8Cbz5XN
KwoAoKePThNUrCZC+aKVyVSZEgaq/GEK
=IjaM
-----END PGP SIGNATURE-----

Revision history for this message
Gavin Panella (allenap) wrote :

Line 107 has a small typo, s/arq/arch, but otherwise it looks good :)

BTW, I just tried using two-column-list in a portlet and it did not work properly; it rendered only one row on the same line, then the others were staggered. Have you seen that?

review: Approve (code)
Revision history for this message
Celso Providelo (cprov) wrote :

On Wed, Sep 2, 2009 at 7:42 AM, Gavin
Panella<email address hidden> wrote:
> Review: Approve code
> Line 107 has a small typo, s/arq/arch, but otherwise it looks good :)

This typo comes from the CSS sprites declaration, I wasn't aware that
my change was the only callsite.
Fixed both.

> BTW, I just tried using two-column-list in a portlet and it did not work properly; it rendered only one row on the same line, then the others were staggered. Have you seen that?

two-column-list only applies to multiples <dl>s, not multiple <dt>s
within the same <dl>:

{{{
<div class="two-columns">
  <dl><dt>C1</dt><dd>one</dd></dl>
  <dl><dt>C2</dt><dd>two</dd></dl>
  <dl><dt>C1</dt><dd>three</dd><dt>C1</dt><dd>three</dd></dl>
</div>
}}}
--
Celso Providelo <email address hidden>
IRC: cprov, Jabber: <email address hidden>, Skype: cprovidelo
1024D/681B6469 C858 2652 1A6E F6A6 037B B3F7 9FF2 583E 681B 6469

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-02 03:54:47 +0000
+++ lib/canonical/launchpad/pagetitles.py 2009-09-02 05:37:54 +0000
@@ -405,8 +405,6 @@
405405
406distribution_builds = ContextTitle('%s builds')406distribution_builds = ContextTitle('%s builds')
407407
408distribution_ppa_list = ContextTitle('%s Personal Package Archives')
409
410distributionsourcepackage_bugs = ContextTitle('Bugs in %s')408distributionsourcepackage_bugs = ContextTitle('Bugs in %s')
411409
412distributionsourcepackage_index = ContextTitle('%s')410distributionsourcepackage_index = ContextTitle('%s')
413411
=== modified file 'lib/lp/registry/browser/distribution.py'
--- lib/lp/registry/browser/distribution.py 2009-09-01 10:37:35 +0000
+++ lib/lp/registry/browser/distribution.py 2009-09-02 05:37:54 +0000
@@ -653,6 +653,7 @@
653 self.context, purposes=[ArchivePurpose.COPY], user=self.user)653 self.context, purposes=[ArchivePurpose.COPY], user=self.user)
654 return results.order_by('date_created DESC')654 return results.order_by('date_created DESC')
655655
656
656class DistributionPPASearchView(LaunchpadView):657class DistributionPPASearchView(LaunchpadView):
657 """Search PPAs belonging to the Distribution in question."""658 """Search PPAs belonging to the Distribution in question."""
658659
@@ -661,6 +662,10 @@
661 self.show_inactive = self.request.get('show_inactive')662 self.show_inactive = self.request.get('show_inactive')
662663
663 @property664 @property
665 def page_title(self):
666 return '%s Personal Package Archives' % self.context.title
667
668 @property
664 def search_results(self):669 def search_results(self):
665 """Process search form request."""670 """Process search form request."""
666 if self.name_filter is None:671 if self.name_filter is None:
667672
=== modified file 'lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt'
--- lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt 2009-08-23 05:28:49 +0000
+++ lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt 2009-09-02 05:37:54 +0000
@@ -37,11 +37,14 @@
37 >>> print extract_text(37 >>> print extract_text(
38 ... find_tag_by_id(anon_browser.contents, 'ppa_statistics'))38 ... find_tag_by_id(anon_browser.contents, 'ppa_statistics'))
39 Statistics39 Statistics
40 3 registered PPAs40 Registered PPAs:
41 2 active PPAs41 3
42 4 published sources42 Active PPAs:
43 4 published binaries43 2
4444 Published sources:
45 4
46 Published binaries:
47 4
4548
46Up to 5 latest source publications are also presented in the 'Latest49Up to 5 latest source publications are also presented in the 'Latest
47sources' section.50sources' section.
@@ -919,15 +922,15 @@
919 ... find_tag_by_id(anon_browser.contents, 'ppa_most_active'))922 ... find_tag_by_id(anon_browser.contents, 'ppa_most_active'))
920 Most active923 Most active
921 PPAs with the highest number of uploads in the last 7 days.924 PPAs with the highest number of uploads in the last 7 days.
922 Celso Providelo 4 uploads925 PPA for Celso Providelo 4 uploads
923 Mark Shuttleworth 2 uploads926 PPA for Mark Shuttleworth 2 uploads
924 Ubuntu Team 2 uploads927 PPA for Ubuntu team 2 uploads
925 No Privileges Person 1 uploads928 PPA for No Privileges Person 1 uploads
926929
927The user can also in any PPA title listed in that section to visit the930The user can also in any PPA title listed in that section to visit the
928PPA itself.931PPA itself.
929932
930 >>> anon_browser.getLink('Celso Providelo').click()933 >>> anon_browser.getLink('PPA for Celso Providelo').click()
931 >>> print anon_browser.title934 >>> print anon_browser.title
932 PPA for Celso Providelo935 PPA for Celso Providelo
933936
934937
=== modified file 'lib/lp/soyuz/templates/distribution-portlet-ppa-architectures.pt'
--- lib/lp/soyuz/templates/distribution-portlet-ppa-architectures.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/soyuz/templates/distribution-portlet-ppa-architectures.pt 2009-09-02 05:37:54 +0000
@@ -7,19 +7,21 @@
7 tal:condition="serieses">7 tal:condition="serieses">
88
9 <h2>PPA supported series</h2>9 <h2>PPA supported series</h2>
10 <div class="portletBody portletContent">10 <div>
11 <ul style="padding: 0 0 0 2em;" class="distroseries">11 <ul>
12 <tal:per_series repeat="series serieses">12 <tal:per_series repeat="series serieses">
13 <li tal:condition="series/active">13 <li class="sprite distribution"
14 tal:condition="series/active">
14 <a tal:attributes="href series/fmt:url">15 <a tal:attributes="href series/fmt:url">
15 <tal:version replace="series/version" />16 <tal:version replace="series/version" />
16 "<tal:codename replace="series/displayname" />"17 "<tal:codename replace="series/displayname" />"
17 </a>18 </a>
18 - <tal:status replace="series/status/name/fmt:lower" />19 - <tal:status replace="series/status/name/fmt:lower" />
1920
20 <ul class="architecture" tal:define="archs series/virtualized_architectures"21 <ul tal:define="archs series/virtualized_architectures"
21 tal:condition="archs">22 tal:condition="archs">
22 <li tal:repeat="arch archs">23 <li class="sprite arquitecture"
24 tal:repeat="arch archs">
23 <a tal:attributes="href arch/fmt:url">25 <a tal:attributes="href arch/fmt:url">
24 <tal:title replace="arch/architecturetag" />26 <tal:title replace="arch/architecturetag" />
25 <tal:official condition="arch/official">27 <tal:official condition="arch/official">
2628
=== modified file 'lib/lp/soyuz/templates/distribution-ppa-list.pt'
--- lib/lp/soyuz/templates/distribution-ppa-list.pt 2009-08-14 18:51:49 +0000
+++ lib/lp/soyuz/templates/distribution-ppa-list.pt 2009-09-02 05:37:54 +0000
@@ -16,8 +16,7 @@
1616
17 <div id="ppa_search" class="top-portlet">17 <div id="ppa_search" class="top-portlet">
1818
19 <h1 tal:content="CONTEXTS/fmt:pagetitle">Ubuntu Linux Personal19 <h2>Personal Package Archives</h2>
20 Package Archives</h1>
2120
22 <p>Personal Package Archives (PPA) allow you to upload21 <p>Personal Package Archives (PPA) allow you to upload
23 Ubuntu source packages to be built and published as an22 Ubuntu source packages to be built and published as an
@@ -30,7 +29,7 @@
30 tal:condition="registered_ppas">29 tal:condition="registered_ppas">
31 <p>Search user-contributed software packages published in any30 <p>Search user-contributed software packages published in any
32 <tal:distribution replace="context/title"31 <tal:distribution replace="context/title"
33 >Ubuntu</tal:distribution>PPA.</p>32 >Ubuntu</tal:distribution> PPA.</p>
34 <table>33 <table>
35 <tbody>34 <tbody>
36 <tr>35 <tr>
@@ -60,38 +59,40 @@
6059
61 <div id="ppa_statistics" class="portlet">60 <div id="ppa_statistics" class="portlet">
62 <h2>Statistics</h2>61 <h2>Statistics</h2>
63 <tal:has_ppas condition="registered_ppas">62 <div class="two-column-list" tal:condition="registered_ppas">
64 <ul>63 <dl>
65 <li><tal:ppa_registered64 <dt> Registered PPAs:</dt>
66 replace="registered_ppas"65 <dd tal:content="registered_ppas">10</dd>
67 >10</tal:ppa_registered> registered PPAs</li>66 </dl>
68 <li><tal:ppa_active67 <dl>
69 replace="view/number_of_active_ppas"68 <dt>Active PPAs:</dt>
70 >4</tal:ppa_active> active PPAs</li>69 <dd tal:content="view/number_of_active_ppas">4</dd>
71 <li><tal:ppa_sources70 </dl>
72 replace="view/number_of_ppa_sources"71 <dl>
73 >20</tal:ppa_sources> published sources</li>72 <dt>Published sources:</dt>
74 <li><tal:ppa_binaries73 <dd tal:content="view/number_of_ppa_sources">20</dd>
75 replace="view/number_of_ppa_binaries"74 </dl>
76 >20</tal:ppa_binaries> published binaries</li>75 <dl>
77 </ul>76 <dt>Published binaries:</dt>
78 </tal:has_ppas>77 <dd tal:content="view/number_of_ppa_binaries">20</dd>
79 <tal:has_no_ppas condition="not: registered_ppas">78 </dl>
80 <p><tal:distribution replace="context/displayname" />79 </div>
81 does not have any registered PPA.</p>80 <p tal:condition="not: registered_ppas">
82 </tal:has_no_ppas>81 <span tal:replace="context/displayname">Ubuntu Linux</span>
82 does not have any registered PPA.
83 </p>
83 </div> <!-- ppa_statistics -->84 </div> <!-- ppa_statistics -->
8485
85 <div id="ppa_latest_uploads" class="portlet"86 <div id="ppa_latest_uploads" class="portlet"
86 tal:condition="registered_ppas">87 tal:condition="registered_ppas">
87 <h2>Latest uploads</h2>88 <h2>Latest uploads</h2>
88 <ul class="source package">89 <ul class="source package">
89 <li tal:repeat="pub view/latest_ppa_source_publications">90 <li class="sprite package-source"
91 tal:repeat="pub view/latest_ppa_source_publications">
90 <tal:source_title replace="pub/displayname">92 <tal:source_title replace="pub/displayname">
91 mozilla-firefox - 1.0 in warty93 mozilla-firefox - 1.0 in warty
92 </tal:source_title> in94 </tal:source_title> in
93 <a tal:attributes="href pub/archive/fmt:url"95 <a tal:replace="structure pub/archive/fmt:link"
94 tal:content="pub/archive/displayname"
95 >PPA for Celso Providelo </a>96 >PPA for Celso Providelo </a>
96 <tal:datepublished replace="pub/age/fmt:approximateduration">97 <tal:datepublished replace="pub/age/fmt:approximateduration">
97 3 minutes</tal:datepublished> ago98 3 minutes</tal:datepublished> ago
@@ -107,10 +108,8 @@
107 <table>108 <table>
108 <tr tal:repeat="most_active view/most_active_ppas">109 <tr tal:repeat="most_active view/most_active_ppas">
109 <td>110 <td>
110 <a tal:attributes="href most_active/archive/fmt:url"111 <a tal:replace="structure most_active/archive/fmt:link"
111 tal:content="most_active/archive/owner/fmt:displayname">112 >PPA for Celso Providelo</a>
112 Celso Providelo
113 </a>
114 </td>113 </td>
115 <td align="right">114 <td align="right">
116 <tal:sources replace="most_active/uploads" /> uploads115 <tal:sources replace="most_active/uploads" /> uploads