Merge lp:~adiroiban/launchpad/bug-487970 into lp:launchpad

Proposed by Adi Roiban
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
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.

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

-- 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:
  lib/canonical/launchpad/apidoc/wadl-testrunner.xml
  lib/lp/translations/stories/distroseries/xx-distroseries-templates.txt
  lib/lp/translations/stories/productseries/xx-productseries-templates.txt
  lib/lp/translations/templates/object-templates.pt

-- removed diff as it is below

Revision history for this message
Данило Шеган (danilo) wrote :
Download full text (7.1 KiB)

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-orienteed
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/translations/stories/distroseries/xx-distroseries-templates.txt'
> --- lib/lp/translations/stories/distroseries/xx-distroseries-templates.txt 2009-10-30 10:09:17 +0000
> +++ lib/lp/translations/stories/distroseries/xx-distroseries-templates.txt 2009-11-25 17:37:01 +0000
> @@ -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://translations.launchpad.dev/ubuntu/hoary')
> + >>> anon_browser.getLink('full list of templates').click()
> +
> +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_by_id(anon_browser.contents, 'templates_table')
> + >>> 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...

Read more...

review: Approve (code)
Revision history for this message
Adi Roiban (adiroiban) wrote :

I copied the diff according to the cover letter guidance https://dev.launchpad.net/DetailedCoverLetterTemplate

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

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/translations/stories/distroseries/xx-distroseries-templates.txt'
--- lib/lp/translations/stories/distroseries/xx-distroseries-templates.txt 2009-10-30 10:09:17 +0000
+++ lib/lp/translations/stories/distroseries/xx-distroseries-templates.txt 2009-12-07 08:26:11 +0000
@@ -1,11 +1,15 @@
1= Templates view for DistroSeries =1
2
3Templates view for DistroSeries
4===============================
25
3The +templates view for DistroSeries gives an overview of the translation6The +templates view for DistroSeries gives an overview of the translation
4templates in this series and provides easy access to the various subpages of7templates in this series and provides easy access to the various subpages of
5each template.8each template.
69
710
8== Getting there ==11Getting there
12-------------
913
10To get to the listing of all templates, one needs to use the link14To get to the listing of all templates, one needs to use the link
11from the distribution series translations page.15from the distribution series translations page.
@@ -16,7 +20,45 @@
16 >>> print user_browser.url20 >>> print user_browser.url
17 http://translations.launchpad.dev/ubuntu/hoary/+templates21 http://translations.launchpad.dev/ubuntu/hoary/+templates
1822
19== The templates table ==23The templates table
24-------------------
25
26Full template listing for a distribution series is reached by following
27a link from the distribution series translations page.
28
29 >>> anon_browser.open(
30 ... 'http://translations.launchpad.dev/ubuntu/hoary')
31 >>> anon_browser.getLink('full list of templates').click()
32
33Full listing of templates shows source package name, template name and
34the date of last update for this distribution series.
35
36 >>> table = find_tag_by_id(anon_browser.contents, 'templates_table')
37 >>> print extract_text(table)
38 Source package Template name Last update
39 evolution disabled-template 2007-01-05
40 evolution evolution-2.2 2005-05-06
41 evolution man 2006-08-14
42 mozilla pkgconf-mozilla 2005-05-06
43 pmount man 2006-08-14
44 pmount pmount 2005-05-06
45
46
47Logged-in users will see a link from distro series
48 >>> user_browser.open(
49 ... 'http://translations.launchpad.dev/ubuntu/hoary')
50 >>> user_browser.getLink('full list of templates').click()
51
52Logged-in users can also choose to download all translations for each
53of the templates.
54
55 >>> table = find_tag_by_id(user_browser.contents, 'templates_table')
56 >>> print extract_text(table)
57 Source package Template name Last update Actions
58 evolution disabled-template 2007-01-05 Download
59 ...
60 mozilla pkgconf-mozilla 2005-05-06 Download
61 ...
2062
21Administrator can see all editing options.63Administrator can see all editing options.
2264
@@ -28,16 +70,17 @@
2870
29 >>> table = find_tag_by_id(admin_browser.contents, 'templates_table')71 >>> table = find_tag_by_id(admin_browser.contents, 'templates_table')
30 >>> print extract_text(table)72 >>> print extract_text(table)
31 Source package Template name Actions73 Source package Template name Last update Actions
32 evolution disabled-template Edit Upload Download Administer74 evolution disabled-template 2007-01-05 Edit Upload Download Administer
33 evolution evolution-2.2 Edit Upload Download Administer75 evolution evolution-2.2 2005-05-06 Edit Upload Download Administer
34 evolution man Edit Upload Download Administer76 evolution man 2006-08-14 Edit Upload Download Administer
35 mozilla pkgconf-mozilla Edit Upload Download Administer77 mozilla pkgconf-mozilla 2005-05-06 Edit Upload Download Administer
36 pmount man Edit Upload Download Administer78 pmount man 2006-08-14 Edit Upload Download Administer
37 pmount pmount Edit Upload Download Administer79 pmount pmount 2005-05-06 Edit Upload Download Administer
3880
3981
40== Links to the templates ==82Links to the templates
83----------------------
4184
42Clicking on a template name will take the user to that template's overview85Clicking on a template name will take the user to that template's overview
43page.86page.
4487
=== modified file 'lib/lp/translations/stories/productseries/xx-productseries-templates.txt'
--- lib/lp/translations/stories/productseries/xx-productseries-templates.txt 2009-10-30 10:09:17 +0000
+++ lib/lp/translations/stories/productseries/xx-productseries-templates.txt 2009-12-07 08:26:11 +0000
@@ -1,13 +1,18 @@
1= Templates view for ProductSeries =1
2
3Templates view for ProductSeries
4================================
25
3The +templates view for ProductSeries gives an overview of the translation6The +templates view for ProductSeries gives an overview of the translation
4templates in this series and provides easy access to the various subpages of7templates in this series and provides easy access to the various subpages of
5each template.8each template.
69
7== Preparation ==10
811Preparation
9To test the ordering of templates in the listing, we need another template12-----------
10that is new but must appear at the top of the list.13
14To test the ordering of templates in the listing, we need another
15template that is new but must appear at the top of the list.
1116
12 >>> login('foo.bar@canonical.com')17 >>> login('foo.bar@canonical.com')
13 >>> from zope.component import getUtility18 >>> from zope.component import getUtility
@@ -18,7 +23,9 @@
18 ... name='at-the-top')23 ... name='at-the-top')
19 >>> logout()24 >>> logout()
2025
21== Getting there ==26
27Getting there
28-------------
2229
23To get to the listing of all templates, one needs to use the link30To get to the listing of all templates, one needs to use the link
24from the product series translations page.31from the product series translations page.
@@ -30,16 +37,17 @@
30 http://translations.launchpad.dev/evolution/trunk/+templates37 http://translations.launchpad.dev/evolution/trunk/+templates
3138
3239
33== The templates table ==40The templates table
41-------------------
3442
35The page shows a table of all templates and links to their subpages.43The page shows a table of all templates and links to their subpages.
3644
37 >>> table = find_tag_by_id(user_browser.contents, 'templates_table')45 >>> table = find_tag_by_id(user_browser.contents, 'templates_table')
38 >>> print extract_text(table)46 >>> print extract_text(table)
39 Template name Actions47 Template name Last update Actions
40 at-the-top Download48 at-the-top ... Download
41 evolution-2.2 Download49 evolution-2.2 2005-08-25 Download
42 evolution-2.2-test Download50 evolution-2.2-test 2006-12-13 Download
4351
44If an administrator views this page, links to the templates admin page are52If an administrator views this page, links to the templates admin page are
45shown, too.53shown, too.
@@ -48,13 +56,14 @@
48 ... 'http://translations.launchpad.dev/evolution/trunk/+templates')56 ... 'http://translations.launchpad.dev/evolution/trunk/+templates')
49 >>> table = find_tag_by_id(admin_browser.contents, 'templates_table')57 >>> table = find_tag_by_id(admin_browser.contents, 'templates_table')
50 >>> print extract_text(table)58 >>> print extract_text(table)
51 Template name Actions59 Template name Last update Actions
52 at-the-top Edit Upload Download Administer60 at-the-top ... Edit Upload Download Administer
53 evolution-2.2 Edit Upload Download Administer61 evolution-2.2 2005-08-25 Edit Upload Download Administer
54 evolution-2.2-test Edit Upload Download Administer62 evolution-2.2-test 2006-12-13 Edit Upload Download Administer
5563
5664
57== Links to the templates ==65Links to the templates
66----------------------
5867
59Clicking on a template name will take the user to that template's overview68Clicking on a template name will take the user to that template's overview
60page.69page.
6170
=== modified file 'lib/lp/translations/templates/object-templates.pt'
--- lib/lp/translations/templates/object-templates.pt 2009-11-24 19:23:52 +0000
+++ lib/lp/translations/templates/object-templates.pt 2009-12-07 08:26:11 +0000
@@ -26,12 +26,12 @@
26 </style>26 </style>
27 <style tal:condition="view/is_distroseries" type="text/css">27 <style tal:condition="view/is_distroseries" type="text/css">
28 #templates_table {28 #templates_table {
29 width: 72em;29 width: 79em;
30 }30 }
31 </style>31 </style>
32 <style tal:condition="not:view/is_distroseries" type="text/css">32 <style tal:condition="not:view/is_distroseries" type="text/css">
33 #templates_table {33 #templates_table {
34 width: 50em;34 width: 58em;
35 }35 }
36 </style>36 </style>
37 <script language="JavaScript" type="text/javascript">37 <script language="JavaScript" type="text/javascript">
@@ -75,6 +75,7 @@
75 <th tal:condition="view/is_distroseries"75 <th tal:condition="view/is_distroseries"
76 class="sourcepackage_column">Source package</th>76 class="sourcepackage_column">Source package</th>
77 <th class="template_column">Template name</th>77 <th class="template_column">Template name</th>
78 <th class="lastupdate_column">Last update</th>
78 <th class="actions_column"79 <th class="actions_column"
79 tal:condition="context/required:launchpad.AnyPerson">80 tal:condition="context/required:launchpad.AnyPerson">
80 Actions</th>81 Actions</th>
@@ -88,6 +89,22 @@
88 </td>89 </td>
89 <td class="template_column"><a tal:attributes="href template/fmt:url"90 <td class="template_column"><a tal:attributes="href template/fmt:url"
90 tal:content="template/name">Template name</a></td>91 tal:content="template/name">Template name</a></td>
92 <td class="lastupdate_column">
93 <span class="sortkey"
94 tal:condition="template/date_last_updated"
95 tal:content="template/date_last_updated/fmt:datetime">
96 time sort key
97 </span>
98 <span class="lastupdate_column"
99 tal:condition="template/date_last_updated"
100 tal:attributes="
101 title template/date_last_updated/fmt:datetime"
102 tal:content="
103 template/date_last_updated/fmt:approximatedate"
104 >
105 2009-09-23
106 </span>
107 </td>
91 <td class="actions_column"108 <td class="actions_column"
92 tal:condition="context/required:launchpad.AnyPerson">109 tal:condition="context/required:launchpad.AnyPerson">
93 <div class="template_links">110 <div class="template_links">