web/views/basecomponents.py
changeset 8326 2e793b2cdb57
parent 8244 c7d89541e3c5
child 8505 dcd9bc1d1bca
equal deleted inserted replaced
8325:7f2337d7937f 8326:2e793b2cdb57
    75     with user'action (preference, logout, etc...)
    75     with user'action (preference, logout, etc...)
    76     """
    76     """
    77     __abstract__ = True
    77     __abstract__ = True
    78     cw_property_defs = component.override_ctx(
    78     cw_property_defs = component.override_ctx(
    79         component.CtxComponent,
    79         component.CtxComponent,
    80         vocabulary=['header-left', 'header-right'])
    80         vocabulary=['header-center', 'header-left', 'header-right', ])
    81     # don't want user to hide this component using an cwproperty
    81     # don't want user to hide this component using an cwproperty
    82     site_wide = True
    82     site_wide = True
    83     context = _('header-left')
    83     context = _('header-center')
    84 
    84 
    85 
    85 
    86 class ApplLogo(HeaderComponent):
    86 class ApplLogo(HeaderComponent):
    87     """build the instance logo, usually displayed in the header"""
    87     """build the instance logo, usually displayed in the header"""
    88     __regid__ = 'logo'
    88     __regid__ = 'logo'
    89     __select__ = yes() # no need for a cnx
    89     __select__ = yes() # no need for a cnx
    90     order = -1
    90     order = -1
       
    91     context = _('header-left')
    91 
    92 
    92     def render(self, w):
    93     def render(self, w):
    93         w(u'<a href="%s"><img id="logo" src="%s" alt="logo"/></a>'
    94         w(u'<a href="%s"><img id="logo" src="%s" alt="logo"/></a>'
    94           % (self._cw.base_url(), self._cw.uiprops['LOGO']))
    95           % (self._cw.base_url(), self._cw.uiprops['LOGO']))
    95 
    96