Changeset 5987
- Timestamp:
- 26 Apr 2011, 20:14:36 (14 years ago)
- 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
r5977 r5987 1159 1159 # Certificate pages 1160 1160 # 1161 class CertificatePage(WAeUP Page):1161 class CertificatePage(WAeUPDisplayFormPage): 1162 1162 """Index page for certificates. 1163 1163 """ … … 1166 1166 grok.require('waeup.View') 1167 1167 pnav = 1 1168 form_fields = grok.AutoFields(ICertificate) 1168 1169 1169 1170 @property 1170 1171 def title(self): 1171 1172 return "Certificate: %s (%s)" % (self.context.title, self.context.code) 1172 1173 1173 1174 def update(self): 1174 1175 if 'delcourse' in self.request.form: -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatepage.pt
r5977 r5987 2 2 3 3 <table class="zebra"> 4 <thead> 5 </thead> 6 <tbody> 4 <thead> 5 </thead> 6 <tbody> 7 <tal:block repeat="widget view/widgets"> 7 8 <tr> 8 <td>Code:</td> 9 <td tal:content="context/__name__">CODE</td> 10 </tr> 11 <tr> 12 <td>Title:</td> 13 <td tal:content="context/title">THE TITLE</td> 9 <td tal:define="hint widget/hint"> 10 <label tal:condition="python:hint" 11 tal:attributes="for widget/name"> 12 <span i18n:translate="" 13 tal:content="widget/label">label</span> 14 </label> 15 <label tal:condition="python:not hint" 16 tal:attributes="for widget/name"> 17 <span i18n:translate="" 18 tal:content="widget/label">label</span> 19 </label> 20 </td> 21 <td class="field"> 22 <div class="widget" tal:content="structure widget"> 23 <input type="text" /> 24 </div> 25 <div class="error" tal:condition="widget/error"> 26 <span tal:replace="structure widget/error">error</span> 27 </div> 28 </td> 14 29 </tr> 15 <tr> 16 <td>Start Level:</td> 17 <td tal:content="context/start_level">START_LEVEL</td> 18 </tr> 19 <tr> 20 <td>End Level:</td> 21 <td tal:content="context/end_level">END_LEVEL</td> 22 </tr> 23 <tr> 24 <td>Study Mode:</td> 25 <td tal:content="context/study_mode">STUDY_MODE</td> 26 </tr> 27 <tr> 28 <td>Application Category:</td> 29 <td tal:content="context/application_category">APPLICATION_CATEGORY</td> 30 </tr> 31 </tbody> 30 </tal:block> 31 </tbody> 32 32 </table> 33 33 34 34 <h3><span tal:content="context/__name__">Code</span> Course Referrers</h3> 35 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 36 <table class="zebra"> 37 <thead> 38 <tr> 39 <th>Course Referrer</th> 40 <th>Course</th> 41 <th>Title</th> 42 <th>Level</th> 43 <th>Semester</th> 44 <th>Mandatory</th> 45 <th> </th> 46 </tr> 47 </thead> 48 <tbody> 49 <span tal:omit-tag="" tal:repeat="level python: sorted(view.getCourseList().items())"> 50 <span tal:omit-tag="" tal:repeat="semester python: sorted(level[1].items())"> 51 <tr tal:repeat="courseref python:semester[1]"> 52 <td> <a href="" tal:attributes="href courseref/url" tal:content="courseref/code">courseref code</a></td> 53 <td> <a href="" tal:attributes="href courseref/course_url" tal:content="courseref/course/code">course code</a></td> 54 <td tal:content="courseref/title">title</td> 55 <td tal:content="python:level[0]">level</td> 56 <td tal:content="python:semester[0]">semester</td> 57 <td tal:content="courseref/mandatory">mandatory</td> 58 <td> 59 <form method="POST"> 60 <input type="hidden" name="code" 61 value="" tal:attributes="value courseref/course/code" /> 62 <input type="hidden" name="level" 63 value="" tal:attributes="value python:level[0]" /> 64 <input type="submit" name="delcourse" value="delete" /> 65 </form> 66 </td> 67 </tr> 68 </span> 69 </span> 70 </tbody> 71 </table> 72 72
Note: See TracChangeset for help on using the changeset viewer.