changeset 97:539cfd9a40b2

theme: moving related edit bar methods toghether imported from: moin--main--1.5--patch-99
author Nir Soffer <nirs@freeshell.org>
date Sun, 09 Oct 2005 00:45:15 +0000
parents 5b9e216fa00d
children 8375a3795ff8
files MoinMoin/theme/__init__.py
diffstat 1 files changed, 38 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/theme/__init__.py	Sat Oct 08 15:37:24 2005 +0000
+++ b/MoinMoin/theme/__init__.py	Sun Oct 09 00:45:15 2005 +0000
@@ -841,44 +841,6 @@
                         not form.has_key('button_cancel'))
         return False
 
-    def quicklinkLink(self, page):
-        """ Return add/remove quicklink link
-        
-        @rtype: unicode
-        @return: link to add or remove a quicklink
-        """
-        if not self.request.user.valid:
-            return ''
-        
-        _ = self.request.getText
-        if self.request.user.isQuickLinkedTo([page.page_name]):
-            title = _("Remove Link")
-        else:
-            title = _("Add Link")
-        quotedname = wikiutil.quoteWikinameURL(page.page_name)
-        return wikiutil.link_tag(self.request, quotedname + 
-                                 '?action=quicklink', title)
-
-    def subscribeLink(self, page):
-        """ Return subscribe/unsubscribe link to valid users
-        
-        @rtype: unicode
-        @return: subscribe or unsubscribe link
-        """
-        _ = self.request.getText
-        user = self.request.user
-        if self.cfg.mail_enabled and user.valid:
-            # Email enabled and user valid, get current page status
-            if user.isSubscribedTo([page.page_name]):
-                title = _("Unsubscribe")
-            else:
-                title = _("Subscribe")
-            quotedname = wikiutil.quoteWikinameURL(page.page_name)
-            link = wikiutil.link_tag(self.request, quotedname + 
-                                     '?action=subscribe', title)
-            return link
-        return ''
-
     def actionsMenu(self, page):
         """ Create actions menu list and items data dict
         
@@ -1072,6 +1034,44 @@
         self._cache[cacheKey] = html
         return html
 
+    def subscribeLink(self, page):
+        """ Return subscribe/unsubscribe link to valid users
+        
+        @rtype: unicode
+        @return: subscribe or unsubscribe link
+        """
+        _ = self.request.getText
+        user = self.request.user
+        if self.cfg.mail_enabled and user.valid:
+            # Email enabled and user valid, get current page status
+            if user.isSubscribedTo([page.page_name]):
+                title = _("Unsubscribe")
+            else:
+                title = _("Subscribe")
+            quotedname = wikiutil.quoteWikinameURL(page.page_name)
+            link = wikiutil.link_tag(self.request, quotedname + 
+                                     '?action=subscribe', title)
+            return link
+        return ''
+
+    def quicklinkLink(self, page):
+        """ Return add/remove quicklink link
+        
+        @rtype: unicode
+        @return: link to add or remove a quicklink
+        """
+        if not self.request.user.valid:
+            return ''
+        
+        _ = self.request.getText
+        if self.request.user.isQuickLinkedTo([page.page_name]):
+            title = _("Remove Link")
+        else:
+            title = _("Add Link")
+        quotedname = wikiutil.quoteWikinameURL(page.page_name)
+        return wikiutil.link_tag(self.request, quotedname + 
+                                 '?action=quicklink', title)
+
     def attachmentsLink(self, page):
         """ Return link to page attachments """
         _ = self.request.getText