1 <html xmlns="http://www.w3.org/1999/xhtml">
4 <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
5 <title>Header widgets</title>
11 <pre>titleAndDescForm</pre>
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">
18 <th i18n:translate="">Title</th>
20 <input type="text" name="title" value="Title" size="64" tal:attributes="value here/Title" />
24 <th i18n:translate="">Description</th>
26 <textarea name="description" rows="4" cols="61" tal:content="here/Description">Description</textarea>
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>
44 <pre>fullMetadataForm</pre>
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;">
54 <th i18n:translate="">Enable Discussion?</th>
56 <select name="allow_discussion">
57 <option value="default"
58 tal:attributes="selected python: allow_discussion is None"
59 i18n:translate="">Default</option>
61 tal:attributes="selected python: allow_discussion is False"
62 i18n:translate="">Off</option>
64 tal:attributes="selected python: allow_discussion is True"
65 i18n:translate="">On</option>
70 <th align="right" i18n:translate="">Identifier</th>
71 <td colspan="3"> <span tal:replace="context/Identifier"></span>
75 <th align="right" i18n:translate="">Title</th>
81 tal:attributes="value context/Title" />
85 <th align="right" i18n:translate="">Description</th>
87 <textarea name="description:text" rows="5" cols="65" tal:content="context/Description"></textarea>
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>
96 <select name="subject:list" multiple
97 tal:define="mtool context/portal_metadata;
98 items python: mtool.listAllowedSubjects(context);"
99 tal:condition="items">
101 tal:define="subjects context/Subject"
102 tal:repeat="item items"
103 tal:attributes="value item; selected python: item in subjects"
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>
115 <th align="right" i18n:translate="">Creation Date</th>
116 <td> <span tal:replace="python:context.created().strftime(locale_date_fmt)">Creation date</span>
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>
121 <!-- TODO : localise date format -->
122 <tr tal:define="translate python:modules['Products.Plinn.utils'].translate;
123 _ python:lambda x: translate(x, here)">
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>
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')"
141 <legend i18n:translate="">Expiration Date</legend>
142 <span metal:use-macro="here/widgets/macros/date_selector"></span>
147 <th align="right" i18n:translate="">Format</th>
148 <td> <input type="text" name="format" value=""
149 tal:attributes="value context/Format" />
155 <th align="right" i18n:translate="">Language</th>
156 <td> <input type="text" name="language" value=""
157 tal:attributes="value context/Language" />
163 <th align="right" i18n:translate="">Rights</th>
164 <td> <input type="text" name="rights" value=""
165 tal:attributes="value context/Rights" />
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>
185 <pre>viewTitleAndDesc</pre>
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>
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.