Changeset 8361 for main


Ignore:
Timestamp:
5 May 2012, 05:00:39 (13 years ago)
Author:
Henrik Bettermann
Message:

Add HTMLDisplayWidget which is now used for the frontpage by default.

Add frontpage.html default content.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py

    r8346 r8361  
    6262from waeup.kofa.university.vocabularies import course_levels
    6363from waeup.kofa.authentication import LocalRoleSetEvent
    64 from waeup.kofa.widgets.restwidget import ReSTDisplayWidget
     64#from waeup.kofa.widgets.restwidget import ReSTDisplayWidget
     65from waeup.kofa.widgets.htmlwidget import HTMLDisplayWidget
    6566from waeup.kofa.authentication import get_principal_role_manager
    6667from waeup.kofa.utils.helpers import get_user_account
     
    623624    label = _(u'View portal configuration')
    624625    form_fields = grok.AutoFields(IConfigurationContainer)
    625     form_fields['frontpage'].custom_widget = ReSTDisplayWidget
     626    form_fields['frontpage'].custom_widget = HTMLDisplayWidget
    626627
    627628class ConfigurationContainerManageFormPage(KofaEditFormPage):
  • main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py

    r8346 r8361  
    5050VALIDATED = 'courses validated'
    5151
    52 default_frontpage = u'' + codecs.open(os.path.join(
    53         os.path.dirname(__file__), 'frontpage.rst'),
     52#default_rest_frontpage = u'' + codecs.open(os.path.join(
     53#        os.path.dirname(__file__), 'frontpage.rst'),
     54#        encoding='utf-8', mode='rb').read()
     55
     56default_html_frontpage = u'' + codecs.open(os.path.join(
     57        os.path.dirname(__file__), 'frontpage.html'),
    5458        encoding='utf-8', mode='rb').read()
    5559
     
    494498
    495499    frontpage = schema.Text(
    496         title = _(u'Content in reST format'),
     500        title = _(u'Content in HTML format'),
    497501        required = False,
    498         default = default_frontpage,
     502        default = default_html_frontpage,
    499503        )
    500504
Note: See TracChangeset for help on using the changeset viewer.