8752.2.1
by Curtis Hovey
Added base-layout macros to replace main-template-macros. |
1 |
<macros
|
4939.2.15
by Curtis Hovey
Added namespaces to main* templates and fixed markup. |
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 |
i18n:domain="launchpad" |
|
8752.2.1
by Curtis Hovey
Added base-layout macros to replace main-template-macros. |
7 |
tal:omit-tag="" |
4939.2.15
by Curtis Hovey
Added namespaces to main* templates and fixed markup. |
8 |
>
|
2770.1.43
by Guilherme Salgado
Fix shipit to report OOPSes, some wording fixes (replacing order with request) and added a footer on all shipit pages with a link to the FAQ. |
9 |
|
8752.2.1
by Curtis Hovey
Added base-layout macros to replace main-template-macros. |
10 |
<metal:notifications define-macro="notifications" |
11 |
tal:define="notifications notifications|request/notifications"> |
|
2770.1.43
by Guilherme Salgado
Fix shipit to report OOPSes, some wording fixes (replacing order with request) and added a footer on all shipit pages with a link to the FAQ. |
12 |
<tal:comment replace="nothing"> |
13 |
This macro expects the following variables: |
|
14 |
:notifications: An object implementing INotificationList. |
|
15 |
</tal:comment>
|
|
16 |
||
3283.4.5
by Matthew Paul Thomas
Replaces 'notice-notification' and 'info-notification' with 'informational message', and 'debug-notification' with 'debug message'. Fixes nasty problem with bugtask validation, with help from Brad Bollenbach. |
17 |
<div class="error message" |
2770.1.43
by Guilherme Salgado
Fix shipit to report OOPSes, some wording fixes (replacing order with request) and added a footer on all shipit pages with a link to the FAQ. |
18 |
tal:repeat="notification notifications/error" |
19 |
tal:content="structure notification/message" |
|
20 |
>An error notification message</div> |
|
3283.4.5
by Matthew Paul Thomas
Replaces 'notice-notification' and 'info-notification' with 'informational message', and 'debug-notification' with 'debug message'. Fixes nasty problem with bugtask validation, with help from Brad Bollenbach. |
21 |
<div class="warning message" |
2770.1.43
by Guilherme Salgado
Fix shipit to report OOPSes, some wording fixes (replacing order with request) and added a footer on all shipit pages with a link to the FAQ. |
22 |
tal:repeat="notification notifications/warning" |
23 |
tal:content="structure notification/message" |
|
24 |
>A warning notification message</div> |
|
3283.4.5
by Matthew Paul Thomas
Replaces 'notice-notification' and 'info-notification' with 'informational message', and 'debug-notification' with 'debug message'. Fixes nasty problem with bugtask validation, with help from Brad Bollenbach. |
25 |
<div class="informational message" |
2770.1.43
by Guilherme Salgado
Fix shipit to report OOPSes, some wording fixes (replacing order with request) and added a footer on all shipit pages with a link to the FAQ. |
26 |
tal:repeat="notification notifications/info" |
27 |
tal:content="structure notification/message" |
|
28 |
>An info notification message</div> |
|
3283.4.5
by Matthew Paul Thomas
Replaces 'notice-notification' and 'info-notification' with 'informational message', and 'debug-notification' with 'debug message'. Fixes nasty problem with bugtask validation, with help from Brad Bollenbach. |
29 |
<div class="debug message" |
2770.1.43
by Guilherme Salgado
Fix shipit to report OOPSes, some wording fixes (replacing order with request) and added a footer on all shipit pages with a link to the FAQ. |
30 |
tal:repeat="notification notifications/debug" |
31 |
tal:content="structure notification/message" |
|
32 |
>A debug notification message, only displayed for developers.</div> |
|
33 |
</metal:notifications>
|
|
34 |
||
8752.2.1
by Curtis Hovey
Added base-layout macros to replace main-template-macros. |
35 |
|
8524.1.1
by Edwin Grubbs
Refactored loading js in main-template.pt. |
36 |
<metal:load-javascript define-macro="load-javascript" |
37 |
tal:define=" |
|
12046.2.1
by Danilo Segan
Move versioninfo to lp.app.versioninfo. |
38 |
revno modules/lp.app.versioninfo/revno | string:unknown;
|
10576.1.3
by Maris Fogels
Make all of the on-page JavaScript load from the host domain using a relative URL. Speeds up IE a good deal by making it cache even more resources. |
39 |
icingroot string:/+icing/rev${revno};
|
8524.1.1
by Edwin Grubbs
Refactored loading js in main-template.pt. |
40 |
devmode modules/canonical.config/config/devmode;
|
7675.438.1
by Guilherme Salgado
Upgrade to latest lazr-js |
41 |
yui string:${icingroot}/yui;
|
9778.2.1
by Guilherme Salgado
Undo changes to base-layout.pt |
42 |
lazr_js string:${icingroot}/lazr/build;
|
8524.1.1
by Edwin Grubbs
Refactored loading js in main-template.pt. |
43 |
lp_js string:${icingroot}/build"
|
44 |
>
|
|
45 |
<tal:comment replace="nothing"> |
|
46 |
This macro just loads javascript files. It doesn't |
|
47 |
do any initialization. |
|
10576.1.7
by Maris Fogels
Updated the page comments based on reviewer feedback. |
48 |
|
49 |
We load all of the script files from the same host that served the HTML in |
|
50 |
order to optimize IE caching over SSL. This is inefficient when you cross |
|
51 |
subdomains (from bugs to code for example) but luckily most users stay |
|
52 |
within one or two domains. |
|
53 |
||
54 |
XXX mars 2010-04-08 |
|
55 |
We can revisit this IE-only optimization if we remove SSL. Any changes that |
|
56 |
affect IE should be tested using webpagetest.org. (See the dev.launchpad.net |
|
57 |
wiki for details.) |
|
58 |
||
10200.6.2
by Maris Fogels
Pulled MochiKit out of the Launchpad JavaScript rollup. |
59 |
XXX mars 2010-01-21 |
60 |
We have to load MochiKit outside of the main javascript rollup so that the |
|
61 |
rollup's size does not exceed 512Kb. That magic number triggers a bug |
|
62 |
somewhere in the automated test system that will prevent Windmill from |
|
63 |
executing. |
|
64 |
</tal:comment>
|
|
12421.1.30
by Tim Penhey
Move the LP creation to the load-javascript macro to fix the timeline graph. |
65 |
<script type="text/javascript"> |
66 |
var LP = { |
|
67 |
cache: {}, |
|
68 |
links: {} |
|
69 |
}; |
|
70 |
</script>
|
|
10200.6.2
by Maris Fogels
Pulled MochiKit out of the Launchpad JavaScript rollup. |
71 |
<script type="text/javascript" |
72 |
tal:attributes="src string:${icingroot}/MochiKit.js"></script> |
|
73 |
||
12126.7.1
by Deryck Hodge
Remove yui file links from base template for devmode. |
74 |
<script type="text/javascript" |
75 |
tal:attributes="src string:${icingroot}/build/launchpad.js"></script> |
|
8524.1.1
by Edwin Grubbs
Refactored loading js in main-template.pt. |
76 |
|
77 |
<script type="text/javascript" |
|
78 |
tal:content="string:var cookie_scope = '${request/lp:cookie_scope}';"></script> |
|
7675.351.228
by Guilherme Salgado
Move the LPS creation from the page-javascript macro into the load-javascript one so that it is available to pages that only use the latter (e.g. object-timeline-graph.pt) |
79 |
<script type="text/javascript"> |
80 |
// Define a global YUI sandbox that should be used by everyone. |
|
11666.5.46
by Deryck Hodge
Add combine: false YUI config option to global YUI object. |
81 |
var LPS = YUI({ |
11666.5.54
by Deryck Hodge
Comment the YUI config options in the base template. |
82 |
// Don't try to fetch CSS files. |
11666.5.46
by Deryck Hodge
Add combine: false YUI config option to global YUI object. |
83 |
fetchCSS: false, |
11666.5.54
by Deryck Hodge
Comment the YUI config options in the base template. |
84 |
// For paranoia, set a low timeout to not wait on loading a resource. |
11666.5.47
by Deryck Hodge
Add few YUI config params, which are educated but blind guesses at what might help prevent failing windmill tests. |
85 |
timeout: 50 |
11666.5.46
by Deryck Hodge
Add combine: false YUI config option to global YUI object. |
86 |
}); |
7675.351.228
by Guilherme Salgado
Move the LPS creation from the page-javascript macro into the load-javascript one so that it is available to pages that only use the latter (e.g. object-timeline-graph.pt) |
87 |
</script>
|
8752.2.4
by Curtis Hovey
Separated page-javascript from load-javascript because the former is only used by full pages. |
88 |
</metal:load-javascript>
|
89 |
||
90 |
||
91 |
<metal:page-javascript define-macro="page-javascript" |
|
92 |
tal:define=" |
|
12046.2.1
by Danilo Segan
Move versioninfo to lp.app.versioninfo. |
93 |
revno modules/lp.app.versioninfo/revno | string:unknown;
|
10576.1.3
by Maris Fogels
Make all of the on-page JavaScript load from the host domain using a relative URL. Speeds up IE a good deal by making it cache even more resources. |
94 |
icingroot_contrib string:/+icing-contrib/rev${revno};
|
8752.2.4
by Curtis Hovey
Separated page-javascript from load-javascript because the former is only used by full pages. |
95 |
devmode modules/canonical.config/config/devmode;
|
8752.2.5
by Curtis Hovey
Fixed ill-formed markup. |
96 |
map_query string:&file=api&v=2&key=${modules/canonical.config/config/google/maps_api_key};"> |
8752.2.4
by Curtis Hovey
Separated page-javascript from load-javascript because the former is only used by full pages. |
97 |
<tal:comment replace="nothing"> |
98 |
Load and initialize the common script used by all pages. |
|
99 |
</tal:comment>
|
|
100 |
<tal:needs_json tal:condition="request/needs_json"> |
|
101 |
<script type="text/javascript" |
|
102 |
tal:attributes="src string:${icingroot_contrib}/json2.js"></script> |
|
103 |
<script type="text/javascript" |
|
104 |
tal:attributes="src string:${icingroot_contrib}/JSONScriptRequest.js"></script> |
|
105 |
</tal:needs_json>
|
|
106 |
||
107 |
<metal:load-lavascript use-macro="context/@@+base-layout-macros/load-javascript" /> |
|
8752.2.1
by Curtis Hovey
Added base-layout macros to replace main-template-macros. |
108 |
|
11134.7.10
by Curtis Hovey
Moved doctests into unittest. |
109 |
<script id="base-layout-load-scripts" type="text/javascript"> |
13371.3.1
by Raphael Badin
Add js infrastructure for long polling. |
110 |
LPS.use('node', 'event-delegate', 'lp', 'lp.app.links', 'lp.app.longpoll', function(Y) { |
8752.2.1
by Curtis Hovey
Added base-layout macros to replace main-template-macros. |
111 |
Y.on('load', function(e) { |
112 |
sortables_init(); |
|
113 |
initInlineHelp(); |
|
8762.2.16
by Graham Binns
Merged mainline. |
114 |
Y.lp.activate_collapsibles(); |
8752.2.1
by Curtis Hovey
Added base-layout macros to replace main-template-macros. |
115 |
activateFoldables(); |
116 |
activateConstrainBugExpiration(); |
|
13371.3.1
by Raphael Badin
Add js infrastructure for long polling. |
117 |
Y.lp.app.links.check_valid_lp_links(); |
118 |
// Longpolling will only start if |
|
119 |
// LP.cache.longpoll is populated. |
|
120 |
Y.lp.app.longpoll.setupLongPollManager(); |
|
8752.2.1
by Curtis Hovey
Added base-layout macros to replace main-template-macros. |
121 |
}, window); |
122 |
||
123 |
// Hook up the function that dismisses the help window if we click |
|
124 |
// anywhere outside of it. |
|
125 |
Y.on('click', handleClickOnPage, window); |
|
11644.2.4
by Ian Booth
Link checking js loaded on every page |
126 |
|
12421.1.17
by Tim Penhey
Add field level events as well. |
127 |
Y.on('lp:context:web_link:changed', function(e) { |
128 |
window.location = e.new_value; |
|
129 |
}); |
|
11644.2.4
by Ian Booth
Link checking js loaded on every page |
130 |
}); |
8752.2.1
by Curtis Hovey
Added base-layout macros to replace main-template-macros. |
131 |
</script>
|
8752.2.4
by Curtis Hovey
Separated page-javascript from load-javascript because the former is only used by full pages. |
132 |
</metal:page-javascript>
|
8524.1.1
by Edwin Grubbs
Refactored loading js in main-template.pt. |
133 |
|
134 |
||
8752.2.1
by Curtis Hovey
Added base-layout macros to replace main-template-macros. |
135 |
<metal:launchpad-stylesheet-3-0 define-macro="launchpad-stylesheet-3-0" |
136 |
tal:define=" |
|
12046.2.1
by Danilo Segan
Move versioninfo to lp.app.versioninfo. |
137 |
revno modules/lp.app.versioninfo/revno | string:unknown;
|
10576.1.2
by Maris Fogels
Change the CSS resource hostname to match the current host. This increases cache hits in IE, at the cost of downloading more resources from a single domain. |
138 |
icingroot string:/+icing/rev${revno}"> |
8752.2.1
by Curtis Hovey
Added base-layout macros to replace main-template-macros. |
139 |
<tal:comment replace="nothing"> |
7675.438.2
by Guilherme Salgado
Combine all the css files we need in a single combo.css, which is now the only one included in our base template |
140 |
This macro loads a single css file containing all our stylesheets. |
141 |
If you need to include a new css file here, add it to |
|
142 |
buildout-templates/bin/combine-css.in instead. |
|
10576.1.7
by Maris Fogels
Updated the page comments based on reviewer feedback. |
143 |
|
144 |
We load the CSS from the same host that served the HTML in order to optimize |
|
145 |
IE caching over SSL. This is inefficient when you cross subdomains (from |
|
146 |
bugs to code for example) but luckily most users stay within one or two |
|
147 |
domains. |
|
148 |
||
149 |
XXX mars 2010-04-08 |
|
150 |
We can revisit this IE-only optimization if we remove SSL. Any changes that |
|
151 |
affect IE should be tested using webpagetest.org. (See the dev.launchpad.net |
|
152 |
wiki for details.) |
|
8752.2.1
by Curtis Hovey
Added base-layout macros to replace main-template-macros. |
153 |
</tal:comment>
|
10576.1.1
by Maris Fogels
Change the @import CSS definition to use a <link> instead. |
154 |
<link
|
155 |
type="text/css" |
|
156 |
rel="stylesheet" |
|
157 |
media="screen, print" |
|
158 |
tal:attributes="href string:${icingroot}/combo.css" /> |
|
8752.2.1
by Curtis Hovey
Added base-layout macros to replace main-template-macros. |
159 |
</metal:launchpad-stylesheet-3-0>
|
160 |
||
161 |
||
8524.1.1
by Edwin Grubbs
Refactored loading js in main-template.pt. |
162 |
<metal:lp-client-cache define-macro="lp-client-cache"> |
12510.7.4
by Aaron Bentley
Avoid exposing email addresses to anonymous users vi LP.cache (bug #740208) |
163 |
<tal:cache condition="view/user|nothing" |
164 |
define="cache request/webservicerequest:cache; |
|
165 |
links cache/links;
|
|
166 |
objects cache/objects;"> |
|
167 |
<script tal:repeat="key links" |
|
168 |
tal:content="string:LP.links['${key}'] = |
|
169 |
'${links/?key/fmt:api_url}';"> |
|
170 |
</script>
|
|
171 |
<script tal:repeat="key objects" |
|
12632.1.1
by William Grant
Escape LP.cache JSON again. This will leave some stuff inappropriately escaped (HTML's <script> is CDATA with no option of PCDATA, so there's no safe way to get it in unescaped). Thanks IE. |
172 |
tal:content="string:LP.cache['${key}'] = |
13023.6.17
by Henning Eggers
Removed obfuscate-email from where it is not needed. |
173 |
${objects/?key/webservice:json};"> |
12510.7.4
by Aaron Bentley
Avoid exposing email addresses to anonymous users vi LP.cache (bug #740208) |
174 |
</script>
|
8524.1.1
by Edwin Grubbs
Refactored loading js in main-template.pt. |
175 |
</tal:cache>
|
176 |
||
13023.6.8
by Henning Eggers
The cache stays in. |
177 |
<script tal:condition="context/webservice:is_entry" |
178 |
tal:content="string:LP.cache['context'] = |
|
13023.6.17
by Henning Eggers
Removed obfuscate-email from where it is not needed. |
179 |
${context/webservice:json/fmt:obfuscate-email};"> |
13023.6.8
by Henning Eggers
The cache stays in. |
180 |
</script>
|
8524.1.1
by Edwin Grubbs
Refactored loading js in main-template.pt. |
181 |
</metal:lp-client-cache>
|
182 |
||
9010.5.2
by Michael Nelson
Added logo and aligned h1/menu with logo etc. |
183 |
|
9152.4.2
by Michael Nelson
Renamed location-tabs to application-buttons. |
184 |
<metal:application-buttons define-macro="application-buttons"> |
9010.5.10
by Michael Nelson
Moved part of macro back into base-layout.pt template so that fill-slot works. |
185 |
<!-- Application Menu -->
|
9621.1.1
by Barry Warsaw
Hacks to the registering slot and the facet menu (a.k.a. app tabs) to not look |
186 |
<ul class="facetmenu" |
187 |
tal:define="facetmenu view/menu:facet"> |
|
9010.5.10
by Michael Nelson
Moved part of macro back into base-layout.pt template so that fill-slot works. |
188 |
<tal:facet repeat="link facetmenu"> |
189 |
<li
|
|
190 |
tal:condition="python: link.enabled and link.selected" |
|
191 |
tal:attributes="title link/summary; class string:${link/name} active" |
|
9010.5.21
by Michael Nelson
Fixed a bug where non-linked tabs were not displayed. |
192 |
><span
|
193 |
tal:condition="not:link/linked" |
|
194 |
tal:content="structure link/escapedtext" |
|
195 |
/><a
|
|
9010.5.10
by Michael Nelson
Moved part of macro back into base-layout.pt template so that fill-slot works. |
196 |
tal:condition="link/linked" |
197 |
tal:attributes="href link/url" |
|
198 |
tal:content="structure link/escapedtext" /></li> |
|
199 |
<li
|
|
200 |
tal:condition="python: link.enabled and not link.selected" |
|
201 |
tal:attributes="title link/summary; class link/name" |
|
202 |
><a
|
|
203 |
tal:condition="link/enabled" |
|
204 |
tal:attributes="href link/url" |
|
205 |
tal:content="structure link/escapedtext" |
|
206 |
/></li>
|
|
207 |
<li
|
|
208 |
tal:condition="not:link/enabled" |
|
209 |
tal:attributes="class string:${link/name} disabled-tab" |
|
9055.1.1
by Michael Nelson
Fixed two small issues with application tabs. |
210 |
><span
|
9010.5.10
by Michael Nelson
Moved part of macro back into base-layout.pt template so that fill-slot works. |
211 |
tal:content="link/escapedtext" /></li> |
212 |
</tal:facet>
|
|
213 |
</ul>
|
|
9152.4.2
by Michael Nelson
Renamed location-tabs to application-buttons. |
214 |
</metal:application-buttons>
|
9010.5.2
by Michael Nelson
Added logo and aligned h1/menu with logo etc. |
215 |
|
9101.2.2
by Curtis Hovey
Extracted the footer to a macro. |
216 |
|
217 |
<metal:footer define-macro="footer"> |
|
218 |
<div id="footer" class="footer"> |
|
10129.5.5
by Francis J. Lacoste
Don't display the lp-arcana on the front page. |
219 |
<div class="lp-arcana" tal:condition="not:view/is_root_page|nothing"> |
9511.1.2
by Michael Nelson
Updated formatting of footer so the branding is always undisturbed, while the site-message wraps. |
220 |
<div class="lp-branding"> |
9443.6.14
by Michael Nelson
Merged RF and resolved one conflict. |
221 |
<a tal:attributes="href string:${rooturl}"><img src="/@@/launchpad-logo-and-name-hierarchy.png" alt="Launchpad"/></a> |
9443.6.10
by Michael Nelson
Updated style as per Martin's request. |
222 |
•
|
10427.7.3
by Curtis Hovey
Fix the links in the footer to always use the mainsite. |
223 |
<a tal:attributes="href string:${rooturl}+tour">Take the tour</a> |
9443.6.10
by Michael Nelson
Updated style as per Martin's request. |
224 |
•
|
225 |
<a href="https://help.launchpad.net/">Read the guide</a> |
|
226 |
|
|
227 |
<form id="globalsearch" method="get" accept-charset="UTF-8" |
|
228 |
tal:condition="view/macro:pagehas/globalsearch" |
|
229 |
tal:attributes="action string:${rooturl}+search"> |
|
230 |
<input type="search" id="search-text" name="field.text" /> |
|
7675.507.25
by Edwin Grubbs
Removed extra sprite files. Fixed search form sprite. |
231 |
<input type="submit" value="" class="icon-only sprite search-icon" /> |
9443.6.10
by Michael Nelson
Updated style as per Martin's request. |
232 |
</form>
|
233 |
</div>
|
|
234 |
<metal:site-message
|
|
235 |
use-macro="context/@@+base-layout-macros/site-message"/> |
|
9101.2.2
by Curtis Hovey
Extracted the footer to a macro. |
236 |
</div>
|
237 |
||
238 |
<div class="colophon"> |
|
12156.4.1
by matthew.revell at canonical
Changed VAT rate quoted in tour to 20% following yet another change to UK VAT. Also updated main and tour footer copyright notices to include 2011. |
239 |
© 2004-2011
|
9101.2.2
by Curtis Hovey
Extracted the footer to a macro. |
240 |
<a href="http://canonical.com/">Canonical Ltd.</a> |
241 |
•
|
|
10427.7.3
by Curtis Hovey
Fix the links in the footer to always use the mainsite. |
242 |
<a tal:attributes="href string:${rooturl}legal">Terms of use</a> |
9101.2.2
by Curtis Hovey
Extracted the footer to a macro. |
243 |
•
|
11626.4.1
by Curtis Hovey
Save spike for switch from feedback@ to /support. There are open questions about the criteria for showing suppot--anonymous or cannot login. Should /support not be reused. |
244 |
<a tal:condition="not: view/user|nothing" |
11626.4.3
by Curtis Hovey
Updated templates to used /support (logged in) or /feedback (anonymous) for |
245 |
href="/feedback">Contact Launchpad Support</a> |
11626.4.1
by Curtis Hovey
Save spike for switch from feedback@ to /support. There are open questions about the criteria for showing suppot--anonymous or cannot login. Should /support not be reused. |
246 |
<a tal:condition="view/user|nothing" |
247 |
href="/support">Contact Launchpad Support</a> |
|
9653.1.1
by matthew.revell at canonical
Adds a 'System status' link to base-layout-macros.pt, which links to http://identi.ca/status -- Launchpad's off-site system status page. (Bug 446189) |
248 |
•
|
249 |
<a href="http://identi.ca/launchpadstatus" |
|
250 |
>System status</a> |
|
11677.3.2
by Robert Collins
Reduce use of is_edge. |
251 |
<span id="lp-version"> |
9101.2.2
by Curtis Hovey
Extracted the footer to a macro. |
252 |
•
|
11014.1.1
by Curtis Hovey
Restore revision number to footer. |
253 |
r<tal:revno replace="revno" /> |
9101.2.2
by Curtis Hovey
Extracted the footer to a macro. |
254 |
<tal:devmode condition="devmode">devmode</tal:devmode> |
255 |
<tal:demo condition="is_demo">demo site</tal:demo> |
|
11677.3.3
by Robert Collins
More edge removal. |
256 |
(<a href="https://code.launchpad.net/~launchpad-pqm/launchpad/stable/" |
11227.2.2
by Jonathan Lange
Link properly |
257 |
>get the code</a>) |
9101.2.2
by Curtis Hovey
Extracted the footer to a macro. |
258 |
</span>
|
259 |
</div>
|
|
260 |
</div>
|
|
261 |
</metal:footer>
|
|
9443.6.6
by Michael Nelson
Moved the site-message snippet to a macro. |
262 |
|
263 |
<metal:site-message define-macro="site-message"> |
|
9511.1.2
by Michael Nelson
Updated formatting of footer so the branding is always undisturbed, while the site-message wraps. |
264 |
<div class="sitemessage" tal:condition="site_message"> |
9443.6.6
by Michael Nelson
Moved the site-message snippet to a macro. |
265 |
<tal:site_message tal:content="structure site_message"> |
266 |
This site is running pre-release code. |
|
267 |
</tal:site_message>
|
|
268 |
</div>
|
|
269 |
</metal:site-message>
|
|
270 |
||
10212.1.5
by Brad Crittenden
Create a pluralized message macro. |
271 |
<metal:plural-msg define-macro="plural-message"> |
272 |
<tal:comment condition="nothing"> |
|
273 |
Expected variables to be defined in a containing tag or global: |
|
274 |
count - value to check to determine plural form |
|
275 |
singluar - string to use when count == 1 |
|
276 |
plural - string to use when count > 1. If no plural is given it defaults |
|
277 |
to the singular value + 's'. |
|
278 |
</tal:comment>
|
|
279 |
<tal:singular
|
|
280 |
condition="python: count == 1" |
|
10754.4.5
by Curtis Hovey
Use plural-message macro to fix team membership portlet. |
281 |
replace="singular" /><tal:plural |
10212.1.5
by Brad Crittenden
Create a pluralized message macro. |
282 |
define="l_default string:s; |
283 |
l_plural plural | string:$singular$l_default;"
|
|
284 |
condition="python: count != 1" |
|
10754.4.5
by Curtis Hovey
Use plural-message macro to fix team membership portlet. |
285 |
replace="l_plural" /></metal:plural-msg> |
8752.2.1
by Curtis Hovey
Added base-layout macros to replace main-template-macros. |
286 |
</macros>
|