Merge lp:~allenap/launchpad/ui-convert-bug-portlet-x-3.0-bug-427275 into lp:launchpad

Proposed by Gavin Panella
Status: Merged
Merged at revision: not available
Proposed branch: lp:~allenap/launchpad/ui-convert-bug-portlet-x-3.0-bug-427275
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~allenap/launchpad/ui-convert-bug-portlet-x-3.0-bug-427275
Reviewer Review Type Date Requested Status
Paul Hummer (community) Approve
Review via email: mp+11558@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) wrote :

This branch converts all the bug-portlet-*.pt templates to observe 3.0
rules:

  Converted:

    bug-portlet-attachments.pt
    bug-portlet-duplicates.pt
    bug-portlet-questions.pt
    bug-portlet-specs.pt
    bug-portlet-watch.pt

  Tidied:

    bug-portlet-privacy.pt

  No change needed:

    bug-portlet-subscribers-content.pt
    bug-portlet-subscribers.pt
    bug-portlet-notified.pt

  Unused, removed:

    bug-portlet-cve.pt

./bin/test -vvct lp/bugs/.*/stories

Lint free.

Revision history for this message
Paul Hummer (rockstar) wrote :

Thanks for the branch!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/bugs/browser/configure.zcml'
2--- lib/lp/bugs/browser/configure.zcml 2009-09-09 09:00:58 +0000
3+++ lib/lp/bugs/browser/configure.zcml 2009-09-10 16:14:04 +0000
4@@ -1007,9 +1007,6 @@
5 name="+portlet-duplicates"
6 template="../templates/bug-portlet-duplicates.pt"/>
7 <browser:page
8- name="+portlet-cve"
9- template="../templates/bug-portlet-cve.pt"/>
10- <browser:page
11 name="+portlet-attachments"
12 template="../templates/bug-portlet-attachments.pt"/>
13 <browser:page
14
15=== modified file 'lib/lp/bugs/stories/bugs/xx-bug-create-question.txt'
16--- lib/lp/bugs/stories/bugs/xx-bug-create-question.txt 2009-09-04 09:45:19 +0000
17+++ lib/lp/bugs/stories/bugs/xx-bug-create-question.txt 2009-09-10 20:38:38 +0000
18@@ -93,7 +93,7 @@
19 Bug #10:
20
21 >>> portlet = find_portlet(user_browser.contents, 'Related questions')
22- >>> question_anchor = portlet.div.a
23+ >>> question_anchor = portlet.a
24 >>> question_anchor
25 <a href=".../ubuntu/+source/linux-source-2.6.15/+question/...">another
26 test bug</a>
27
28=== modified file 'lib/lp/bugs/templates/bug-portlet-attachments.pt'
29--- lib/lp/bugs/templates/bug-portlet-attachments.pt 2009-07-17 17:59:07 +0000
30+++ lib/lp/bugs/templates/bug-portlet-attachments.pt 2009-09-10 16:13:39 +0000
31@@ -1,37 +1,27 @@
32 <div
33- xmlns:tal="http://xml.zope.org/namespaces/tal"
34- xmlns:metal="http://xml.zope.org/namespaces/metal"
35- xmlns:i18n="http://xml.zope.org/namespaces/i18n"
36- class="portlet" id="portlet-attachments"
37- tal:condition="context/attachments"
38- tal:define="current_task view/current_bugtask;
39- url current_task/fmt:url"
40->
41-
42+ xmlns:tal="http://xml.zope.org/namespaces/tal"
43+ xmlns:metal="http://xml.zope.org/namespaces/metal"
44+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
45+ class="portlet" id="portlet-attachments"
46+ tal:condition="context/attachments">
47 <h2>Bug attachments</h2>
48-
49- <div class="portletBody">
50- <div class="portletContent">
51- <ul>
52- <li class="download"
53- tal:repeat="attachment context/attachments">
54- <a tal:attributes="href attachment/libraryfile/http_url"
55- tal:content="attachment/title"
56- class="sprite download-icon">
57- Attachment Title
58- </a>
59- <small>
60- (<a tal:attributes="href attachment/fmt:url">edit</a>)
61- </small>
62- </li>
63- </ul>
64- <ul style="text-align: right">
65- <li>
66- <a tal:attributes="href string:$url/+addcomment" class="sprite add">
67- Add
68- </a>
69- </li>
70- </ul>
71- </div>
72- </div>
73+ <ul>
74+ <li class="download"
75+ tal:repeat="attachment context/attachments">
76+ <a tal:attributes="href attachment/libraryfile/http_url"
77+ tal:content="attachment/title"
78+ class="sprite download-icon">
79+ Attachment Title
80+ </a>
81+ <small>
82+ (<a tal:attributes="href attachment/fmt:url">edit</a>)
83+ </small>
84+ </li>
85+ </ul>
86+ <ul>
87+ <li>
88+ <a tal:attributes="href view/current_bugtask/fmt:url/+addcomment"
89+ class="sprite add">Add</a>
90+ </li>
91+ </ul>
92 </div>
93
94=== removed file 'lib/lp/bugs/templates/bug-portlet-cve.pt'
95--- lib/lp/bugs/templates/bug-portlet-cve.pt 2009-07-17 17:59:07 +0000
96+++ lib/lp/bugs/templates/bug-portlet-cve.pt 1970-01-01 00:00:00 +0000
97@@ -1,25 +0,0 @@
98-<div
99- xmlns:tal="http://xml.zope.org/namespaces/tal"
100- xmlns:metal="http://xml.zope.org/namespaces/metal"
101- xmlns:i18n="http://xml.zope.org/namespaces/i18n"
102- class="portlet" id="portlet-cve" tal:condition="context/cves"
103- tal:define="current_task view/current_bugtask;
104- url current_task/fmt:url"
105->
106- <h2>
107- <abbr title="Common Vulnerabilities and Exposures index">CVE</abbr>
108- references
109- </h2>
110- <div class="portletBody">
111-
112- <ul>
113- <li class="cve" tal:repeat="cve context/cves">
114- <a tal:attributes="href cve/fmt:url;
115- title cve/description/fmt:shorten/40"
116- tal:content="cve/sequence"
117- >2002-1342</a>
118- </li>
119- </ul>
120-
121- </div>
122-</div>
123
124=== modified file 'lib/lp/bugs/templates/bug-portlet-duplicates.pt'
125--- lib/lp/bugs/templates/bug-portlet-duplicates.pt 2009-07-17 17:59:07 +0000
126+++ lib/lp/bugs/templates/bug-portlet-duplicates.pt 2009-09-10 16:13:39 +0000
127@@ -1,22 +1,15 @@
128 <div
129- xmlns:tal="http://xml.zope.org/namespaces/tal"
130- xmlns:metal="http://xml.zope.org/namespaces/metal"
131- xmlns:i18n="http://xml.zope.org/namespaces/i18n"
132- class="portlet" id="portlet-duplicates"
133- tal:condition="context/duplicates"
134->
135-
136+ xmlns:tal="http://xml.zope.org/namespaces/tal"
137+ xmlns:metal="http://xml.zope.org/namespaces/metal"
138+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
139+ class="portlet" id="portlet-duplicates"
140+ tal:condition="context/duplicates">
141 <h2>Duplicates of this bug</h2>
142-
143- <div class="portletBody">
144- <div class="portletContent">
145- <div tal:repeat="dupe view/duplicates">
146- <a tal:attributes="href dupe/url;
147- title dupe/title;
148- class context/image:sprite_css">
149- Bug #<span tal:replace="dupe/id">3445</span>
150- </a>
151- </div>
152- </div>
153- </div>
154+ <ul>
155+ <li tal:repeat="dupe view/duplicates">
156+ <a tal:content="string: Bug #${dupe/id}"
157+ tal:attributes="href dupe/url; title dupe/title;
158+ class context/image:sprite_css" />
159+ </li>
160+ </ul>
161 </div>
162
163=== modified file 'lib/lp/bugs/templates/bug-portlet-privacy.pt'
164--- lib/lp/bugs/templates/bug-portlet-privacy.pt 2009-08-10 21:07:02 +0000
165+++ lib/lp/bugs/templates/bug-portlet-privacy.pt 2009-09-10 20:18:28 +0000
166@@ -9,28 +9,21 @@
167 tal:define="link context/menu:context/visibility"
168 >
169 <div tal:condition="not:context/private" id="privacy-text">
170- <a
171- tal:condition="link/enabled"
172- tal:attributes="href link/path; title link/text"
173- class="sprite edit"
174- id="privacy-link"
175- >This report is public</a>
176- <tal:unchangeable condition="not:link/enabled"
177- >This report is public</tal:unchangeable>
178+ <a class="sprite edit" id="privacy-link"
179+ tal:attributes="href link/path; title link/text"
180+ tal:condition="link/enabled">This report is public</a>
181+ <tal:unchangeable condition="not:link/enabled">
182+ This report is public
183+ </tal:unchangeable>
184 </div>
185 <div tal:condition="context/private" id="privacy-text">
186- <a
187- tal:condition="link/enabled"
188+ <a class="sprite edit" id="privacy-link"
189 tal:attributes="href link/path; title link/text"
190- class="sprite edit"
191- id="privacy-link"
192- >This report is <strong>private</strong></a>
193- <tal:unchangeable condition="not:link/enabled"
194- >This report is private</tal:unchangeable>
195+ tal:condition="link/enabled">This report is <strong>private</strong></a>
196+ <tal:unchangeable condition="not:link/enabled">
197+ This report is private
198+ </tal:unchangeable>
199 </div>
200- <div
201- tal:condition="context/security_related"
202- class="sprite security"
203- id="security-message"
204- >Security vulnerability</div>
205+ <div class="sprite security" id="security-message"
206+ tal:condition="context/security_related">Security vulnerability</div>
207 </div>
208
209=== modified file 'lib/lp/bugs/templates/bug-portlet-questions.pt'
210--- lib/lp/bugs/templates/bug-portlet-questions.pt 2009-07-17 17:59:07 +0000
211+++ lib/lp/bugs/templates/bug-portlet-questions.pt 2009-09-10 20:18:28 +0000
212@@ -1,24 +1,16 @@
213 <div
214- xmlns:tal="http://xml.zope.org/namespaces/tal"
215- xmlns:metal="http://xml.zope.org/namespaces/metal"
216- xmlns:i18n="http://xml.zope.org/namespaces/i18n"
217- class="portlet" id="portlet-questions"
218- tal:condition="context/questions"
219->
220-
221+ xmlns:tal="http://xml.zope.org/namespaces/tal"
222+ xmlns:metal="http://xml.zope.org/namespaces/metal"
223+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
224+ class="portlet" id="portlet-questions"
225+ tal:condition="context/questions">
226 <h2>Related questions</h2>
227-
228- <div class="portletBody portletContent">
229-
230- <ul>
231- <li tal:repeat="question context/questions" class="question-row">
232- <span tal:content="question/target/displayname"
233- tal:attributes="class question/image:sprite_css">Ubuntu</span>:
234- <a tal:attributes="href question/fmt:url"
235- tal:content="question/title">question title here</a>
236- </li>
237- </ul>
238-
239- </div>
240-
241+ <ul>
242+ <li tal:repeat="question context/questions" class="question-row">
243+ <span tal:content="question/target/displayname"
244+ tal:attributes="class question/image:sprite_css">Ubuntu</span>:
245+ <a tal:attributes="href question/fmt:url"
246+ tal:content="question/title">question title here</a>
247+ </li>
248+ </ul>
249 </div>
250
251=== modified file 'lib/lp/bugs/templates/bug-portlet-specs.pt'
252--- lib/lp/bugs/templates/bug-portlet-specs.pt 2009-07-17 17:59:07 +0000
253+++ lib/lp/bugs/templates/bug-portlet-specs.pt 2009-09-10 20:18:28 +0000
254@@ -1,15 +1,12 @@
255 <div
256- xmlns:tal="http://xml.zope.org/namespaces/tal"
257- xmlns:metal="http://xml.zope.org/namespaces/metal"
258- xmlns:i18n="http://xml.zope.org/namespaces/i18n"
259- class="portlet" id="portlet-blueprints"
260- tal:condition="context/specifications"
261->
262+ xmlns:tal="http://xml.zope.org/namespaces/tal"
263+ xmlns:metal="http://xml.zope.org/namespaces/metal"
264+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
265+ class="portlet" id="portlet-blueprints"
266+ tal:condition="context/specifications">
267 <h2>Related blueprints</h2>
268- <div class="portletBody">
269- <table>
270- <tr tal:repeat="spec context/specifications"
271- tal:replace="structure spec/@@+listing-compact" />
272- </table>
273- </div>
274+ <ul>
275+ <li tal:repeat="spec context/specifications"
276+ tal:content="structure spec/fmt:link" />
277+ </ul>
278 </div>
279
280=== modified file 'lib/lp/bugs/templates/bug-portlet-watch.pt'
281--- lib/lp/bugs/templates/bug-portlet-watch.pt 2009-07-17 17:59:07 +0000
282+++ lib/lp/bugs/templates/bug-portlet-watch.pt 2009-09-10 20:18:28 +0000
283@@ -1,26 +1,21 @@
284 <div
285- xmlns:tal="http://xml.zope.org/namespaces/tal"
286- xmlns:metal="http://xml.zope.org/namespaces/metal"
287- xmlns:i18n="http://xml.zope.org/namespaces/i18n"
288- class="portlet" id="portlet-watches"
289- tal:condition="context/watches"
290- tal:define="current_task view/current_bugtask;
291- url current_task/fmt:url">
292+ xmlns:tal="http://xml.zope.org/namespaces/tal"
293+ xmlns:metal="http://xml.zope.org/namespaces/metal"
294+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
295+ class="portlet" id="portlet-watches"
296+ tal:condition="context/watches">
297 <h2>Remote bug watches</h2>
298- <div class="portletBody portletContent">
299- <ul style="padding-left:0;">
300- <li tal:repeat="watch context/watches">
301- <span class="sprite bug-remote" />
302- <a tal:replace="structure watch/fmt:external-link" />
303- <tal:block tal:condition="watch/remotestatus">
304- <br />[<span tal:content="watch/remotestatus" />]
305- </tal:block>&nbsp;<a
306- tal:attributes="href watch/fmt:url"
307- class="sprite edit"
308- alt="Change watch details"
309- ><span class="invisible-link">[edit]</span></a>
310- </li>
311- </ul>
312- <p>Bug watches keep track of this bug in other bug trackers.</p>
313- </div>
314+ <ul>
315+ <li tal:repeat="watch context/watches">
316+ <span class="sprite bug-remote" />
317+ <a tal:replace="structure watch/fmt:external-link" />
318+ <tal:block tal:condition="watch/remotestatus">
319+ <br />[<span tal:content="watch/remotestatus" />]
320+ </tal:block>&nbsp;<a
321+ tal:attributes="href watch/fmt:url"
322+ class="sprite edit" alt="Change watch details"
323+ ><span class="invisible-link">[edit]</span></a>
324+ </li>
325+ </ul>
326+ <p>Bug watches keep track of this bug in other bug trackers.</p>
327 </div>