On utilise la requĂȘte globale pour traduire.
[Plinn.git] / skins / generic / widgets.pt
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3 <html xmlns="http://www.w3.org/1999/xhtml">
4
5 <head>
6 <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
7 <title>widgets</title>
8 <link href="../patch_skins/plinn_style.css" rel="stylesheet" media="screen">
9 </head>
10
11 <body>
12 <pre>tabs</pre>
13 <hr/>
14 <table class="tabs" metal:define-macro="tabs">
15 <tr>
16 <td tal:repeat="ai_dict ai_dicts" tal:attributes="class python:(useQueryString and ['%s?%s' % (request['URL0'], request['QUERY_STRING']) == ai_dict['url'], ] or [request['URL0'] == ai_dict['url'], ])[0] and 'selected' or nothing">
17 <a href="." tal:attributes="href ai_dict/url" tal:content="python:ai_dict['name'] or ai_dict['id']" i18n:translate="">Action 1</a>
18 </td>
19 </tr>
20 </table>
21 <pre>generic_header</pre>
22 <hr />
23 <div metal:define-macro="generic_header"
24 tal:define="mq python:modules['ZTUtils'].make_query;
25 url python:request.get('URL0');
26 cmfPerms python:modules['Products.CMFCore.permissions'];
27 ModifyPortalContent cmfPerms/ModifyPortalContent;
28 allow_edit python:mtool.checkPermission(ModifyPortalContent, here)">
29 <table width="100%">
30 <tr>
31 <td tal:condition="allow_edit" i18n:domain="plinn">
32 <a href="." title="Edit metadata" i18n:attributes="title" id="ToggleFormButton"
33 tal:attributes="href python: '%s?%s' % (url , mq( request.form, {'edit_metadata':'titleAndDescForm'} ))"><img src="../images/collapsedPalette.gif" alt="Edit metadata" height="16" width="16" tal:attributes="src here/collapsedPalette.gif/absolute_url" border="0" i18n:attributes="alt" /></a>
34 </td>
35 <td width="100%" id="HeaderArea" tal:define="metadata_macro python:request.form.get('edit_metadata', 'viewTitleAndDesc')">
36 <span metal:use-macro="python:here.header_widgets.macros[metadata_macro]"></span>
37 </td>
38 </tr>
39 </table>
40 <script type="text/javascript" tal:attributes="src here/palette.js/absolute_url"></script>
41 <script type="text/javascript" tal:attributes="src here/generic_header_script.js/absolute_url"></script>
42 <script type="text/javascript" tal:attributes="src here/calendar.js/absolute_url"></script>
43 <script type="text/javascript" tal:attributes="src string:${portal_url}/lang/calendar-fr.js"></script>
44 <script type="text/javascript" tal:attributes="src here/calendar-setup.js/absolute_url"></script>
45 <script type="text/javascript">//<!--
46 initHeaderScript();
47 //-->
48 </script>
49 </div>
50
51 <div metal:define-macro="clipboard" tal:condition="python:not request.SESSION.get('editBoxes')" tal:omit-tag="" i18n:domain="plinn" tal:on-error="python:here.emptyClipboard(empty=True,ajax=True) and None">
52 <table tal:condition="clip" class="clipboard" cellspacing="0" tal:define="clip here/getCPInfoList">
53 <tr><th i18n:translate="">Clipboard</th></tr>
54 <tr><td>
55 <form tal:attributes="action string:${here/absolute_url}/emptyClipboard" method="post">
56 <ul>
57 <li tal:repeat="item clip" tal:attributes="class python:repeat['item'].odd() and 'odd' or 'even'"><input type="checkbox" name="indexes:int:list" tal:attributes="value repeat/item/index"/><a tal:attributes="href item/url ; title item/title"><img tal:attributes="src item/icon ; alt item/type ; height item/height ; width item/width" border="0" /> <span tal:replace="item/title">Title</span></a></li>
58 </ul>
59 <!--
60 <input type="submit" name="delete" value="Delete" i18n:attributes="value" style="float:left"/>
61 <input type="submit" name="empty" value="Empty" i18n:attributes="value" style="float:right" />
62 -->
63 </form>
64 </td></tr>
65 </table>
66 </div>
67
68 <div metal:define-macro="date_selector"
69 tal:define="isDict python:hasattr(date, 'keys');
70 year python:str(isDict and date['year'] or date.year()) ;
71 month python:str(isDict and date['month'] or date.month()).zfill(2) ;
72 day python:str(isDict and date['day'] or date.day()).zfill(2) ;
73 hour python:str(isDict and date['hour'] or date.hour()).zfill(2) ;
74 minute python:str(isDict and date['minute'] or date.minute()).zfill(2);
75 defaultDate defaultDate|nothing"
76 i18n:domain="plinn"
77 tal:omit-tag="">
78 <div tal:condition="defaultDate" tal:omit-tag="">
79 <label>
80 <input type="checkbox" id="effective_date_cb" tal:attributes="id string:${dateName}_cb" />
81 <span tal:replace="defaultDateLabel|nothing">default</span>
82 </label><br />
83 </div>
84 <div tal:attributes="id string:${dateName}_fields">
85 <input type="hidden" tal:attributes="id dateName" /><span i18n:translate="" tal:omit-tag=""
86 ><span i18n:name="month"
87 ><input type="text" size="2" tal:attributes="id string:${dateName}_month; name string:${dateName}.month:record; value month"
88 /></span>&nbsp;/&nbsp;<span i18n:name="day"
89 ><input type="text" size="2" tal:attributes="id string:${dateName}_day; name string:${dateName}.day:record; value day"
90 /></span>&nbsp;/&nbsp;<span i18n:name="year"
91 ><input type="text" size="4" tal:attributes="id string:${dateName}_year; name string:${dateName}.year:record; value year"
92 /></span>&nbsp;&nbsp;<span i18n:name="hour"
93 ><input type="text" size="2" tal:attributes="id string:${dateName}_hour; name string:${dateName}.hour:record; value hour"
94 /></span>&nbsp;:&nbsp;<span i18n:name="minute"
95 ><input type="text" size="2" tal:attributes="id string:${dateName}_minute; name string:${dateName}.minute:record; value minute"
96 /></span></span>
97 <input type="button" value="..." tal:attributes="id string:show_${dateName}_cal" /><br />
98 <script type="text/javascript" tal:condition="not:defaultDate"
99 tal:content="structure python:'''
100 // <!--\n
101 new MetadataDateManager('%s');\n
102 // -->''' % dateName">
103 </script>
104 <script type="text/javascript" tal:condition="defaultDate"
105 tal:content="structure python:'''
106 // <!--\n
107 new MetadataDateManager('%s', new Date('%s'));\n
108 // -->''' % (dateName, defaultDate)">
109 </script>
110 </div>
111 </div>
112
113 <table metal:define-macro="news_box"
114 class="news_box" cellspacing="0"
115 tal:define="ctool python:modules['Products.CMFCore.utils'].getToolByName(here, 'portal_catalog');
116 news python:ctool(portal_type='News Item'
117 , sort_on='modified'
118 , sort_order='reverse'
119 , review_state='published')[:5]"
120 tal:condition="news"
121 i18n:domain="plinn">
122 <tr>
123 <th i18n:translate="">News</th>
124 </tr>
125 <tr tal:repeat="n news">
126 <td tal:define="oddrow repeat/n/odd" tal:attributes="class python:oddrow and 'odd' or 'even'">
127 <a tal:attributes="href n/getURL ; title n/Description">
128 <img border="0" alt="News Item" tal:attributes="src n/getIcon" i18n:attributes="alt" />
129 <span tal:replace="n/Title|n/getId"></span>
130 <div tal:content="python:DateTime(n.ModificationDate).strftime(locale_date_fmt)"></div>
131 </a>
132 </td>
133 </tr>
134 </table>
135
136
137 <div metal:define-macro="debug" tal:replace="nothing">
138 </div>
139 </body>
140
141 </html>