[CMF-checkins] CVS: CMF/CMFWorkspaces/skins/workspaces - workspace_content_rows.pt:1.2 workspace_view.pt:1.2
Shane Hathaway
shane@cvs.zope.org
Wed, 22 May 2002 13:02:41 -0400
Update of /cvs-repository/CMF/CMFWorkspaces/skins/workspaces
In directory cvs.zope.org:/tmp/cvs-serv27467/skins/workspaces
Modified Files:
workspace_content_rows.pt workspace_view.pt
Log Message:
Working content rows display
=== CMF/CMFWorkspaces/skins/workspaces/workspace_content_rows.pt 1.1.1.1 => 1.2 ===
- tal:define="sort_attr python: request.get('sort_attr', 'Title');
- sort_direction python: request.get('sort_direction', 'up')">
-
-<span tal:condition="nothing">
- Page fragment presenting the contents as rows in a table, including the
- table header.
-</span>
+ <form metal:define-macro="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">
+
+<thead>
<tr tal:define="sort_fmt python: here.absolute_url() +
- '?sort_attr=%s&sort_direction=%s'">
+ '?sort_attr=%s&sort_order=%s'">
<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: sort_fmt % (column, 'up')"
+ tal:attributes="href python: sort_fmt % (column, 'normal')"
tal:content="column">Title</a>
<a href="" tal:condition="python: sort_attr == column"
- tal:attributes="href python: sort_fmt % (
- column, ascending and 'down' or 'up')"><img border="0"
- src="sorted_down.gif" tal:attributes="src python:
- '%s/%s' % (here.portal_url(), ascending
+ tal:attributes="href python: sort_fmt % (column,
+ (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>
+</thead>
- <tr tal:repeat="it python:
- here.listReferencedItems(sort_attr, sort_direction)">
+
+<tbody>
+ <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"
@@ -60,5 +63,25 @@
</tal:block>
</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>
+
=== CMF/CMFWorkspaces/skins/workspaces/workspace_view.pt 1.1.1.1 => 1.2 ===
</form>
- <form action="" method="POST"
- tal:attributes="action here/absolute_url">
-
- <table>
-
- <div metal:use-macro="here/workspace_content_rows/macros/tbody" />
-
- <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>
-
- </table>
-
- </form>
+ <div metal:use-macro="here/workspace_content_rows/macros/form">
+ Workspace contents
+ </div>
<!--
<div tal:define="