[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/www - naiveFile_edit.pt:1.1.2.1 naiveFile_main.pt:1.1.2.1
Stephan Richter
srichter@cbu.edu
Sat, 19 Jan 2002 15:05:21 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/www
In directory cvs.zope.org:/tmp/cvs-serv7462/www
Added Files:
Tag: Zope-3x-branch
naiveFile_edit.pt naiveFile_main.pt
Log Message:
- Added Support for simple File saved in the ZODB
- Provided a Web-based view
Note: You should not use this object to save large pieces of data.
=== Added File Zope3/lib/python/Zope/App/OFS/www/naiveFile_edit.pt ===
<html metal:use-macro="views/standard_macros/page">
<head>
<style metal:fill-slot="headers" type="text/css">
<!--
.ContentIcon {
width: 20px;
}
.ContentTitle {
text-align: left;
}
-->
</style>
</head>
<body>
<div metal:fill-slot="body">
<p tal:content="options/msg | nothing">
Message will go here.
</p>
<form action="edit" method="post">
<table class="EditTable">
<tbody>
<tr>
<th class="EditAttributeName">Content-Type</th>
<td class="EditAttributeValue">
<input type="text" name="contentType"
tal:attributes="value here/getContentType" />
</td>
</tr>
<tr>
<th class="EditAttributeName">Data</th>
<td class="EditAttributeValue">
<textarea name="data"
tal:content="here/getData">Data</textarea>
</td>
</tr>
</tbody>
</table>
<input type="submit" name="edit" value="Save Changes">
</form>
</div>
</body>
</html>
=== Added File Zope3/lib/python/Zope/App/OFS/www/naiveFile_main.pt ===
<html metal:use-macro="views/standard_macros/page">
<head>
<style metal:fill-slot="headers" type="text/css">
<!--
.ContentIcon {
width: 20px;
}
.ContentTitle {
text-align: left;
}
-->
</style>
</head>
<body>
<div metal:fill-slot="body">
<table class="ContentListing">
<caption>Folder Contents <a href="adder;view"> Add... </a> </caption>
<tbody>
<tr>
<td class="ContentIcon"><br /> </td>
<th class="ContentTitle">Title</th>
</tr>
<!--
** listContentInfo returns a sequence of mappings, containing:
** 'id' : the ID of the contained within the container
** 'url' : the absolute URL of the contained object
** 'title' : the title of the contained object
** 'icon' : the absolute URL of the icon, for the contained object
(may be None)
-->
<tr tal:repeat="info container/listContentInfo">
<td class="ContentIcon">
<img alt="Folder" src="../../ZMI/www/folder_icon.gif"
tal:condition="info/url"
tal:attributes="src info/url" />
</td>
<td class="ContentTitle">
<a href="subfolder_id"
tal:attributes="href info/url"
tal:content="info/title"
>Folder Title or ID here</a>
</td>
</tr>
<tr tal:condition="nothing">
<td class="ContentIcon">
<img alt="Document" src="../../ZMI/www/document_icon.gif" />
</td>
<td class="ContentTitle">
<a href="document_id">Document Title or ID here</a>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>