web/views/actions.py
changeset 5477 f79c39be0b9b
parent 5426 0d4853a6e5ee
child 5483 1a30c5a56256
--- a/web/views/actions.py	Wed May 05 18:10:33 2010 +0200
+++ b/web/views/actions.py	Thu Apr 29 08:39:13 2010 +0200
@@ -412,6 +412,21 @@
     def url(self):
         return 'http://www.cubicweb.org'
 
+class GotRhythmAction(action.Action):
+    __regid__ = 'rhythm'
+    __select__ = yes()
+
+    category = 'footer'
+    order = 3
+    title = _('Got rhythm?')
+
+    def url(self):
+        from logilab.mtconverter import xml_escape
+        return xml_escape(self._cw.url()+'#')
+
+    def html_class(self):
+        self._cw.add_js('cubicweb.rhythm.js')
+        return 'rhythm'
 
 ## default actions ui configuration ###########################################