[Checkins] SVN: Products.CMFDefault/trunk/Products/CMFDefault/ - UI tweaking

Yvo Schubbe cvs-admin at zope.org
Mon Jul 23 07:45:11 UTC 2012


Log message for revision 127370:
  - UI tweaking

Changed:
  U   Products.CMFDefault/trunk/Products/CMFDefault/browser/content/folder.py
  U   Products.CMFDefault/trunk/Products/CMFDefault/browser/content/folder_contents.pt
  U   Products.CMFDefault/trunk/Products/CMFDefault/browser/membership/members.pt
  U   Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/zpt_stylesheet.css

-=-
Modified: Products.CMFDefault/trunk/Products/CMFDefault/browser/content/folder.py
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/browser/content/folder.py	2012-07-23 07:41:41 UTC (rev 127369)
+++ Products.CMFDefault/trunk/Products/CMFDefault/browser/content/folder.py	2012-07-23 07:45:08 UTC (rev 127370)
@@ -50,14 +50,18 @@
 
 
 class ContentProxy(object):
+
     """Utility wrapping content item for display purposes"""
 
     def __init__(self, context):
         self.name = context.getId()
         self.title = context.Title() or context.getId()
         self.type = context.Type() or None
-        self.icon = context.icon
-        self.url = context.absolute_url()
+        self.icon = context.getIconURL()
+        self.url = context.getActionInfo(('object/folderContents',
+                                          'object/edit',
+                                          'object/download',
+                                          'object/view'))['url']
         self.ModificationDate = context.ModificationDate()
 
 
@@ -216,13 +220,17 @@
         key, reverse = self._get_sorting()
         columns = ({'sort_key': 'Type',
                     'title': _(u'Type'),
+                    'class': 'contents_type_col',
                     'colspan': '2'},
                    {'sort_key': 'getId',
-                    'title': _(u'Name')},
+                    'title': _(u'Name'),
+                    'class': 'contents_name_col'},
                    {'sort_key': 'modified',
-                    'title': _(u'Last Modified')},
+                    'title': _(u'Last Modified'),
+                    'class': 'contents_modified_col'},
                    {'sort_key': 'position',
-                    'title': _(u'Position')})
+                    'title': _(u'Position'),
+                    'class': 'contents_position_col'})
         for column in columns:
             paras = {'form.sort_key': column['sort_key']}
             if key == column['sort_key'] \

Modified: Products.CMFDefault/trunk/Products/CMFDefault/browser/content/folder_contents.pt
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/browser/content/folder_contents.pt	2012-07-23 07:41:41 UTC (rev 127369)
+++ Products.CMFDefault/trunk/Products/CMFDefault/browser/content/folder_contents.pt	2012-07-23 07:45:08 UTC (rev 127370)
@@ -18,55 +18,64 @@
  ><span class="mild" i18n:translate="">Root</span></tal:case></p>
 
 <form action="." method="post" tal:attributes="action request/ACTUAL_URL">
+ <tal:block repeat="widget view/hidden_widgets"
+    replace="structure widget/hidden" />
+<div class="pagination"
+><metal:macro metal:use-macro="context/@@batch_widget/pagination" /></div>
 <div class="form">
-  <tal:block repeat="widget view/hidden_widgets"
-             replace="structure widget/hidden" />
-   <table class="BatchTable" tal:condition="view/listBatchItems">
-     <tr>
-       <th tal:repeat="column view/column_headings"
-            tal:attributes="colspan column/colspan | nothing"><a href="column"
-         tal:content="column/title"
-         tal:attributes="href column/url"
-         >Column Title</a></th>
-     </tr>
+ <table class="BatchTable" tal:condition="view/listBatchItems">
+  <thead>
+   <tr class="list-header">
+    <th tal:repeat="column view/column_headings"
+       tal:attributes="colspan column/colspan | nothing;
+                       class column/class"
+    ><a href="" tal:attributes="href column/url"
+        tal:content="column/title"
+        tal:omit-tag="not: column/url">COLUMN TITLE</a></th>
+   </tr>
+  </thead>
+  <tbody>
    <tr tal:repeat="item view/listBatchItems"
-      tal:attributes="class python: (repeat['item'].even() and 'row-hilite') or None">
-     <td><input name="form.select_ids" type="checkbox" value=""
-         tal:condition="item/checkbox" tal:attributes="value item/name" /></td>
-     <td><a href="" tal:attributes="href item/url"
-         tal:condition="item/icon"
-      ><img src="" alt="" border="0"
-          tal:attributes="src item/icon; alt item/type"
-          i18n:attributes="alt" /></a></td>
-     <td><a tal:attributes="href string:${item/url}/edit.html" tal:content="string:${item/name} (${item/title})"></a></td>
-     <td tal:content="item/ModificationDate"></td>
+      tal:attributes="class python: (repeat['item'].even() and 'row-hilite') or 'row-normal'">
+    <td><input name="form.select_ids" type="checkbox" value=""
+        tal:condition="item/checkbox" tal:attributes="value item/name" /></td>
+    <td><a href="" tal:attributes="href item/url"
+        tal:condition="item/icon"
+     ><img src="" alt="" border="0"
+         tal:attributes="src item/icon; alt item/type"
+         i18n:attributes="alt" /></a></td>
+    <td><a tal:attributes="href item/url" tal:content="string:${item/name} (${item/title})"></a></td>
+    <td tal:content="item/ModificationDate"></td>
     <td tal:content="item/position"></td>
    </tr>
-   </table>
+  </tbody>
+ </table>
+<div class="clear"></div>
 
-<div class="buttons">
+<div class="buttons"
+   tal:condition="python: view.show_basic() or view.show_paste()">
  <tal:loop tal:repeat="action view/object_actions"
     tal:replace="structure action/render" />
 </div>
 <div class="buttons">
-  <tal:loop tal:repeat="action view/delta_actions"
-   tal:replace="structure action/render" />
-   <div tal:condition="view/is_orderable"
-        tal:define="widget python:view.widgets.get('delta');
-                    hint widget/hint | nothing">
-     <label tal:attributes="for widget/name; title python: hint or None"
-       tal:content="widget/label">Move By</label>
-     <tal:block tal:replace="structure view/widgets/delta" />
-   </div>
-  <tal:loop tal:repeat="action view/absolute_actions"
-   tal:replace="structure action/render" />
-  <tal:loop tal:repeat="action view/sort_actions"
-   tal:replace="structure action/render" />
+ <tal:loop tal:repeat="action view/delta_actions"
+    tal:replace="structure action/render" />
+ <div tal:condition="view/is_orderable"
+    tal:define="widget python: view.widgets.get('delta');
+                hint widget/hint | nothing">
+  <label tal:attributes="for widget/name; title python: hint or None"
+     tal:content="widget/label">Move By</label>
+  <tal:block tal:replace="structure view/widgets/delta" />
+ </div>
+ <tal:loop tal:repeat="action view/absolute_actions"
+    tal:replace="structure action/render" />
+ <tal:loop tal:repeat="action view/sort_actions"
+    tal:replace="structure action/render" />
 </div>
 </div>
+<div class="pagination"
+><metal:macro metal:use-macro="context/@@batch_widget/navigation" /></div>
 </form>
-<metal:macro metal:use-macro="context/@@batch_widget/navigation" />
-<metal:macro metal:use-macro="context/@@batch_widget/pagination" />
 </metal:slot>
 
 </body>

Modified: Products.CMFDefault/trunk/Products/CMFDefault/browser/membership/members.pt
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/browser/membership/members.pt	2012-07-23 07:41:41 UTC (rev 127369)
+++ Products.CMFDefault/trunk/Products/CMFDefault/browser/membership/members.pt	2012-07-23 07:45:08 UTC (rev 127370)
@@ -7,34 +7,34 @@
 <metal:macro metal:use-macro="context/@@formlib_macros/header" />
 
 <form action="." method="post" tal:attributes="action request/ACTUAL_URL">
+ <tal:block repeat="widget view/hidden_widgets"
+    replace="structure widget/hidden" />
+<div class="pagination"
+><metal:macro metal:use-macro="context/@@batch_widget/pagination" /></div>
 <div class="form">
-  <tal:block repeat="widget view/hidden_widgets"
-             replace="structure widget/hidden" />
  <table class="BatchTable" tal:condition="view/listBatchItems">
   <thead>
    <tr class="list-header">
-    <td>&nbsp;</td>
-    <th i18n:translate="">Member</th>
-    <th i18n:translate="">Email Address</th>
-    <th i18n:translate="">Last Login</th>
+    <td class="members_select_col">&nbsp;</td>
+    <th class="members_name_col" i18n:translate="">Member</th>
+    <th class="members_address_col" i18n:translate="">Email Address</th>
+    <th class="members_login_col" i18n:translate="">Last Login</th>
    </tr>
   </thead>
-     <tbody>
-       <tr tal:repeat="item view/listBatchItems"
-           tal:attributes="class python: (repeat['item'].even() and 'row-hilite') or None">
-          <td><input name="form.select_ids" type="checkbox" value=""
-                     tal:attributes="value item/name" /></td>
-          <td><a href="" tal:omit-tag="not: item/home"
-                 tal:content="string:${item/fullname} (${item/name})"
-                 tal:attributes="href item/home">FULL NAME (ID)</a></td>
-          <td><a href="" 
-                 tal:content="item/email" 
-                 tal:attributes="href string:mailto:${item/email}"></a></td>
-          <td tal:content="item/login_time"></td>         
-      </tr>
-
-     </tbody>
-     </table>
+  <tbody>
+   <tr tal:repeat="item view/listBatchItems"
+      tal:attributes="class python: (repeat['item'].even() and 'row-hilite') or 'row-normal'">
+    <td><input name="form.select_ids" type="checkbox" value=""
+        tal:attributes="value item/name" /></td>
+    <td><a href="" tal:omit-tag="not: item/home"
+        tal:content="string:${item/fullname} (${item/name})"
+        tal:attributes="href item/home">FULL NAME (ID)</a></td>
+    <td><a href="" tal:attributes="href string:mailto:${item/email}"
+        tal:content="item/email"></a></td>
+    <td tal:content="item/login_time"></td>
+   </tr>
+  </tbody>
+ </table>
 <div class="clear"></div>
 
 <div class="buttons">
@@ -42,9 +42,9 @@
     tal:replace="structure action/render" />
 </div>
 </div>
+<div class="pagination"
+><metal:macro metal:use-macro="context/@@batch_widget/navigation" /></div>
 </form>
-<metal:macro metal:use-macro="context/@@batch_widget/navigation" />
-<metal:macro metal:use-macro="context/@@batch_widget/pagination" />
 </metal:slot>
 
 </body>

Modified: Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/zpt_stylesheet.css
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/zpt_stylesheet.css	2012-07-23 07:41:41 UTC (rev 127369)
+++ Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/zpt_stylesheet.css	2012-07-23 07:45:08 UTC (rev 127370)
@@ -434,4 +434,20 @@
                    font-size: 80%; font-weight: bold; color: red; }
 .clear           { clear: both; padding-top: 6px; }
 .buttons         { min-width: 604px; margin: 0 0 0 116px; }
+.buttons div     { display: inline; }
 .button          { margin-bottom: 6px; }
+.form table      { width: 720px; table-layout: fixed; }
+.form th,
+.form td         { overflow: hidden; text-overflow: ellipsis; }
+.form th:last-child,
+.form td:last-child { text-align: right; }
+.contents_type_col { width: 4em; }
+.contents_name_col { width: 98%; }
+.contents_modified_col { width: 12em; }
+.contents_position_col { width: 6em; }
+.members_select_col { width: 2em; }
+.members_name_col { width: 49%; }
+.members_address_col { width: 49%; }
+.members_login_col { width: 8em; }
+.pagination      { width: 720px; height: 1em; margin: 0; padding: 8px 0;
+                   text-align: right; }



More information about the checkins mailing list