Ignore:
Timestamp:
12 May 2011, 20:56:14 (14 years ago)
Author:
Henrik Bettermann
Message:

Make frontpage editable.

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

Legend:

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

    r6028 r6065  
    4141from waeup.sirp.university.catalog import search
    4242from waeup.sirp.university.vocabularies import course_levels
     43from waeup.sirp.widgets.restwidget import ReSTWidget
    4344
    4445grok.context(IWAeUPObject)
     
    110111#
    111112
    112 class UniversityPage(WAeUPPage):
     113class UniversityPage(WAeUPDisplayFormPage):
    113114    """ The main university page.
    114115    """
     
    116117    grok.name('index')
    117118    grok.context(IUniversity)
    118     title = u'Welcome to SIRP'
    119119    pnav = 0
     120   
     121    form_fields = grok.AutoFields(IUniversity)
     122    form_fields['frontpage'].custom_widget = ReSTWidget
     123
     124    @property
     125    def title(self):
     126        return "Welcome"
     127
     128    @property
     129    def label(self):
     130        return self.context.title
    120131
    121132class Manage(WAeUPEditFormPage):
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/universitypage.pt

    r5412 r6065  
     1<h2 tal:content="view/label">Title</h2>
    12
    2 <h2>
    3   Welcome to the Student Information and Registration Portal of <span tal:replace="context/name">NAME</span>
    4 </h2>
    5 
    6 <p>
    7   This is the default frontpage of the Student Information and Registration Portal
    8   (SIRP) which is part of the West African eUniversity Project
    9   (<a href="http://www.waeup.org/">WAeUP</a>).
    10 </p>
    11 
    12 <p>
    13   First thing to do after installation is to set a new location
    14   for data files (imports/exports) in the <a
    15   href="datacenter">DataCenter</a>.
    16 </p>
    17 
    18 <p>
    19   You can tweak the layout starting with the page template
    20   <code>universitypage.pt</code> in
    21   <code>waeup/sirp/browser/templates/</code>.
    22 </p>
    23 
    24 <!--
    25     <div name="tableexample" class="yui-skin-sam">
    26     <div tal:replace="structure view/table/renderHTML" />
    27     </div>
    28 -->
    29 
    30 
     3<span tal:replace="structure view/widgets/frontpage">Frontpage</span>
Note: See TracChangeset for help on using the changeset viewer.