Merge lp:~jpds/launchpad/mirror_pages_v3 into lp:launchpad

Proposed by Jonathan Davies
Status: Merged
Approved by: Curtis Hovey
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~jpds/launchpad/mirror_pages_v3
Merge into: lp:launchpad
Diff against target: 177 lines (+88/-56)
2 files modified
lib/lp/registry/browser/tests/distributionmirror-views.txt (+26/-1)
lib/lp/registry/templates/distributionmirror-index.pt (+62/-55)
To merge this branch: bzr merge lp:~jpds/launchpad/mirror_pages_v3
Reviewer Review Type Date Requested Status
Curtis Hovey (community) ui Approve
Graham Binns (community) code Approve
Review via email: mp+18461@code.launchpad.net

Commit message

Updated distribution mirror pages to use v3 styling.

To post a comment you must log in.
Revision history for this message
Jonathan Davies (jpds) wrote :

= Summary =

This branch updates distribution mirror pages to use v3 styling, with (./) buttons to separate options.

Revision history for this message
Graham Binns (gmb) wrote :

Hi Jonathan,

I'm happy with the template changes you've made here - UI review from Curtis pending, of course.

Two things:

 1. This isn't linked to a bug anywhere, so I don't know why these changes are being made. If there's a bug, please link it to the branch. If not, please file one and then link it. We use bugs to track work happening in Launchpad, so it's best if the branches and the bugs are linked.
 2. I said when I reviewed your branch yesterday that you need to write better cover letters. Your cover letter here isn't terribly informative. In future, please try to include:
   - Rationale for the changes in the branch (this can reference a bug if the bug has a lot of discussion or a description of a good fix).
   - The name of the person you had a pre-implementation discussion with about the branch.
   - The results of `make lint` (this helps us make sure that we don't land unused code).

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

Hi Johnathan.

This is a very nice improvement. I think the Organisation field should say "None" when the value is not set. Otherwise, this is good and I can land it for you.

review: Approve (ui)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/browser/tests/distributionmirror-views.txt'
2--- lib/lp/registry/browser/tests/distributionmirror-views.txt 2009-12-14 15:22:53 +0000
3+++ lib/lp/registry/browser/tests/distributionmirror-views.txt 2010-02-09 21:40:34 +0000
4@@ -359,10 +359,35 @@
5 ... archive_mirror, '+index', principal=user)
6 >>> content = find_tag_by_id(view.render(), 'maincontent')
7
8+The page shows the mirror's owner:
9+
10+ >>> print extract_text(find_tag_by_id(content, 'owner'))
11+ Owner:
12+ Mark Shuttleworth
13+
14 The page shows the mirror status
15
16 >>> print extract_text(find_tag_by_id(content, 'status'))
17- Official Ubuntu Linux mirror administered by Mark Shuttleworth, ...
18+ Status:
19+ Official
20+
21+The page shows which country the mirror is in:
22+
23+ >>> print extract_text(find_tag_by_id(content, 'country'))
24+ Country:
25+ Antarctica
26+
27+The page shows which kind of mirror a mirror is:
28+
29+ >>> print extract_text(find_tag_by_id(content, 'type'))
30+ Type:
31+ Archive
32+
33+And which organisation runs a mirror:
34+
35+ >>> print extract_text(find_tag_by_id(content, 'organisation'))
36+ Organisation:
37+ None
38
39 The page contains a source list...
40
41
42=== modified file 'lib/lp/registry/templates/distributionmirror-index.pt'
43--- lib/lp/registry/templates/distributionmirror-index.pt 2009-12-08 15:51:34 +0000
44+++ lib/lp/registry/templates/distributionmirror-index.pt 2010-02-09 21:40:34 +0000
45@@ -12,70 +12,77 @@
46 <h1 tal:content="view/page_title" />
47 </tal:heading>
48
49- <tal:main metal:fill-slot="main"
50- define="overview_menu context/menu:overview">
51-
52- <div class="top-portlet">
53- <p id="status" class="registered">
54- <strong>
55- <tal:status replace="context/status/title">Official</tal:status>
56- </strong>
57- <span tal:replace="context/distribution/title" /> mirror administered
58- by
59- <span tal:content="structure context/owner/fmt:link" />, first
60- registered
61- <span tal:content="context/date_created/fmt:displaydate" />
62+ <tal:registering metal:fill-slot="registering">
63+ <p>
64+ Registered
65+ <span tal:content="context/date_created/fmt:displaydate">
66+ on 2005-01-01</span>
67 </p>
68+ </tal:registering>
69
70- <tal:is-admin condition="context/required:launchpad.Edit">
71- </tal:is-admin>
72+ <tal:main
73+ metal:fill-slot="main"
74+ define="overview_menu context/menu:overview">
75+
76+ <div class="top-portlet" tal:condition="context/description">
77+ <p tal:content="structure context/description/fmt:text-to-html" />
78 </div>
79- <h2>Archive information</h2>
80+
81 <div class="yui-g">
82- <div class="yui-u first">
83- <div class="top-portlet">
84- <tal:is-admin condition="context/required:launchpad.Edit">
85- <dl id="whiteboard">
86+ <div class="portlet">
87+ <h2>Archive information</h2>
88+ <div class="yui-u first">
89+ <div class="two-column-list">
90+ <dl id="owner">
91+ <dt>Owner:</dt>
92+ <dd>
93+ <span tal:content="structure context/owner/fmt:link" />
94+ <a tal:replace="structure overview_menu/reassign/fmt:icon"/>
95+ </dd>
96+ </dl>
97+
98+ <dl id="status">
99+ <dt>Status:</dt>
100+ <dd>
101+ <tal:status replace="context/status/title">Official</tal:status>
102+ <a tal:replace="structure overview_menu/review/fmt:icon"/>
103+ </dd>
104+ </dl>
105+ </div>
106+
107+ <dl id="whiteboard"
108+ tal:condition="context/required:launchpad.Edit">
109 <dt>
110 Whiteboard
111 <a tal:replace="structure overview_menu/review/fmt:icon"/>
112 </dt>
113 <dd tal:content="structure context/whiteboard/fmt:text-to-html" />
114- </dl>
115- </tal:is-admin>
116- <dl tal:condition="context/description">
117- <dt>Description:</dt>
118- <dd class="description"
119- tal:content="structure context/description/fmt:text-to-html" />
120- </dl>
121- </div>
122- </div>
123-
124- <div class="yui-u">
125-
126- <div class="top-portlet">
127- <div class="two-column-list">
128- <dl>
129- <dt>Speed:</dt>
130- <dd tal:content="context/speed/title" />
131- </dl>
132- <dl>
133- <dt>Country:</dt>
134- <dd tal:content="context/country/name" />
135- </dl>
136- <dl>
137- <dt>Type:</dt>
138- <dd tal:content="context/content/title" />
139- </dl>
140- <dl>
141- <dt>Organisation:</dt>
142- <dd tal:content="context/displayname" />
143- </dl>
144-
145- </div>
146- </div>
147- </div>
148- </div>
149+ </dl>
150+
151+ </div>
152+
153+ <div class="yui-u">
154+ <div class="two-column-list">
155+ <dl id="speed">
156+ <dt>Speed:</dt>
157+ <dd tal:content="context/speed/title" />
158+ </dl>
159+ <dl id="country">
160+ <dt>Country:</dt>
161+ <dd tal:content="context/country/name" />
162+ </dl>
163+ <dl id="type">
164+ <dt>Type:</dt>
165+ <dd tal:content="context/content/title" />
166+ </dl>
167+ <dl id="organisation">
168+ <dt>Organisation:</dt>
169+ <dd tal:condition="context/displayname"
170+ tal:content="context/displayname" />
171+ <dd tal:condition="not: context/displayname">None</dd>
172+ </dl>
173+ </div>
174+ </div>
175
176 <div class="portlet"
177 id="last-probe"