obsolete methods
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 29 May 2009 10:49:01 +0200
changeset 1999 b9a8f5995658
parent 1998 12040c090aa4
child 2000 bcb9a55a89e0
obsolete methods
view.py
--- a/view.py	Thu May 28 22:57:52 2009 +0200
+++ b/view.py	Fri May 29 10:49:01 2009 +0200
@@ -7,6 +7,7 @@
 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
 """
 __docformat__ = "restructuredtext en"
+_ = unicode
 
 from cStringIO import StringIO
 
@@ -19,8 +20,6 @@
 from cubicweb.appobject import AppRsetObject
 from cubicweb.utils import UStringIO, HTMLStream
 
-_ = unicode
-
 
 # robots control
 NOINDEX = u'<meta name="ROBOTS" content="NOINDEX" />'
@@ -222,21 +221,6 @@
         """simple helper that escapes `data` and writes into `self.w`"""
         self.w(html_escape(data))
 
-    def action(self, actionid, row=0):
-        """shortcut to get action object with id `actionid`"""
-        return self.vreg.select_action(actionid, self.req, self.rset,
-                                       row=row)
-
-    def action_url(self, actionid, label=None, row=0):
-        """simple method to be able to display `actionid` as a link anywhere
-        """
-        action = self.vreg.select_action(actionid, self.req, self.rset,
-                                         row=row)
-        if action:
-            label = label or self.req._(action.title)
-            return u'<a href="%s">%s</a>' % (html_escape(action.url()), label)
-        return u''
-
     def html_headers(self):
         """return a list of html headers (eg something to be inserted between
         <head> and </head> of the returned page