[Zope-Checkins] SVN: Zope/trunk/ - UI improvement for the catalog contents tab

Christian Theune ct at gocept.com
Sun Aug 29 09:57:11 EDT 2004


Log message for revision 27327:
   - UI improvement for the catalog contents tab
  


Changed:
  U   Zope/trunk/doc/CHANGES.txt
  U   Zope/trunk/lib/python/Products/ZCatalog/dtml/catalogView.dtml


-=-
Modified: Zope/trunk/doc/CHANGES.txt
===================================================================
--- Zope/trunk/doc/CHANGES.txt	2004-08-29 13:15:08 UTC (rev 27326)
+++ Zope/trunk/doc/CHANGES.txt	2004-08-29 13:57:11 UTC (rev 27327)
@@ -26,6 +26,9 @@
 
     Features added
 
+     - UI improvement for the ZCatalog. The "catalog contents" allow
+       you to filter the cataloged objects by path now.
+
      - Made test.py follow symbolic links on POSIX systems.
 
      - added utilities/reindex_catalog.py to perform ZCatalog maintenance

Modified: Zope/trunk/lib/python/Products/ZCatalog/dtml/catalogView.dtml
===================================================================
--- Zope/trunk/lib/python/Products/ZCatalog/dtml/catalogView.dtml	2004-08-29 13:15:08 UTC (rev 27326)
+++ Zope/trunk/lib/python/Products/ZCatalog/dtml/catalogView.dtml	2004-08-29 13:57:11 UTC (rev 27327)
@@ -1,7 +1,9 @@
 <dtml-var manage_page_header>
 <dtml-var manage_tabs>
 
-<dtml-if searchResults>
+    <dtml-let filterpath="REQUEST.get('filterpath', '/')"
+              results="searchResults(path=filterpath)">
+<dtml-if results>
 
 <script type="text/javascript">
 <!-- 
@@ -28,25 +30,40 @@
 //-->
 </script>
 
+<h1 class="form-label section-bar">Path filter</h1>
+<dtml-if "'path' in this().Indexes.objectIds()">
+<form action="&dtml-URL;">
+    <p class="form-text">
+        Path: <input type="text" name="filterpath" value="&dtml-filterpath;"/> <input type="submit" value="Set Filter"/>
+    </p>
+</form>
+<dtml-else>
+    <p class="form-text">
+    The path filter is <span style="color:red;">disabled</span>. To enable the path filter, add a PathIndex called "path" to this catalog.
+    </p>
+</dtml-if>
+
+<h1 class="form-label section-bar">Objects in this catalog</h1>
+
 <form action="&dtml-URL1;" name="objectItems">
-
 <p class="form-text">
-&dtml-id; contains <dtml-var searchResults fmt=collection-length thousands_commas> record(s).
+The catalog "&dtml-id;" contains <dtml-var results fmt=collection-length thousands_commas> record(s) in the path "&dtml-filterpath;".
 </p>
-  <div class="form-text">
-  <dtml-in searchResults previous size=20 start=query_start >
-    <a href="&dtml-URL;?query_start=&dtml-previous-sequence-start-number;">
+<div class="form-text">
+  <dtml-in results previous size=20 start=query_start >
+      <a href="&dtml-URL;?query_start=&dtml-previous-sequence-start-number;&filterpath=&dtml-filterpath;">
       [Previous <dtml-var previous-sequence-size> entries]
     </a>
   </dtml-in>
-  <dtml-in searchResults next size=20 start=query_start >
-    <a href="&dtml-URL;?query_start=&dtml-next-sequence-start-number;">
+  <dtml-in results next size=20 start=query_start >
+    <a href="&dtml-URL;?query_start=&dtml-next-sequence-start-number;&filterpath=&dtml-filterpath;">
       [Next <dtml-var next-sequence-size> entries]
     </a>
   </dtml-in>
   </div>
+
 <table width="100%" cellspacing="0" cellpadding="2" border="0">
-<dtml-in searchResults size=20 start=query_start >
+<dtml-in results size=20 start=query_start >
   <dtml-if name="sequence-start">
   <tr class="list-header">
     <td width="5%" align="right" colspan="2" valign="top">&nbsp;</td>
@@ -100,7 +117,7 @@
 There are no objects in the Catalog.
 </p>
 </dtml-if>
-
+</dtml-let>
 <dtml-var manage_page_footer>
 
 



More information about the Zope-Checkins mailing list