Merge lp:~sinzui/launchpad/remove-main-template into lp:launchpad
- remove-main-template
- Merge into devel
Proposed by
Curtis Hovey
Status: | Merged |
---|---|
Approved by: | Aaron Bentley |
Approved revision: | not available |
Merged at revision: | not available |
Proposed branch: | lp:~sinzui/launchpad/remove-main-template |
Merge into: | lp:launchpad |
Diff against target: |
939 lines (+49/-535) 21 files modified
lib/canonical/launchpad/doc/tales-macro.txt (+3/-32) lib/canonical/launchpad/doc/zcmldirectives.txt (+2/-2) lib/canonical/launchpad/icing/style.css (+0/-1) lib/canonical/launchpad/pagetitles.py (+0/-9) lib/canonical/launchpad/templates/launchpad-forgottenpassword.pt (+1/-2) lib/canonical/launchpad/templates/main-template-macros.pt (+0/-33) lib/canonical/launchpad/templates/main-template.pt (+0/-308) lib/canonical/launchpad/webapp/login.py (+1/-0) lib/canonical/launchpad/webapp/tales.py (+5/-99) lib/canonical/launchpad/zcml/launchpad.zcml (+0/-18) lib/canonical/widgets/location.py (+1/-1) lib/lp/app/browser/configure.zcml (+6/-0) lib/lp/app/templates/base-layout-macros.pt (+1/-2) lib/lp/registry/browser/productrelease.py (+1/-1) lib/lp/registry/browser/team.py (+1/-1) lib/lp/registry/templates/object-timeline-graph.pt (+3/-3) lib/lp/services/openid/browser/configure.zcml (+1/-0) lib/lp/services/openid/browser/openidrpconfig.py (+18/-0) lib/lp/services/openid/templates/openidrpconfig-add.pt (+2/-10) lib/lp/services/openid/templates/openidrpconfig-edit.pt (+2/-10) lib/lp/services/openid/templates/openidrpconfigset-index.pt (+1/-3) |
To merge this branch: | bzr merge lp:~sinzui/launchpad/remove-main-template |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Review via email: mp+15165@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote : | # |
Revision history for this message
Aaron Bentley (abentley) wrote : | # |
Looks good, thanks!
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'lib/canonical/launchpad/doc/tales-macro.txt' | |||
2 | --- lib/canonical/launchpad/doc/tales-macro.txt 2009-10-21 18:42:52 +0000 | |||
3 | +++ lib/canonical/launchpad/doc/tales-macro.txt 2009-11-23 17:20:28 +0000 | |||
4 | @@ -12,20 +12,20 @@ | |||
5 | 12 | layout it's using. The following METAL fragment illustrates the way it's | 12 | layout it's using. The following METAL fragment illustrates the way it's |
6 | 13 | usually done: | 13 | usually done: |
7 | 14 | 14 | ||
9 | 15 | <html metal:use-macro="view/macro:page/default" /> | 15 | <html metal:use-macro="view/macro:page/main_side" /> |
10 | 16 | 16 | ||
11 | 17 | 17 | ||
12 | 18 | >>> from canonical.launchpad.ftests import test_tales | 18 | >>> from canonical.launchpad.ftests import test_tales |
13 | 19 | >>> view = FakeView() | 19 | >>> view = FakeView() |
14 | 20 | 20 | ||
15 | 21 | # Return value is the compiled macro expression. | 21 | # Return value is the compiled macro expression. |
17 | 22 | >>> test_tales('view/macro:page/default', view=view) | 22 | >>> test_tales('view/macro:page/main_side', view=view) |
18 | 23 | [('version', ...] | 23 | [('version', ...] |
19 | 24 | 24 | ||
20 | 25 | The pagetype is registered in the __pagetype__ attribute. | 25 | The pagetype is registered in the __pagetype__ attribute. |
21 | 26 | 26 | ||
22 | 27 | >>> view.__pagetype__ | 27 | >>> view.__pagetype__ |
24 | 28 | 'default' | 28 | 'main_side' |
25 | 29 | 29 | ||
26 | 30 | If the pagetype isn't defined, a LocationError is raised. | 30 | If the pagetype isn't defined, a LocationError is raised. |
27 | 31 | 31 | ||
28 | @@ -43,35 +43,6 @@ | |||
29 | 43 | >>> test_tales('view/macro:pagehas/portlets', view=view) | 43 | >>> test_tales('view/macro:pagehas/portlets', view=view) |
30 | 44 | True | 44 | True |
31 | 45 | 45 | ||
32 | 46 | >>> test_tales('view/macro:pagehas/actionsmenu', view=view) | ||
33 | 47 | True | ||
34 | 48 | |||
35 | 49 | >>> test_tales('view/macro:pagehas/heading', view=view) | ||
36 | 50 | False | ||
37 | 51 | |||
38 | 52 | |||
39 | 53 | The actions menu is deprecated. Some of the links are moved inline, | ||
40 | 54 | others are shown as navigation tabs. The navigationtabs page feature | ||
41 | 55 | controls that aspect. Two layouts show these, default2.0 and onecolumn. | ||
42 | 56 | |||
43 | 57 | >>> from canonical.launchpad.webapp.tales import PageMacroDispatcher | ||
44 | 58 | >>> for layout in sorted(PageMacroDispatcher._pagetypes): | ||
45 | 59 | ... view = FakeView() | ||
46 | 60 | ... macro = test_tales('view/macro:page/%s' % layout, view=view) | ||
47 | 61 | ... if test_tales('view/macro:pagehas/navigationtabs', view=view): | ||
48 | 62 | ... print layout | ||
49 | 63 | default2.0 | ||
50 | 64 | onecolumn | ||
51 | 65 | |||
52 | 66 | These two layouts have the actionsmenu turned off. | ||
53 | 67 | |||
54 | 68 | >>> macro = test_tales('view/macro:page/default2.0', view=view) | ||
55 | 69 | >>> test_tales('view/macro:pagehas/actionsmenu', view=view) | ||
56 | 70 | False | ||
57 | 71 | |||
58 | 72 | >>> macro = test_tales('view/macro:page/onecolumn', view=view) | ||
59 | 73 | >>> test_tales('view/macro:pagehas/actionsmenu', view=view) | ||
60 | 74 | False | ||
61 | 75 | 46 | ||
62 | 76 | The 'macro:isbetauser' can be used to safely try to determine if the | 47 | The 'macro:isbetauser' can be used to safely try to determine if the |
63 | 77 | current user is a beta user. It works for views that provide | 48 | current user is a beta user. It works for views that provide |
64 | 78 | 49 | ||
65 | === modified file 'lib/canonical/launchpad/doc/zcmldirectives.txt' | |||
66 | --- lib/canonical/launchpad/doc/zcmldirectives.txt 2009-10-21 19:35:40 +0000 | |||
67 | +++ lib/canonical/launchpad/doc/zcmldirectives.txt 2009-11-23 17:20:28 +0000 | |||
68 | @@ -151,7 +151,7 @@ | |||
69 | 151 | ... for="canonical.launchpad.ftests.IFoo" | 151 | ... for="canonical.launchpad.ftests.IFoo" |
70 | 152 | ... name="+mandrill" | 152 | ... name="+mandrill" |
71 | 153 | ... permission="zope.Public" | 153 | ... permission="zope.Public" |
73 | 154 | ... template="templates/main-template.pt" | 154 | ... template="../../lp/app/templates/base-layout.pt" |
74 | 155 | ... facet="another-mister-lizard" | 155 | ... facet="another-mister-lizard" |
75 | 156 | ... layer="canonical.launchpad.ftests.IFooLayer" | 156 | ... layer="canonical.launchpad.ftests.IFooLayer" |
76 | 157 | ... /> | 157 | ... /> |
77 | @@ -169,7 +169,7 @@ | |||
78 | 169 | ... (fooobject, request), name='+mandrill') | 169 | ... (fooobject, request), name='+mandrill') |
79 | 170 | 170 | ||
80 | 171 | >>> print mandrill_view.__class__.__name__ | 171 | >>> print mandrill_view.__class__.__name__ |
82 | 172 | SimpleViewClass from ...main-template.pt | 172 | SimpleViewClass from ...base-layout.pt |
83 | 173 | >>> print mandrill_view.__launchpad_facetname__ | 173 | >>> print mandrill_view.__launchpad_facetname__ |
84 | 174 | another-mister-lizard | 174 | another-mister-lizard |
85 | 175 | 175 | ||
86 | 176 | 176 | ||
87 | === modified file 'lib/canonical/launchpad/icing/style.css' | |||
88 | --- lib/canonical/launchpad/icing/style.css 2009-11-15 23:14:57 +0000 | |||
89 | +++ lib/canonical/launchpad/icing/style.css 2009-11-23 17:20:28 +0000 | |||
90 | @@ -607,7 +607,6 @@ | |||
91 | 607 | float: left; | 607 | float: left; |
92 | 608 | width: 16.16%; /* = (100% / 6) - 0.5% left over */ | 608 | width: 16.16%; /* = (100% / 6) - 0.5% left over */ |
93 | 609 | margin: 0 0.25%; /* = the leftover 0.5%, half each on the left and right */ | 609 | margin: 0 0.25%; /* = the leftover 0.5%, half each on the left and right */ |
94 | 610 | /* This is overridden in main-template.pt for Internet Explorer */ | ||
95 | 611 | padding: 0; | 610 | padding: 0; |
96 | 612 | text-align: center; | 611 | text-align: center; |
97 | 613 | color: #333; | 612 | color: #333; |
98 | 614 | 613 | ||
99 | === modified file 'lib/canonical/launchpad/pagetitles.py' | |||
100 | --- lib/canonical/launchpad/pagetitles.py 2009-11-18 11:52:25 +0000 | |||
101 | +++ lib/canonical/launchpad/pagetitles.py 2009-11-23 17:20:28 +0000 | |||
102 | @@ -394,8 +394,6 @@ | |||
103 | 394 | 394 | ||
104 | 395 | launchpad_forbidden = 'Forbidden' | 395 | launchpad_forbidden = 'Forbidden' |
105 | 396 | 396 | ||
106 | 397 | launchpad_forgottenpassword = 'Need a new Launchpad password?' | ||
107 | 398 | |||
108 | 399 | # launchpad_css is a css file | 397 | # launchpad_css is a css file |
109 | 400 | 398 | ||
110 | 401 | # launchpad_js is standard javascript | 399 | # launchpad_js is standard javascript |
111 | @@ -516,13 +514,6 @@ | |||
112 | 516 | """Return the page title to the invalid identity page.""" | 514 | """Return the page title to the invalid identity page.""" |
113 | 517 | return 'Invalid OpenID identity %s' % view.openid_request.identity | 515 | return 'Invalid OpenID identity %s' % view.openid_request.identity |
114 | 518 | 516 | ||
115 | 519 | openidrpconfig_add = 'Add an OpenID Relying Party Configuration' | ||
116 | 520 | |||
117 | 521 | openidrpconfig_edit = ContextDisplayName( | ||
118 | 522 | 'Edit Relying Party Configuration for %s') | ||
119 | 523 | |||
120 | 524 | openidrpconfigset_index = 'OpenID Relying Party Configurations' | ||
121 | 525 | |||
122 | 526 | def package_bugs(context, view): | 517 | def package_bugs(context, view): |
123 | 527 | """Return the page title bug in a package.""" | 518 | """Return the page title bug in a package.""" |
124 | 528 | return 'Bugs in %s' % context.name | 519 | return 'Bugs in %s' % context.name |
125 | 529 | 520 | ||
126 | === modified file 'lib/canonical/launchpad/templates/launchpad-forgottenpassword.pt' | |||
127 | --- lib/canonical/launchpad/templates/launchpad-forgottenpassword.pt 2009-10-20 11:29:26 +0000 | |||
128 | +++ lib/canonical/launchpad/templates/launchpad-forgottenpassword.pt 2009-11-23 17:20:28 +0000 | |||
129 | @@ -5,8 +5,7 @@ | |||
130 | 5 | omit-tag=""> | 5 | omit-tag=""> |
131 | 6 | <tal:do-this-first tal:content="view/process_form" /> | 6 | <tal:do-this-first tal:content="view/process_form" /> |
132 | 7 | <html | 7 | <html |
135 | 8 | metal:use-macro="context/@@main_template/master" | 8 | metal:use-macro="view/macro:page/main_only"> |
134 | 9 | > | ||
136 | 10 | <head metal:fill-slot="head_epilogue"> | 9 | <head metal:fill-slot="head_epilogue"> |
137 | 11 | <meta name="robots" content="noindex" /> | 10 | <meta name="robots" content="noindex" /> |
138 | 12 | </head> | 11 | </head> |
139 | 13 | 12 | ||
140 | === removed file 'lib/canonical/launchpad/templates/main-template-macros.pt' | |||
141 | --- lib/canonical/launchpad/templates/main-template-macros.pt 2009-07-17 17:59:07 +0000 | |||
142 | +++ lib/canonical/launchpad/templates/main-template-macros.pt 1970-01-01 00:00:00 +0000 | |||
143 | @@ -1,33 +0,0 @@ | |||
144 | 1 | <macros | ||
145 | 2 | xmlns="http://www.w3.org/1999/xhtml" | ||
146 | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" | ||
147 | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" | ||
148 | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | ||
149 | 6 | i18n:domain="launchpad" | ||
150 | 7 | tal:omit-tag="" | ||
151 | 8 | > | ||
152 | 9 | <metal:notifications define-macro="notifications"> | ||
153 | 10 | <metal:base-notifications | ||
154 | 11 | use-macro="context/@@+base-layout-macros/notifications" /> | ||
155 | 12 | </metal:notifications> | ||
156 | 13 | |||
157 | 14 | <metal:load-javascript define-macro="load-javascript"> | ||
158 | 15 | <metal:base-load-javascript | ||
159 | 16 | use-macro="context/@@+base-layout-macros/load-javascript" /> | ||
160 | 17 | </metal:load-javascript> | ||
161 | 18 | |||
162 | 19 | <metal:page-javascript define-macro="page-javascript"> | ||
163 | 20 | <metal:base-page-javascript | ||
164 | 21 | use-macro="context/@@+base-layout-macros/page-javascript" /> | ||
165 | 22 | </metal:page-javascript> | ||
166 | 23 | |||
167 | 24 | <metal:launchpad-stylesheet define-macro="launchpad-stylesheet"> | ||
168 | 25 | <metal:base-launchpad-stylesheet | ||
169 | 26 | use-macro="context/@@+base-layout-macros/launchpad-stylesheet" /> | ||
170 | 27 | </metal:launchpad-stylesheet> | ||
171 | 28 | |||
172 | 29 | <metal:lp-client-cache define-macro="lp-client-cache"> | ||
173 | 30 | <metal:base-lp-client-cache | ||
174 | 31 | use-macro="context/@@+base-layout-macros/lp-client-cache" /> | ||
175 | 32 | </metal:lp-client-cache> | ||
176 | 33 | </macros> | ||
177 | 34 | 0 | ||
178 | === removed file 'lib/canonical/launchpad/templates/main-template.pt' | |||
179 | --- lib/canonical/launchpad/templates/main-template.pt 2009-09-15 17:30:59 +0000 | |||
180 | +++ lib/canonical/launchpad/templates/main-template.pt 1970-01-01 00:00:00 +0000 | |||
181 | @@ -1,308 +0,0 @@ | |||
182 | 1 | <metal:page | ||
183 | 2 | xmlns:metal="http://xml.zope.org/namespaces/metal" | ||
184 | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" | ||
185 | 4 | define-macro="master" | ||
186 | 5 | tal:define=" | ||
187 | 6 | revno modules/canonical.launchpad.versioninfo/revno | string:unknown; | ||
188 | 7 | version string:Launchpad 2.2.6 (r${revno}); | ||
189 | 8 | " | ||
190 | 9 | ><metal:doctype define-slot="doctype"><tal:doctype tal:replace="structure string:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">" /></metal:doctype> | ||
191 | 10 | <metal:block define-slot="top_slot" /> | ||
192 | 11 | <html | ||
193 | 12 | xmlns="http://www.w3.org/1999/xhtml" | ||
194 | 13 | xmlns:tal="http://xml.zope.org/namespaces/tal" | ||
195 | 14 | xmlns:metal="http://xml.zope.org/namespaces/metal" | ||
196 | 15 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | ||
197 | 16 | xml:lang="en" | ||
198 | 17 | lang="en" | ||
199 | 18 | dir="ltr" | ||
200 | 19 | tal:attributes="lang view/lang|default_language|default; | ||
201 | 20 | xml:lang view/lang|default_language|default; | ||
202 | 21 | dir view/dir|string:ltr" | ||
203 | 22 | tal:define=" | ||
204 | 23 | rooturl modules/canonical.launchpad.webapp.vhosts/allvhosts/configs/mainsite/rooturl; | ||
205 | 24 | icingroot string:${rooturl}+icing/rev${revno}; | ||
206 | 25 | icingroot_contrib string:${rooturl}+icing-contrib/rev${revno}; | ||
207 | 26 | devmode modules/canonical.config/config/devmode; | ||
208 | 27 | is_demo modules/canonical.config/config/launchpad/is_demo; | ||
209 | 28 | is_edge modules/canonical.config/config/launchpad/is_edge; | ||
210 | 29 | is_lpnet modules/canonical.config/config/launchpad/is_lpnet; | ||
211 | 30 | site_message modules/canonical.config/config/launchpad/site_message; | ||
212 | 31 | CONTEXTS python:{'template':template, 'context': context, 'view':view}; | ||
213 | 32 | " | ||
214 | 33 | > | ||
215 | 34 | <head tal:define="yui string:${icingroot}/yui/3.0.0pr2/build; | ||
216 | 35 | lazr_js string:${icingroot}/lazr/build; | ||
217 | 36 | lp_js string:${icingroot}/build" | ||
218 | 37 | > | ||
219 | 38 | <title tal:content="CONTEXTS/fmt:pagetitle" i18n:translate="">Launchpad</title> | ||
220 | 39 | <tal:atomfeeds condition="view/feed_links | nothing"> | ||
221 | 40 | <tal:loop repeat="link view/feed_links"> | ||
222 | 41 | <link rel="alternate" type="application/atom+xml" href="" title="" | ||
223 | 42 | tal:attributes="title link/title; | ||
224 | 43 | href link/href"/> | ||
225 | 44 | </tal:loop> | ||
226 | 45 | </tal:atomfeeds> | ||
227 | 46 | |||
228 | 47 | <!-- Launchpad style sheet --> | ||
229 | 48 | <metal:launchpad-stylesheet | ||
230 | 49 | use-macro="context/@@+main-template-macros/launchpad-stylesheet" /> | ||
231 | 50 | |||
232 | 51 | <style tal:condition="is_demo" type="text/css" | ||
233 | 52 | >html, body {background-image: url(/@@/demo) !important;}</style> | ||
234 | 53 | <tal:comment condition="nothing"> | ||
235 | 54 | Internet Explorer apparently doubles the horizontal margins of the | ||
236 | 55 | application tabs, which causes the 'Answers' tab to wrap onto a second | ||
237 | 56 | row. To work around this, we give IE some speshul CSS: | ||
238 | 57 | </tal:comment> | ||
239 | 58 | <!--[if lte IE 7]> | ||
240 | 59 | <style type="text/css">#lp-apps span {margin: 0 0.125%;}</style> | ||
241 | 60 | <![endif]--> | ||
242 | 61 | <tal:comment condition="nothing"> | ||
243 | 62 | This CSS collapses the contents of collapsible fieldsets, | ||
244 | 63 | without the flashing that would result from doing it in JavaScript. | ||
245 | 64 | activateCollapsibles() removes the class="collapsed" from fieldsets, to | ||
246 | 65 | re-show their divs, once the children themselves have been collapsed. | ||
247 | 66 | </tal:comment> | ||
248 | 67 | <style type="text/css"> | ||
249 | 68 | fieldset.collapsed div, fieldset div.collapsed {display: none;} | ||
250 | 69 | </style> | ||
251 | 70 | <noscript> | ||
252 | 71 | <style type="text/css"> | ||
253 | 72 | fieldset.collapsible div, fieldset div.collapsed {display: block;} | ||
254 | 73 | </style> | ||
255 | 74 | </noscript> | ||
256 | 75 | |||
257 | 76 | <metal:page-javascript | ||
258 | 77 | use-macro="context/@@+main-template-macros/page-javascript" /> | ||
259 | 78 | |||
260 | 79 | <link rel="shortcut icon" href="/@@/launchpad.png" /> | ||
261 | 80 | <metal:block define-slot="head_epilogue"></metal:block> | ||
262 | 81 | </head> | ||
263 | 82 | <body | ||
264 | 83 | id="document" | ||
265 | 84 | tal:attributes="class string:tab-${view/menu:selectedfacetname} ${view/macro:pagetype} yui-skin-sam" | ||
266 | 85 | > | ||
267 | 86 | <div id="locationbar"> | ||
268 | 87 | <tal:login replace="structure context/@@login_status" /> | ||
269 | 88 | <form | ||
270 | 89 | tal:condition="view/macro:pagehas/globalsearch" | ||
271 | 90 | id="globalsearch" | ||
272 | 91 | action="" | ||
273 | 92 | xml:lang="en" lang="en" dir="ltr" | ||
274 | 93 | method="get" | ||
275 | 94 | accept-charset="UTF-8" | ||
276 | 95 | tal:attributes="action string:${rooturl}+search" | ||
277 | 96 | class="sprite search-icon" | ||
278 | 97 | > | ||
279 | 98 | <input type="search" id="search-text" name="field.text" /> | ||
280 | 99 | </form> | ||
281 | 100 | <tal:hierarchy replace="structure context/@@+hierarchy" /> | ||
282 | 101 | <div | ||
283 | 102 | tal:condition="view/macro:pagehas/applicationtabs" | ||
284 | 103 | tal:define="facetmenu view/menu:facet" | ||
285 | 104 | id="lp-apps" | ||
286 | 105 | class="clearfix" | ||
287 | 106 | > | ||
288 | 107 | <tal:XXX replace="nothing"> | ||
289 | 108 | # XXX mpt 2008-07-02 bug=229931: The HTML comment works. | ||
290 | 109 | </tal:XXX> | ||
291 | 110 | <!-- :-) --><tal:facet repeat="link facetmenu"> | ||
292 | 111 | <span | ||
293 | 112 | tal:condition="python: link.enabled and link.selected" | ||
294 | 113 | tal:attributes="title link/summary; class string:${link/name} active" | ||
295 | 114 | ><strong | ||
296 | 115 | tal:condition="not:link/linked" | ||
297 | 116 | tal:content="structure link/escapedtext" | ||
298 | 117 | /><a | ||
299 | 118 | tal:condition="link/linked" | ||
300 | 119 | tal:attributes="href link/url" | ||
301 | 120 | tal:content="structure link/escapedtext" | ||
302 | 121 | /></span><span | ||
303 | 122 | tal:condition="python: link.enabled and not link.selected" | ||
304 | 123 | tal:attributes="title link/summary; class link/name" | ||
305 | 124 | ><a | ||
306 | 125 | tal:condition="link/enabled" | ||
307 | 126 | tal:attributes="href link/url" | ||
308 | 127 | tal:content="structure link/escapedtext" | ||
309 | 128 | /></span><span | ||
310 | 129 | tal:condition="not:link/enabled" | ||
311 | 130 | tal:attributes="class string:${link/name} disabled-tab" | ||
312 | 131 | ><strong | ||
313 | 132 | tal:content="structure link/escapedtext" | ||
314 | 133 | /></span><small tal:condition="not:repeat/link/end" | ||
315 | 134 | > / </small></tal:facet> | ||
316 | 135 | </div> | ||
317 | 136 | |||
318 | 137 | </div><!--id="locationbar"--> | ||
319 | 138 | |||
320 | 139 | <tal:maintenance replace="structure context/@@+maintenancemessage" /> | ||
321 | 140 | <h1 metal:define-slot="heading" | ||
322 | 141 | tal:condition="view/macro:pagehas/applicationbuttons" /> | ||
323 | 142 | <div tal:condition="view/macro:pagehas/applicationborder" id="mainarea"> | ||
324 | 143 | <div id="container"> | ||
325 | 144 | <!--[if IE 7]> <![endif]--> | ||
326 | 145 | <tal:XXX condition="nothing"> | ||
327 | 146 | # XXX mpt 2008-07-16 bug=249032: This conditional comment should | ||
328 | 147 | # not be necessary. | ||
329 | 148 | </tal:XXX> | ||
330 | 149 | |||
331 | 150 | <tal:noportlets | ||
332 | 151 | condition="not: view/macro:pagehas/portlets" | ||
333 | 152 | > | ||
334 | 153 | <tal:notifications | ||
335 | 154 | define="notifications request/notifications" | ||
336 | 155 | condition="notifications" | ||
337 | 156 | > | ||
338 | 157 | <metal:notifications | ||
339 | 158 | use-macro= | ||
340 | 159 | "context/@@+main-template-macros/notifications" | ||
341 | 160 | /> | ||
342 | 161 | </tal:notifications> | ||
343 | 162 | </tal:noportlets> | ||
344 | 163 | <metal:block define-slot="before_nav_menu"/> | ||
345 | 164 | <div id="navigation-tabs" | ||
346 | 165 | tal:condition="view/macro:pagehas/navigationtabs"> | ||
347 | 166 | <div id="context-navigation-tabs" | ||
348 | 167 | tal:condition="context/menu:navigation"> | ||
349 | 168 | <tal:menu | ||
350 | 169 | replace="structure context/@@+navigationmenutabs" | ||
351 | 170 | /> | ||
352 | 171 | </div> | ||
353 | 172 | <div id="view-navigation-tabs" | ||
354 | 173 | tal:condition="view/menu:navigation"> | ||
355 | 174 | <tal:menu | ||
356 | 175 | replace="structure view/@@+navigationmenutabs" | ||
357 | 176 | /> | ||
358 | 177 | </div> | ||
359 | 178 | </div> | ||
360 | 179 | <tal:noportlets condition="not: view/macro:pagehas/portlets"> | ||
361 | 180 | <metal:block define-slot="main" /> | ||
362 | 181 | </tal:noportlets> | ||
363 | 182 | <div | ||
364 | 183 | id="maincontent" | ||
365 | 184 | tal:condition="view/macro:pagehas/portlets" | ||
366 | 185 | > | ||
367 | 186 | <div id="nonportlets"> | ||
368 | 187 | |||
369 | 188 | <div class="pageheading" | ||
370 | 189 | tal:condition="view/macro:pagehas/pageheading"> | ||
371 | 190 | <metal:block define-slot="pageheading"> | ||
372 | 191 | <tal:XXX condition="nothing"> | ||
373 | 192 | # XXX Mark Shuttleworth 2007-04-30: Obsolete | ||
374 | 193 | </tal:XXX> | ||
375 | 194 | </metal:block> | ||
376 | 195 | </div> | ||
377 | 196 | <tal:notifications | ||
378 | 197 | define="notifications request/notifications" | ||
379 | 198 | condition="notifications" | ||
380 | 199 | ><metal:notifications | ||
381 | 200 | use-macro="context/@@+main-template-macros/notifications" /> | ||
382 | 201 | </tal:notifications> | ||
383 | 202 | <metal:block define-slot="main" /> | ||
384 | 203 | |||
385 | 204 | </div> | ||
386 | 205 | </div> | ||
387 | 206 | <div | ||
388 | 207 | id="portlets" xml:lang="en" lang="en" dir="ltr" | ||
389 | 208 | tal:condition="view/macro:pagehas/portlets" | ||
390 | 209 | > | ||
391 | 210 | <tal:menu condition="view/macro:pagehas/actionsmenu" | ||
392 | 211 | replace="structure view/@@+menubox" /> | ||
393 | 212 | <metal:portlets define-slot="portlets" /> | ||
394 | 213 | <metal:portlets define-slot="portlets_two" /> | ||
395 | 214 | <metal:portlets define-slot="portlets_one" /> | ||
396 | 215 | </div> | ||
397 | 216 | <div class="clear"></div> | ||
398 | 217 | |||
399 | 218 | </div><!--id="container"--> | ||
400 | 219 | </div><!--id="mainarea"--> | ||
401 | 220 | <tal:noborder condition="not:view/macro:pagehas/applicationborder"> | ||
402 | 221 | <tal:notifications | ||
403 | 222 | define="notifications request/notifications" | ||
404 | 223 | condition="notifications" | ||
405 | 224 | ><metal:notifications | ||
406 | 225 | use-macro="context/@@+main-template-macros/notifications" /> | ||
407 | 226 | </tal:notifications> | ||
408 | 227 | <metal:block define-slot="main" /> | ||
409 | 228 | </tal:noborder> | ||
410 | 229 | <div id="globalfooter" class="clearfix" xml:lang="en" lang="en" dir="ltr"> | ||
411 | 230 | <div id="colophon"> | ||
412 | 231 | <a tal:condition="not:request/lp:person" href="/+tour" | ||
413 | 232 | >What is Launchpad?</a> | ||
414 | 233 | <a tal:condition="request/lp:person" href="/feedback" | ||
415 | 234 | >Contact us</a> | <a href="https://help.launchpad.net/">Get help with Launchpad</a> | ||
416 | 235 | </div> | ||
417 | 236 | |||
418 | 237 | <metal:site-message | ||
419 | 238 | use-macro="context/@@+base-layout-macros/site-message"/> | ||
420 | 239 | |||
421 | 240 | <div id="lp-arcana"> | ||
422 | 241 | © 2004-2009 <a | ||
423 | 242 | href="http://canonical.com/">Canonical Ltd.</a> | ||
424 | 243 | | | ||
425 | 244 | <a href="/legal">Terms of use</a> | ||
426 | 245 | <span tal:condition="not:is_lpnet" id="lp-version"> | ||
427 | 246 | | | ||
428 | 247 | <a | ||
429 | 248 | href="https://help.launchpad.net/LaunchpadReleases" | ||
430 | 249 | tal:content="version" | ||
431 | 250 | /> | ||
432 | 251 | <tal:devmode condition="devmode">devmode</tal:devmode> | ||
433 | 252 | <tal:demo condition="is_demo">demo site</tal:demo> | ||
434 | 253 | <tal:edge condition="is_edge">beta site</tal:edge> | ||
435 | 254 | </span> | ||
436 | 255 | </div> | ||
437 | 256 | <ul style="clear: both; margin-top:20px;" tal:condition="nothing"> | ||
438 | 257 | <li>Facet name: | ||
439 | 258 | <tal:block tal:replace="view/menu:selectedfacetname" /> | ||
440 | 259 | </li> | ||
441 | 260 | <li>Page type: | ||
442 | 261 | <tal:pagetype replace="view/macro:pagetype" /> | ||
443 | 262 | </li> | ||
444 | 263 | <li>Has portlet column: | ||
445 | 264 | <span tal:replace="view/macro:pagehas/portlets" /> | ||
446 | 265 | </li> | ||
447 | 266 | <li>Has application tabs: | ||
448 | 267 | <span tal:replace="view/macro:pagehas/applicationtabs" /> | ||
449 | 268 | </li> | ||
450 | 269 | <li>Has application border: | ||
451 | 270 | <span tal:replace="view/macro:pagehas/applicationborder" /> | ||
452 | 271 | </li> | ||
453 | 272 | <li>Has application buttons: | ||
454 | 273 | <span tal:replace="view/macro:pagehas/applicationbuttons" /> | ||
455 | 274 | </li> | ||
456 | 275 | <li>Has heading: | ||
457 | 276 | <span tal:replace="view/macro:pagehas/heading" /> | ||
458 | 277 | </li> | ||
459 | 278 | </ul> | ||
460 | 279 | </div><!--id="globalfooter"--> | ||
461 | 280 | |||
462 | 281 | <div id="help-pane" class="invisible"> | ||
463 | 282 | <div id="help-body"> | ||
464 | 283 | <tal:XXX condition="nothing"> | ||
465 | 284 | # XXX mars 2008-11-07 bug=295254: | ||
466 | 285 | # We use this ugly src="" hack to get rid of an IE6 security | ||
467 | 286 | # warning. See bug #295234. | ||
468 | 287 | </tal:XXX> | ||
469 | 288 | <iframe | ||
470 | 289 | id="help-pane-content" | ||
471 | 290 | class="invisible" | ||
472 | 291 | src="javascript:void(0);"></iframe> | ||
473 | 292 | </div> | ||
474 | 293 | <div id="help-footer"> | ||
475 | 294 | <span id="help-close"></span> | ||
476 | 295 | </div> | ||
477 | 296 | </div> | ||
478 | 297 | |||
479 | 298 | <metal:lp-client-cache | ||
480 | 299 | use-macro="context/@@+main-template-macros/lp-client-cache" /> | ||
481 | 300 | |||
482 | 301 | </body> | ||
483 | 302 | </html> | ||
484 | 303 | <tal:requestlog | ||
485 | 304 | define="log modules/canonical.launchpad.webapp.adapter/summarize_requests" | ||
486 | 305 | replace="structure string:<!-- at least ${log} -->" /> | ||
487 | 306 | <tal:version replace="structure string:<!-- ${version} -->" /> | ||
488 | 307 | </metal:page> | ||
489 | 308 | <!-- 1-0 inprogress portlets wrong in IE/Mac --> | ||
490 | 309 | 0 | ||
491 | === modified file 'lib/canonical/launchpad/webapp/login.py' | |||
492 | --- lib/canonical/launchpad/webapp/login.py 2009-10-29 18:38:51 +0000 | |||
493 | +++ lib/canonical/launchpad/webapp/login.py 2009-11-23 17:20:28 +0000 | |||
494 | @@ -550,6 +550,7 @@ | |||
495 | 550 | submitted = False | 550 | submitted = False |
496 | 551 | captcha_submission = 'captcha_submission' | 551 | captcha_submission = 'captcha_submission' |
497 | 552 | captcha_hash = 'captcha_hash' | 552 | captcha_hash = 'captcha_hash' |
498 | 553 | page_title = 'Need a new Launchpad password?' | ||
499 | 553 | 554 | ||
500 | 554 | def process_form(self): | 555 | def process_form(self): |
501 | 555 | request = self.request | 556 | request = self.request |
502 | 556 | 557 | ||
503 | === modified file 'lib/canonical/launchpad/webapp/tales.py' | |||
504 | --- lib/canonical/launchpad/webapp/tales.py 2009-11-14 22:44:07 +0000 | |||
505 | +++ lib/canonical/launchpad/webapp/tales.py 2009-11-23 17:20:28 +0000 | |||
506 | @@ -2998,17 +2998,13 @@ | |||
507 | 2998 | """Selects a macro, while storing information about page layout. | 2998 | """Selects a macro, while storing information about page layout. |
508 | 2999 | 2999 | ||
509 | 3000 | view/macro:page | 3000 | view/macro:page |
514 | 3001 | view/macro:page/onecolumn | 3001 | view/macro:page/main_side |
515 | 3002 | view/macro:page/applicationhome | 3002 | view/macro:page/main_only |
516 | 3003 | view/macro:page/pillarindex | 3003 | view/macro:page/searchless |
517 | 3004 | view/macro:page/freeform | 3004 | view/macro:page/locationless |
518 | 3005 | 3005 | ||
519 | 3006 | view/macro:pagehas/applicationtabs | 3006 | view/macro:pagehas/applicationtabs |
520 | 3007 | view/macro:pagehas/applicationborder | ||
521 | 3008 | view/macro:pagehas/applicationbuttons | ||
522 | 3009 | view/macro:pagehas/globalsearch | 3007 | view/macro:pagehas/globalsearch |
523 | 3010 | view/macro:pagehas/heading | ||
524 | 3011 | view/macro:pagehas/pageheading | ||
525 | 3012 | view/macro:pagehas/portlets | 3008 | view/macro:pagehas/portlets |
526 | 3013 | 3009 | ||
527 | 3014 | view/macro:pagetype | 3010 | view/macro:pagetype |
528 | @@ -3017,7 +3013,6 @@ | |||
529 | 3017 | 3013 | ||
530 | 3018 | implements(ITraversable) | 3014 | implements(ITraversable) |
531 | 3019 | 3015 | ||
532 | 3020 | master = ViewPageTemplateFile('../templates/main-template.pt') | ||
533 | 3021 | base = ViewPageTemplateFile('../../../lp/app/templates/base-layout.pt') | 3016 | base = ViewPageTemplateFile('../../../lp/app/templates/base-layout.pt') |
534 | 3022 | 3017 | ||
535 | 3023 | def __init__(self, context): | 3018 | def __init__(self, context): |
536 | @@ -3054,7 +3049,7 @@ | |||
537 | 3054 | if pagetype not in self._pagetypes: | 3049 | if pagetype not in self._pagetypes: |
538 | 3055 | raise TraversalError('unknown pagetype: %s' % pagetype) | 3050 | raise TraversalError('unknown pagetype: %s' % pagetype) |
539 | 3056 | self.context.__pagetype__ = pagetype | 3051 | self.context.__pagetype__ = pagetype |
541 | 3057 | return self._template.macros['master'] | 3052 | return self.base.macros['master'] |
542 | 3058 | 3053 | ||
543 | 3059 | def haspage(self, layoutelement): | 3054 | def haspage(self, layoutelement): |
544 | 3060 | pagetype = getattr(self.context, '__pagetype__', None) | 3055 | pagetype = getattr(self.context, '__pagetype__', None) |
545 | @@ -3069,15 +3064,9 @@ | |||
546 | 3069 | 3064 | ||
547 | 3070 | def __init__(self, | 3065 | def __init__(self, |
548 | 3071 | applicationtabs=False, | 3066 | applicationtabs=False, |
549 | 3072 | applicationborder=False, | ||
550 | 3073 | applicationbuttons=False, | ||
551 | 3074 | globalsearch=False, | 3067 | globalsearch=False, |
552 | 3075 | heading=False, | ||
553 | 3076 | pageheading=True, | ||
554 | 3077 | portlets=False, | 3068 | portlets=False, |
555 | 3078 | pagetypewasset=True, | 3069 | pagetypewasset=True, |
556 | 3079 | actionsmenu=True, | ||
557 | 3080 | navigationtabs=False | ||
558 | 3081 | ): | 3070 | ): |
559 | 3082 | self.elements = vars() | 3071 | self.elements = vars() |
560 | 3083 | 3072 | ||
561 | @@ -3085,108 +3074,25 @@ | |||
562 | 3085 | return self.elements[name] | 3074 | return self.elements[name] |
563 | 3086 | 3075 | ||
564 | 3087 | _pagetypes = { | 3076 | _pagetypes = { |
565 | 3088 | 'unset': | ||
566 | 3089 | LayoutElements( | ||
567 | 3090 | applicationborder=True, | ||
568 | 3091 | applicationtabs=True, | ||
569 | 3092 | globalsearch=True, | ||
570 | 3093 | portlets=True, | ||
571 | 3094 | pagetypewasset=False), | ||
572 | 3095 | 'default': | ||
573 | 3096 | LayoutElements( | ||
574 | 3097 | applicationborder=True, | ||
575 | 3098 | applicationtabs=True, | ||
576 | 3099 | globalsearch=True, | ||
577 | 3100 | portlets=True), | ||
578 | 3101 | 'default2.0': | ||
579 | 3102 | LayoutElements( | ||
580 | 3103 | actionsmenu=False, | ||
581 | 3104 | applicationborder=True, | ||
582 | 3105 | applicationtabs=True, | ||
583 | 3106 | globalsearch=True, | ||
584 | 3107 | portlets=True, | ||
585 | 3108 | navigationtabs=True), | ||
586 | 3109 | 'onecolumn': | ||
587 | 3110 | LayoutElements( | ||
588 | 3111 | actionsmenu=False, | ||
589 | 3112 | applicationborder=True, | ||
590 | 3113 | applicationtabs=True, | ||
591 | 3114 | globalsearch=True, | ||
592 | 3115 | navigationtabs=True, | ||
593 | 3116 | portlets=False), | ||
594 | 3117 | 'applicationhome': | ||
595 | 3118 | LayoutElements( | ||
596 | 3119 | applicationborder=True, | ||
597 | 3120 | applicationbuttons=True, | ||
598 | 3121 | applicationtabs=True, | ||
599 | 3122 | globalsearch=True, | ||
600 | 3123 | pageheading=False, | ||
601 | 3124 | heading=True), | ||
602 | 3125 | 'pillarindex': | ||
603 | 3126 | LayoutElements( | ||
604 | 3127 | applicationborder=True, | ||
605 | 3128 | applicationbuttons=True, | ||
606 | 3129 | globalsearch=True, | ||
607 | 3130 | heading=True, | ||
608 | 3131 | pageheading=False, | ||
609 | 3132 | portlets=True), | ||
610 | 3133 | 'search': | ||
611 | 3134 | LayoutElements( | ||
612 | 3135 | actionsmenu=False, | ||
613 | 3136 | applicationborder=True, | ||
614 | 3137 | applicationtabs=True, | ||
615 | 3138 | globalsearch=False, | ||
616 | 3139 | heading=False, | ||
617 | 3140 | pageheading=False, | ||
618 | 3141 | portlets=False), | ||
619 | 3142 | 'freeform': | ||
620 | 3143 | LayoutElements(), | ||
621 | 3144 | 'main_side': | 3077 | 'main_side': |
622 | 3145 | LayoutElements( | 3078 | LayoutElements( |
623 | 3146 | actionsmenu=False, | ||
624 | 3147 | applicationborder=False, | ||
625 | 3148 | applicationtabs=True, | 3079 | applicationtabs=True, |
626 | 3149 | globalsearch=True, | 3080 | globalsearch=True, |
627 | 3150 | heading=False, | ||
628 | 3151 | pageheading=False, | ||
629 | 3152 | portlets=True), | 3081 | portlets=True), |
630 | 3153 | 'main_only': | 3082 | 'main_only': |
631 | 3154 | LayoutElements( | 3083 | LayoutElements( |
632 | 3155 | actionsmenu=False, | ||
633 | 3156 | applicationborder=False, | ||
634 | 3157 | applicationtabs=True, | 3084 | applicationtabs=True, |
635 | 3158 | globalsearch=True, | 3085 | globalsearch=True, |
636 | 3159 | heading=False, | ||
637 | 3160 | pageheading=False, | ||
638 | 3161 | portlets=False), | 3086 | portlets=False), |
639 | 3162 | 'searchless': | 3087 | 'searchless': |
640 | 3163 | LayoutElements( | 3088 | LayoutElements( |
641 | 3164 | actionsmenu=False, | ||
642 | 3165 | applicationborder=False, | ||
643 | 3166 | applicationtabs=True, | 3089 | applicationtabs=True, |
644 | 3167 | globalsearch=False, | 3090 | globalsearch=False, |
645 | 3168 | heading=False, | ||
646 | 3169 | pageheading=False, | ||
647 | 3170 | portlets=False), | 3091 | portlets=False), |
648 | 3171 | 'locationless': | 3092 | 'locationless': |
649 | 3172 | LayoutElements(), | 3093 | LayoutElements(), |
650 | 3173 | } | 3094 | } |
651 | 3174 | 3095 | ||
652 | 3175 | _3_0_pagetypes = [ | ||
653 | 3176 | 'main_side', | ||
654 | 3177 | 'main_only', | ||
655 | 3178 | 'searchless', | ||
656 | 3179 | 'locationless', | ||
657 | 3180 | ] | ||
658 | 3181 | |||
659 | 3182 | @property | ||
660 | 3183 | def _template(self): | ||
661 | 3184 | """Return the ViewPageTemplateFile used by layout.""" | ||
662 | 3185 | if self.context.__pagetype__ in self._3_0_pagetypes: | ||
663 | 3186 | return self.base | ||
664 | 3187 | else: | ||
665 | 3188 | return self.master | ||
666 | 3189 | |||
667 | 3190 | 3096 | ||
668 | 3191 | class TranslationGroupFormatterAPI(ObjectFormatterAPI): | 3097 | class TranslationGroupFormatterAPI(ObjectFormatterAPI): |
669 | 3192 | """Adapter for `ITranslationGroup` objects to a formatted string.""" | 3098 | """Adapter for `ITranslationGroup` objects to a formatted string.""" |
670 | 3193 | 3099 | ||
671 | === modified file 'lib/canonical/launchpad/zcml/launchpad.zcml' | |||
672 | --- lib/canonical/launchpad/zcml/launchpad.zcml 2009-09-18 13:24:29 +0000 | |||
673 | +++ lib/canonical/launchpad/zcml/launchpad.zcml 2009-11-23 17:20:28 +0000 | |||
674 | @@ -9,17 +9,6 @@ | |||
675 | 9 | xmlns:xmlrpc="http://namespaces.zope.org/xmlrpc" | 9 | xmlns:xmlrpc="http://namespaces.zope.org/xmlrpc" |
676 | 10 | i18n_domain="canonical.launchpad"> | 10 | i18n_domain="canonical.launchpad"> |
677 | 11 | 11 | ||
678 | 12 | <!-- XXX: Steve Alexander 2004-11-24: | ||
679 | 13 | yuck... registering a main template as a view for everything. | ||
680 | 14 | This should be a non-published resource. | ||
681 | 15 | --> | ||
682 | 16 | <browser:page | ||
683 | 17 | name="main_template" | ||
684 | 18 | for="*" | ||
685 | 19 | permission="zope.Public" | ||
686 | 20 | template="../templates/main-template.pt" | ||
687 | 21 | /> | ||
688 | 22 | |||
689 | 23 | <!-- Error pages --> | 12 | <!-- Error pages --> |
690 | 24 | <!-- System Errors --> | 13 | <!-- System Errors --> |
691 | 25 | <browser:page | 14 | <browser:page |
692 | @@ -168,13 +157,6 @@ | |||
693 | 168 | permission="zope.Public" | 157 | permission="zope.Public" |
694 | 169 | /> | 158 | /> |
695 | 170 | 159 | ||
696 | 171 | <browser:page | ||
697 | 172 | for="*" | ||
698 | 173 | name="+main-template-macros" | ||
699 | 174 | template="../templates/main-template-macros.pt" | ||
700 | 175 | permission="zope.Public" | ||
701 | 176 | /> | ||
702 | 177 | |||
703 | 178 | <!-- Macros for the forbidden pages; used by launchpad-forbidden.pt and | 160 | <!-- Macros for the forbidden pages; used by launchpad-forbidden.pt and |
704 | 179 | shipit-forbidden.pt, initially. --> | 161 | shipit-forbidden.pt, initially. --> |
705 | 180 | <browser:page | 162 | <browser:page |
706 | 181 | 163 | ||
707 | === modified file 'lib/canonical/widgets/location.py' | |||
708 | --- lib/canonical/widgets/location.py 2009-06-25 05:30:52 +0000 | |||
709 | +++ lib/canonical/widgets/location.py 2009-11-23 17:20:28 +0000 | |||
710 | @@ -57,7 +57,7 @@ | |||
711 | 57 | def __init__(self, context, request): | 57 | def __init__(self, context, request): |
712 | 58 | # This widget makes use of javascript for googlemaps and | 58 | # This widget makes use of javascript for googlemaps and |
713 | 59 | # json-handling, so we flag that in the request so that our | 59 | # json-handling, so we flag that in the request so that our |
715 | 60 | # main-template includes the necessary javascript files. | 60 | # base-layout includes the necessary javascript files. |
716 | 61 | request.needs_json = True | 61 | request.needs_json = True |
717 | 62 | request.needs_gmap2 = True | 62 | request.needs_gmap2 = True |
718 | 63 | super(LocationWidget, self).__init__(context, request) | 63 | super(LocationWidget, self).__init__(context, request) |
719 | 64 | 64 | ||
720 | === modified file 'lib/lp/app/browser/configure.zcml' | |||
721 | --- lib/lp/app/browser/configure.zcml 2009-09-08 22:42:42 +0000 | |||
722 | +++ lib/lp/app/browser/configure.zcml 2009-11-23 17:20:28 +0000 | |||
723 | @@ -16,6 +16,12 @@ | |||
724 | 16 | /> | 16 | /> |
725 | 17 | <browser:page | 17 | <browser:page |
726 | 18 | for="*" | 18 | for="*" |
727 | 19 | name="+main-template-macros" | ||
728 | 20 | template="../templates/base-layout-macros.pt" | ||
729 | 21 | permission="zope.Public" | ||
730 | 22 | /> | ||
731 | 23 | <browser:page | ||
732 | 24 | for="*" | ||
733 | 19 | name="+related-pages" | 25 | name="+related-pages" |
734 | 20 | class="canonical.launchpad.browser.launchpad.NavigationMenuTabs" | 26 | class="canonical.launchpad.browser.launchpad.NavigationMenuTabs" |
735 | 21 | template="../templates/navigationmenu-related-pages.pt" | 27 | template="../templates/navigationmenu-related-pages.pt" |
736 | 22 | 28 | ||
737 | === modified file 'lib/lp/app/templates/base-layout-macros.pt' | |||
738 | --- lib/lp/app/templates/base-layout-macros.pt 2009-11-10 21:49:38 +0000 | |||
739 | +++ lib/lp/app/templates/base-layout-macros.pt 2009-11-23 17:20:28 +0000 | |||
740 | @@ -271,8 +271,7 @@ | |||
741 | 271 | devmode modules/canonical.config/config/devmode"> | 271 | devmode modules/canonical.config/config/devmode"> |
742 | 272 | <tal:comment replace="nothing"> | 272 | <tal:comment replace="nothing"> |
743 | 273 | This macro loads the old stylesheet, then the YUI CSS, and finally | 273 | This macro loads the old stylesheet, then the YUI CSS, and finally |
746 | 274 | the new stylesheet. When no pages use main-template, this can be | 274 | the new stylesheet. |
745 | 275 | refactored. | ||
747 | 276 | </tal:comment> | 275 | </tal:comment> |
748 | 277 | <metal:old-style-sheet use-macro="context/@@+base-layout-macros/launchpad-stylesheet" /> | 276 | <metal:old-style-sheet use-macro="context/@@+base-layout-macros/launchpad-stylesheet" /> |
749 | 278 | <link rel="stylesheet" type="text/css" | 277 | <link rel="stylesheet" type="text/css" |
750 | 279 | 278 | ||
751 | === modified file 'lib/lp/registry/browser/productrelease.py' | |||
752 | --- lib/lp/registry/browser/productrelease.py 2009-09-11 16:11:43 +0000 | |||
753 | +++ lib/lp/registry/browser/productrelease.py 2009-11-23 17:20:28 +0000 | |||
754 | @@ -185,7 +185,7 @@ | |||
755 | 185 | 185 | ||
756 | 186 | def initialize(self): | 186 | def initialize(self): |
757 | 187 | # The dynamically loaded milestone form needs this javascript | 187 | # The dynamically loaded milestone form needs this javascript |
759 | 188 | # enabled in the main-template.pt. | 188 | # enabled in the base-layout. |
760 | 189 | self.request.needs_datepicker_iframe = True | 189 | self.request.needs_datepicker_iframe = True |
761 | 190 | super(ProductReleaseFromSeriesAddView, self).initialize() | 190 | super(ProductReleaseFromSeriesAddView, self).initialize() |
762 | 191 | 191 | ||
763 | 192 | 192 | ||
764 | === modified file 'lib/lp/registry/browser/team.py' | |||
765 | --- lib/lp/registry/browser/team.py 2009-10-22 18:37:29 +0000 | |||
766 | +++ lib/lp/registry/browser/team.py 2009-11-23 17:20:28 +0000 | |||
767 | @@ -1013,7 +1013,7 @@ | |||
768 | 1013 | limit = None | 1013 | limit = None |
769 | 1014 | 1014 | ||
770 | 1015 | def initialize(self): | 1015 | def initialize(self): |
772 | 1016 | # Tell our main-template to include Google's gmap2 javascript so that | 1016 | # Tell our base-layout to include Google's gmap2 javascript so that |
773 | 1017 | # we can render the map. | 1017 | # we can render the map. |
774 | 1018 | if self.mapped_participants_count > 0: | 1018 | if self.mapped_participants_count > 0: |
775 | 1019 | self.request.needs_gmap2 = True | 1019 | self.request.needs_gmap2 = True |
776 | 1020 | 1020 | ||
777 | === modified file 'lib/lp/registry/templates/object-timeline-graph.pt' | |||
778 | --- lib/lp/registry/templates/object-timeline-graph.pt 2009-09-28 20:48:08 +0000 | |||
779 | +++ lib/lp/registry/templates/object-timeline-graph.pt 2009-11-23 17:20:28 +0000 | |||
780 | @@ -10,11 +10,11 @@ | |||
781 | 10 | > | 10 | > |
782 | 11 | <head> | 11 | <head> |
783 | 12 | <metal:launchpad-stylesheet | 12 | <metal:launchpad-stylesheet |
785 | 13 | use-macro="context/@@+main-template-macros/launchpad-stylesheet" /> | 13 | use-macro="context/@@+base-layout-macros/launchpad-stylesheet" /> |
786 | 14 | <metal:load-javascript | 14 | <metal:load-javascript |
788 | 15 | use-macro="context/@@+main-template-macros/load-javascript" /> | 15 | use-macro="context/@@+base-layout-macros/load-javascript" /> |
789 | 16 | <metal:lp-client-cache | 16 | <metal:lp-client-cache |
791 | 17 | use-macro="context/@@+main-template-macros/lp-client-cache" /> | 17 | use-macro="context/@@+base-layout-macros/lp-client-cache" /> |
792 | 18 | </head> | 18 | </head> |
793 | 19 | 19 | ||
794 | 20 | <body style="margin: 0; padding: 0"> | 20 | <body style="margin: 0; padding: 0"> |
795 | 21 | 21 | ||
796 | === modified file 'lib/lp/services/openid/browser/configure.zcml' | |||
797 | --- lib/lp/services/openid/browser/configure.zcml 2009-07-17 02:25:09 +0000 | |||
798 | +++ lib/lp/services/openid/browser/configure.zcml 2009-11-23 17:20:28 +0000 | |||
799 | @@ -48,6 +48,7 @@ | |||
800 | 48 | <browser:page | 48 | <browser:page |
801 | 49 | for="..interfaces.openidrpconfig.IOpenIDRPConfigSet" | 49 | for="..interfaces.openidrpconfig.IOpenIDRPConfigSet" |
802 | 50 | name="+index" | 50 | name="+index" |
803 | 51 | class=".openidrpconfig.OpenIDRPConfigSetView" | ||
804 | 51 | permission="launchpad.Admin" | 52 | permission="launchpad.Admin" |
805 | 52 | template="../templates/openidrpconfigset-index.pt" | 53 | template="../templates/openidrpconfigset-index.pt" |
806 | 53 | /> | 54 | /> |
807 | 54 | 55 | ||
808 | === modified file 'lib/lp/services/openid/browser/openidrpconfig.py' | |||
809 | --- lib/lp/services/openid/browser/openidrpconfig.py 2009-07-17 02:25:09 +0000 | |||
810 | +++ lib/lp/services/openid/browser/openidrpconfig.py 2009-11-23 17:20:28 +0000 | |||
811 | @@ -19,6 +19,7 @@ | |||
812 | 19 | from canonical.launchpad.webapp import ( | 19 | from canonical.launchpad.webapp import ( |
813 | 20 | LaunchpadEditFormView, LaunchpadFormView, Navigation, action, | 20 | LaunchpadEditFormView, LaunchpadFormView, Navigation, action, |
814 | 21 | canonical_url, custom_widget) | 21 | canonical_url, custom_widget) |
815 | 22 | from canonical.launchpad.webapp.publisher import LaunchpadView | ||
816 | 22 | from canonical.widgets import LabeledMultiCheckBoxWidget | 23 | from canonical.widgets import LabeledMultiCheckBoxWidget |
817 | 23 | from canonical.widgets.image import ImageChangeWidget | 24 | from canonical.widgets.image import ImageChangeWidget |
818 | 24 | from lp.registry.interfaces.person import PersonCreationRationale | 25 | from lp.registry.interfaces.person import PersonCreationRationale |
819 | @@ -38,6 +39,11 @@ | |||
820 | 38 | return getUtility(IOpenIDRPConfigSet).get(config_id) | 39 | return getUtility(IOpenIDRPConfigSet).get(config_id) |
821 | 39 | 40 | ||
822 | 40 | 41 | ||
823 | 42 | class OpenIDRPConfigSetView(LaunchpadView): | ||
824 | 43 | page_title = 'OpenID Relying Party Configurations' | ||
825 | 44 | label = page_title | ||
826 | 45 | |||
827 | 46 | |||
828 | 41 | class OpenIDRPConfigAddView(LaunchpadFormView): | 47 | class OpenIDRPConfigAddView(LaunchpadFormView): |
829 | 42 | """View class for adding new RP configurations.""" | 48 | """View class for adding new RP configurations.""" |
830 | 43 | 49 | ||
831 | @@ -47,6 +53,8 @@ | |||
832 | 47 | 'auto_authorize'] | 53 | 'auto_authorize'] |
833 | 48 | custom_widget('logo', ImageChangeWidget, ImageChangeWidget.ADD_STYLE) | 54 | custom_widget('logo', ImageChangeWidget, ImageChangeWidget.ADD_STYLE) |
834 | 49 | custom_widget('allowed_sreg', LabeledMultiCheckBoxWidget) | 55 | custom_widget('allowed_sreg', LabeledMultiCheckBoxWidget) |
835 | 56 | label = 'Add an OpenID Relying Party Configuration' | ||
836 | 57 | page_title = label | ||
837 | 50 | 58 | ||
838 | 51 | initial_values = { | 59 | initial_values = { |
839 | 52 | 'creation_rationale': | 60 | 'creation_rationale': |
840 | @@ -73,10 +81,18 @@ | |||
841 | 73 | def next_url(self): | 81 | def next_url(self): |
842 | 74 | return canonical_url(getUtility(IOpenIDRPConfigSet)) | 82 | return canonical_url(getUtility(IOpenIDRPConfigSet)) |
843 | 75 | 83 | ||
844 | 84 | cancel_url = next_url | ||
845 | 85 | |||
846 | 76 | 86 | ||
847 | 77 | class OpenIDRPConfigEditView(LaunchpadEditFormView): | 87 | class OpenIDRPConfigEditView(LaunchpadEditFormView): |
848 | 78 | """View class for editing or removing RP configurations.""" | 88 | """View class for editing or removing RP configurations.""" |
849 | 79 | 89 | ||
850 | 90 | @property | ||
851 | 91 | def label(self): | ||
852 | 92 | return 'Edit Relying Party Configuration for %s' % ( | ||
853 | 93 | self.context.displayname) | ||
854 | 94 | page_title = label | ||
855 | 95 | |||
856 | 80 | schema = IOpenIDRPConfig | 96 | schema = IOpenIDRPConfig |
857 | 81 | field_names = ['trust_root', 'displayname', 'description', 'logo', | 97 | field_names = ['trust_root', 'displayname', 'description', 'logo', |
858 | 82 | 'allowed_sreg', 'creation_rationale', 'can_query_any_team', | 98 | 'allowed_sreg', 'creation_rationale', 'can_query_any_team', |
859 | @@ -104,3 +120,5 @@ | |||
860 | 104 | @property | 120 | @property |
861 | 105 | def next_url(self): | 121 | def next_url(self): |
862 | 106 | return canonical_url(getUtility(IOpenIDRPConfigSet)) | 122 | return canonical_url(getUtility(IOpenIDRPConfigSet)) |
863 | 123 | |||
864 | 124 | cancel_url = next_url | ||
865 | 107 | 125 | ||
866 | === modified file 'lib/lp/services/openid/templates/openidrpconfig-add.pt' | |||
867 | --- lib/lp/services/openid/templates/openidrpconfig-add.pt 2009-07-17 17:59:07 +0000 | |||
868 | +++ lib/lp/services/openid/templates/openidrpconfig-add.pt 2009-11-23 17:20:28 +0000 | |||
869 | @@ -3,21 +3,13 @@ | |||
870 | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
871 | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
872 | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
876 | 6 | xml:lang="en" | 6 | metal:use-macro="view/macro:page/main_only" |
874 | 7 | lang="en" | ||
875 | 8 | metal:use-macro="context/@@main_template/master" | ||
877 | 9 | i18n:domain="launchpad"> | 7 | i18n:domain="launchpad"> |
878 | 10 | 8 | ||
879 | 11 | <body> | 9 | <body> |
880 | 12 | 10 | ||
881 | 13 | <div metal:fill-slot="main"> | 11 | <div metal:fill-slot="main"> |
889 | 14 | 12 | <div metal:use-macro="context/@@launchpad_form/form" /> | |
883 | 15 | <div metal:use-macro="context/@@launchpad_form/form"> | ||
884 | 16 | |||
885 | 17 | <h1 metal:fill-slot="heading">Add an OpenID Relying Party Configuration</h1> | ||
886 | 18 | |||
887 | 19 | </div> | ||
888 | 20 | |||
890 | 21 | </div> | 13 | </div> |
891 | 22 | 14 | ||
892 | 23 | </body> | 15 | </body> |
893 | 24 | 16 | ||
894 | === modified file 'lib/lp/services/openid/templates/openidrpconfig-edit.pt' | |||
895 | --- lib/lp/services/openid/templates/openidrpconfig-edit.pt 2009-07-17 17:59:07 +0000 | |||
896 | +++ lib/lp/services/openid/templates/openidrpconfig-edit.pt 2009-11-23 17:20:28 +0000 | |||
897 | @@ -3,21 +3,13 @@ | |||
898 | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
899 | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
900 | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
904 | 6 | xml:lang="en" | 6 | metal:use-macro="view/macro:page/main_only" |
902 | 7 | lang="en" | ||
903 | 8 | metal:use-macro="context/@@main_template/master" | ||
905 | 9 | i18n:domain="launchpad"> | 7 | i18n:domain="launchpad"> |
906 | 10 | 8 | ||
907 | 11 | <body> | 9 | <body> |
908 | 12 | 10 | ||
909 | 13 | <div metal:fill-slot="main"> | 11 | <div metal:fill-slot="main"> |
917 | 14 | 12 | <div metal:use-macro="context/@@launchpad_form/form" /> | |
911 | 15 | <div metal:use-macro="context/@@launchpad_form/form"> | ||
912 | 16 | |||
913 | 17 | <h1 metal:fill-slot="heading">Edit OpenID Relying Party Configuration</h1> | ||
914 | 18 | |||
915 | 19 | </div> | ||
916 | 20 | |||
918 | 21 | </div> | 13 | </div> |
919 | 22 | 14 | ||
920 | 23 | </body> | 15 | </body> |
921 | 24 | 16 | ||
922 | === modified file 'lib/lp/services/openid/templates/openidrpconfigset-index.pt' | |||
923 | --- lib/lp/services/openid/templates/openidrpconfigset-index.pt 2009-07-17 17:59:07 +0000 | |||
924 | +++ lib/lp/services/openid/templates/openidrpconfigset-index.pt 2009-11-23 17:20:28 +0000 | |||
925 | @@ -3,13 +3,11 @@ | |||
926 | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
927 | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
928 | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
930 | 6 | metal:use-macro="context/@@main_template/master" | 6 | metal:use-macro="view/macro:page/main_only" |
931 | 7 | i18n:domain="launchpad"> | 7 | i18n:domain="launchpad"> |
932 | 8 | 8 | ||
933 | 9 | <body> | 9 | <body> |
934 | 10 | <div metal:fill-slot="main"> | 10 | <div metal:fill-slot="main"> |
935 | 11 | <h1>OpenID Relying Party Configurations</h1> | ||
936 | 12 | |||
937 | 13 | <table class="listing" tal:condition="context/getAll"> | 11 | <table class="listing" tal:condition="context/getAll"> |
938 | 14 | <thead> | 12 | <thead> |
939 | 15 | <tr> | 13 | <tr> |
This is my branch to remove main-template and main-template- macros.
lp:~sinzui/launchpad/remove-main-template /bugs.launchpad .net/bugs/ 69726 macro|zcmldirec tives"
then test the whole suite. (/me did) implementation: no one
Diff size: 940 (450 lines are removed files)
Launchpad bug: https:/
Test command: ./bin/test -vvt "tales-
Pre-
Target release: 3.1.11
= Remove main-template and main-template- macros =
main-template and main-template- macros are obsolete and launchpad still
has code and tests to support them. They should be removed.
== Rules ==
* Remove main-template and main-template- macros from zcml and templates
* Update page macros, remove obsolete behaviour
ADDENDUM
ec2 test discovered pages that were still on 2.0 UI.
* Shipit and signon both use @@+main- template- macros/ notifications macros will continue support macros, update it to 3.0
Registering that name on base-template-
* OpenIDRPConfig is still using main-template, updated them to 3.0
* forgottenpassword is still using main-template, update it to 3.0
* The timeline is still using main-template-
== QA ==
* Visit a project
* Verify that the timeline displays
* Visit +rpconfig
* Verify the page displays
* Verify the add and edit pages have cancel buttons
* Visit forgottenpassword, verify the page displays.
== Lint ==
Linting changed files: /launchpad/ pagetitles. py /launchpad/ doc/tales- macro.txt /launchpad/ doc/zcmldirecti ves.txt /launchpad/ icing/style. css /launchpad/ templates/ launchpad- forgottenpasswo rd.pt /launchpad/ webapp/ login.py /launchpad/ webapp/ tales.py /launchpad/ zcml/launchpad. zcml /widgets/ location. py app/browser/ configure. zcml app/templates/ base-layout- macros. pt registry/ browser/ productrelease. py registry/ browser/ team.py registry/ templates/ object- timeline- graph.pt services/ openid/ browser/ configure. zcml services/ openid/ browser/ openidrpconfig. py services/ openid/ templates/ openidrpconfig- add.pt services/ openid/ templates/ openidrpconfig- edit.pt services/ openid/ templates/ openidrpconfigs et-index. pt
lib/canonical
lib/canonical
lib/canonical
lib/canonical
lib/canonical
lib/canonical
lib/canonical
lib/canonical
lib/canonical
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
== Test ==
* lib/canonical/ launchpad/ doc/tales- macro.txt launchpad/ doc/zcmldirecti ves.txt
* Removed unsupported features.
* Updated test to use a real page layout.
* lib/canonical/
* Updated test to use a modern example.
== Implementation ==
* lib/canonical/ launchpad/ pagetitles. py launchpad/ icing/style. css launchpad/ templates/ launchpad- forgottenpasswo rd.pt launchpad/ webapp/ login.py launchpad/ webapp/ tales.py
* Removed the unused page title.
* lib/canonical/
* Removed the comment about main template.
* lib/canonical/
* Updated page to 3.0
* lib/canonical/
* Moved the page title tot he view.
* lib/canonical/
* Updated the documentation examples for page layouts.
* Removed master (main-template) and the code that switched between
main and base.
* Removed the old layout co...