Merge lp:~gary/launchpad/launchpad-templates-3 into lp:launchpad
- launchpad-templates-3
- Merge into devel
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~gary/launchpad/launchpad-templates-3 |
Merge into: | lp:launchpad |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~gary/launchpad/launchpad-templates-3 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Edwin Grubbs (community) | code ui* | Approve | |
Review via email: mp+12101@code.launchpad.net |
Commit message
Description of the change
Gary Poster (gary) wrote : | # |
Edwin Grubbs (edwin-grubbs) wrote : | # |
Hi Gary,
Thanks for getting rid of all this cruft. I only have a few suggestions for
changes.
merge-conditional
Need to remove default_editform, launchpad_addform, launchpad_editform,
and message_add from pagetitles.py. Since these are just used as macros, they
don't need to have a view class with a page_title either.
Can you open up a bug to see if the few templates that use these the
launchpad_addform and launchpad_editform macros can be updated not to use them?
If these macros are still necessary, the <h1> in these macros needs to be
removed at the same time that the templates using them are converted to UI 3.0.
Otherwise, there will be duplicate <h1> tags.
-Edwin
>=== modified file 'lib/canonical/
>--- lib/canonical/
>+++ lib/canonical/
>@@ -35,6 +35,8 @@
> """View class for hardware database submissions."""
>
> schema = IHWSubmissionForm
>+ label = 'Hardware Database Submission'
>+ page_title = 'Submit New Data to the Launchpad Hardware Database'
>
> @action(u'Upload', name='upload')
> def upload_action(self, action, data):
>@@ -150,6 +152,14 @@
> class HWDBPersonSubmi
> """View class for preseting HWDB submissions by a person."""
>
>+ @property
>+ def label(self):
>+ return 'Hardware submissions for %s' % (self.context.
>+
>+ @property
>+ def page_title(self):
>+ return "Hardware Database submissions by %s" % (self.context.
I think I told you something different in previous reviews, but it was
made clear to me that the page_title is only necessary for toplevel pages
that it can't compute breadcrumbs for, so you can get rid of it here.
> def getAllBatched(
> """Return the list of HWDB submissions made by this person."""
> hw_submissionset = getUtility(
>@@ -255,6 +265,7 @@
> """View class for lists of HWDB submissions for a system fingerprint."""
>
> implements(
>+ label = page_title = "Hardware Database submissions for a fingerprint"
>
>
> template = ViewPageTemplat
> '../templates/
>
>=== modified file 'lib/canonical/
>--- lib/canonical/
>+++ lib/canonical/
>@@ -3,10 +3,7 @@
> xmlns:tal="http://
> xmlns:metal="http://
> xmlns:i18n="http://
>- xml:lang="en"
>- lang="en"
>- dir="ltr"
>- metal:use-
>+ metal:use-
> i18n:domain=
> >
This file also fills the "heading" slot, which should be removed.
>=== modified file 'lib/canonical/
>--- lib/canonical/
>+++ lib/canonical/
Gary Poster (gary) wrote : | # |
Thank you Edwin!
I have made all of the changes you requested, except that when I removed the page_title, tests failed. I left it in.
The requested bug is https:/
The incremental diff also includes changes to address other problems I found in tests.
Thanks again.
Gary
=== modified file 'lib/canonical/
--- lib/canonical/
+++ lib/canonical/
@@ -102,7 +102,7 @@
>>> anon_browser.open('http://
>>> print extract_
- Hardware submissions for Foo Bar
+ Hardware submissions for Foo Bar...
Foo Bar has posted no submissions.
Submissions that are marked as private and owned by a team are only
@@ -131,7 +131,7 @@
>>> anon_browser.open(
... 'http://
>>> print extract_
- Hardware submissions for Ubuntu Team
+ Hardware submissions for Ubuntu Team...
Ubuntu Team has posted no submissions.
>>> browser = setupBrowser(
@@ -233,5 +233,6 @@
>>> anon_browser.open(
... 'http://
>>> print extract_
+ Hardware Database submissions for a fingerprint
Submissions for system: unknownfingerprint
There are no submissions for this system.
=== modified file 'lib/canonical/
--- lib/canonical/
+++ lib/canonical/
@@ -317,8 +317,6 @@
debug_root_index = 'Launchpad Debug Home Page'
-default_editform = 'Default "Edit" Page'
-
distributionmi
distribution_
@@ -417,13 +415,6 @@
# launchpad_debug doesn't need a title.
-def launchpad_
- """Return the page_title of the view, or None."""
- # Returning None results in the default Launchpad page title being used.
- return getattr(view, 'page_title', None)
-
-launchpad_editform = launchpad_addform
-
launchpad_feedback = 'Help improve Launchpad'
launchpad_
@@ -517,8 +508,6 @@
# messages_index is a redirect
-message_add = ContextBugId('Bug #%d - Add a comment')
-
milestone_add = ContextTitle('Add new milestone for %s')
milestone_edit = ContextTitle('Edit %s')
=== modified file 'lib/canonical/
--- lib/canonical/
+++ lib/canonical/
@@ -7,9 +7,6 @@
i18n:
>
<body>
- <...
Preview Diff
1 | === modified file 'lib/canonical/launchpad/browser/hwdb.py' |
2 | --- lib/canonical/launchpad/browser/hwdb.py 2009-08-14 13:03:36 +0000 |
3 | +++ lib/canonical/launchpad/browser/hwdb.py 2009-09-18 20:25:59 +0000 |
4 | @@ -35,6 +35,8 @@ |
5 | """View class for hardware database submissions.""" |
6 | |
7 | schema = IHWSubmissionForm |
8 | + label = 'Hardware Database Submission' |
9 | + page_title = 'Submit New Data to the Launchpad Hardware Database' |
10 | |
11 | @action(u'Upload', name='upload') |
12 | def upload_action(self, action, data): |
13 | @@ -150,6 +152,14 @@ |
14 | class HWDBPersonSubmissionsView(LaunchpadView): |
15 | """View class for preseting HWDB submissions by a person.""" |
16 | |
17 | + @property |
18 | + def label(self): |
19 | + return 'Hardware submissions for %s' % (self.context.title,) |
20 | + |
21 | + @property |
22 | + def page_title(self): |
23 | + return "Hardware Database submissions by %s" % (self.context.title,) |
24 | + |
25 | def getAllBatched(self): |
26 | """Return the list of HWDB submissions made by this person.""" |
27 | hw_submissionset = getUtility(IHWSubmissionSet) |
28 | @@ -255,6 +265,7 @@ |
29 | """View class for lists of HWDB submissions for a system fingerprint.""" |
30 | |
31 | implements(IBrowserPublisher) |
32 | + label = page_title = "Hardware Database submissions for a fingerprint" |
33 | |
34 | template = ViewPageTemplateFile( |
35 | '../templates/hwdb-fingerprint-submissions.pt') |
36 | |
37 | === modified file 'lib/canonical/launchpad/pagetitles.py' |
38 | --- lib/canonical/launchpad/pagetitles.py 2009-09-18 09:21:50 +0000 |
39 | +++ lib/canonical/launchpad/pagetitles.py 2009-09-18 20:25:59 +0000 |
40 | @@ -415,12 +415,6 @@ |
41 | |
42 | hassprints_sprints = ContextTitle("Events related to %s") |
43 | |
44 | -hwdb_fingerprint_submissions = ( |
45 | - "Hardware Database submissions for a fingerprint") |
46 | - |
47 | -hwdb_submit_hardware_data = ( |
48 | - 'Submit New Data to the Launchpad Hardware Database') |
49 | - |
50 | # launchpad_debug doesn't need a title. |
51 | |
52 | def launchpad_addform(context, view): |
53 | @@ -438,8 +432,6 @@ |
54 | |
55 | launchpad_graphics = 'Overview of Launchpad graphics and icons' |
56 | |
57 | -template_form = 'XXX PLEASE DO NOT USE THIS TEMPLATE XXX' |
58 | - |
59 | # launchpad_css is a css file |
60 | |
61 | # launchpad_js is standard javascript |
62 | @@ -550,8 +542,6 @@ |
63 | |
64 | announcements_all = 'Announcements from all projects hosted in Launchpad' |
65 | |
66 | -notification_test = 'Notification test' |
67 | - |
68 | oauth_authorize = 'Authorize application to access Launchpad on your behalf' |
69 | |
70 | def object_driver(context, view): |
71 | @@ -615,9 +605,6 @@ |
72 | |
73 | # person_foaf is an rdf file |
74 | |
75 | -person_hwdb_submissions = ContextDisplayName( |
76 | - "Hardware Database submissions by %s") |
77 | - |
78 | person_images = ContextDisplayName(smartquote("%s's hackergotchi and emblem")) |
79 | |
80 | person_karma = ContextDisplayName(smartquote("%s's karma in Launchpad")) |
81 | |
82 | === removed file 'lib/canonical/launchpad/templates/default-editform.pt' |
83 | --- lib/canonical/launchpad/templates/default-editform.pt 2009-07-17 17:59:07 +0000 |
84 | +++ lib/canonical/launchpad/templates/default-editform.pt 1970-01-01 00:00:00 +0000 |
85 | @@ -1,85 +0,0 @@ |
86 | -<html |
87 | - xmlns="http://www.w3.org/1999/xhtml" |
88 | - xmlns:tal="http://xml.zope.org/namespaces/tal" |
89 | - xmlns:metal="http://xml.zope.org/namespaces/metal" |
90 | - xml:lang="en" |
91 | - lang="en" |
92 | - dir="ltr" |
93 | - metal:use-macro="context/@@main_template/master" |
94 | -> |
95 | -<body> |
96 | -<tal:tag condition="view/update"/> |
97 | - <div metal:fill-slot="main"> |
98 | - <div metal:define-macro="body"> |
99 | - |
100 | - <form action="." tal:attributes="action request/URL" method="post" |
101 | - enctype="multipart/form-data"> |
102 | - |
103 | - <div metal:define-macro="formbody"> |
104 | - |
105 | - <h1 tal:condition="view/label" |
106 | - tal:content="view/label" |
107 | - metal:define-slot="heading" |
108 | - >Edit something</h1> |
109 | - |
110 | - <p tal:define="status view/update" |
111 | - tal:condition="status" |
112 | - tal:content="status" /> |
113 | - |
114 | - <p |
115 | - tal:condition="view/errors" |
116 | - class="error message" |
117 | - > |
118 | - There are |
119 | - <tal:count |
120 | - replace="view/errors/count:len" |
121 | - >6</tal:count> problems with the information you provided. |
122 | - Please fix them and try again. |
123 | - </p> |
124 | - |
125 | - <div metal:define-slot="extra_info" |
126 | - class="documentDescription" |
127 | - tal:replace="nothing"> |
128 | - This is where a document heading paragraph can be inserted. In |
129 | - your actual customised editform, you can fill-slot this with |
130 | - a descriptive paragraph. |
131 | - </div> |
132 | - |
133 | - <div class="row" |
134 | - metal:define-slot="extra_top" tal:replace="nothing"> |
135 | - <div>Extra top</div> |
136 | - <div class="field"><input type="text" style="width:100%" /></div> |
137 | - </div> |
138 | - |
139 | - <div metal:use-macro="context/@@launchpad_widget_macros/launchpad_widget_rows" /> |
140 | - |
141 | - <div class="separator"></div> |
142 | - |
143 | - <div class="row" |
144 | - metal:define-slot="extra_bottom" tal:replace="nothing"> |
145 | - <div>Extra bottom</div> |
146 | - <div class="field"><input type="text" style="width:100%" /></div> |
147 | - </div> |
148 | - <div class="separator"></div> |
149 | - </div> |
150 | - |
151 | - <div class="actions"> |
152 | - <input |
153 | - type="submit" |
154 | - name="UPDATE_SUBMIT" |
155 | - value="Change" |
156 | - /> |
157 | - </div> |
158 | - <div class="row" metal:define-slot="extra_buttons" |
159 | - tal:replace="nothing"> |
160 | - </div> |
161 | - |
162 | - <div class="separator"></div> |
163 | - |
164 | - </form> |
165 | - |
166 | - </div> |
167 | - </div> |
168 | - |
169 | - </body> |
170 | -</html> |
171 | |
172 | === modified file 'lib/canonical/launchpad/templates/hwdb-fingerprint-submissions.pt' |
173 | --- lib/canonical/launchpad/templates/hwdb-fingerprint-submissions.pt 2009-07-17 17:59:07 +0000 |
174 | +++ lib/canonical/launchpad/templates/hwdb-fingerprint-submissions.pt 2009-09-18 20:25:59 +0000 |
175 | @@ -3,10 +3,7 @@ |
176 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
177 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
178 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
179 | - xml:lang="en" |
180 | - lang="en" |
181 | - dir="ltr" |
182 | - metal:use-macro="view/macro:page/applicationhome" |
183 | + metal:use-macro="view/macro:page/main_only" |
184 | i18n:domain="launchpad" |
185 | > |
186 | <body> |
187 | |
188 | === modified file 'lib/canonical/launchpad/templates/hwdb-submit-hardware-data.pt' |
189 | --- lib/canonical/launchpad/templates/hwdb-submit-hardware-data.pt 2009-07-17 17:59:07 +0000 |
190 | +++ lib/canonical/launchpad/templates/hwdb-submit-hardware-data.pt 2009-09-18 20:25:59 +0000 |
191 | @@ -3,20 +3,16 @@ |
192 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
193 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
194 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
195 | - xml:lang="en" |
196 | - lang="en" |
197 | - dir="ltr" |
198 | - metal:use-macro="view/macro:page/applicationhome" |
199 | + metal:use-macro="view/macro:page/main_only" |
200 | i18n:domain="launchpad" |
201 | > |
202 | <body> |
203 | - <h1 metal:fill-slot="heading">Hardware Database Submission</h1> |
204 | |
205 | <div metal:fill-slot="main"> |
206 | <div metal:use-macro="context/@@launchpad_form/form"> |
207 | |
208 | <p metal:fill-slot="extra_info"> |
209 | - This form is only intended to be filled and submitted by Ubuntu's |
210 | + This form is only intended to be filled and submitted by Ubuntu's |
211 | Hardware Database Client. |
212 | </p> |
213 | |
214 | |
215 | === modified file 'lib/canonical/launchpad/templates/launchpad-addform.pt' |
216 | --- lib/canonical/launchpad/templates/launchpad-addform.pt 2009-07-17 17:59:07 +0000 |
217 | +++ lib/canonical/launchpad/templates/launchpad-addform.pt 2009-09-18 20:25:59 +0000 |
218 | @@ -2,10 +2,7 @@ |
219 | xmlns="http://www.w3.org/1999/xhtml" |
220 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
221 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
222 | - xml:lang="en" |
223 | - lang="en" |
224 | - dir="ltr" |
225 | - metal:use-macro="context/@@main_template/master" |
226 | + metal:use-macro="view/macro:page/main_only" |
227 | > |
228 | <body> |
229 | |
230 | @@ -21,8 +18,8 @@ |
231 | |
232 | <div metal:define-macro="addform"> |
233 | |
234 | - <form action="." |
235 | - tal:attributes="action request/URL" |
236 | + <form action="." |
237 | + tal:attributes="action request/URL" |
238 | method="post" |
239 | enctype="multipart/form-data" |
240 | accept-charset="UTF-8"> |
241 | @@ -46,8 +43,8 @@ |
242 | tal:condition="status" |
243 | tal:content="status" /> |
244 | |
245 | - <div class="row" |
246 | - metal:define-slot="extra_top" |
247 | + <div class="row" |
248 | + metal:define-slot="extra_top" |
249 | tal:replace="nothing"> |
250 | <div>Extra top</div> |
251 | <div><input type="text" style="width:100%" /></div> |
252 | @@ -56,7 +53,7 @@ |
253 | <div metal:use-macro="context/@@launchpad_widget_macros/launchpad_widget_rows" /> |
254 | |
255 | <div class="row" |
256 | - metal:define-slot="extra_bottom" |
257 | + metal:define-slot="extra_bottom" |
258 | tal:replace="nothing"> |
259 | <div>Extra bottom</div> |
260 | <div class="field"><input type="text" style="width:100%" /></div> |
261 | @@ -69,8 +66,8 @@ |
262 | name="UPDATE_SUBMIT" /> |
263 | </div> |
264 | |
265 | - <div class="row" |
266 | - metal:define-slot="extra_buttons" |
267 | + <div class="row" |
268 | + metal:define-slot="extra_buttons" |
269 | tal:replace="nothing"> |
270 | </div> |
271 | |
272 | |
273 | === modified file 'lib/canonical/launchpad/templates/launchpad-editform.pt' |
274 | --- lib/canonical/launchpad/templates/launchpad-editform.pt 2009-07-17 17:59:07 +0000 |
275 | +++ lib/canonical/launchpad/templates/launchpad-editform.pt 2009-09-18 20:25:59 +0000 |
276 | @@ -2,10 +2,7 @@ |
277 | xmlns="http://www.w3.org/1999/xhtml" |
278 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
279 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
280 | - xml:lang="en" |
281 | - lang="en" |
282 | - dir="ltr" |
283 | - metal:use-macro="context/@@main_template/master" |
284 | + metal:use-macro="view/macro:page/main_only" |
285 | > |
286 | <body> |
287 | |
288 | @@ -62,7 +59,7 @@ |
289 | class="documentDescription" |
290 | tal:replace="nothing"> |
291 | This is where a document heading paragraph can be inserted. In |
292 | - your actual customised editform, you can fill-slot this with |
293 | + your actual customised editform, you can fill-slot this with |
294 | a descriptive paragraph. |
295 | </div> |
296 | |
297 | @@ -71,11 +68,11 @@ |
298 | <div>Extra top</div> |
299 | <div class="field"><input type="text" style="width:100%" /></div> |
300 | </div> |
301 | - |
302 | + |
303 | <div metal:use-macro="context/@@launchpad_widget_macros/launchpad_widget_rows" /> |
304 | - |
305 | + |
306 | <div class="separator"></div> |
307 | - |
308 | + |
309 | <div class="row" |
310 | metal:define-slot="extra_bottom" tal:replace="nothing"> |
311 | <div>Extra bottom</div> |
312 | |
313 | === removed file 'lib/canonical/launchpad/templates/message-add.pt' |
314 | --- lib/canonical/launchpad/templates/message-add.pt 2009-07-17 17:59:07 +0000 |
315 | +++ lib/canonical/launchpad/templates/message-add.pt 1970-01-01 00:00:00 +0000 |
316 | @@ -1,33 +0,0 @@ |
317 | -<html |
318 | - xmlns="http://www.w3.org/1999/xhtml" |
319 | - xmlns:tal="http://xml.zope.org/namespaces/tal" |
320 | - xmlns:metal="http://xml.zope.org/namespaces/metal" |
321 | - xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
322 | - xml:lang="en" |
323 | - lang="en" |
324 | - dir="ltr" |
325 | - metal:use-macro="context/@@main_template/master" |
326 | - i18n:domain="launchpad" |
327 | -> |
328 | -<body> |
329 | - |
330 | -<metal:portlets fill-slot="portlets"> |
331 | - <div tal:replace="structure context/@@+portlet-details" /> |
332 | -</metal:portlets> |
333 | - |
334 | -<div metal:fill-slot="main"> |
335 | - |
336 | - <div metal:use-macro="context/@@launchpad_form/form"> |
337 | - |
338 | - <p metal:fill-slot="extra_info"> |
339 | - This form will allow you to create a new message in the discussion |
340 | - thread. |
341 | - </p> |
342 | - |
343 | - </div> |
344 | - |
345 | -</div> |
346 | - |
347 | -</body> |
348 | -</html> |
349 | - |
350 | |
351 | === modified file 'lib/canonical/launchpad/templates/notification-test.pt' |
352 | --- lib/canonical/launchpad/templates/notification-test.pt 2009-07-17 17:59:07 +0000 |
353 | +++ lib/canonical/launchpad/templates/notification-test.pt 2009-09-18 20:25:59 +0000 |
354 | @@ -3,10 +3,7 @@ |
355 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
356 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
357 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
358 | - xml:lang="en" |
359 | - lang="en" |
360 | - dir="ltr" |
361 | - metal:use-macro="context/@@main_template/master" |
362 | + metal:use-macro="view/macro:page/main_only" |
363 | i18n:domain="launchpad" |
364 | > |
365 | <body> |
366 | |
367 | === modified file 'lib/canonical/launchpad/templates/person-hwdb-submissions.pt' |
368 | --- lib/canonical/launchpad/templates/person-hwdb-submissions.pt 2009-07-17 17:59:07 +0000 |
369 | +++ lib/canonical/launchpad/templates/person-hwdb-submissions.pt 2009-09-18 20:25:59 +0000 |
370 | @@ -3,16 +3,10 @@ |
371 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
372 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
373 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
374 | - xml:lang="en" |
375 | - lang="en" |
376 | - dir="ltr" |
377 | - metal:use-macro="context/@@main_template/master" |
378 | + metal:use-macro="view/macro:page/main_only" |
379 | i18n:domain="launchpad" |
380 | > |
381 | <body> |
382 | - <metal:pageheading fill-slot="pageheading"> |
383 | - <h1>Hardware submissions for <span tal:replace="context/title" /></h1> |
384 | - </metal:pageheading> |
385 | |
386 | <div metal:fill-slot="main" |
387 | tal:define="batchnav view/getAllBatched; |
388 | |
389 | === removed file 'lib/canonical/launchpad/templates/sourcepackagerelease-body-summary.pt' |
390 | --- lib/canonical/launchpad/templates/sourcepackagerelease-body-summary.pt 2009-07-17 17:59:07 +0000 |
391 | +++ lib/canonical/launchpad/templates/sourcepackagerelease-body-summary.pt 1970-01-01 00:00:00 +0000 |
392 | @@ -1,8 +0,0 @@ |
393 | -<tal:root |
394 | - xmlns:tal="http://xml.zope.org/namespaces/tal" |
395 | - xmlns:metal="http://xml.zope.org/namespaces/metal" |
396 | - xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
397 | - omit-tag=""> |
398 | - |
399 | -SourcePackageRelease Body Summary Here |
400 | -</tal:root> |
401 | |
402 | === removed file 'lib/canonical/launchpad/templates/template-addform.pt' |
403 | --- lib/canonical/launchpad/templates/template-addform.pt 2009-07-17 17:59:07 +0000 |
404 | +++ lib/canonical/launchpad/templates/template-addform.pt 1970-01-01 00:00:00 +0000 |
405 | @@ -1,72 +0,0 @@ |
406 | -<html |
407 | - xmlns="http://www.w3.org/1999/xhtml" |
408 | - xmlns:tal="http://xml.zope.org/namespaces/tal" |
409 | - xmlns:metal="http://xml.zope.org/namespaces/metal" |
410 | - xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
411 | - xml:lang="en" |
412 | - lang="en" |
413 | - dir="ltr" |
414 | - metal:use-macro="context/@@main_template/master" |
415 | - i18n:domain="launchpad" |
416 | -> |
417 | - |
418 | -<body> |
419 | - |
420 | -<div tal:replace="nothing"> |
421 | - This page uses the launchpad-addform.pt METAL. Copy this page to your |
422 | - object-add.pt and then tweak the various bits below to make it all look |
423 | - nice. |
424 | -</div> |
425 | - |
426 | -<metal:portlets fill-slot="portlets"> |
427 | -</metal:portlets> |
428 | - |
429 | -<div metal:fill-slot="main"> |
430 | - |
431 | - <div metal:use-macro="context/@@launchpad_addform/addform"> |
432 | - |
433 | - <h1 tal:condition="view/label" |
434 | - tal:content="view/label" |
435 | - metal:fill-slot="heading">Heading from ZCML label="xxx"</h1> |
436 | - |
437 | - <div metal:fill-slot="extra_info" class="documentDescription"> |
438 | - Place the introductory paragraph here. It will be displayed in |
439 | - bold text below the form title. It should be a single paragraph |
440 | - giving an overview of what is being added. |
441 | - </div> |
442 | - |
443 | - <div class="row" metal:fill-slot="extra_top" tal:replace="nothing"> |
444 | - <div>Extra top</div> |
445 | - <div class="field"><input type="text" style="width:100%" /></div> |
446 | - <div> |
447 | - Put any extra form elements you want for this form which |
448 | - are not autogenerated here, and they will be at the top of the |
449 | - form. The auto-generated elements will use the layout from |
450 | - launchpad-widget-macros.pt so try to follow that pattern. |
451 | - </div> |
452 | - </div> |
453 | - |
454 | - <div class="row" metal:fill-slot="extra_bottom" tal:replace="nothing"> |
455 | - <div>Extra bottom</div> |
456 | - <div class="field"><input type="text" style="width:100%" /></div> |
457 | - <div> |
458 | - If you want additional non-autogenerated widgets at the bottom of the |
459 | - form, add them here. |
460 | - </div> |
461 | - </div> |
462 | - |
463 | - <div class="row" metal:fill-slot="extra_buttons" tal:replace="nothing"> |
464 | - If you wish to add some more buttons to the form, put those here. |
465 | - </div> |
466 | - |
467 | - </div> |
468 | - |
469 | - <div tal:replace="nothing"> |
470 | - This piece will appear at the bottom of the form if you want to add |
471 | - a footer. |
472 | - </div> |
473 | - |
474 | -</div> |
475 | - |
476 | -</body> |
477 | -</html> |
478 | |
479 | === removed file 'lib/canonical/launchpad/templates/template-editform.pt' |
480 | --- lib/canonical/launchpad/templates/template-editform.pt 2009-07-17 17:59:07 +0000 |
481 | +++ lib/canonical/launchpad/templates/template-editform.pt 1970-01-01 00:00:00 +0000 |
482 | @@ -1,64 +0,0 @@ |
483 | -<tal:root |
484 | - xmlns:tal="http://xml.zope.org/namespaces/tal" |
485 | - omit-tag=""> |
486 | -<tal:tag condition="view/update"/> |
487 | - |
488 | -<html |
489 | - xmlns="http://www.w3.org/1999/xhtml" |
490 | - xmlns:metal="http://xml.zope.org/namespaces/metal" |
491 | - xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
492 | - xml:lang="en" |
493 | - lang="en" |
494 | - dir="ltr" |
495 | - metal:use-macro="context/@@main_template/master" |
496 | - i18n:domain="launchpad" |
497 | -> |
498 | - |
499 | -<body> |
500 | - |
501 | -<metal:portlets fill-slot="portlets"> |
502 | -</metal:portlets> |
503 | - |
504 | -<div metal:fill-slot="main"> |
505 | - |
506 | - <div metal:use-macro="context/@@launchpad_editform/editform"> |
507 | - |
508 | - <h1 tal:condition="view/label" |
509 | - tal:content="view/label" |
510 | - metal:fill-slot="heading">Form Label comes from ZCML label="xxx"</h1> |
511 | - |
512 | - <div metal:fill-slot="extra_info" class="documentDescription"> |
513 | - Edit this paragraph to be a nice summary description of the edit form. |
514 | - It will be displayed at the top of the page, in bold text. The form |
515 | - errors and update status will be displayed above it if they are |
516 | - needed. |
517 | - </div> |
518 | - |
519 | - <div class="row" metal:fill-slot="extra_top" tal:replace="nothing"> |
520 | - <div>Extra top</div> |
521 | - <div class="field"><input type="text" style="width:100%" /></div> |
522 | - Put any additional widgets you want at the top of the form here, |
523 | - or delete this section altogether, or just leave it and it will |
524 | - be deleted by the tal:replace=nothing. |
525 | - </div> |
526 | - |
527 | - <div class="row" metal:fill-slot="extra_bottom" tal:replace="nothing"> |
528 | - <div>Extra bottom</div> |
529 | - <div class="field"><input type="text" style="width:100%" /></div> |
530 | - Put any additional widgets you want at the bottom of the form here, |
531 | - or delete this section altogether, or just leave it and it will |
532 | - be deleted by the tal:replace=nothing. |
533 | - </div> |
534 | - |
535 | - <div class="row" metal:fill-slot="extra_buttons" tal:replace="nothing"> |
536 | - Put any additional buttons you want on the form here and they |
537 | - will be displayed at the bottom of the form. Watch the |
538 | - tal:replace=nothing. |
539 | - </div> |
540 | - |
541 | - </div> |
542 | - |
543 | -</div> |
544 | -</body> |
545 | -</html> |
546 | -</tal:root> |
547 | |
548 | === removed file 'lib/canonical/launchpad/templates/template-form.pt' |
549 | --- lib/canonical/launchpad/templates/template-form.pt 2009-07-17 17:59:07 +0000 |
550 | +++ lib/canonical/launchpad/templates/template-form.pt 1970-01-01 00:00:00 +0000 |
551 | @@ -1,72 +0,0 @@ |
552 | -<html |
553 | - xmlns="http://www.w3.org/1999/xhtml" |
554 | - xmlns:tal="http://xml.zope.org/namespaces/tal" |
555 | - xmlns:metal="http://xml.zope.org/namespaces/metal" |
556 | - xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
557 | - xml:lang="en" |
558 | - lang="en" |
559 | - dir="ltr" |
560 | - metal:use-macro="context/@@main_template/master" |
561 | - i18n:domain="launchpad" |
562 | -> |
563 | - |
564 | -<body> |
565 | - |
566 | -<div tal:replace="nothing"> |
567 | - This page uses the launchpad-form.pt METAL. Copy this page to your |
568 | - object-form.pt and then tweak the various bits below to make it all look |
569 | - nice. |
570 | -</div> |
571 | - |
572 | -<metal:portlets fill-slot="portlets"> |
573 | -</metal:portlets> |
574 | - |
575 | -<div metal:fill-slot="main"> |
576 | - |
577 | - <div metal:use-macro="context/@@launchpad_form/form"> |
578 | - |
579 | - <h1 tal:condition="view/label" |
580 | - tal:content="view/label" |
581 | - metal:fill-slot="heading">Heading from ZCML label="xxx"</h1> |
582 | - |
583 | - <div metal:fill-slot="extra_info" class="documentDescription"> |
584 | - Place the introductory paragraph here. It will be displayed in |
585 | - bold text below the form title. It should be a single paragraph |
586 | - giving an overview of what is being added. |
587 | - </div> |
588 | - |
589 | - <div class="row" metal:fill-slot="extra_top" tal:replace="nothing"> |
590 | - <div>Extra top</div> |
591 | - <div class="field"><input type="text" style="width:100%" /></div> |
592 | - <div> |
593 | - Put any extra form elements you want for this form which |
594 | - are not autogenerated here, and they will be at the top of the |
595 | - form. The auto-generated elements will use the layout from |
596 | - launchpad-widget-macros.pt so try to follow that pattern. |
597 | - </div> |
598 | - </div> |
599 | - |
600 | - <div class="row" metal:fill-slot="extra_bottom" tal:replace="nothing"> |
601 | - <div>Extra bottom</div> |
602 | - <div class="field"><input type="text" style="width:100%" /></div> |
603 | - <div> |
604 | - If you want additional non-autogenerated widgets at the bottom of the |
605 | - form, add them here. |
606 | - </div> |
607 | - </div> |
608 | - |
609 | - <div class="row" metal:fill-slot="extra_buttons" tal:replace="nothing"> |
610 | - If you wish to add some more buttons to the form, put those here. |
611 | - </div> |
612 | - |
613 | - </div> |
614 | - |
615 | - <div tal:replace="nothing"> |
616 | - This piece will appear at the bottom of the form if you want to add |
617 | - a footer. |
618 | - </div> |
619 | - |
620 | -</div> |
621 | - |
622 | -</body> |
623 | -</html> |
624 | |
625 | === removed file 'lib/canonical/launchpad/templates/template-page.pt' |
626 | --- lib/canonical/launchpad/templates/template-page.pt 2009-07-17 17:59:07 +0000 |
627 | +++ lib/canonical/launchpad/templates/template-page.pt 1970-01-01 00:00:00 +0000 |
628 | @@ -1,29 +0,0 @@ |
629 | -<html |
630 | - xmlns="http://www.w3.org/1999/xhtml" |
631 | - xmlns:tal="http://xml.zope.org/namespaces/tal" |
632 | - xmlns:metal="http://xml.zope.org/namespaces/metal" |
633 | - xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
634 | - xml:lang="en" |
635 | - lang="en" |
636 | - dir="ltr" |
637 | - metal:use-macro="context/@@main_template/master" |
638 | - i18n:domain="launchpad" |
639 | -> |
640 | - |
641 | -<body> |
642 | - |
643 | -<metal:portlets fill-slot="portlets"> |
644 | -</metal:portlets> |
645 | - |
646 | -<p metal:fill-slot="help-XXXX"> |
647 | - HELP TEXT HERE |
648 | -</p> |
649 | - |
650 | -</metal:heading> |
651 | - |
652 | - <div metal:fill-slot="main"> |
653 | - <h1>Page title here</h1> |
654 | - |
655 | - </div> |
656 | - </body> |
657 | -</html> |
658 | |
659 | === modified file 'lib/canonical/launchpad/webapp/notifications.py' |
660 | --- lib/canonical/launchpad/webapp/notifications.py 2009-06-25 05:30:52 +0000 |
661 | +++ lib/canonical/launchpad/webapp/notifications.py 2009-09-18 20:25:59 +0000 |
662 | @@ -315,6 +315,9 @@ |
663 | in the test suite, as this page is useful for adjusting the visual style |
664 | of the notifications |
665 | """ |
666 | + |
667 | + label = page_title = 'Notification test' |
668 | + |
669 | def initialize(self): |
670 | response = self.request.response |
671 |
This branch removes seven templates, and changes 6 to match 3.0.
These files are removed. The majority of the diff consists of these. bigjools identified sourcepackagere lease-body- summary. pt as one that could be removed. I identified the other six by looking through .py files and .zcml files to try to find any usage. I did not find any usage, and salgado confirmed that I could remove them.
lib/canonical /launchpad/ templates/ default- editform. pt /launchpad/ templates/ message- add.pt /launchpad/ templates/ sourcepackagere lease-body- summary. pt /launchpad/ templates/ template- addform. pt /launchpad/ templates/ template- editform. pt /launchpad/ templates/ template- form.pt /launchpad/ templates/ template- page.pt
lib/canonical
lib/canonical
lib/canonical
lib/canonical
lib/canonical
lib/canonical
Most of the six template modifications have an exception of one sort or another that I'll mention below. This one is fairly normal though.
lib/canonical /launchpad/ templates/ notification- test.pt
To test, log in as an admin (<email address hidden>:test) and look at launchpad. dev/+notificati ontest1, launchpad. dev/+notificati ontest2, launchpad. dev/+notificati ontest3, and launchpad. dev/+notificati ontest4. I'm not sure why the last three redirect and did not investigate, but the behavior before and after my change seems the same.
These two are only used for their macros.
lib/canonical /launchpad/ templates/ launchpad- addform. pt /launchpad/ templates/ launchpad- editform. pt
lib/canonical
These two templates use the add form:
./lib/lp/ registry/ templates/ signedcodeofcon duct-acknowledg e.pt:11: <div metal:use- macro=" context/ @@launchpad_ addform/ addform" /> blueprints/ templates/ specification- requestfeedback .pt:23: <div metal:use- macro=" context/ @@launchpad_ addform/ addform" >
./lib/lp/
These two use the edit form:
./lib/lp/ registry/ templates/ signedcodeofcon duct-activate. pt:11: <div metal:use- macro=" context/ @@launchpad_ editform/ editform" /> registry/ templates/ signedcodeofcon duct-deactivate .pt:11: <div metal:use- macro=" context/ @@launchpad_ editform/ editform" />
./lib/lp/
The macros these use (addform and editform, respectively) do not actually include the <html> tag of the launchpad- addform. pt and launchpad- editform. pt templates, so the change I made to these templates is really only for statistics: changing it to 3.0 does not affect anything.
Finally, these three templates are all for bugs: hwdb functionality.
lib/canonical /launchpad/ templates/ hwdb-fingerprin t-submissions. pt /launchpad/ templates/ hwdb-submit- hardware- data.pt /launchpad/ templates/ person- hwdb-submission s.pt
lib/canonical
lib/canonical
I didn't know how to view these, and at least one of them appears to be for machine usage, and deryck didn't know how to view them either, so rather than digging into the code to figure out what was going on so I could see the pages, I opted to make the mechanical changes.
Thank you!
Gary