Merge lp:~adiroiban/launchpad/bug-487970 into lp:launchpad
- bug-487970
- Merge into devel
Status: | Merged |
---|---|
Approved by: | Данило Шеган |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~adiroiban/launchpad/bug-487970 |
Merge into: | lp:launchpad |
Diff against target: |
230 lines (+102/-33) 3 files modified
lib/lp/translations/stories/distroseries/xx-distroseries-templates.txt (+56/-13) lib/lp/translations/stories/productseries/xx-productseries-templates.txt (+27/-18) lib/lp/translations/templates/object-templates.pt (+19/-2) |
To merge this branch: | bzr merge lp:~adiroiban/launchpad/bug-487970 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Данило Шеган (community) | code | Approve | |
Review via email: mp+15250@code.launchpad.net |
Commit message
Add the Last updated column in the +templates page for distroseries and productseries.
Description of the change
Tim Penhey (thumper) wrote : | # |
Данило Шеган (danilo) wrote : | # |
Hi Adi,
Thanks for working on this: it's a very welcome change! You've done a
great job here. I'll have some stylistic comments but don't let that
turn you off: it's just to better cope with development in a large team
such as Launchpad's.
I'd like this page (+templates) to become more of a maintainer-
starting point: a place they can go to look at stuff like disabled
templates and such. This branch is a step in the right direction.
review approve code
status approve
Let me know when you've fixed the minor points I note here so I can land
this for you (though, note that we are in "week 4", which means that our
development trees are closed for anything but "release critical"
landings).
У чет, 26. 11 2009. у 00:44 +0000, Adi Roiban пише:
> = Demo and Q/A =
>
> You should access the +templates pages for both a producseries and a distroseries.
> The table should also display the „Last update” column
As I mentioned earlier, it's useful to get direct links to pages which
you are modifying on launchpad.dev and on eg. edge.launchpad.net: while
I do know where to find them, others might need to spend more time to do
it.
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -18,6 +18,44 @@
>
> == The templates table ==
>
> +Anonymous users will see a link from distro series
I'd rather make this something like:
"Full template listing for a distribution series is reached by following
a link from the distribution series translations page."
The idea is to make narrative in tests more like statements and like an
actual user story. In this particular case, using anonymous users just
demonstrates that *everybody* can reach this page.
> + >>> anon_browser.open(
> + ... 'http://
> + >>> anon_browser.
> +
> +The anon page shows a table with only source package, template name and last
> +update.
And this should probably be something like:
"Full listing of templates shows source package name, template name and
the date of last update for this distribution series."
> +
> + >>> table = find_tag_
> + >>> print extract_text(table)
> + Source package Template name Last update
> + evolution disabled-template 2007-01-05
> + evolution evolution-2.2 2005-05-06
> + evolution man 2006-08-14
> + mozilla pkgconf-mozilla 2005-05-06
> + pmount man 2006-08-14
> + pmount pmount 2005-05-06
> +
> +
> +Normal users will see a link from distro series
This is relatively unneeded. The only thing you want to demonstrate
with this test is that Download links are shown. You can cut down on
the narrative, and use something as simple as:
"Logged-in users can also choose to download all translations for each
of the templates."
followed b...
Adi Roiban (adiroiban) wrote : | # |
I copied the diff according to the cover letter guidance https:/
Since this was my first review I did not know the exact process.
I changed the pagetests narative.
I have also updated the pagetest style as Abel Deuring suggest this problem in another MP.
HTML style was updated... and got rid of that TAB
I need to increase the table size to accommodate the new column. The action column was wrapped when viewed by an admin.
All translation tests are OK.
Lint is clean.
Thanks for the review.
Preview Diff
1 | === modified file 'lib/lp/translations/stories/distroseries/xx-distroseries-templates.txt' | |||
2 | --- lib/lp/translations/stories/distroseries/xx-distroseries-templates.txt 2009-10-30 10:09:17 +0000 | |||
3 | +++ lib/lp/translations/stories/distroseries/xx-distroseries-templates.txt 2009-12-07 08:26:11 +0000 | |||
4 | @@ -1,11 +1,15 @@ | |||
6 | 1 | = Templates view for DistroSeries = | 1 | |
7 | 2 | |||
8 | 3 | Templates view for DistroSeries | ||
9 | 4 | =============================== | ||
10 | 2 | 5 | ||
11 | 3 | The +templates view for DistroSeries gives an overview of the translation | 6 | The +templates view for DistroSeries gives an overview of the translation |
12 | 4 | templates in this series and provides easy access to the various subpages of | 7 | templates in this series and provides easy access to the various subpages of |
13 | 5 | each template. | 8 | each template. |
14 | 6 | 9 | ||
15 | 7 | 10 | ||
17 | 8 | == Getting there == | 11 | Getting there |
18 | 12 | ------------- | ||
19 | 9 | 13 | ||
20 | 10 | To get to the listing of all templates, one needs to use the link | 14 | To get to the listing of all templates, one needs to use the link |
21 | 11 | from the distribution series translations page. | 15 | from the distribution series translations page. |
22 | @@ -16,7 +20,45 @@ | |||
23 | 16 | >>> print user_browser.url | 20 | >>> print user_browser.url |
24 | 17 | http://translations.launchpad.dev/ubuntu/hoary/+templates | 21 | http://translations.launchpad.dev/ubuntu/hoary/+templates |
25 | 18 | 22 | ||
27 | 19 | == The templates table == | 23 | The templates table |
28 | 24 | ------------------- | ||
29 | 25 | |||
30 | 26 | Full template listing for a distribution series is reached by following | ||
31 | 27 | a link from the distribution series translations page. | ||
32 | 28 | |||
33 | 29 | >>> anon_browser.open( | ||
34 | 30 | ... 'http://translations.launchpad.dev/ubuntu/hoary') | ||
35 | 31 | >>> anon_browser.getLink('full list of templates').click() | ||
36 | 32 | |||
37 | 33 | Full listing of templates shows source package name, template name and | ||
38 | 34 | the date of last update for this distribution series. | ||
39 | 35 | |||
40 | 36 | >>> table = find_tag_by_id(anon_browser.contents, 'templates_table') | ||
41 | 37 | >>> print extract_text(table) | ||
42 | 38 | Source package Template name Last update | ||
43 | 39 | evolution disabled-template 2007-01-05 | ||
44 | 40 | evolution evolution-2.2 2005-05-06 | ||
45 | 41 | evolution man 2006-08-14 | ||
46 | 42 | mozilla pkgconf-mozilla 2005-05-06 | ||
47 | 43 | pmount man 2006-08-14 | ||
48 | 44 | pmount pmount 2005-05-06 | ||
49 | 45 | |||
50 | 46 | |||
51 | 47 | Logged-in users will see a link from distro series | ||
52 | 48 | >>> user_browser.open( | ||
53 | 49 | ... 'http://translations.launchpad.dev/ubuntu/hoary') | ||
54 | 50 | >>> user_browser.getLink('full list of templates').click() | ||
55 | 51 | |||
56 | 52 | Logged-in users can also choose to download all translations for each | ||
57 | 53 | of the templates. | ||
58 | 54 | |||
59 | 55 | >>> table = find_tag_by_id(user_browser.contents, 'templates_table') | ||
60 | 56 | >>> print extract_text(table) | ||
61 | 57 | Source package Template name Last update Actions | ||
62 | 58 | evolution disabled-template 2007-01-05 Download | ||
63 | 59 | ... | ||
64 | 60 | mozilla pkgconf-mozilla 2005-05-06 Download | ||
65 | 61 | ... | ||
66 | 20 | 62 | ||
67 | 21 | Administrator can see all editing options. | 63 | Administrator can see all editing options. |
68 | 22 | 64 | ||
69 | @@ -28,16 +70,17 @@ | |||
70 | 28 | 70 | ||
71 | 29 | >>> table = find_tag_by_id(admin_browser.contents, 'templates_table') | 71 | >>> table = find_tag_by_id(admin_browser.contents, 'templates_table') |
72 | 30 | >>> print extract_text(table) | 72 | >>> print extract_text(table) |
83 | 31 | Source package Template name Actions | 73 | Source package Template name Last update Actions |
84 | 32 | evolution disabled-template Edit Upload Download Administer | 74 | evolution disabled-template 2007-01-05 Edit Upload Download Administer |
85 | 33 | evolution evolution-2.2 Edit Upload Download Administer | 75 | evolution evolution-2.2 2005-05-06 Edit Upload Download Administer |
86 | 34 | evolution man Edit Upload Download Administer | 76 | evolution man 2006-08-14 Edit Upload Download Administer |
87 | 35 | mozilla pkgconf-mozilla Edit Upload Download Administer | 77 | mozilla pkgconf-mozilla 2005-05-06 Edit Upload Download Administer |
88 | 36 | pmount man Edit Upload Download Administer | 78 | pmount man 2006-08-14 Edit Upload Download Administer |
89 | 37 | pmount pmount Edit Upload Download Administer | 79 | pmount pmount 2005-05-06 Edit Upload Download Administer |
90 | 38 | 80 | ||
91 | 39 | 81 | ||
92 | 40 | == Links to the templates == | 82 | Links to the templates |
93 | 83 | ---------------------- | ||
94 | 41 | 84 | ||
95 | 42 | Clicking on a template name will take the user to that template's overview | 85 | Clicking on a template name will take the user to that template's overview |
96 | 43 | page. | 86 | page. |
97 | 44 | 87 | ||
98 | === modified file 'lib/lp/translations/stories/productseries/xx-productseries-templates.txt' | |||
99 | --- lib/lp/translations/stories/productseries/xx-productseries-templates.txt 2009-10-30 10:09:17 +0000 | |||
100 | +++ lib/lp/translations/stories/productseries/xx-productseries-templates.txt 2009-12-07 08:26:11 +0000 | |||
101 | @@ -1,13 +1,18 @@ | |||
103 | 1 | = Templates view for ProductSeries = | 1 | |
104 | 2 | |||
105 | 3 | Templates view for ProductSeries | ||
106 | 4 | ================================ | ||
107 | 2 | 5 | ||
108 | 3 | The +templates view for ProductSeries gives an overview of the translation | 6 | The +templates view for ProductSeries gives an overview of the translation |
109 | 4 | templates in this series and provides easy access to the various subpages of | 7 | templates in this series and provides easy access to the various subpages of |
110 | 5 | each template. | 8 | each template. |
111 | 6 | 9 | ||
116 | 7 | == Preparation == | 10 | |
117 | 8 | 11 | Preparation | |
118 | 9 | To test the ordering of templates in the listing, we need another template | 12 | ----------- |
119 | 10 | that is new but must appear at the top of the list. | 13 | |
120 | 14 | To test the ordering of templates in the listing, we need another | ||
121 | 15 | template that is new but must appear at the top of the list. | ||
122 | 11 | 16 | ||
123 | 12 | >>> login('foo.bar@canonical.com') | 17 | >>> login('foo.bar@canonical.com') |
124 | 13 | >>> from zope.component import getUtility | 18 | >>> from zope.component import getUtility |
125 | @@ -18,7 +23,9 @@ | |||
126 | 18 | ... name='at-the-top') | 23 | ... name='at-the-top') |
127 | 19 | >>> logout() | 24 | >>> logout() |
128 | 20 | 25 | ||
130 | 21 | == Getting there == | 26 | |
131 | 27 | Getting there | ||
132 | 28 | ------------- | ||
133 | 22 | 29 | ||
134 | 23 | To get to the listing of all templates, one needs to use the link | 30 | To get to the listing of all templates, one needs to use the link |
135 | 24 | from the product series translations page. | 31 | from the product series translations page. |
136 | @@ -30,16 +37,17 @@ | |||
137 | 30 | http://translations.launchpad.dev/evolution/trunk/+templates | 37 | http://translations.launchpad.dev/evolution/trunk/+templates |
138 | 31 | 38 | ||
139 | 32 | 39 | ||
141 | 33 | == The templates table == | 40 | The templates table |
142 | 41 | ------------------- | ||
143 | 34 | 42 | ||
144 | 35 | The page shows a table of all templates and links to their subpages. | 43 | The page shows a table of all templates and links to their subpages. |
145 | 36 | 44 | ||
146 | 37 | >>> table = find_tag_by_id(user_browser.contents, 'templates_table') | 45 | >>> table = find_tag_by_id(user_browser.contents, 'templates_table') |
147 | 38 | >>> print extract_text(table) | 46 | >>> print extract_text(table) |
152 | 39 | Template name Actions | 47 | Template name Last update Actions |
153 | 40 | at-the-top Download | 48 | at-the-top ... Download |
154 | 41 | evolution-2.2 Download | 49 | evolution-2.2 2005-08-25 Download |
155 | 42 | evolution-2.2-test Download | 50 | evolution-2.2-test 2006-12-13 Download |
156 | 43 | 51 | ||
157 | 44 | If an administrator views this page, links to the templates admin page are | 52 | If an administrator views this page, links to the templates admin page are |
158 | 45 | shown, too. | 53 | shown, too. |
159 | @@ -48,13 +56,14 @@ | |||
160 | 48 | ... 'http://translations.launchpad.dev/evolution/trunk/+templates') | 56 | ... 'http://translations.launchpad.dev/evolution/trunk/+templates') |
161 | 49 | >>> table = find_tag_by_id(admin_browser.contents, 'templates_table') | 57 | >>> table = find_tag_by_id(admin_browser.contents, 'templates_table') |
162 | 50 | >>> print extract_text(table) | 58 | >>> print extract_text(table) |
170 | 51 | Template name Actions | 59 | Template name Last update Actions |
171 | 52 | at-the-top Edit Upload Download Administer | 60 | at-the-top ... Edit Upload Download Administer |
172 | 53 | evolution-2.2 Edit Upload Download Administer | 61 | evolution-2.2 2005-08-25 Edit Upload Download Administer |
173 | 54 | evolution-2.2-test Edit Upload Download Administer | 62 | evolution-2.2-test 2006-12-13 Edit Upload Download Administer |
174 | 55 | 63 | ||
175 | 56 | 64 | ||
176 | 57 | == Links to the templates == | 65 | Links to the templates |
177 | 66 | ---------------------- | ||
178 | 58 | 67 | ||
179 | 59 | Clicking on a template name will take the user to that template's overview | 68 | Clicking on a template name will take the user to that template's overview |
180 | 60 | page. | 69 | page. |
181 | 61 | 70 | ||
182 | === modified file 'lib/lp/translations/templates/object-templates.pt' | |||
183 | --- lib/lp/translations/templates/object-templates.pt 2009-11-24 19:23:52 +0000 | |||
184 | +++ lib/lp/translations/templates/object-templates.pt 2009-12-07 08:26:11 +0000 | |||
185 | @@ -26,12 +26,12 @@ | |||
186 | 26 | </style> | 26 | </style> |
187 | 27 | <style tal:condition="view/is_distroseries" type="text/css"> | 27 | <style tal:condition="view/is_distroseries" type="text/css"> |
188 | 28 | #templates_table { | 28 | #templates_table { |
190 | 29 | width: 72em; | 29 | width: 79em; |
191 | 30 | } | 30 | } |
192 | 31 | </style> | 31 | </style> |
193 | 32 | <style tal:condition="not:view/is_distroseries" type="text/css"> | 32 | <style tal:condition="not:view/is_distroseries" type="text/css"> |
194 | 33 | #templates_table { | 33 | #templates_table { |
196 | 34 | width: 50em; | 34 | width: 58em; |
197 | 35 | } | 35 | } |
198 | 36 | </style> | 36 | </style> |
199 | 37 | <script language="JavaScript" type="text/javascript"> | 37 | <script language="JavaScript" type="text/javascript"> |
200 | @@ -75,6 +75,7 @@ | |||
201 | 75 | <th tal:condition="view/is_distroseries" | 75 | <th tal:condition="view/is_distroseries" |
202 | 76 | class="sourcepackage_column">Source package</th> | 76 | class="sourcepackage_column">Source package</th> |
203 | 77 | <th class="template_column">Template name</th> | 77 | <th class="template_column">Template name</th> |
204 | 78 | <th class="lastupdate_column">Last update</th> | ||
205 | 78 | <th class="actions_column" | 79 | <th class="actions_column" |
206 | 79 | tal:condition="context/required:launchpad.AnyPerson"> | 80 | tal:condition="context/required:launchpad.AnyPerson"> |
207 | 80 | Actions</th> | 81 | Actions</th> |
208 | @@ -88,6 +89,22 @@ | |||
209 | 88 | </td> | 89 | </td> |
210 | 89 | <td class="template_column"><a tal:attributes="href template/fmt:url" | 90 | <td class="template_column"><a tal:attributes="href template/fmt:url" |
211 | 90 | tal:content="template/name">Template name</a></td> | 91 | tal:content="template/name">Template name</a></td> |
212 | 92 | <td class="lastupdate_column"> | ||
213 | 93 | <span class="sortkey" | ||
214 | 94 | tal:condition="template/date_last_updated" | ||
215 | 95 | tal:content="template/date_last_updated/fmt:datetime"> | ||
216 | 96 | time sort key | ||
217 | 97 | </span> | ||
218 | 98 | <span class="lastupdate_column" | ||
219 | 99 | tal:condition="template/date_last_updated" | ||
220 | 100 | tal:attributes=" | ||
221 | 101 | title template/date_last_updated/fmt:datetime" | ||
222 | 102 | tal:content=" | ||
223 | 103 | template/date_last_updated/fmt:approximatedate" | ||
224 | 104 | > | ||
225 | 105 | 2009-09-23 | ||
226 | 106 | </span> | ||
227 | 107 | </td> | ||
228 | 91 | <td class="actions_column" | 108 | <td class="actions_column" |
229 | 92 | tal:condition="context/required:launchpad.AnyPerson"> | 109 | tal:condition="context/required:launchpad.AnyPerson"> |
230 | 93 | <div class="template_links"> | 110 | <div class="template_links"> |
-- Copied from the commit message
I'm still learning about bug submission process...
= Tests =
./bin/test --cdiff -ct ".*series- templates"
= Demo and Q/A =
You should access the +templates pages for both a producseries and a distroseries.
The table should also display the „Last update” column
= lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: /launchpad/ apidoc/ wadl-testrunner .xml translations/ stories/ distroseries/ xx-distroseries -templates. txt translations/ stories/ productseries/ xx-productserie s-templates. txt translations/ templates/ object- templates. pt
lib/canonical
lib/lp/
lib/lp/
lib/lp/
-- removed diff as it is below