[CMF-checkins] CVS: CMF/CMFWorkspaces/skins/workspaces - object_list_rows.pt:1.1 workspace_view.pt:1.3 workspace_content_rows.pt:NONE
Shane Hathaway
shane@cvs.zope.org
Wed, 22 May 2002 14:47:19 -0400
Update of /cvs-repository/CMF/CMFWorkspaces/skins/workspaces
In directory cvs.zope.org:/tmp/cvs-serv21513
Modified Files:
workspace_view.pt
Added Files:
object_list_rows.pt
Removed Files:
workspace_content_rows.pt
Log Message:
Refactored the content rows display so that object_list_rows can be shared
with search results.
=== Added File CMF/CMFWorkspaces/skins/workspaces/object_list_rows.pt ===
<!-- Invoke this macro with "items" in the namespace. -->
<table>
<tbody metal:define-macro="tbody"
tal:define="my_url python: request['URL'] + '?';
mq python: modules['ZTUtils'].make_query">
<tr>
<th width="1%"> </th>
<th nowrap width="5%"></th>
<th tal:repeat="column python: ['Title', 'Type', 'CreationDate']"
tal:attributes="width python:
column == 'Title' and '50%' or default">
<a href="" tal:omit-tag="python: sort_attr == column"
tal:attributes="href python: my_url +
mq(request.form, sort_attr=column, sort_order='normal')"
tal:content="column">Title</a>
<a href="" tal:condition="python: sort_attr == column"
tal:attributes="href python: my_url + mq(request.form,
sort_attr=column, sort_order=(sort_order == 'normal'
and 'reverse' or 'normal'))"><img border="0"
src="sorted_down.gif" tal:attributes="src
python: '%s/%s' % (here.portal_url(), sort_order == 'normal'
and 'sorted_down.gif' or 'sorted_up.gif')" /></a>
</th>
</tr>
<tr tal:repeat="it items">
<tal:block define="item python:it[1]">
<td><img tal:define="status_image item/get_status_image | nothing"
tal:condition="status_image"
tal:replace="structure status_image"
tal:on-error="string:broken" /></td>
<td> <input type="checkbox" name="selected_items:list"
tal:attributes="value python: it[0]"/>
</td>
<td> <img src="document_icon.gif"
tal:attributes="src item/getIcon"
tal:on-error="string:" />
<a href="#"
tal:attributes="href string:${item/absolute_url}/view"
tal:content="item/Title"
tal:omit-tag="no_item_links|nothing"
tal:on-error="string:(broken)">
TITLE or ID </a>
</td>
<td tal:content="item/Type"
tal:on-error="string:(unknown)">
Type
</td>
<td tal:content="item/CreationDate"
tal:on-error="string:(unknown)">
CreationDate
</td>
</tal:block>
</tr>
</tbody>
</table>
=== CMF/CMFWorkspaces/skins/workspaces/workspace_view.pt 1.2 => 1.3 ===
</form>
- <div metal:use-macro="here/workspace_content_rows/macros/form">
- Workspace contents
- </div>
+
+ <form action="" method="POST"
+ tal:attributes="action here/absolute_url"
+ tal:define="sort_attr python: request.get('sort_attr', 'Title');
+ sort_order python: request.get('sort_order', 'normal');
+ items python: here.listReferencedItems(sort_attr, sort_order)">
+
+ <table tal:condition="items">
+
+ <tbody metal:use-macro="here/object_list_rows/macros/tbody">
+ <tr><td>Workspace contents</td></tr>
+ </tbody>
+
+ <tfoot>
+ <tr>
+
+ <td colspan="5">
+ <input type="submit" name="workspace_remove:method"
+ value="Remove from workspace" />
+ <input type="submit" name="workspace_copy_to_other_form:method"
+ value="Copy to other workspace..." />
+ </td>
+
+ </tr>
+ </tfoot>
+
+ </table>
+
+ <p tal:condition="not:items"><em>No items are in this workspace.</em></p>
+
+ </form>
+
+
+
+
+
<!--
<div tal:define="
=== Removed File CMF/CMFWorkspaces/skins/workspaces/workspace_content_rows.pt ===