[Zope3-checkins] CVS: zopeproducts/zwiki - TODO.txt:1.10 browser.py:1.10 configure.zcml:1.13 view_page.pt:1.5

Stephan Richter srichter@cbu.edu
Wed, 9 Apr 2003 11:47:08 -0400


Update of /cvs-repository/zopeproducts/zwiki
In directory cvs.zope.org:/tmp/cvs-serv21720

Modified Files:
	TODO.txt browser.py configure.zcml view_page.pt 
Log Message:
Added 'Jump To' box to the Wiki View page.


=== zopeproducts/zwiki/TODO.txt 1.9 => 1.10 ===
--- zopeproducts/zwiki/TODO.txt:1.9	Wed Apr  9 11:16:39 2003
+++ zopeproducts/zwiki/TODO.txt	Wed Apr  9 11:47:07 2003
@@ -12,19 +12,15 @@
 
   Rendering/Views
 
-    - Incorporate ReST in the Zope 3 core or at least in this product.
-
     - Create a custom skin, so that we are not relying on the standard Zope 3
       skin.
 
     - Create custom HTMLDocument class for rendering the STX and ReST in Wiki
       style.
 
-    - Make sure WebDAV work.
+    - Make sure WebDAV works.
 
     - Add File Extension recognition.
-
-    - Have a "Jump to" form on the WikiPage view.
 
     - Create a Management screen (advancedform) that is accessible for users
       without management rights.


=== zopeproducts/zwiki/browser.py 1.9 => 1.10 ===
--- zopeproducts/zwiki/browser.py:1.9	Wed Apr  9 10:36:48 2003
+++ zopeproducts/zwiki/browser.py	Wed Apr  9 11:47:07 2003
@@ -146,6 +146,14 @@
         formatter = self.request.locale.getDateTimeFormatter('medium')
         return formatter.format(date)
 
+    def jumpTo(self, jumpto):
+        """Try to get quickly to another Wiki page"""
+        wiki = getParent(self.context)
+        if jumpto in wiki:
+            return self.request.response.redirect(getPath(wiki)+'/'+jumpto)
+        else:
+            return self.request.response.redirect('.')
+
     def renderWikiLinks(self, source):
         """Add Wiki Links to the source"""
 


=== zopeproducts/zwiki/configure.zcml 1.12 => 1.13 ===
--- zopeproducts/zwiki/configure.zcml:1.12	Wed Apr  9 10:33:57 2003
+++ zopeproducts/zwiki/configure.zcml	Wed Apr  9 11:47:07 2003
@@ -128,14 +128,14 @@
       class=".browser.EditWikiPage"
       menu="zmi_views" title="Edit" />
 
-  <browser:page
-      name="view.html"
+  <browser:pages
       for=".interfaces.IWikiPage"
       class=".browser.ViewWikiPage"
-      template="view_page.pt"
-      permission="zope.View"
-      menu="zmi_views"
-      title="View"/>
+      permission="zope.View">
+      <browser:page name="view.html" template="view_page.pt"
+          menu="zmi_views" title="View" />
+      <browser:page name="jumpto.html" attribute="jumpTo" />
+  </browser:pages>
 
   <browser:pages
       for=".interfaces.IWikiPage"


=== zopeproducts/zwiki/view_page.pt 1.4 => 1.5 ===
--- zopeproducts/zwiki/view_page.pt:1.4	Wed Apr  9 00:52:27 2003
+++ zopeproducts/zwiki/view_page.pt	Wed Apr  9 11:47:07 2003
@@ -13,6 +13,15 @@
 
       <p tal:replace="structure view/render">This is the rendered Wiki</p>
 
+      <form action="jumpto.html">
+      <div class="box" id="jumpto">
+        <div class="body">
+          <span i18n:translate="">Jump to:</span><input
+            type="text" name="jumpto"/>
+        </div>
+      </div>
+      </form>
+
     </div>
   </body>
 </html>