Merge lp:~gary/launchpad/launchpad-templates-3 into lp:launchpad

Proposed by Gary Poster
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
Reviewer Review Type Date Requested Status
Edwin Grubbs (community) code ui* Approve
Review via email: mp+12101@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Gary Poster (gary) wrote :

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 sourcepackagerelease-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
  lib/canonical/launchpad/templates/message-add.pt
  lib/canonical/launchpad/templates/sourcepackagerelease-body-summary.pt
  lib/canonical/launchpad/templates/template-addform.pt
  lib/canonical/launchpad/templates/template-editform.pt
  lib/canonical/launchpad/templates/template-form.pt
  lib/canonical/launchpad/templates/template-page.pt

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/+notificationtest1, launchpad.dev/+notificationtest2, launchpad.dev/+notificationtest3, and launchpad.dev/+notificationtest4. 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
  lib/canonical/launchpad/templates/launchpad-editform.pt

These two templates use the add form:

./lib/lp/registry/templates/signedcodeofconduct-acknowledge.pt:11: <div metal:use-macro="context/@@launchpad_addform/addform"/>
./lib/lp/blueprints/templates/specification-requestfeedback.pt:23: <div metal:use-macro="context/@@launchpad_addform/addform">

These two use the edit form:

./lib/lp/registry/templates/signedcodeofconduct-activate.pt:11: <div metal:use-macro="context/@@launchpad_editform/editform"/>
./lib/lp/registry/templates/signedcodeofconduct-deactivate.pt:11: <div metal:use-macro="context/@@launchpad_editform/editform"/>

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-fingerprint-submissions.pt
  lib/canonical/launchpad/templates/hwdb-submit-hardware-data.pt
  lib/canonical/launchpad/templates/person-hwdb-submissions.pt

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

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :
Download full text (3.6 KiB)

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/launchpad/browser/hwdb.py'
>--- lib/canonical/launchpad/browser/hwdb.py 2009-08-14 13:03:36 +0000
>+++ lib/canonical/launchpad/browser/hwdb.py 2009-09-18 21:42:33 +0000
>@@ -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 HWDBPersonSubmissionsView(LaunchpadView):
> """View class for preseting HWDB submissions by a person."""
>
>+ @property
>+ def label(self):
>+ return 'Hardware submissions for %s' % (self.context.title,)
>+
>+ @property
>+ def page_title(self):
>+ return "Hardware Database submissions by %s" % (self.context.title,)

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(self):
> """Return the list of HWDB submissions made by this person."""
> hw_submissionset = getUtility(IHWSubmissionSet)
>@@ -255,6 +265,7 @@
> """View class for lists of HWDB submissions for a system fingerprint."""
>
> implements(IBrowserPublisher)
>+ label = page_title = "Hardware Database submissions for a fingerprint"
>
>
> template = ViewPageTemplateFile(
> '../templates/hwdb-fingerprint-submissions.pt')
>
>=== modified file 'lib/canonical/launchpad/templates/hwdb-fingerprint-submissions.pt'
>--- lib/canonical/launchpad/templates/hwdb-fingerprint-submissions.pt 2009-07-17 17:59:07 +0000
>+++ lib/canonical/launchpad/templates/hwdb-fingerprint-submissions.pt 2009-09-18 21:42:33 +0000
>@@ -3,10 +3,7 @@
> xmlns:tal="http://xml.zope.org/namespaces/tal"
> xmlns:metal="http://xml.zope.org/namespaces/metal"
> xmlns:i18n="http://xml.zope.org/namespaces/i18n"
>- xml:lang="en"
>- lang="en"
>- dir="ltr"
>- metal:use-macro="view/macro:page/applicationhome"
>+ metal:use-macro="view/macro:page/main_only"
> i18n:domain="launchpad"
> >

This file also fills the "heading" slot, which should be removed.

>=== modified file 'lib/canonical/launchpad/templates/notification-test.pt'
>--- lib/canonical/launchpad/templates/notification-test.pt 2009-07-17 17:59:07 +0000
>+++ lib/canonical/launchpad/templates/notific...

Read more...

review: Approve (code ui*)
Revision history for this message
Gary Poster (gary) wrote :
Download full text (3.7 KiB)

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://bugs.edge.launchpad.net/launchpad-registry/+bug/433074 . It is 3 registry templates and 1 blueprint template, so I pushed it in registry as a first guess.

The incremental diff also includes changes to address other problems I found in tests.

Thanks again.

Gary

=== modified file 'lib/canonical/launchpad/pagetests/hwdb/02-view-submissions.txt'
--- lib/canonical/launchpad/pagetests/hwdb/02-view-submissions.txt 2008-03-19 09:25:03 +0000
+++ lib/canonical/launchpad/pagetests/hwdb/02-view-submissions.txt 2009-09-19 14:32:00 +0000
@@ -102,7 +102,7 @@

     >>> anon_browser.open('http://launchpad.dev/~name16/+hwdb-submissions')
     >>> print extract_text(find_main_content(anon_browser.contents))
- 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://launchpad.dev/~ubuntu-team/+hwdb-submissions')
     >>> print extract_text(find_main_content(anon_browser.contents))
- Hardware submissions for Ubuntu Team
+ Hardware submissions for Ubuntu Team...
     Ubuntu Team has posted no submissions.

     >>> browser = setupBrowser(auth='Basic <email address hidden>:cprov')
@@ -233,5 +233,6 @@
     >>> anon_browser.open(
     ... 'http://launchpad.dev/+hwdb/+fingerprint/unknownfingerprint')
     >>> print extract_text(find_main_content(anon_browser.contents))
+ Hardware Database submissions for a fingerprint
     Submissions for system: unknownfingerprint
     There are no submissions for this system.

=== modified file 'lib/canonical/launchpad/pagetitles.py'
--- lib/canonical/launchpad/pagetitles.py 2009-09-18 20:25:59 +0000
+++ lib/canonical/launchpad/pagetitles.py 2009-09-19 13:19:49 +0000
@@ -317,8 +317,6 @@

 debug_root_index = 'Launchpad Debug Home Page'

-default_editform = 'Default "Edit" Page'
-
 distributionmirror_index = ContextTitle('Mirror %s')

 distribution_archive_list = ContextTitle('%s Copy Archives')
@@ -417,13 +415,6 @@

 # launchpad_debug doesn't need a title.

-def launchpad_addform(context, view):
- """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_forbidden = 'Forbidden'
@@ -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/launchpad/templates/hwdb-fingerprint-submissions.pt'
--- lib/canonical/launchpad/templates/hwdb-fingerprint-submissions.pt 2009-09-18 20:25:59 +0000
+++ lib/canonical/launchpad/templates/hwdb-fingerprint-submissions.pt 2009-09-19 13:21:09 +0000
@@ -7,9 +7,6 @@
   i18n:domain="launchpad"
 >
   <body>
- <...

Read more...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/browser/hwdb.py'
--- lib/canonical/launchpad/browser/hwdb.py 2009-08-14 13:03:36 +0000
+++ lib/canonical/launchpad/browser/hwdb.py 2009-09-18 20:25:59 +0000
@@ -35,6 +35,8 @@
35 """View class for hardware database submissions."""35 """View class for hardware database submissions."""
3636
37 schema = IHWSubmissionForm37 schema = IHWSubmissionForm
38 label = 'Hardware Database Submission'
39 page_title = 'Submit New Data to the Launchpad Hardware Database'
3840
39 @action(u'Upload', name='upload')41 @action(u'Upload', name='upload')
40 def upload_action(self, action, data):42 def upload_action(self, action, data):
@@ -150,6 +152,14 @@
150class HWDBPersonSubmissionsView(LaunchpadView):152class HWDBPersonSubmissionsView(LaunchpadView):
151 """View class for preseting HWDB submissions by a person."""153 """View class for preseting HWDB submissions by a person."""
152154
155 @property
156 def label(self):
157 return 'Hardware submissions for %s' % (self.context.title,)
158
159 @property
160 def page_title(self):
161 return "Hardware Database submissions by %s" % (self.context.title,)
162
153 def getAllBatched(self):163 def getAllBatched(self):
154 """Return the list of HWDB submissions made by this person."""164 """Return the list of HWDB submissions made by this person."""
155 hw_submissionset = getUtility(IHWSubmissionSet)165 hw_submissionset = getUtility(IHWSubmissionSet)
@@ -255,6 +265,7 @@
255 """View class for lists of HWDB submissions for a system fingerprint."""265 """View class for lists of HWDB submissions for a system fingerprint."""
256266
257 implements(IBrowserPublisher)267 implements(IBrowserPublisher)
268 label = page_title = "Hardware Database submissions for a fingerprint"
258269
259 template = ViewPageTemplateFile(270 template = ViewPageTemplateFile(
260 '../templates/hwdb-fingerprint-submissions.pt')271 '../templates/hwdb-fingerprint-submissions.pt')
261272
=== modified file 'lib/canonical/launchpad/pagetitles.py'
--- lib/canonical/launchpad/pagetitles.py 2009-09-18 09:21:50 +0000
+++ lib/canonical/launchpad/pagetitles.py 2009-09-18 20:25:59 +0000
@@ -415,12 +415,6 @@
415415
416hassprints_sprints = ContextTitle("Events related to %s")416hassprints_sprints = ContextTitle("Events related to %s")
417417
418hwdb_fingerprint_submissions = (
419 "Hardware Database submissions for a fingerprint")
420
421hwdb_submit_hardware_data = (
422 'Submit New Data to the Launchpad Hardware Database')
423
424# launchpad_debug doesn't need a title.418# launchpad_debug doesn't need a title.
425419
426def launchpad_addform(context, view):420def launchpad_addform(context, view):
@@ -438,8 +432,6 @@
438432
439launchpad_graphics = 'Overview of Launchpad graphics and icons'433launchpad_graphics = 'Overview of Launchpad graphics and icons'
440434
441template_form = 'XXX PLEASE DO NOT USE THIS TEMPLATE XXX'
442
443# launchpad_css is a css file435# launchpad_css is a css file
444436
445# launchpad_js is standard javascript437# launchpad_js is standard javascript
@@ -550,8 +542,6 @@
550542
551announcements_all = 'Announcements from all projects hosted in Launchpad'543announcements_all = 'Announcements from all projects hosted in Launchpad'
552544
553notification_test = 'Notification test'
554
555oauth_authorize = 'Authorize application to access Launchpad on your behalf'545oauth_authorize = 'Authorize application to access Launchpad on your behalf'
556546
557def object_driver(context, view):547def object_driver(context, view):
@@ -615,9 +605,6 @@
615605
616# person_foaf is an rdf file606# person_foaf is an rdf file
617607
618person_hwdb_submissions = ContextDisplayName(
619 "Hardware Database submissions by %s")
620
621person_images = ContextDisplayName(smartquote("%s's hackergotchi and emblem"))608person_images = ContextDisplayName(smartquote("%s's hackergotchi and emblem"))
622609
623person_karma = ContextDisplayName(smartquote("%s's karma in Launchpad"))610person_karma = ContextDisplayName(smartquote("%s's karma in Launchpad"))
624611
=== removed file 'lib/canonical/launchpad/templates/default-editform.pt'
--- lib/canonical/launchpad/templates/default-editform.pt 2009-07-17 17:59:07 +0000
+++ lib/canonical/launchpad/templates/default-editform.pt 1970-01-01 00:00:00 +0000
@@ -1,85 +0,0 @@
1<html
2 xmlns="http://www.w3.org/1999/xhtml"
3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xml:lang="en"
6 lang="en"
7 dir="ltr"
8 metal:use-macro="context/@@main_template/master"
9>
10<body>
11<tal:tag condition="view/update"/>
12 <div metal:fill-slot="main">
13 <div metal:define-macro="body">
14
15 <form action="." tal:attributes="action request/URL" method="post"
16 enctype="multipart/form-data">
17
18 <div metal:define-macro="formbody">
19
20 <h1 tal:condition="view/label"
21 tal:content="view/label"
22 metal:define-slot="heading"
23 >Edit something</h1>
24
25 <p tal:define="status view/update"
26 tal:condition="status"
27 tal:content="status" />
28
29 <p
30 tal:condition="view/errors"
31 class="error message"
32 >
33 There are
34 <tal:count
35 replace="view/errors/count:len"
36 >6</tal:count> problems with the information you provided.
37 Please fix them and try again.
38 </p>
39
40 <div metal:define-slot="extra_info"
41 class="documentDescription"
42 tal:replace="nothing">
43 This is where a document heading paragraph can be inserted. In
44 your actual customised editform, you can fill-slot this with
45 a descriptive paragraph.
46 </div>
47
48 <div class="row"
49 metal:define-slot="extra_top" tal:replace="nothing">
50 <div>Extra top</div>
51 <div class="field"><input type="text" style="width:100%" /></div>
52 </div>
53
54 <div metal:use-macro="context/@@launchpad_widget_macros/launchpad_widget_rows" />
55
56 <div class="separator"></div>
57
58 <div class="row"
59 metal:define-slot="extra_bottom" tal:replace="nothing">
60 <div>Extra bottom</div>
61 <div class="field"><input type="text" style="width:100%" /></div>
62 </div>
63 <div class="separator"></div>
64 </div>
65
66 <div class="actions">
67 <input
68 type="submit"
69 name="UPDATE_SUBMIT"
70 value="Change"
71 />
72 </div>
73 <div class="row" metal:define-slot="extra_buttons"
74 tal:replace="nothing">
75 </div>
76
77 <div class="separator"></div>
78
79 </form>
80
81 </div>
82 </div>
83
84 </body>
85</html>
860
=== modified file 'lib/canonical/launchpad/templates/hwdb-fingerprint-submissions.pt'
--- lib/canonical/launchpad/templates/hwdb-fingerprint-submissions.pt 2009-07-17 17:59:07 +0000
+++ lib/canonical/launchpad/templates/hwdb-fingerprint-submissions.pt 2009-09-18 20:25:59 +0000
@@ -3,10 +3,7 @@
3 xmlns:tal="http://xml.zope.org/namespaces/tal"3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6 xml:lang="en"6 metal:use-macro="view/macro:page/main_only"
7 lang="en"
8 dir="ltr"
9 metal:use-macro="view/macro:page/applicationhome"
10 i18n:domain="launchpad"7 i18n:domain="launchpad"
11>8>
12 <body>9 <body>
1310
=== modified file 'lib/canonical/launchpad/templates/hwdb-submit-hardware-data.pt'
--- lib/canonical/launchpad/templates/hwdb-submit-hardware-data.pt 2009-07-17 17:59:07 +0000
+++ lib/canonical/launchpad/templates/hwdb-submit-hardware-data.pt 2009-09-18 20:25:59 +0000
@@ -3,20 +3,16 @@
3 xmlns:tal="http://xml.zope.org/namespaces/tal"3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6 xml:lang="en"6 metal:use-macro="view/macro:page/main_only"
7 lang="en"
8 dir="ltr"
9 metal:use-macro="view/macro:page/applicationhome"
10 i18n:domain="launchpad"7 i18n:domain="launchpad"
11>8>
12 <body>9 <body>
13 <h1 metal:fill-slot="heading">Hardware Database Submission</h1>
1410
15 <div metal:fill-slot="main">11 <div metal:fill-slot="main">
16 <div metal:use-macro="context/@@launchpad_form/form">12 <div metal:use-macro="context/@@launchpad_form/form">
1713
18 <p metal:fill-slot="extra_info">14 <p metal:fill-slot="extra_info">
19 This form is only intended to be filled and submitted by Ubuntu's 15 This form is only intended to be filled and submitted by Ubuntu's
20 Hardware Database Client.16 Hardware Database Client.
21 </p>17 </p>
2218
2319
=== modified file 'lib/canonical/launchpad/templates/launchpad-addform.pt'
--- lib/canonical/launchpad/templates/launchpad-addform.pt 2009-07-17 17:59:07 +0000
+++ lib/canonical/launchpad/templates/launchpad-addform.pt 2009-09-18 20:25:59 +0000
@@ -2,10 +2,7 @@
2 xmlns="http://www.w3.org/1999/xhtml"2 xmlns="http://www.w3.org/1999/xhtml"
3 xmlns:tal="http://xml.zope.org/namespaces/tal"3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xml:lang="en"5 metal:use-macro="view/macro:page/main_only"
6 lang="en"
7 dir="ltr"
8 metal:use-macro="context/@@main_template/master"
9>6>
10 <body>7 <body>
118
@@ -21,8 +18,8 @@
2118
22 <div metal:define-macro="addform">19 <div metal:define-macro="addform">
2320
24 <form action="." 21 <form action="."
25 tal:attributes="action request/URL" 22 tal:attributes="action request/URL"
26 method="post"23 method="post"
27 enctype="multipart/form-data"24 enctype="multipart/form-data"
28 accept-charset="UTF-8">25 accept-charset="UTF-8">
@@ -46,8 +43,8 @@
46 tal:condition="status"43 tal:condition="status"
47 tal:content="status" />44 tal:content="status" />
4845
49 <div class="row" 46 <div class="row"
50 metal:define-slot="extra_top" 47 metal:define-slot="extra_top"
51 tal:replace="nothing">48 tal:replace="nothing">
52 <div>Extra top</div>49 <div>Extra top</div>
53 <div><input type="text" style="width:100%" /></div>50 <div><input type="text" style="width:100%" /></div>
@@ -56,7 +53,7 @@
56 <div metal:use-macro="context/@@launchpad_widget_macros/launchpad_widget_rows" />53 <div metal:use-macro="context/@@launchpad_widget_macros/launchpad_widget_rows" />
5754
58 <div class="row"55 <div class="row"
59 metal:define-slot="extra_bottom" 56 metal:define-slot="extra_bottom"
60 tal:replace="nothing">57 tal:replace="nothing">
61 <div>Extra bottom</div>58 <div>Extra bottom</div>
62 <div class="field"><input type="text" style="width:100%" /></div>59 <div class="field"><input type="text" style="width:100%" /></div>
@@ -69,8 +66,8 @@
69 name="UPDATE_SUBMIT" />66 name="UPDATE_SUBMIT" />
70 </div>67 </div>
7168
72 <div class="row" 69 <div class="row"
73 metal:define-slot="extra_buttons" 70 metal:define-slot="extra_buttons"
74 tal:replace="nothing">71 tal:replace="nothing">
75 </div>72 </div>
7673
7774
=== modified file 'lib/canonical/launchpad/templates/launchpad-editform.pt'
--- lib/canonical/launchpad/templates/launchpad-editform.pt 2009-07-17 17:59:07 +0000
+++ lib/canonical/launchpad/templates/launchpad-editform.pt 2009-09-18 20:25:59 +0000
@@ -2,10 +2,7 @@
2 xmlns="http://www.w3.org/1999/xhtml"2 xmlns="http://www.w3.org/1999/xhtml"
3 xmlns:tal="http://xml.zope.org/namespaces/tal"3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xml:lang="en"5 metal:use-macro="view/macro:page/main_only"
6 lang="en"
7 dir="ltr"
8 metal:use-macro="context/@@main_template/master"
9>6>
10 <body>7 <body>
118
@@ -62,7 +59,7 @@
62 class="documentDescription"59 class="documentDescription"
63 tal:replace="nothing">60 tal:replace="nothing">
64 This is where a document heading paragraph can be inserted. In61 This is where a document heading paragraph can be inserted. In
65 your actual customised editform, you can fill-slot this with 62 your actual customised editform, you can fill-slot this with
66 a descriptive paragraph.63 a descriptive paragraph.
67 </div>64 </div>
6865
@@ -71,11 +68,11 @@
71 <div>Extra top</div>68 <div>Extra top</div>
72 <div class="field"><input type="text" style="width:100%" /></div>69 <div class="field"><input type="text" style="width:100%" /></div>
73 </div>70 </div>
74 71
75 <div metal:use-macro="context/@@launchpad_widget_macros/launchpad_widget_rows" />72 <div metal:use-macro="context/@@launchpad_widget_macros/launchpad_widget_rows" />
76 73
77 <div class="separator"></div>74 <div class="separator"></div>
78 75
79 <div class="row"76 <div class="row"
80 metal:define-slot="extra_bottom" tal:replace="nothing">77 metal:define-slot="extra_bottom" tal:replace="nothing">
81 <div>Extra bottom</div>78 <div>Extra bottom</div>
8279
=== removed file 'lib/canonical/launchpad/templates/message-add.pt'
--- lib/canonical/launchpad/templates/message-add.pt 2009-07-17 17:59:07 +0000
+++ lib/canonical/launchpad/templates/message-add.pt 1970-01-01 00:00:00 +0000
@@ -1,33 +0,0 @@
1<html
2 xmlns="http://www.w3.org/1999/xhtml"
3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6 xml:lang="en"
7 lang="en"
8 dir="ltr"
9 metal:use-macro="context/@@main_template/master"
10 i18n:domain="launchpad"
11>
12<body>
13
14<metal:portlets fill-slot="portlets">
15 <div tal:replace="structure context/@@+portlet-details" />
16</metal:portlets>
17
18<div metal:fill-slot="main">
19
20 <div metal:use-macro="context/@@launchpad_form/form">
21
22 <p metal:fill-slot="extra_info">
23 This form will allow you to create a new message in the discussion
24 thread.
25 </p>
26
27 </div>
28
29</div>
30
31</body>
32</html>
33
340
=== modified file 'lib/canonical/launchpad/templates/notification-test.pt'
--- lib/canonical/launchpad/templates/notification-test.pt 2009-07-17 17:59:07 +0000
+++ lib/canonical/launchpad/templates/notification-test.pt 2009-09-18 20:25:59 +0000
@@ -3,10 +3,7 @@
3 xmlns:tal="http://xml.zope.org/namespaces/tal"3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6 xml:lang="en"6 metal:use-macro="view/macro:page/main_only"
7 lang="en"
8 dir="ltr"
9 metal:use-macro="context/@@main_template/master"
10 i18n:domain="launchpad"7 i18n:domain="launchpad"
11>8>
12<body>9<body>
1310
=== modified file 'lib/canonical/launchpad/templates/person-hwdb-submissions.pt'
--- lib/canonical/launchpad/templates/person-hwdb-submissions.pt 2009-07-17 17:59:07 +0000
+++ lib/canonical/launchpad/templates/person-hwdb-submissions.pt 2009-09-18 20:25:59 +0000
@@ -3,16 +3,10 @@
3 xmlns:tal="http://xml.zope.org/namespaces/tal"3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6 xml:lang="en"6 metal:use-macro="view/macro:page/main_only"
7 lang="en"
8 dir="ltr"
9 metal:use-macro="context/@@main_template/master"
10 i18n:domain="launchpad"7 i18n:domain="launchpad"
11>8>
12 <body>9 <body>
13 <metal:pageheading fill-slot="pageheading">
14 <h1>Hardware submissions for <span tal:replace="context/title" /></h1>
15 </metal:pageheading>
1610
17 <div metal:fill-slot="main"11 <div metal:fill-slot="main"
18 tal:define="batchnav view/getAllBatched;12 tal:define="batchnav view/getAllBatched;
1913
=== removed file 'lib/canonical/launchpad/templates/sourcepackagerelease-body-summary.pt'
--- lib/canonical/launchpad/templates/sourcepackagerelease-body-summary.pt 2009-07-17 17:59:07 +0000
+++ lib/canonical/launchpad/templates/sourcepackagerelease-body-summary.pt 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
1<tal:root
2 xmlns:tal="http://xml.zope.org/namespaces/tal"
3 xmlns:metal="http://xml.zope.org/namespaces/metal"
4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
5 omit-tag="">
6
7SourcePackageRelease Body Summary Here
8</tal:root>
90
=== removed file 'lib/canonical/launchpad/templates/template-addform.pt'
--- lib/canonical/launchpad/templates/template-addform.pt 2009-07-17 17:59:07 +0000
+++ lib/canonical/launchpad/templates/template-addform.pt 1970-01-01 00:00:00 +0000
@@ -1,72 +0,0 @@
1<html
2 xmlns="http://www.w3.org/1999/xhtml"
3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6 xml:lang="en"
7 lang="en"
8 dir="ltr"
9 metal:use-macro="context/@@main_template/master"
10 i18n:domain="launchpad"
11>
12
13<body>
14
15<div tal:replace="nothing">
16 This page uses the launchpad-addform.pt METAL. Copy this page to your
17 object-add.pt and then tweak the various bits below to make it all look
18 nice.
19</div>
20
21<metal:portlets fill-slot="portlets">
22</metal:portlets>
23
24<div metal:fill-slot="main">
25
26 <div metal:use-macro="context/@@launchpad_addform/addform">
27
28 <h1 tal:condition="view/label"
29 tal:content="view/label"
30 metal:fill-slot="heading">Heading from ZCML label="xxx"</h1>
31
32 <div metal:fill-slot="extra_info" class="documentDescription">
33 Place the introductory paragraph here. It will be displayed in
34 bold text below the form title. It should be a single paragraph
35 giving an overview of what is being added.
36 </div>
37
38 <div class="row" metal:fill-slot="extra_top" tal:replace="nothing">
39 <div>Extra top</div>
40 <div class="field"><input type="text" style="width:100%" /></div>
41 <div>
42 Put any extra form elements you want for this form which
43 are not autogenerated here, and they will be at the top of the
44 form. The auto-generated elements will use the layout from
45 launchpad-widget-macros.pt so try to follow that pattern.
46 </div>
47 </div>
48
49 <div class="row" metal:fill-slot="extra_bottom" tal:replace="nothing">
50 <div>Extra bottom</div>
51 <div class="field"><input type="text" style="width:100%" /></div>
52 <div>
53 If you want additional non-autogenerated widgets at the bottom of the
54 form, add them here.
55 </div>
56 </div>
57
58 <div class="row" metal:fill-slot="extra_buttons" tal:replace="nothing">
59 If you wish to add some more buttons to the form, put those here.
60 </div>
61
62 </div>
63
64 <div tal:replace="nothing">
65 This piece will appear at the bottom of the form if you want to add
66 a footer.
67 </div>
68
69</div>
70
71</body>
72</html>
730
=== removed file 'lib/canonical/launchpad/templates/template-editform.pt'
--- lib/canonical/launchpad/templates/template-editform.pt 2009-07-17 17:59:07 +0000
+++ lib/canonical/launchpad/templates/template-editform.pt 1970-01-01 00:00:00 +0000
@@ -1,64 +0,0 @@
1<tal:root
2 xmlns:tal="http://xml.zope.org/namespaces/tal"
3 omit-tag="">
4<tal:tag condition="view/update"/>
5
6<html
7 xmlns="http://www.w3.org/1999/xhtml"
8 xmlns:metal="http://xml.zope.org/namespaces/metal"
9 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
10 xml:lang="en"
11 lang="en"
12 dir="ltr"
13 metal:use-macro="context/@@main_template/master"
14 i18n:domain="launchpad"
15>
16
17<body>
18
19<metal:portlets fill-slot="portlets">
20</metal:portlets>
21
22<div metal:fill-slot="main">
23
24 <div metal:use-macro="context/@@launchpad_editform/editform">
25
26 <h1 tal:condition="view/label"
27 tal:content="view/label"
28 metal:fill-slot="heading">Form Label comes from ZCML label="xxx"</h1>
29
30 <div metal:fill-slot="extra_info" class="documentDescription">
31 Edit this paragraph to be a nice summary description of the edit form.
32 It will be displayed at the top of the page, in bold text. The form
33 errors and update status will be displayed above it if they are
34 needed.
35 </div>
36
37 <div class="row" metal:fill-slot="extra_top" tal:replace="nothing">
38 <div>Extra top</div>
39 <div class="field"><input type="text" style="width:100%" /></div>
40 Put any additional widgets you want at the top of the form here,
41 or delete this section altogether, or just leave it and it will
42 be deleted by the tal:replace=nothing.
43 </div>
44
45 <div class="row" metal:fill-slot="extra_bottom" tal:replace="nothing">
46 <div>Extra bottom</div>
47 <div class="field"><input type="text" style="width:100%" /></div>
48 Put any additional widgets you want at the bottom of the form here,
49 or delete this section altogether, or just leave it and it will
50 be deleted by the tal:replace=nothing.
51 </div>
52
53 <div class="row" metal:fill-slot="extra_buttons" tal:replace="nothing">
54 Put any additional buttons you want on the form here and they
55 will be displayed at the bottom of the form. Watch the
56 tal:replace=nothing.
57 </div>
58
59 </div>
60
61</div>
62</body>
63</html>
64</tal:root>
650
=== removed file 'lib/canonical/launchpad/templates/template-form.pt'
--- lib/canonical/launchpad/templates/template-form.pt 2009-07-17 17:59:07 +0000
+++ lib/canonical/launchpad/templates/template-form.pt 1970-01-01 00:00:00 +0000
@@ -1,72 +0,0 @@
1<html
2 xmlns="http://www.w3.org/1999/xhtml"
3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6 xml:lang="en"
7 lang="en"
8 dir="ltr"
9 metal:use-macro="context/@@main_template/master"
10 i18n:domain="launchpad"
11>
12
13<body>
14
15<div tal:replace="nothing">
16 This page uses the launchpad-form.pt METAL. Copy this page to your
17 object-form.pt and then tweak the various bits below to make it all look
18 nice.
19</div>
20
21<metal:portlets fill-slot="portlets">
22</metal:portlets>
23
24<div metal:fill-slot="main">
25
26 <div metal:use-macro="context/@@launchpad_form/form">
27
28 <h1 tal:condition="view/label"
29 tal:content="view/label"
30 metal:fill-slot="heading">Heading from ZCML label="xxx"</h1>
31
32 <div metal:fill-slot="extra_info" class="documentDescription">
33 Place the introductory paragraph here. It will be displayed in
34 bold text below the form title. It should be a single paragraph
35 giving an overview of what is being added.
36 </div>
37
38 <div class="row" metal:fill-slot="extra_top" tal:replace="nothing">
39 <div>Extra top</div>
40 <div class="field"><input type="text" style="width:100%" /></div>
41 <div>
42 Put any extra form elements you want for this form which
43 are not autogenerated here, and they will be at the top of the
44 form. The auto-generated elements will use the layout from
45 launchpad-widget-macros.pt so try to follow that pattern.
46 </div>
47 </div>
48
49 <div class="row" metal:fill-slot="extra_bottom" tal:replace="nothing">
50 <div>Extra bottom</div>
51 <div class="field"><input type="text" style="width:100%" /></div>
52 <div>
53 If you want additional non-autogenerated widgets at the bottom of the
54 form, add them here.
55 </div>
56 </div>
57
58 <div class="row" metal:fill-slot="extra_buttons" tal:replace="nothing">
59 If you wish to add some more buttons to the form, put those here.
60 </div>
61
62 </div>
63
64 <div tal:replace="nothing">
65 This piece will appear at the bottom of the form if you want to add
66 a footer.
67 </div>
68
69</div>
70
71</body>
72</html>
730
=== removed file 'lib/canonical/launchpad/templates/template-page.pt'
--- lib/canonical/launchpad/templates/template-page.pt 2009-07-17 17:59:07 +0000
+++ lib/canonical/launchpad/templates/template-page.pt 1970-01-01 00:00:00 +0000
@@ -1,29 +0,0 @@
1<html
2 xmlns="http://www.w3.org/1999/xhtml"
3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6 xml:lang="en"
7 lang="en"
8 dir="ltr"
9 metal:use-macro="context/@@main_template/master"
10 i18n:domain="launchpad"
11>
12
13<body>
14
15<metal:portlets fill-slot="portlets">
16</metal:portlets>
17
18<p metal:fill-slot="help-XXXX">
19 HELP TEXT HERE
20</p>
21
22</metal:heading>
23
24 <div metal:fill-slot="main">
25 <h1>Page title here</h1>
26
27 </div>
28 </body>
29</html>
300
=== modified file 'lib/canonical/launchpad/webapp/notifications.py'
--- lib/canonical/launchpad/webapp/notifications.py 2009-06-25 05:30:52 +0000
+++ lib/canonical/launchpad/webapp/notifications.py 2009-09-18 20:25:59 +0000
@@ -315,6 +315,9 @@
315 in the test suite, as this page is useful for adjusting the visual style315 in the test suite, as this page is useful for adjusting the visual style
316 of the notifications316 of the notifications
317 """317 """
318
319 label = page_title = 'Notification test'
320
318 def initialize(self):321 def initialize(self):
319 response = self.request.response322 response = self.request.response
320323