--- a/web/component.py Tue Feb 17 13:48:58 2009 +0100
+++ b/web/component.py Tue Feb 17 13:54:23 2009 +0100
@@ -17,8 +17,9 @@
_ = unicode
+class VComponent(ComponentMixIn, View): pass
-class EntityVComponent(ComponentMixIn, View):
+class EntityVComponent(VComponent):
"""abstract base class for additinal components displayed in content
headers and footer according to:
--- a/web/views/basecomponents.py Tue Feb 17 13:48:58 2009 +0100
+++ b/web/views/basecomponents.py Tue Feb 17 13:54:23 2009 +0100
@@ -5,7 +5,7 @@
* the workflow history section for workflowable objects
:organization: Logilab
-:copyright: 2001-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
"""
__docformat__ = "restructuredtext en"
@@ -20,13 +20,13 @@
match_form_params)
from cubicweb.web.htmlwidgets import MenuWidget, PopupBoxMenu, BoxSeparator, BoxLink
-from cubicweb.web.component import (VComponent, SingletonVComponent, EntityVComponent,
+from cubicweb.web.component import (VComponent, EntityVComponent,
RelatedObjectsVComponent)
_ = unicode
-class RQLInputForm(SingletonVComponent):
+class RQLInputForm(VComponent):
"""build the rql input form, usually displayed in the header"""
id = 'rqlinput'
visible = False
@@ -55,7 +55,7 @@
self.w(u'</form></div>')
-class ApplLogo(SingletonVComponent):
+class ApplLogo(VComponent):
"""build the application logo, usually displayed in the header"""
id = 'logo'
site_wide = True # don't want user to hide this component using an eproperty
@@ -64,7 +64,7 @@
% (self.req.base_url(), self.req.external_resource('LOGO')))
-class ApplHelp(SingletonVComponent):
+class ApplHelp(VComponent):
"""build the help button, usually displayed in the header"""
id = 'help'
def call(self):
@@ -73,7 +73,7 @@
self.req._(u'help'),))
-class UserLink(SingletonVComponent):
+class UserLink(VComponent):
"""if the user is the anonymous user, build a link to login
else a link to the connected user object with a loggout link
"""
@@ -114,7 +114,7 @@
% (self.build_url('login'), self.req._('login')))
-class ApplicationMessage(SingletonVComponent):
+class ApplicationMessage(VComponent):
"""display application's messages given using the __message parameter
into a special div section
"""
@@ -169,7 +169,7 @@
displaycols=displaycols, headers=headers)
-class ApplicationName(SingletonVComponent):
+class ApplicationName(VComponent):
"""display the application name"""
id = 'appliname'
@@ -190,7 +190,7 @@
help = _('contentnavigation_seealso_description')
-class EtypeRestrictionComponent(SingletonVComponent):
+class EtypeRestrictionComponent(VComponent):
"""displays the list of entity types contained in the resultset
to be able to filter accordingly.
"""