[Zope3-checkins] CVS: Products3/RotterdamSprint - add_box.pt:1.1 folder_contents.pt:1.1 configure.zcml:1.14
runyaga
runyaga@thisbox.com
Thu, 5 Dec 2002 12:02:48 -0500
Update of /cvs-repository/Products3/RotterdamSprint
In directory cvs.zope.org:/tmp/cvs-serv30333
Modified Files:
configure.zcml
Added Files:
add_box.pt folder_contents.pt
Log Message:
now we use our folder_contents instead of modifying the main.pt
=== Added File Products3/RotterdamSprint/add_box.pt ===
<div metal:define-macro="add_contents">
<span tal:content="structure context/@@+/index.html">
test
</span>
</div>
=== Added File Products3/RotterdamSprint/folder_contents.pt ===
<html metal:use-macro="views/standard_macros/page">
<head>
<style metal:fill-slot="headers" type="text/css">
</style>
</head>
<body>
<div metal:fill-slot="body">
<div metal:define-macro="contents">
<div>Contents <a href="+"> Add... </a> </div>
<form method="">
<select name="item">
<tal:block repeat="info context/@@+/addingInfo">
<option tal:attributes="value info/id|default"
tal:content="info/title">Folder
</option>
</tal:block>
</select>
</form>
<form name="containerContentsForm" method="get" action="."
tal:define="container_contents view/listContentInfo"
tal:condition="container_contents"
>
<table id="sortable" class="listing" summary="Content listing"
cellpadding="2" cellspacing="0"
metal:define-macro="contents_table"
>
<thead>
<tr>
<th> </th>
<th>Name</th>
<th>Title</th>
<th>Size</th>
<th>Created</th>
<th>Modified</th>
</tr>
</thead>
<tbody>
<metal:block tal:repeat="item container_contents">
<tr tal:define="oddrow repeat/item/odd; url item/url"
tal:attributes="class python:oddrow and 'even' or 'odd'" >
<td>
<input type="checkbox" class="noborder" name="ids:list" id="#"
value="#"
tal:attributes="value item/id;
id python: 'cb_'+item['id'];
checked request/ids_checked|nothing;"/>
</td>
<td>
<a href="#"
tal:attributes="href
string:${url}/@@SelectedManagementView.html"
tal:content="structure item/icon|default"
>
</a>
<a href="#"
tal:attributes="href
string:${url}/@@SelectedManagementView.html"
tal:content="item/id"
>foo</a>
</td>
<td><span tal:content="item/title|default"> </span></td>
<td><span tal:define="size item/size/size; label item/size/label;"
tal:attributes="size size"
tal:content="label"> </span></td>
<td><span tal:define="created item/created|default"
tal:content="created"> </span></td>
<td><span tal:define="modified item/modified|default"
tal:content="modified"> </span></td>
</tr>
</metal:block>
</tbody>
</table>
<br />
<input type="submit" name="@@removeObjects.html:method" value="Delete"
tal:attributes="value string:menu_delete_button"
i18n:attributes="value" />
</form>
</div>
</div>
</body>
</html>
=== Products3/RotterdamSprint/configure.zcml 1.13 => 1.14 ===
--- Products3/RotterdamSprint/configure.zcml:1.13 Thu Dec 5 11:56:47 2002
+++ Products3/RotterdamSprint/configure.zcml Thu Dec 5 12:02:48 2002
@@ -66,16 +66,32 @@
layer="rotterdam"
template="dialog_macros.pt" />
-<!-- lets include rotterdam versions of ZMI views -->
+<browser:view
+ name="add_box"
+ permission="Zope.View"
+ layer="rotterdam"
+ template="add_box.pt" />
+
<browser:view
for="Zope.App.OFS.Container.IContentContainer."
name="+"
factory="Zope.App.OFS.Container.Views.Browser.Adding."
permission="Zope.ManageContent"
layer="rotterdam"
+ allowed_attributes="addingInfo"
>
<browser:page name="index.html" template="add.pt" />
<browser:page name="action.html" attribute="action" />
</browser:view>
+
+<browser:view
+ for="Zope.App.OFS.Content.Folder.Folder.IFolder"
+ permission="Zope.ManageContent"
+ layer="rotterdam"
+ factory="Zope.App.OFS.Content.Folder.Views.Browser.FolderContents.">
+ <browser:page name="contents.html" attribute="contents" template="folder_contents.pt" />
+
+</browser:view>
+
</zopeConfigure>