Changeset 47 for waeup_product/trunk/skins/waeup_default
- Timestamp:
- 14 Oct 2005, 13:01:35 (19 years ago)
- Location:
- waeup_product/trunk/skins/waeup_default
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py
r45 r47 1 #-*- mode: python; mode: fold -*- 1 2 ##parameters= 2 3 # $Id$ 3 4 """Return custom layouts types.""" 4 layouts = {} 5 6 # common header layout 7 common_layout = { 5 6 ## 'widgets': { ###( 7 ## '': { 8 ## 'type': 'String Widget', 9 ## 'data': { 10 ## 'title': '', 11 ## 'fields': ('',), 12 ## 'is_required': False, 13 ## 'label': '', 14 ## 'label_edit': '', 15 ## 'description': '', 16 ## 'help': '', 17 ## 'is_i18n': False, 18 ## 'readonly_layout_modes': (), 19 ## 'hidden_layout_modes': (), 20 ## 'hidden_readonly_layout_modes': (), 21 ## 'hidden_empty': False, 22 ## 'hidden_if_expr': '', 23 ## 'css_class': '', 24 ## 'widget_mode_expr': '', 25 ## 'display_width': 10, 26 ## 'size_max': 0, 27 ## }, 28 29 ###) 30 31 common_layout = {###( 8 32 'widgets': { 9 33 'LanguageSelector': { … … 70 94 }, 71 95 } 72 layouts['waeup_common'] = common_layout73 96 # 74 # 75 student_layout = { 97 ###) 98 99 student_layout = { ###( 76 100 'widgets': { 77 101 'jamb_is_admitted': { … … 119 143 }, 120 144 }, 121 'jamb_pin_usage': {122 'type': 'Int Widget',123 'data': {124 'title': 'Jamb Pin usage',125 'fields': ('jamb_pin_usage',),126 'is_required': False,127 'label': 'Nr of Cardusage',128 'label_edit': 'Nr of Cardusage',129 'description': '',130 'help': 'How many times has the scratchcard been used',131 'is_i18n': False,132 'readonly_layout_modes': (),133 'hidden_layout_modes': (),134 'hidden_readonly_layout_modes': (),135 'hidden_empty': False,136 'hidden_if_expr': '',137 'css_class': '',138 'widget_mode_expr': '',139 'display_width': 2,140 'size_max': 2,141 },142 },145 ## 'jamb_pin_usage': { 146 ## 'type': 'Int Widget', 147 ## 'data': { 148 ## 'title': 'Jamb Pin usage', 149 ## 'fields': ('jamb_pin_usage',), 150 ## 'is_required': False, 151 ## 'label': 'Nr of Cardusage', 152 ## 'label_edit': 'Nr of Cardusage', 153 ## 'description': '', 154 ## 'help': 'How many times has the scratchcard been used', 155 ## 'is_i18n': False, 156 ## 'readonly_layout_modes': (), 157 ## 'hidden_layout_modes': (), 158 ## 'hidden_readonly_layout_modes': (), 159 ## 'hidden_empty': False, 160 ## 'hidden_if_expr': '', 161 ## 'css_class': '', 162 ## 'widget_mode_expr': '', 163 ## 'display_width': 2, 164 ## 'size_max': 2, 165 ## }, 166 ## }, 143 167 'faculty': { 144 168 'type': 'String Widget', … … 171 195 [{'widget_id': 'jamb_is_admitted', 'ncols': 1},], 172 196 [{'widget_id': 'jamb_where_admitted', 'ncols': 1},], 173 [{'widget_id': 'jamb_pin_usage', 'ncols': 1},],197 #[{'widget_id': 'jamb_pin_usage', 'ncols': 1},], 174 198 [{'widget_id': 'faculty', 'ncols': 1},], 175 199 ] 176 200 }, 177 201 } 178 layouts['student'] = student_layout 179 # 180 # 181 scratch_card = { 202 ###) 203 204 student_personal_layout = { ###( 205 'widgets': { 206 'firstname': { 207 'type': 'String Widget', 208 'data': { 209 'title': '', 210 'fields': ('firstname',), 211 'is_required': False, 212 'label': 'First Name', 213 'label_edit': 'First Name', 214 'description': '', 215 'help': '', 216 'is_i18n': False, 217 'readonly_layout_modes': (), 218 'hidden_layout_modes': (), 219 'hidden_readonly_layout_modes': (), 220 'hidden_empty': False, 221 'hidden_if_expr': '', 222 'css_class': '', 223 'widget_mode_expr': '', 224 'display_width': 10, 225 'size_max': 0, 226 }, 227 }, 228 'middlename': { 229 'type': 'String Widget', 230 'data': { 231 'title': '', 232 'fields': ('middlename',), 233 'is_required': False, 234 'label': 'Middle Name', 235 'label_edit': 'Middle Name', 236 'description': '', 237 'help': '', 238 'is_i18n': False, 239 'readonly_layout_modes': (), 240 'hidden_layout_modes': (), 241 'hidden_readonly_layout_modes': (), 242 'hidden_empty': False, 243 'hidden_if_expr': '', 244 'css_class': '', 245 'widget_mode_expr': '', 246 'display_width': 10, 247 'size_max': 0, 248 }, 249 }, 250 'lastname': { 251 'type': 'String Widget', 252 'data': { 253 'title': '', 254 'fields': ('lastname',), 255 'is_required': False, 256 'label': 'Last Name', 257 'label_edit': 'Last Name', 258 'description': '', 259 'help': '', 260 'is_i18n': False, 261 'readonly_layout_modes': (), 262 'hidden_layout_modes': (), 263 'hidden_readonly_layout_modes': (), 264 'hidden_empty': False, 265 'hidden_if_expr': '', 266 'css_class': '', 267 'widget_mode_expr': '', 268 'display_width': 10, 269 'size_max': 0, 270 }, 271 }, 272 'sex': { 273 'type': 'Boolean Widget', 274 'data': { 275 'title': '', 276 'fields': ('sex',), 277 'is_required': False, 278 'label': 'Sex', 279 'label_edit': 'Sex', 280 'label_false': 'male', 281 'label_true': 'female', 282 'description': '', 283 'help': '', 284 'is_i18n': False, 285 'readonly_layout_modes': (), 286 'hidden_layout_modes': (), 287 'hidden_readonly_layout_modes': (), 288 'hidden_empty': False, 289 'hidden_if_expr': '', 290 'css_class': '', 291 'widget_mode_expr': '', 292 'display_width': 10, 293 'size_max': 0, 294 }, 295 }, 296 'birthday': { 297 'type': 'Date Widget', 298 'data': { 299 'title': '', 300 'fields': ('birthday',), 301 'is_required': False, 302 'label': '', 303 'label_edit': 'Day of birth', 304 'description': 'Day of birth', 305 'help': '', 306 'is_i18n': False, 307 'readonly_layout_modes': (), 308 'hidden_layout_modes': (), 309 'hidden_readonly_layout_modes': (), 310 'hidden_empty': False, 311 'hidden_if_expr': '', 312 'css_class': '', 313 'widget_mode_expr': '', 314 'display_width': 10, 315 'size_max': 0, 316 }, 317 }, 318 }, 319 'layout': { 320 'style_prefix': 'layout_default_', 321 'flexible_widgets': (), 322 'ncols': 1, 323 'rows': [ 324 [{'widget_id': 'firstname', 'ncols': 1},], 325 [{'widget_id': 'middlename', 'ncols': 1},], 326 [{'widget_id': 'lastname', 'ncols': 1},], 327 [{'widget_id': 'sex', 'ncols': 1},], 328 [{'widget_id': 'birthday', 'ncols': 1},], 329 ] 330 }, 331 } 332 333 ###) 334 335 scratch_card = { ###( 182 336 'widgets': { 183 337 'sc_id': { … … 237 391 } 238 392 239 layouts['scratch_card'] = scratch_card 240 241 jamb_layout = { 393 394 ###) 395 396 admission = { ###( 397 'widgets': { 398 'sc_id': { 399 'type': 'String Widget', 400 'data': { 401 'title': 'SC ID', 402 'fields': ('admission_sc_id',), 403 'is_required': False, 404 'label': 'Card Serial Number ', 405 'label_edit': 'Card Serial Number', 406 'description': 'Card Serial Number ', 407 'help': 'This can be found on the bottom right of the reverse side of your Scratch Card', 408 'is_i18n': False, 409 'readonly_layout_modes': (), 410 'hidden_layout_modes': (), 411 'hidden_readonly_layout_modes': (), 412 'hidden_empty': False, 413 'hidden_if_expr': 'python:1', 414 'css_class': '', 415 'widget_mode_expr': '', 416 'display_width': 10, 417 'size_max': 0, 418 }, 419 }, 420 'sc_pin': { 421 'type': 'String Widget', 422 'data': { 423 'title': 'SC Pin', 424 'fields': ('admission_sc_pin'), 425 'is_required': True, 426 'label': 'PIN', 427 'label_edit': 'PIN', 428 'description': '', 429 'help': 'PIN-(Personal Identification Number) is an 8 or 12 digit number on the reverse side of the scratch card which you can purchase from many Banks', 430 'is_i18n': False, 431 'readonly_layout_modes': (), 432 'hidden_layout_modes': (), 433 'hidden_readonly_layout_modes': (), 434 'hidden_empty': False, 435 'hidden_if_expr': '', 436 'css_class': '', 437 'widget_mode_expr': '', 438 'display_width': 10, 439 'size_max': 10, 440 }, 441 }, 442 'jamb_id': { 443 'type': 'StudentId Widget', 444 'data': { 445 'title': 'Registration Number', 446 'fields': ('reg_nr'), 447 'is_required': True, 448 'label': 'Registration Number', 449 'label_edit': 'Registration Number', 450 'description': '', 451 'help': 'This is the combination of 8 digits and 2 letters you are assigned when you purchase an examination form.', 452 'is_i18n': False, 453 'readonly_layout_modes': (), 454 'hidden_layout_modes': (), 455 'hidden_readonly_layout_modes': (), 456 'hidden_empty': False, 457 'hidden_if_expr': '', 458 'css_class': '', 459 'widget_mode_expr': '', 460 'display_width': 10, 461 'size_max': 10, 462 }, 463 }, 464 }, 465 'layout': { 466 'style_prefix': 'layout_admission_', 467 'flexible_widgets': (), 468 'ncols': 1, 469 'rows': [ 470 [{'widget_id': 'sc_id', 'ncols': 1},], 471 [{'widget_id': 'sc_pin', 'ncols': 1},], 472 [{'widget_id': 'jamb_id', 'ncols': 1},], 473 ] 474 }, 475 } 476 477 ###) 478 479 jamb_layout = { ###( 242 480 'widgets': { 243 481 'reg_nr': { … … 459 697 }, 460 698 } 461 699 ###) 700 701 layouts = {} 702 layouts['waeup_common'] = common_layout 703 layouts['student'] = student_layout 704 layouts['student_personal'] = student_personal_layout 705 layouts['scratch_card'] = scratch_card 706 layouts['admission'] = admission 462 707 layouts['jamb'] = jamb_layout 463 464 708 return layouts -
waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py
r45 r47 1 university_schema = { 1 #-*- mode: python; mode: fold -*- 2 # $Id$ 3 4 university_schema = { ###( 2 5 'allow_discussion': { 3 6 'type': 'CPS Int Field', … … 9 12 } 10 13 11 students_folder_schema = { 14 ###) 15 16 students_folder_schema = { ###( 12 17 'allow_discussion': { 13 18 'type': 'CPS Int Field', … … 19 24 } 20 25 21 student_schema = { 26 ###) 27 28 student_schema = { ###( 22 29 'allow_discussion': { 23 30 'type': 'CPS Int Field', … … 81 88 }, 82 89 }, 83 'jamb_pin_usage': {84 'type': 'CPS Int Field',85 'data': {86 'default_expr': 'python:0',87 'is_searchabletext': False,88 'acl_read_permissions': '',89 'acl_read_roles': '',90 'acl_read_expr': '',91 'acl_write_permissions': '',92 'acl_write_roles': '',93 'acl_write_expr': '',94 'read_ignore_storage': False,95 'read_process_expr': '',96 'read_process_dependent_fields': (),97 'write_ignore_storage': False,98 'write_process_expr': '',99 },100 },101 90 } 102 91 # 92 ###) 93 94 student_personal_schema = { ###( 95 'allow_discussion': { 96 'type': 'CPS Int Field', 97 'data': { 98 'default_expr': 'python:0', 99 'is_searchabletext': 0, 100 }, 101 }, 102 'firstname': { 103 'type': 'CPS String Field', 104 'data': { 105 'is_searchabletext': 1, 106 }, 107 }, 108 'middlename': { 109 'type': 'CPS String Field', 110 'data': { 111 'is_searchabletext': 1, 112 }, 113 }, 114 'lastname': { 115 'type': 'CPS String Field', 116 'data': { 117 'is_searchabletext': 1, 118 }, 119 }, 120 'sex': { 121 'type': 'CPS Boolean Field', 122 'data': { 123 'is_searchabletext': 1, 124 }, 125 }, 126 'birthday': { 127 'type': 'CPS DateTime Field', 128 'data': { 129 'is_searchabletext': 1, 130 }, 131 }, 132 } 103 133 # 104 jamb_schema = { 134 ###) 135 136 jamb_schema = { ###( 105 137 'allow_discussion': { 106 138 'type': 'CPS Int Field', … … 115 147 'default_expr': 'string:', 116 148 'is_searchabletext': True, 149 'acl_read_permissions': '', 150 'acl_read_roles': '', 151 'acl_read_expr': '', 152 'acl_write_permissions': '', 153 'acl_write_roles': '', 154 'acl_write_expr': '', 155 'read_ignore_storage': False, 156 'read_process_expr': '', 157 'read_process_dependent_fields': (), 158 'write_ignore_storage': False, 159 'write_process_expr': '', 160 }, 161 }, 162 'admission_sc_id': { 163 'type': 'CPS String Field', 164 'data': { 165 'default_expr': '', 166 'is_searchabletext': True, 167 'acl_read_permissions': '', 168 'acl_read_roles': '', 169 'acl_read_expr': '', 170 'acl_write_permissions': '', 171 'acl_write_roles': '', 172 'acl_write_expr': '', 173 'read_ignore_storage': False, 174 'read_process_expr': '', 175 'read_process_dependent_fields': (), 176 'write_ignore_storage': False, 177 'write_process_expr': '', 178 }, 179 }, 180 'admission_sc_pin': { 181 'type': 'CPS String Field', 182 'data': { 183 'is_searchabletext': True, 184 'acl_read_permissions': '', 185 'acl_read_roles': '', 186 'acl_read_expr': '', 187 'acl_write_permissions': '', 188 'acl_write_roles': '', 189 'acl_write_expr': '', 190 'read_ignore_storage': False, 191 'read_process_expr': '', 192 'read_process_dependent_fields': (), 193 'write_ignore_storage': False, 194 'write_process_expr': '', 195 }, 196 }, 197 'admission_sc_pin_usage': { 198 'type': 'CPS Int Field', 199 'data': { 200 'default_expr': 'python:0', 201 'is_searchabletext': False, 117 202 'acl_read_permissions': '', 118 203 'acl_read_roles': '', … … 274 359 } 275 360 276 scratch_card = { 277 'allow_discussion': { 278 'type': 'CPS Int Field', 279 'data': { 280 'default_expr': 'python:0', 281 'is_searchabletext': 0, 282 }, 283 }, 284 'sc_id': { 285 'type': 'CPS String Field', 286 'data': { 287 'default_expr': '', 288 'is_searchabletext': 0, 289 'acl_read_permissions': '', 290 'acl_read_roles': '', 291 'acl_read_expr': '', 292 'acl_write_permissions': '', 293 'acl_write_roles': '', 294 'acl_write_expr': '', 295 'read_ignore_storage': False, 296 'read_process_expr': '', 297 'read_process_dependent_fields': (), 298 'write_ignore_storage': False, 299 'write_process_expr': '', 300 }, 301 }, 302 'sc_pin': { 303 'type': 'CPS String Field', 304 'data': { 305 'default_expr': '', 306 'is_searchabletext': 0, 307 'acl_read_permissions': '', 308 'acl_read_roles': '', 309 'acl_read_expr': '', 310 'acl_write_permissions': '', 311 'acl_write_roles': '', 312 'acl_write_expr': '', 313 'read_ignore_storage': False, 314 'read_process_expr': '', 315 'read_process_dependent_fields': (), 316 'write_ignore_storage': False, 317 'write_process_expr': '', 318 }, 319 }, 320 } 361 ###) 362 363 ##scratch_card = { ###( 364 #### 'allow_discussion': { 365 #### 'type': 'CPS Int Field', 366 #### 'data': { 367 #### 'default_expr': 'python:0', 368 #### 'is_searchabletext': 0, 369 #### }, 370 #### }, 371 ## 'sc_id': { 372 ## 'type': 'CPS String Field', 373 ## 'data': { 374 ## 'default_expr': '', 375 ## 'is_searchabletext': 0, 376 ## 'acl_read_permissions': '', 377 ## 'acl_read_roles': '', 378 ## 'acl_read_expr': '', 379 ## 'acl_write_permissions': '', 380 ## 'acl_write_roles': '', 381 ## 'acl_write_expr': '', 382 ## 'read_ignore_storage': False, 383 ## 'read_process_expr': '', 384 ## 'read_process_dependent_fields': (), 385 ## 'write_ignore_storage': False, 386 ## 'write_process_expr': '', 387 ## }, 388 ## }, 389 ## 'sc_pin': { 390 ## 'type': 'CPS String Field', 391 ## 'data': { 392 ## 'default_expr': '', 393 ## 'is_searchabletext': 0, 394 ## 'acl_read_permissions': '', 395 ## 'acl_read_roles': '', 396 ## 'acl_read_expr': '', 397 ## 'acl_write_permissions': '', 398 ## 'acl_write_roles': '', 399 ## 'acl_write_expr': '', 400 ## 'read_ignore_storage': False, 401 ## 'read_process_expr': '', 402 ## 'read_process_dependent_fields': (), 403 ## 'write_ignore_storage': False, 404 ## 'write_process_expr': '', 405 ## }, 406 ## }, 407 ##} 321 408 schemas = {} 409 ###) 410 322 411 schemas['university'] = university_schema 323 412 schemas['students'] = students_folder_schema 324 413 schemas['student'] = student_schema 414 schemas['student_personal'] = student_personal_schema 325 415 schemas['jamb'] = jamb_schema 326 schemas['scratch_card'] = scratch_card416 #schemas['scratch_card'] = scratch_card 327 417 328 418 return schemas -
waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py
r45 r47 1 #-*- mode: python; mode: fold -*- 1 2 ##parameters= 2 3 # $Id$ … … 8 9 ChangePermissions = 'Change permissions' 9 10 10 university_type = { 11 university_type = { ###( 11 12 'title': 'WAeUP Base Folder', 12 13 'description': 'The WAeUP Container', … … 55 56 } 56 57 57 students_folder_type = { 58 ###) 59 60 students_folder_type = { ###( 58 61 'title': 'WAeUP Student Folder', 59 62 'description': 'The WAeUP Student Folder', … … 103 106 } 104 107 105 student_type = { 108 ###) 109 110 student_type = { ###( 106 111 'title': 'WAeUP Student', 107 112 'description': '', … … 116 121 'global_allow': True, 117 122 'filter_content_types': True, 118 'allowed_content_types': ('Jamb', ),123 'allowed_content_types': ('Jamb','StudentPersonal'), 119 124 'allow_discussion': False, 120 125 'cps_is_searchable': True, … … 130 135 {'id': 'view', 131 136 'name': 'action_view', 132 #'action': 'string:${object_url}/student_view',133 'action': 'string:${object_url}/cpsdocument_view',137 'action': 'string:${object_url}/student_view', 138 #'action': 'string:${object_url}/cpsdocument_view', 134 139 'condition': '', 135 140 'permission': ('View',), … … 137 142 'visible': True,}, 138 143 {'id': 'new_content', 139 'name': 'Add JambData',144 'name': 'Add Data', 140 145 'action': 'string:${object_url}/folder_factories', 141 'condition': "python: len(object.contentItems()) == 0 ",146 'condition': "python:1 or len(object.contentItems()) == 0 ", 142 147 'permission': ('Modify portal content',), 143 148 'category': 'object', … … 146 151 'name': 'action_folder_contents', 147 152 'action': 'string:${object_url}/folder_contents', 148 'condition': "python: object.getTypeInfo().cps_proxy_type != 'document'",153 'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'", 149 154 'permission': ('Modify portal content',), 150 155 'category': 'object', … … 159 164 ) 160 165 } 161 scratch_card = { 166 167 ###) 168 169 scratch_card = { ###( 162 170 'title': 'WAeUP Scratchcard', 163 171 'description': '', … … 210 218 } 211 219 # 212 # 213 jamb_type = { 220 ###) 221 222 jamb_type = { ###( 214 223 'title': "JAMB data", 215 224 'description': 'The data from JAMB', … … 229 238 #'schemas': ['common','metadata','jamb'], 230 239 'schemas': ['jamb'], 231 'layouts': ['jamb',], 240 'layouts': ['jamb'], 241 'flexible_layouts': (), 242 'storage_methods': ('admitted:store_admission_pin'), 243 'cps_workspace_wf': 'workspace_content_wf', 244 'cps_section_wf': 'section_content_wf', 245 } 246 247 ###) 248 249 student_personal_type = { ###( 250 'title': "Student personal data", 251 'description': '', 252 'content_icon': '', 253 'content_meta_type': 'CPS Document', 254 'product': 'CPSDocument', 255 'factory': 'addCPSDocument', 256 'immediate_view': 'cpsdocument_view', 257 'global_allow': True, 258 'filter_content_types': True, 259 'allowed_content_types': (), 260 'allow_discussion': False, 261 'cps_is_searchable': True, 262 'cps_proxy_type': 'document', 263 'cps_display_as_document_in_listing': True, 264 'cps_is_portalbox': False, 265 #'schemas': ['common','metadata','jamb'], 266 'schemas': ['student_personal'], 267 'layouts': ['student_personal'], 232 268 'flexible_layouts': (), 233 269 'storage_methods': (), … … 235 271 'cps_section_wf': 'section_content_wf', 236 272 } 273 ###) 237 274 238 275 types = {} … … 240 277 types['StudentsFolder'] = students_folder_type 241 278 types['Student'] = student_type 279 types['StudentPersonal'] = student_personal_type 242 280 types['ScratchCard'] = scratch_card 243 281 types['Jamb'] = jamb_type -
waeup_product/trunk/skins/waeup_default/portlet_studentnavigation.pt
r46 r47 1 1 <tal:block define="mtool here/portal_membership; 2 anonymous mtool/isAnonymousUser" 2 anonymous mtool/isAnonymousUser; 3 user python: mtool.getAuthenticatedMember(); 4 folder_id python:str(user)[1:]" 3 5 > 4 <tal:block condition=" not:anonymous">6 <tal:block condition="python: not anonymous"> 5 7 <a href="" i18n:translate="" 6 tal:attributes="href string:${here/portal_url}/sections/unidemo/students ">Studentadministration</a>8 tal:attributes="href string:${here/portal_url}/sections/unidemo/students/${folder_id}">Studentadministration</a> 7 9 </tal:block> 8 10 <tal:block condition="anonymous">
Note: See TracChangeset for help on using the changeset viewer.