Changeset 6017 for main/waeup.sirp/trunk
- Timestamp:
- 2 May 2011, 15:27:20 (14 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/browser
- Files:
-
- 9 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
r6008 r6017 15 15 from hurry.workflow.interfaces import NoTransitionAvailableError 16 16 from zope import schema 17 from waeup.sirp.browser.resources import warning 18 from waeup.sirp.browser.resources import datepicker, tabs 17 from waeup.sirp.browser.resources import warning, datepicker, tabs, datatable 19 18 try: 20 19 from zope.authentication.interfaces import ( … … 1134 1133 def title(self): 1135 1134 return self.context.longtitle() 1135 1136 def getCourses(self): 1137 """Get a list of all stored courses. 1138 """ 1139 for key, val in self.context.courses.items(): 1140 url = self.url(val) 1141 yield(dict(url=url, name=key, container=val)) 1142 1143 def getCertificates(self): 1144 """Get a list of all stored certificates. 1145 """ 1146 for key, val in self.context.certificates.items(): 1147 url = self.url(val) 1148 yield(dict(url=url, name=key, container=val)) 1136 1149 1137 1150 def update(self): 1138 1151 tabs.need() 1139 self.tables = ITableProvider(self.context).getTables(view=self) 1140 self.coursetable = self.tables[0] 1141 self.certificatetable = self.tables[1] 1142 self.coursetable.need() 1152 datatable.need() 1153 # self.tables = ITableProvider(self.context).getTables(view=self) 1154 # self.coursetable = self.tables[0] 1155 # self.certificatetable = self.tables[1] 1156 # self.coursetable.need() 1157 super(DepartmentManageFormPage, self).update() 1158 return 1143 1159 1144 1160 form_fields = grok.AutoFields(IDepartment) -
main/waeup.sirp/trunk/src/waeup/sirp/browser/resources.py
r6016 r6017 186 186 #: other <div>s disappear. See 187 187 #: 188 #: http:// jqueryui.com/demos/tabs/188 #: http://www.datatables.net/ 189 189 #: 190 190 #: for details. -
main/waeup.sirp/trunk/src/waeup/sirp/browser/static/datatables.css
r6010 r6017 158 158 159 159 .paginate_disabled_previous { 160 background-image: url(' ../images/back_disabled.jpg');160 background-image: url('back_disabled.jpg'); 161 161 } 162 162 163 163 .paginate_enabled_previous { 164 background-image: url(' ../images/back_enabled.jpg');164 background-image: url('back_enabled.jpg'); 165 165 } 166 166 167 167 .paginate_disabled_next { 168 background-image: url(' ../images/forward_disabled.jpg');168 background-image: url('forward_disabled.jpg'); 169 169 } 170 170 171 171 .paginate_enabled_next { 172 background-image: url(' ../images/forward_enabled.jpg');172 background-image: url('forward_enabled.jpg'); 173 173 } 174 174 … … 210 210 211 211 .sorting_asc { 212 background: url(' ../images/sort_asc.png') no-repeat center right;212 background: url('sort_asc.png') no-repeat center right; 213 213 } 214 214 215 215 .sorting_desc { 216 background: url(' ../images/sort_desc.png') no-repeat center right;216 background: url('sort_desc.png') no-repeat center right; 217 217 } 218 218 219 219 .sorting { 220 background: url(' ../images/sort_both.png') no-repeat center right;220 background: url('sort_both.png') no-repeat center right; 221 221 } 222 222 223 223 .sorting_asc_disabled { 224 background: url(' ../images/sort_asc_disabled.png') no-repeat center right;224 background: url('sort_asc_disabled.png') no-repeat center right; 225 225 } 226 226 227 227 .sorting_desc_disabled { 228 background: url(' ../images/sort_desc_disabled.png') no-repeat center right;228 background: url('sort_desc_disabled.png') no-repeat center right; 229 229 } 230 230 -
main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/departmentmanagepage.pt
r6003 r6017 74 74 75 75 <div id="tab-2"> 76 <div name="thecoursetable" tal:condition="python: len(context.courses.keys())"> 77 <div tal:replace="structure view/coursetable/renderHTML"></div> 78 </div> 79 <br /> 76 <table id="datatable" class="display"> 77 <thead> 78 <tr> 79 <th> </th><th>Code</th><th>Title</th> 80 </tr> 81 </thead> 82 <tbody> 83 <tr tal:repeat="entry view/getCourses" 84 class="gradeB"> 85 <td> 86 <input type="checkbox" name="val_id" tal:attributes="value entry/name" /> 87 </td> 88 <td> 89 <a href="" 90 tal:attributes="href entry/url" 91 tal:content="entry/name">Name</a> 92 </td> 93 <td tal:content="entry/container/title"> 94 Title 95 </td> 96 </tr> 97 </tbody> 98 </table> 99 <br /><br /> 80 100 <div id="actionsView"> 81 101 <span class="actionButtons" tal:condition="view/availableActions"> … … 90 110 91 111 <div id="tab-3"> 92 <div name="thecerttable"> 93 <div tal:replace="structure view/certificatetable/renderHTML"></div> 94 </div> 95 <br /> 112 <table id="datatable" class="display"> 113 <thead> 114 <tr> 115 <th> </th><th>Code</th><th>Title</th> 116 </tr> 117 </thead> 118 <tbody> 119 <tr tal:repeat="entry view/getCertificates" 120 class="gradeB"> 121 <td> 122 <input type="checkbox" name="val_id" tal:attributes="value entry/name" /> 123 </td> 124 <td> 125 <a href="" 126 tal:attributes="href entry/url" 127 tal:content="entry/name">Name</a> 128 </td> 129 <td tal:content="entry/container/title"> 130 Title 131 </td> 132 </tr> 133 </tbody> 134 </table> 135 <br /><br /> 96 136 <div id="actionsView"> 97 137 <span class="actionButtons" tal:condition="view/availableActions">
Note: See TracChangeset for help on using the changeset viewer.