Changeset 5961


Ignore:
Timestamp:
22 Apr 2011, 02:08:31 (13 years ago)
Author:
uli
Message:

When rendering the site layout, now make use of the new theming
technology (tm).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/layout.py

    r5433 r5961  
    1313    from zope.app.component.hooks import getSite
    1414from waeup.sirp.interfaces import IWAeUPObject
     15from waeup.sirp.browser.interfaces import ITheme
     16from waeup.sirp.browser.theming import get_all_themes
    1517
    1618grok.templatedir('templates')
     
    104106        return getattr(grok.getSite(), 'name', u'Sample University')
    105107       
    106     def getSkin(self):
    107         return getattr(grok.getSite(), 'skin', u'waeuptheme-gray1.css')       
    108    
    109108    def isAuthenticated(self):
    110109        """Return True if the calling user is authenticated.
     
    128127
    129128    def update(self):
    130         yui.reset_fonts_grids.need()
    131         yui.sam.need()
     129        theme_name = getattr(grok.getSite(), 'skin', 'gray waeup theme')
     130        theme = getUtility(ITheme, name=theme_name)
     131        for resource in theme.getResources():
     132            resource.need()
     133        return
Note: See TracChangeset for help on using the changeset viewer.