Ignore:
Timestamp:
25 Feb 2012, 12:52:38 (13 years ago)
Author:
Henrik Bettermann
Message:

Set fallback and default frontpages if frontpage attribute is an empty string.

Remove title attribute from University objects. The titke should be part of the frontpage ReST.

Tests will follow.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/browser
Files:
2 edited

Legend:

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

    r7700 r7703  
    3535  >>> print browser.contents
    3636  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
    37   ...Welcome to the...
     37  ...Welcome to...
    3838  ...
    3939
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py

    r7702 r7703  
    285285    grok.context(IUniversity)
    286286    pnav = 0
    287 
    288     @property
    289     def label(self):
    290         return self.context['configuration'].title
     287    label = ''
    291288
    292289    @property
     
    294291        portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
    295292        lang = self.request.cookies.get('sirp.language', portal_language)
    296         return self.context['configuration'].frontpage_dict.get(lang,'')
     293        html = self.context['configuration'].frontpage_dict.get(lang,'')
     294        if html =='':
     295            html = self.context[
     296                'configuration'].frontpage_dict.get(portal_language,'')
     297        if html =='':
     298            return _(u'<h1>Welcome to WAeUP.SIRP</h1>')
     299        else:
     300            return html
    297301
    298302class AdministrationPage(SIRPPage):
Note: See TracChangeset for help on using the changeset viewer.