Localisation.
[Plinn.git] / skins / generic / header_widgets.pt
1 <html xmlns="http://www.w3.org/1999/xhtml">
2
3 <head>
4 <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
5 <title>Header widgets</title>
6 </head>
7
8 <body>
9
10 <hr/>
11 <pre>titleAndDescForm</pre>
12 <hr/>
13
14 <div metal:define-macro="titleAndDescForm">
15 <form method="post" onsubmit="return submitMetadataForm(this);" tal:attributes="action here/absolute_url" i18n:domain="plinn">
16 <table class="TwoColumnForm" cellspacing="0">
17 <tr>
18 <th i18n:translate="">Title</th>
19 <td>
20 <input type="text" name="title" value="Title" size="64" tal:attributes="value here/Title" />
21 </td>
22 </tr>
23 <tr>
24 <th i18n:translate="">Description</th>
25 <td>
26 <textarea name="description" rows="4" cols="61" tal:content="here/Description">Description</textarea>
27 </td>
28 </tr>
29 <tr>
30 <th><br/></th>
31 <td>
32 <input type="submit" name="metadata_edit_control:method" value="Validate" i18n:attributes="value" />
33 <a href="." style="float:right" id="showFullMetadataForm"
34 tal:define="mq nocall:mq|nothing;"
35 tal:attributes="href python:mq and '%s?%s' % (url , mq( request.form, {'edit_metadata':'fullMetadataForm'})) or '.'"
36 i18n:translate="">Edit all metadata</a>
37 </td>
38 </tr>
39 </table>
40 </form>
41 </div>
42
43 <hr/>
44 <pre>fullMetadataForm</pre>
45 <hr/>
46
47 <div metal:define-macro="fullMetadataForm">
48 <form action="metadata_edit_form" method="post"
49 tal:attributes="action here/absolute_url" i18n:domain="plinn" onsubmit="return submitMetadataForm(this);">
50 <table class="TwoColumnForm"
51 tal:define="allow_discussion python:getattr(here, 'allow_discussion', None);
52 DateTime nocall:modules/DateTime/DateTime;">
53 <tr>
54 <th i18n:translate="">Enable Discussion?</th>
55 <td colspan="3">
56 <select name="allow_discussion">
57 <option value="default"
58 tal:attributes="selected python: allow_discussion is None"
59 i18n:translate="">Default</option>
60 <option value="off"
61 tal:attributes="selected python: allow_discussion is False"
62 i18n:translate="">Off</option>
63 <option value="on"
64 tal:attributes="selected python: allow_discussion is True"
65 i18n:translate="">On</option>
66 </select>
67 </td>
68 </tr>
69 <tr>
70 <th align="right" i18n:translate="">Identifier</th>
71 <td colspan="3"> <span tal:replace="context/Identifier"></span>
72 </td>
73 </tr>
74 <tr>
75 <th align="right" i18n:translate="">Title</th>
76 <td colspan="3">
77 <input type="text"
78 name="title"
79 value=""
80 size="65"
81 tal:attributes="value context/Title" />
82 </td>
83 </tr>
84 <tr>
85 <th align="right" i18n:translate="">Description</th>
86 <td colspan="3">
87 <textarea name="description:text" rows="5" cols="65" tal:content="context/Description"></textarea>
88 </td>
89 </tr>
90 <tr>
91 <th align="right" i18n:translate="">Subject</th>
92 <td tal:define="subj_lines python: '\n'.join( context.Subject() )">
93 <textarea name="subject:lines" rows="3" cols="20"
94 tal:content="subj_lines"></textarea>
95 <br />
96 <select name="subject:list" multiple
97 tal:define="mtool context/portal_metadata;
98 items python: mtool.listAllowedSubjects(context);"
99 tal:condition="items">
100 <option value=""
101 tal:define="subjects context/Subject"
102 tal:repeat="item items"
103 tal:attributes="value item; selected python: item in subjects"
104 tal:content="item">
105 </option>
106 </select>
107 </td>
108 <th align="right" i18n:translate="">Contributors</th>
109 <td tal:define="contrib_lines python: '\n'.join( context.Contributors() )">
110 <textarea name="contributors:lines" rows="5" cols="30"
111 tal:content="contrib_lines"></textarea>
112 </td>
113 </tr>
114 <tr>
115 <th align="right" i18n:translate="">Creation Date</th>
116 <td> <span tal:replace="python:context.created().strftime(locale_date_fmt)">Creation date</span>
117 </td>
118 <th align="right" i18n:translate="">Last Modified Date</th>
119 <td><span tal:replace="python:context.modified().strftime(locale_date_fmt)">Modification date</span></td>
120 </tr>
121 <!-- TODO : localise date format -->
122 <tr tal:define="translate python:modules['Products.Plinn.utils'].translate;
123 _ python:lambda x: translate(x, here)">
124 <td colspan="2">
125 <fieldset tal:define="effective_date here/effective_date|nothing;
126 date python:effective_date or DateTime(1970, 0);
127 dateName string:effective_date;
128 defaultDate string:1969/12/31;
129 defaultDateLabel python:_('immediately')">
130 <legend i18n:translate="">Effective Date</legend>
131 <span metal:use-macro="here/widgets/macros/date_selector"></span>
132 </fieldset>
133 </td>
134 <td colspan="2">
135 <fieldset tal:define="expiration_date here/expiration_date|nothing;
136 date python:expiration_date or DateTime(2500, 0);
137 dateName string:expiration_date;
138 defaultDate string:2499/12/31;
139 defaultDateLabel python:_('never')"
140 >
141 <legend i18n:translate="">Expiration Date</legend>
142 <span metal:use-macro="here/widgets/macros/date_selector"></span>
143 </fieldset>
144 </td>
145 </tr>
146 <tr>
147 <th align="right" i18n:translate="">Format</th>
148 <td> <input type="text" name="format" value=""
149 tal:attributes="value context/Format" />
150 </td>
151 <td></td>
152 <td></td>
153 </tr>
154 <tr>
155 <th align="right" i18n:translate="">Language</th>
156 <td> <input type="text" name="language" value=""
157 tal:attributes="value context/Language" />
158 </td>
159 <td></td>
160 <td></td>
161 </tr>
162 <tr>
163 <th align="right" i18n:translate="">Rights</th>
164 <td> <input type="text" name="rights" value=""
165 tal:attributes="value context/Rights" />
166 </td>
167 <td></td>
168 <td></td>
169 </tr>
170 <tr>
171 <td>&nbsp;</td>
172 <td colspan="3">
173 <input type="submit" name="metadata_edit_control:method" value="Validate" i18n:attributes="value" />
174 <a href="." style="float:right" id="showSimpleMetadataForm"
175 tal:define="mq nocall:mq|nothing;"
176 tal:attributes="href python:mq and '%s?%s' % (url , mq( request.form, {'edit_metadata':'titleAndDescForm'})) or '.'"
177 i18n:translate="">Edit standard metadata</a>
178 </td>
179 </tr>
180 </table>
181 </form>
182 </div>
183
184 <hr/>
185 <pre>viewTitleAndDesc</pre>
186 <hr/>
187
188 <div metal:define-macro="viewTitleAndDesc" i18n:domain="plinn">
189 <div id="DesktopTitle">
190 <img src="document_icon.gif" alt="" border="0" tal:define="icon python:here.restrictedTraverse(here.getIcon())" tal:attributes="src icon/absolute_url; alt here/getPortalTypeName; height icon/height; width icon/width" i18n:attributes="alt" /><span tal:content="here/title_or_id">Page Title</span>
191 </div>
192 <div id="DesktopDescription" tal:content="structure here/Description">
193 Description of the resource goes here, perhaps even wrapping lines; this is to make it long enough to test.
194 </div>
195 </div>
196
197 </body>
198
199 </html>