[Zope-Checkins]
SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/
Get rid of duplicated forms and update as well as overhaul
the old ones (valid
Philipp von Weitershausen
philikon at philikon.de
Sun May 21 16:03:10 EDT 2006
Log message for revision 68221:
Get rid of duplicated forms and update as well as overhaul the old ones (valid
XHTML, whitespace fixes, beautifications, etc.)
Changed:
D Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/pt/
U Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/www/ptAdd.zpt
U Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/www/ptEdit.zpt
-=-
Modified: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/www/ptAdd.zpt
===================================================================
--- Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/www/ptAdd.zpt 2006-05-21 19:44:18 UTC (rev 68220)
+++ Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/www/ptAdd.zpt 2006-05-21 20:03:09 UTC (rev 68221)
@@ -1,50 +1,51 @@
<h1 tal:replace="structure here/manage_page_header">Header</h1>
-
<h2 tal:define="form_title string:Add Page Template"
tal:replace="structure here/manage_form_title">Form Title</h2>
-<p class="form-help">
-Page Templates allow you to use simple HTML or XML attributes to
-create dynamic templates. You may choose to upload the template text
-from a local file by typing the file name or using the <em>browse</em>
-button.
-</p>
+<p class="form-help">Page Templates allow you to use simple HTML or
+XML attributes to create dynamic templates. You may choose to upload
+the template text from a local file by typing the file name or using
+the <em>browse</em> button.</p>
<form action="manage_addPageTemplate" method="post"
- enctype="multipart/form-data">
+ enctype="multipart/form-data">
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
- <div class="form-label">
- Id
- </div>
+ <div class="form-label">Id</div>
</td>
<td align="left" valign="top">
- <input type="text" name="id" size="40" />
+ <input type="text" name="id" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
- <div class="form-optional">
- File
- </div>
+ <div class="form-optional">File</div>
</td>
<td align="left" valign="top">
- <input type="file" name="file" size="25" value="" />
+ <input type="file" name="file" size="25" value="" />
</td>
</tr>
<tr>
<td align="left" valign="top">
+ <div class="form-optional">Encoding</div>
</td>
<td align="left" valign="top">
- <div class="form-element">
- <input class="form-element" type="submit" name="submit"
- value=" Add " />
- <input class="form-element" type="submit" name="submit"
- value=" Add and Edit " />
- </div>
+ <input type="text" name="encoding" size="25" value="utf-8" />
+ <em>(only used for non-XML and non-HTML content)</em>
</td>
</tr>
+ <tr>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">
+ <div class="form-element">
+ <input class="form-element" type="submit" name="submit"
+ value=" Add " />
+ <input class="form-element" type="submit" name="submit"
+ value=" Add and Edit " />
+ </div>
+ </td>
+ </tr>
</table>
</form>
Modified: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/www/ptEdit.zpt
===================================================================
--- Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/www/ptEdit.zpt 2006-05-21 19:44:18 UTC (rev 68220)
+++ Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/www/ptEdit.zpt 2006-05-21 20:03:09 UTC (rev 68221)
@@ -1,148 +1,138 @@
-<h1 tal:replace="structure here/manage_page_header">Header</h1>
+<h1 tal:replace="structure python:context.manage_page_header(management_page_charset='utf-8')">Header</h1>
<h2 tal:define="manage_tabs_message options/manage_tabs_message | nothing"
- tal:replace="structure here/manage_tabs">Tabs</h2>
+ tal:replace="structure context/manage_tabs">Tabs</h2>
<tal:block define="global body request/other/text | request/form/text
-| here/read" />
+ | context/read" />
<form action="" method="post" tal:attributes="action request/URL1">
-<input type="hidden" name=":default_method" value="pt_changePrefs">
+<input type="hidden" name=":default_method" value="pt_changePrefs" />
+<input type="hidden" name="encoding" value="utf-8" />
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="middle">
- <div class="form-optional">
- Title
- </div>
+ <div class="form-optional">Title</div>
</td>
<td align="left" valign="middle">
- <input type="text" name="title" size="40"
- tal:attributes="value request/title | here/title" />
+ <input type="text" name="title" size="40"
+ tal:attributes="value request/title | context/title" />
</td>
<td align="left" valign="middle">
- <div class="form-optional">
- Content-Type
- </div>
+ <div class="form-label">Content-Type</div>
</td>
<td align="left" valign="middle">
- <input type="text" name="content_type" size="14"
- tal:attributes="value request/content_type | here/content_type" />
+ <input type="text" name="content_type" size="14"
+ tal:attributes="value request/content_type | context/content_type" />
</td>
</tr>
<tr>
<td align="left" valign="middle">
- <div class="form-label">
- Last Modified
- </div>
+ <div class="form-label">Last Modified</div>
</td>
<td align="left" valign="middle">
- <div class="form-text"
- tal:content="python:here.bobobase_modification_time().strftime('%Y-%m-%d %I:%M %p')">1/1/2000
- </div>
+ <div class="form-text"
+ tal:content="python:context.bobobase_modification_time().strftime('%Y-%m-%d %I:%M %p')">1/1/2000
+ </div>
</td>
- <td align="left" valign="top" colspan=2>
- <a href="source.html" tal:condition="here/html">Browse HTML source</a>
- <a href="source.xml" tal:condition="not:here/html">Browse XML source</a>
- <br>
- <input type="hidden" name="expand:int:default" value="0">
+ <td align="left" valign="top" colspan="2">
+ <a href="source.html" tal:condition="context/html">Browse HTML source</a>
+ <a href="source.xml" tal:condition="not:context/html">Browse XML source</a>
+ <br />
+ <input type="hidden" name="expand:int:default" value="0" />
<input type="checkbox" value="1" name="expand:int"
- tal:attributes="checked request/expand | here/expand">
+ tal:attributes="checked request/expand | context/expand" />
Expand macros when editing
</td>
</tr>
- <tr tal:define="errors here/pt_errors" tal:condition="errors">
- <tal:block define="global body python:here.document_src({'raw':1})"/>
+ <tr tal:define="errors context/pt_errors" tal:condition="errors">
+ <tal:block define="global body python:context.document_src({'raw':1})" />
<td align="left" valign="middle" class="form-label">Errors</td>
<td align="left" valign="middle" style="background-color: #FFDDDD"
- colspan="3">
-<pre tal:content="python:modules['string'].join(errors, '\n')">errors</pre>
+ colspan="3">
+<pre tal:content="python:'\n'.join(errors)">errors</pre>
</td>
</tr>
- <tr tal:define="warnings here/pt_warnings" tal:condition="warnings">
+ <tr tal:define="warnings context/pt_warnings" tal:condition="warnings">
<td align="left" valign="middle" class="form-label">Warnings</td>
<td align="left" valign="middle" style="background-color: #FFEEDD"
- colspan="3">
-<pre tal:content="python:modules['string'].join(warnings, '\n')">errors</pre>
+ colspan="3">
+<pre tal:content="python:'\n'.join(warnings)">errors</pre>
</td>
</tr>
<tr>
<td align="left" valign="top" colspan="4"
- tal:define="width request/dtpref_cols | string:100%;
- relative_width python:str(width).endswith('%')">
+ tal:define="width request/dtpref_cols | string:100%;
+ relative_width python:str(width).endswith('%')">
<textarea name="text:text" wrap="off" style="width: 100%;" rows="20"
- tal:condition="relative_width"
- tal:attributes="style string:width: $width;;;
- rows request/dtpref_rows | default"
- tal:content="body">Template Body</textarea>
+ tal:condition="relative_width"
+ tal:attributes="style string:width: $width;;;
+ rows request/dtpref_rows | default"
+ tal:content="body">Template Body</textarea>
<textarea name="text:text" wrap="off" rows="20" cols="50"
- tal:condition="not:relative_width"
- tal:attributes="cols width; rows request/dtpref_rows | default"
- tal:content="body">Template Body</textarea>
+ tal:condition="not:relative_width"
+ tal:attributes="cols width; rows request/dtpref_rows | default"
+ tal:content="body">Template Body</textarea>
</td>
</tr>
<tr>
<td align="left" valign="top" colspan="4">
<div class="form-element">
- <em tal:condition="here/wl_isLocked">Locked by WebDAV</em>
- <input tal:condition="not:here/wl_isLocked"
- class="form-element" type="submit"
- name="pt_editAction:method" value="Save Changes">
-
- <input class="form-element" type="submit" name="height" value="Taller">
- <input class="form-element" type="submit" name="height" value="Shorter">
- <input class="form-element" type="submit" name="width" value="Wider">
- <input class="form-element" type="submit" name="width" value="Narrower">
+ <em tal:condition="context/wl_isLocked">Locked by WebDAV</em>
+ <input tal:condition="not:context/wl_isLocked"
+ class="form-element" type="submit"
+ name="pt_editAction:method" value="Save Changes">
+
+ <input class="form-element" type="submit" name="height" value="Taller" />
+ <input class="form-element" type="submit" name="height" value="Shorter" />
+ <input class="form-element" type="submit" name="width" value="Wider" />
+ <input class="form-element" type="submit" name="width" value="Narrower" />
</div>
</td>
</tr>
</table>
</form>
-<p class="form-help">
-You can upload the text for <span tal:replace="here/title_and_id" />
-using the following form.
-Choose an existing HTML or XML file from your local computer by clicking
-<em>browse</em>. You can also <a href="document_src">click here</a>
-to view or download the current text.
-</p>
+<p class="form-help">You can upload the text for
+<span tal:replace="context/title_and_id" /> using the following form.
+Choose an existing HTML or XML file from your local computer by
+clicking <em>browse</em>. You can also <a href="document_src">click
+context</a> to view or download the current text.</p>
-<form action="pt_upload" method="post"
- enctype="multipart/form-data">
+<form action="pt_upload" method="post" enctype="multipart/form-data">
<table cellpadding="2" cellspacing="0" border="0">
<tr>
<td align="left" valign="top">
- <div class="form-label">
- File
- </div>
+ <div class="form-label">File </div>
</td>
<td align="left" valign="top">
- <input type="file" name="file" size="25" value="">
+ <input type="file" name="file" size="40" value="" />
</td>
</tr>
-<tr tal:condition="context/management_page_charset|nothing">
+<tr>
<td align="left" valign="top">
- <div class="form-label">
- Encoding
- </div>
+ <div class="form-label">Encoding </div>
</td>
- <td align="left" valign="top">
- <input name="charset" value=""
- tal:attributes="value here/management_page_charset|default" />
+ <td align="left" valign="top" colspan="2">
+ <input name="encoding" value="utf-8" />
</td>
+ <td align="left" valign="top" colspan="1">
+ <em>(only used for non-XML and non-XHTML content)</em>
+ </td>
</tr>
<tr>
<td></td>
<td align="left" valign="top">
<div class="form-element">
- <em tal:condition="here/wl_isLocked">Locked by WebDAV</em>
- <input tal:condition="not:here/wl_isLocked"
- class="form-element" type="submit" value="Upload File">
+ <em tal:condition="context/wl_isLocked">Locked by WebDAV</em>
+ <input tal:condition="not:context/wl_isLocked"
+ class="form-element" type="submit" value="Upload File" />
</div>
</td>
</tr>
</table>
</form>
-<h1 tal:replace="structure here/manage_page_footer">Footer</h1>
+<h1 tal:replace="structure context/manage_page_footer">Footer</h1>
More information about the Zope-Checkins
mailing list