Changeset 6065
- Timestamp:
- 12 May 2011, 20:56:14 (14 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/app.py
r5964 r6065 38 38 skin=u'gray waeup theme' 39 39 40 # The default frontpage. 41 frontpage= """ 42 This is the default frontpage of the portal. 43 44 First thing to do after installation is to set a new 45 location for data files (imports/exports) in the 46 `Data Center <datacenter>`_ 47 48 1. Heading 49 ---------- 50 51 Text 52 53 1.2 Heading 54 ........... 55 56 Text 57 58 2. Heading 59 ---------- 60 61 Text 62 63 2.1 Heading 64 ........... 65 66 Text 67 68 2.2 Heading 69 ........... 70 71 Text 72 73 """ 74 75 # The default title. 76 title=u'Welcome to the Student Information and Registration Portal of %s' % name 77 40 78 @property 41 79 def logger(self): … … 58 96 59 97 60 def __init__(self, name=name, skin=skin, **kw):98 def __init__(self, name=name, skin=skin, title=title, frontpage=frontpage, **kw): 61 99 super(University, self).__init__(**kw) 62 100 self.name = name 63 101 self.skin = skin 102 self.title = title 103 self.frontpage = frontpage 64 104 self.setup() 65 105 -
main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
r6028 r6065 41 41 from waeup.sirp.university.catalog import search 42 42 from waeup.sirp.university.vocabularies import course_levels 43 from waeup.sirp.widgets.restwidget import ReSTWidget 43 44 44 45 grok.context(IWAeUPObject) … … 110 111 # 111 112 112 class UniversityPage(WAeUP Page):113 class UniversityPage(WAeUPDisplayFormPage): 113 114 """ The main university page. 114 115 """ … … 116 117 grok.name('index') 117 118 grok.context(IUniversity) 118 title = u'Welcome to SIRP'119 119 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 120 131 121 132 class Manage(WAeUPEditFormPage): -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/universitypage.pt
r5412 r6065 1 <h2 tal:content="view/label">Title</h2> 1 2 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> -
main/waeup.sirp/trunk/src/waeup/sirp/interfaces.py
r5968 r6065 42 42 ) 43 43 44 44 title = schema.TextLine( 45 title = u'Title of frontpage', 46 default = u'No Title', 47 required = False, 48 ) 49 45 50 skin = schema.Choice( 46 51 title = u'Skin', … … 49 54 required = True, 50 55 ) 56 57 frontpage = schema.Text( 58 title = u'Human readable frontpage in reST format', 59 required = False, 60 default = u'This is the SIRP frontpage.' 61 ) 51 62 52 63 faculties = Attribute("A container for faculties.")
Note: See TracChangeset for help on using the changeset viewer.