[CMF-checkins] CVS: CMF - content_publish_form.pt:1.1 content_status_history.pt:1.1 discussionitem_view.pt:1.1 document_edit_form.pt:1.1 document_view.pt:1.1 favorite_view.pt:1.1 file_edit_form.pt:1.1 file_view.pt:1.1 folder_edit_form.pt:1.1 full_metadata_edit_form.pt:1.1 image_edit_form.pt:1.1 image_view.pt:1.1 link_edit_form.pt:1.1 metadata_edit_form.pt:1.1 newsitem_edit_form.pt:1.1 newsitem_view.pt:1.1 subjectsList.py:1.1
andrew@digicool.com
andrew@digicool.com
Wed, 20 Jun 2001 14:49:17 -0400 (EDT)
Update of /cvs-repository/CMF/CMFDecor/skins/zpt_content
In directory korak.digicool.com:/tmp/cvs-serv19574
Added Files:
content_publish_form.pt content_status_history.pt
discussionitem_view.pt document_edit_form.pt document_view.pt
favorite_view.pt file_edit_form.pt file_view.pt
folder_edit_form.pt full_metadata_edit_form.pt
image_edit_form.pt image_view.pt link_edit_form.pt
metadata_edit_form.pt newsitem_edit_form.pt newsitem_view.pt
subjectsList.py
Log Message:
*First pass at converting dtml content skins to pagetemplates.
--- Added File content_publish_form.pt in package CMF ---
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">
<div class="Desktop"
tal:define="member python: here.portal_membership.getAuthenticatedMember();
review_state python: here.portal_workflow.getInfoFor(here, 'review_state');
review_history python: here.portal_workflow.getInfoFor(here, 'review_history')">
<h1> Publish <span tal:replace="here/getId">Item</span></h1>
<span tal:replace="request/message"
tal:condition="message|nothing"><hr></span>
<p>A <b>published</b> item is available to the general
member base and anonymous visitors.</p>
<p>Another way to control the visibility of an item is with its <b>effective
date</b>. An item is not publicly available before its effective date,
<em>even if its status is <b>published</b></em>.</p>
<form method="post" action="content_status_modify">
<table class="FormLayout">
<tr>
<td valign=top align=left>
<strong>Status</strong>
</td>
<td valign=top align=left>
This item is currently in <b><span tal:replace="review_state">Private</span></b> status.
<input type="hidden" name="workflow_action" value="publish">
</td>
</tr>
<tr>
<td valign=top align=left colspan=2>
<strong><em>Comments</em></strong><br>
<textarea name="comment" cols="60" rows="5" wrap="soft"
style="width: 100%"></textarea>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value=" Publish this Item "></td>
</tr>
</table>
</form>
<div tal:condition="review_history">
<p><strong>Reviewing history</strong>
<br>
<div tal:repeat="items python: here.reverseList(review_history)">
<span tal:replace="python: items['time'].aCommon()"></span>
<span tal:replace="items/action"></span>
<span tal:condition="items/effective_date|nothing">
(effective: <span tal:replace="python: items['effective_date'].aCommon()"></span>)
</span>
by <span tal:replace="items/actor">Actor</span><br>
<div tal:define="rhComments items/comments"
tal:replace="rhComments">Comments</div>
</div>
</div>
</div>
</div>
</body>
</html>
--- Added File content_status_history.pt in package CMF ---
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">
<div class="Desktop"
tal:define="review_state python: here.portal_workflow.getInfoFor(here, 'review_state');
review_history python: here.portal_workflow.getInfoFor(here, 'review_history')">
<div class="Desktop">
<h1> Content Item status history </h1>
<H2><span tal:replace="request/message"
tal:condition="message|nothing"><hr></span></H2>
<p>An item's status (also called its review state) determines who can see it.
A <b>private</b> item can only be viewed by its Owner and by the site
management. Only <b>published</b> items are available to the general
member base and anonymous visitors. To make an item published, it
has to be reviewed by one of the site's Reviewers. You can request
that an item be reviewed by setting its status to <b>pending</b>.</p>
<p>Another way to control the visibility of an item is with its <b>effective
date</b>. An item is not publicly available before its effective date,
<em>even if its status is <b>published</b></em>.</p>
<p><b>Current state</b></p>
<p>This item is in <b><span tal:replace="review_state">Private</span></b> state.</p>
<div tal:condition="review_history">
<p><strong>Reviewing history</strong>
<br>
<div tal:repeat="items python: here.reverseList(review_history)">
<span tal:replace="python: items['time'].aCommon()"></span>
<span tal:replace="items/action"></span>
<span tal:condition="items/effective_date|nothing">
(effective: <span tal:replace="python: items['effective_date'].aCommon()"></span>)
</span>
by <span tal:replace="items/actor">Actor</span><br>
<div tal:define="rhComments items/comments"
tal:replace="rhComments">Comments</div>
</div>
</div>
<div tal:condition="python: not(review_history)">This item has not had any status changes.</div>
</div>
</div>
</div>
</body>
</html>
--- Added File discussionitem_view.pt in package CMF ---
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">
<div class="Desktop">
<div class="Document">
<div tal:replace="structure here/content_byline">By Me</div>
<div class="Discussion">
<span tal:replace="structure here/aboveInThread"></span>
</div>
<h1> <span tal:replace="here/Title">My Title</span> </h1>
<div tal:replace="structure here/CookedBody">Body</div>
<div class="Discussion">
<span tal:replace="here/viewThreadsAtBottom"
tal:condition="here/viewThreadsAtBottom|nothing">Dicussions</span>
</div>
</div>
</div>
</div>
</body>
</html>
--- Added File document_edit_form.pt in package CMF ---
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">
<div class="Desktop">
<span tal:replace="request/message"
tal:condition="request/message|nothing"><hr></span>
<div class="Document">
<h2>Edit <span tal:replace="here/getId">My ID</span></h2>
<form action="document_edit" method="post" enctype="multipart/form-data">
<input type="hidden" name="SafetyBelt" value="&dtml-SafetyBelt;">
<table class="FormLayout">
<tr>
<th>
Title
</th>
<td>
<span tal:replace="here/Title">Title</span>
</td>
</tr>
<tr>
<th>
Description
</th>
<td>
<span tal:replace="here/description">Description</span>
</td>
</tr>
<tr>
<th>
Format
</th>
<td>
<input type="radio" name="text_format"
value="structured-text"
tal:attributes="checked python: path('here/text_format') == 'structured-text'" />
<label for="cb_structuredtext">structured-text</label>
<input type="radio" name="text_format" value="html"
tal:attributes="checked python: path('here/text_format') == 'html'" />
<label for="cb_html">html</label>
</td>
</tr>
<tr>
<th> Upload </th>
<td>
<input type="file" name="file" size="25">
</td>
</tr>
<tr>
<th class="TextField"> Edit </th>
<td class="TextField">
<textarea name="text:text" rows="20" cols="80"
tal:content="here/EditableBody"></textarea>
</td>
</tr>
<tr>
<td> <br> </td>
<td>
<input type="submit" value=" Change ">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</body>
</html>
--- Added File document_view.pt in package CMF ---
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">
<div class="Desktop">
<div class="Document">
<div tal:replace="structure here/content_byline">By Me</div>
<div tal:replace="structure here/CookedBody">Cooked Body</div>
<div class="Discussion">
<span tal:replace="structure here/viewThreadsAtBottom"
tal:condition="here/viewThreadsAtBottom|nothing"></span>
</div>
</div>
</div>
</div>
</body>
</html>
--- Added File favorite_view.pt in package CMF ---
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">
<div class="Desktop">
<div class="Link">
<div tal:replace="structure here/content_byline">By Me</div>
<p>
<a href="favorite.html" title="ZopeOrg"
tal:define="favorite python:here.portal_url.getPortalPath() + '/' + here.remote_url"
tal:attributes="href favorite; title favorite">
<span tal:replace="favorite">www.zope.org</span></a>
</p>
<p></p>
<dtml-var Description>
<div class="Discussion">
<span tal:replace="here/viewThreadsAtBottom"
tal:condition="viewThreadsAtBottom|nothing">Dicussions</span>
</div>
</div>
</div>
</div>
</body>
</html>
--- Added File file_edit_form.pt in package CMF ---
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">
<div class="Desktop">
<span tal:replace="request/message"
tal:condition="request/message|nothing"><hr></span>
<div class="File">
<h2>Edit <span tal:replace="here/id">My ID</span></h2>
<form action="file_edit" method="post" enctype="multipart/form-data">
<table class="FormLayout">
<tr>
<th> Title </th>
<td> <span tal:replace="here/Title">My Title</span></td>
</tr>
<tr>
<th> Description </th>
<td> <span tal:replace="here/Description">My Description</span></td>
</tr>
<tr>
<th> Content type </th>
<td> <span tal:replace="here/Format">html/text</span></td>
</tr>
<tr>
<th> Upload file </th>
<td> <input type="file" name="file" size="35"> </td>
</tr>
<tr>
<td> <br> </td>
<td><input type="submit" name="submit" value=" Change " /></td>
</tr>
</table>
</form>
</div>
</div>
</div>
</body>
</html>
--- Added File file_view.pt in package CMF ---
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">
<div class="Desktop">
<div class="File">
<span tal:replace="structure here/content_byline">ByLine</span>
<p>
<b>Filename</b>: <span tal:replace="here/getId">My ID</span>
<br>
<b>Size</b>: <span tal:replace="here/size">1024K</span>
<br>
<b>Content type</b>: <span tal:replace="here/content_type">application/gzip</span>
<br>
<b>Description</b>: <span tal:define="pss modules/Products.PythonScripts.standard; description here/Description"
tal:replace="structure python:pss.newline_to_br(description)">File Description</span>
</p>
<a href="aLInk.html" title="Download File"
tal:define="file here/absolute_url"
tal:attributes="href file; title here/Title"
tal:content="string:Download ${here/Title}">Download File</a>
<div class="Discussion">
<span tal:replace="here/viewThreadsAtBottom"
tal:condition="viewThreadsAtBottom|nothing">Dicussions</span>
</div>
</div>
</div>
</div>
</body>
</html>
--- Added File folder_edit_form.pt in package CMF ---
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">
<div class="Desktop">
<span tal:replace="request/message"
tal:condition="request/message|nothing"><hr></span>
<div class="File">
<h2>Edit: <span tal:replace="here/getId">My ID</span></h2>
<form action="folder_edit" method="post">
<table class="FormLayout">
<tr valign="top">
<th align="right"> Title
</th>
<td colspan="3">
<input type="text"
name="title"
value=""
tal:attributes="value here/title"
size="65">
</td>
<tr valign="top">
<th align="right"> Description
</th>
<td colspan="3">
<textarea name="description:text" rows="5"
cols="65"
tal:content="here/description">
</textarea>
</td>
</tr>
<tr valign="top">
<td> <br> </td>
<td>
<input type="submit" value=" Change ">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</body>
</html>
--- Added File full_metadata_edit_form.pt in package CMF ---
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">
<div class="Desktop">
<span tal:replace="request/message"
tal:condition="request/message|nothing"><hr></span>
<div class="Metadata">
<h2>Resource Metadata </h2>
<form action="metadata_edit" method="post">
<table class="FormLayout">
<tr valign="top">
<th align="right"> Identifier
</th>
<td colspan="3"> <span tal:replace="here/Identifier"></span>
</td>
</tr>
<tr valign="top">
<th align="right"> Title
</th>
<td colspan="3">
<input type="text"
name="title"
value=""
size="65"
tal:attributes="value here/Title">
</td>
</tr>
<tr valign="top">
<th align="right"> Description
</th>
<td colspan="3">
<textarea name="description:text" rows="5"
cols="65"
tal:content="here/Description"></textarea>
</td>
</tr>
<tr valign="top">
<th align="right"> Subject </th>
<td>
<textarea name="subject:lines" rows="3"
cols="20"
tal:define="lines here/subjectsList"><span tal:repeat="line lines" tal:replace="line"></span></textarea>
<br>
<select name="subject:list" multiple>
<option value=""
tal:define="items python: here.portal_metadata.listAllowedSubjects(here); subjects here/Subject"
tal:repeat="item items"
tal:attributes="value item; selected python: item in subjects"
tal:content="item">
</option>
</select>
</td>
<th align="right"> Contributors </th>
<td>
<textarea name="contributors:lines" rows="5"
cols="30"
tal:define="items here/Contributors"
tal:repeat="item items"
tal:content="item"></textarea>
</td>
</tr>
<tr valign="top">
<th align="right"> Creation Date
</th>
<td> <span tal:replace="here/CreationDate"></span>
</td>
<th align="right"> Last Modified Date
</th>
<td> <span tal:replace="here/ModificationDate"></span>
</td>
</tr>
<tr valign="top">
<th align="right"> Effective Date
</th>
<td> <input type="text" name="effective_date"
value=""
tal:define="effectiveString python: here.effective_date and here.effective_date.ISO() or 'None'"
tal:attributes="value effectiveString">
</td>
<th align="right"> Expiration Date
</th>
<td> <input type="text" name="expiration_date"
value=""
tal:define="expirationString python: here.expiration_date and here.expiration_date.ISO() or 'None'"
tal:attributes="value expirationString">
</td>
</tr>
<tr valign="top">
<th align="right"> Format
</th>
<td> <input type="text" name="format" value=""
tal:attributes="value here/Format">
</td>
</tr>
<tr valign="top">
<th align="right"> Language
</th>
<td> <input type="text" name="language" value=""
tal:attributes="value here/Language">
</td>
</tr>
<tr valign="top">
<th align="right"> Rights
</th>
<td> <input type="text" name="rights" value=""
tal:attributes="value here/Rights">
</td>
</tr>
<tr valign="top">
<td> <br> </td>
<td>
<input type="submit" value=" Change ">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</body>
</html>
--- Added File image_edit_form.pt in package CMF ---
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">
<div class="Desktop">
<span tal:replace="request/message"
tal:condition="request/message|nothing"><hr></span>
<div class="Image">
<h2>Edit <span tal:replace="here/getId">My ID</span></h2>
<form action="image_edit" method="post" enctype="multipart/form-data">
<table class="FormLayout">
<tr>
<th> Title </th>
<td> <span tal:replace="here/Title">My Title</span> </td>
</tr>
<tr>
<th> Description </th>
<td> <span tal:replace="here/Description">My Description</span> </td>
</tr>
<tr>
<th> Content type </th>
<td> <span tal:replace="here/Format">text/html</span> </td>
</tr>
<tr>
<th> Upload image </th>
<td> <input type="file" name="file" size="25"> </td>
</tr>
<tr>
<td> <br> </td>
<td><input type="submit" name="submit" value=" Change " /></td>
</tr>
</table>
</form>
</div>
</div>
</div>
</body>
</html>
--- Added File image_view.pt in package CMF ---
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">
<div class="Desktop">
<div class="Image">
<span tal:replace="here/tag">Tag</span>
<div class="Discussion">
<span tal:replace="structure here/viewThreadsAtBottom"
tal:condition="here/viewThreadsAtBottom|nothing"></span>
</div>
</div>
</div>
</div>
</body>
</html>
--- Added File link_edit_form.pt in package CMF ---
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">
<div class="Desktop">
<span tal:replace="request/message"
tal:condition="request/message|nothing"><hr></span>
<div class="Link">
<h2>Edit <span tal:replace="here/getId">My ID</span></h2>
<form action="link_edit" method="post">
<table class="FormLayout">
<tr>
<th>
Title
</th>
<td> <span tal:replace="here/Title">My Title</span> </td>
</tr>
<tr>
<th>
URL
</th>
<td>
<input type="text" name="remote_url" value="" tal:attributes="value here/remote_url">
</td>
</tr>
<tr>
<td> <br> </td>
<td>
<input type="submit" value=" Change ">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</body>
</html>
--- Added File metadata_edit_form.pt in package CMF ---
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">
<div class="Desktop">
<span tal:replace="request/message"
tal:condition="request/message|nothing"><hr></span>
<div class="Metadata">
<h2>Standard Resource Metadata </h2>
<form action="metadata_edit" method="post">
<table class="FormLayout">
<tr valign="top">
<th align="right"> Identifier </th>
<td> <dtml-var Identifier> </td>
<td colspan="2" align="right">
<a href="full_metadata_edit_form"> Edit all metadata </a>
</td>
</tr>
<tr valign="top">
<th align="right"> Title </th>
<td colspan="3">
<input type="text"
name="title"
value=""
size="65"
tal:attributes="value here/Title">
</td>
</tr>
<tr valign="top">
<th align="right"> Description </th>
<td colspan="3">
<textarea name="description:text" rows="5"
cols="65"
tal:content="here/Description"></textarea>
</td>
</tr>
<tr valign="top">
<th align="right"> Subject </th>
<td>
<textarea name="subject:lines" rows="3"
cols="20"
tal:define="lines here/subjectsList"><span tal:repeat="line lines" tal:replace="line"></span></textarea>
<br>
<select name="subject:list" multiple>
<option value=""
tal:define="items python: here.portal_metadata.listAllowedSubjects(here); subjects here/Subject"
tal:repeat="item items"
tal:attributes="value item; selected python: item in subjects"
tal:content="item">
</option>
</select>
</td>
<th align="right"> Format </th>
<td> <input type="text" name="format" value="" tal:attributes="value here/Format">
<br> <input type="submit" name="change" value=" Change ">
<br> <input type="submit" name="change_and_edit" value=" Change & Edit ">
<br> <input type="submit" name="change_and_view" value=" Change & View ">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</body>
</html>
--- Added File newsitem_edit_form.pt in package CMF ---
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">
<div class="Desktop">
<span tal:replace="request/message"
tal:condition="request/message|nothing"><hr></span>
<div class="NewsItem">
<h2>Edit <span tal:replace="here/getId">My ID</span></h2>
<form action="newsitem_edit" method="post">
<table class="FormLayout">
<tr>
<th> Title
</th>
<td> <span tal:replace="here/Title">My Title</span> </td>
</tr>
<tr>
<th class="TextField"> Lead-in </th>
<td class="TextField">
<textarea name="description:text" rows="10"
cols="65" tal:content="here/description"></textarea>
</td>
</tr>
<tr>
<th class="TextField"> Body
</th>
<td class="TextField">
<textarea name="text:text" rows="20" cols="65" tal:content="here/EditableBody"></textarea>
</td>
</tr>
<tr>
<th> <br>
<td>
<input type="submit" value=" Change ">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</body>
</html>
--- Added File newsitem_view.pt in package CMF ---
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="here/main_template/macros/master">
<body>
<div metal:fill-slot="main">
<div class="Desktop">
<div class="NewsItem">
<blockquote class="Description">
<span tal:replace="here/Description">Description</span>
</blockquote>
<div tal:replace="structure here/content_byline">By Me</div>
<div tal:replace="structure here/CookedBody">Body</div>
<div class="Discussion">
<span tal:replace="structure here/viewThreadsAtBottom"
tal:condition="here/viewThreadsAtBottom|nothing"></span>
</div>
</div>
</div>
</div>
</body>
</html>
--- Added File subjectsList.py in package CMF ---
## Script (Python) "subjectsList"
##title=List Subjects for Metadata Editing
allowedSubjects=container.portal_metadata.listAllowedSubjects(context)
item=[]
for i in context.Subject():
if not i in allowedSubjects:
item.append(i)
return item