Changeset 166 for waeup_product
- Timestamp:
- 12 Nov 2005, 14:45:08 (19 years ago)
- Location:
- waeup_product/trunk
- Files:
-
- 2 deleted
- 13 edited
- 3 copied
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
waeup_product/trunk/Extensions/install.py
r162 r166 110 110 waeup_ptypes = "'University','StudentsFolder','Student','Jamb','Faculty','Department','Course'" 111 111 waeup_ptypes += ",'AccoFolder','Accommodation','StudentPersonal','AcademicsFolder'" 112 waeup_ptypes += ",'StudyLevel','Semester','CourseTicket' "112 waeup_ptypes += ",'StudyLevel','Semester','CourseTicket','StudentDocuments'" 113 113 if CPSSubscriptions: ###( 114 114 … … 429 429 'Student': 'waeup_student_wf', 430 430 'StudentPersonal': 'waeup_student_wf', 431 'StudentDocuments': 'waeup_student_wf', 431 432 'Jamb': 'waeup_section_wf', 432 433 'ScratchCard': 'waeup_section_wf', -
waeup_product/trunk/Students.py
r164 r166 78 78 '%s_sc_id' % ident : ds.get('sc_id'), 79 79 '%s_sc_value' % ident : ds.get('sc_value'), 80 '%s_date' % ident : ds.get('sc_date'), 80 81 } 81 tmp_user = CPSUnrestrictedUser('pseudo', '', 82 83 if self.portal_membership.isAnonymousUser(): 84 tmp_user = CPSUnrestrictedUser('s%(jamb_id)s' % ds, '', 82 85 ['StudentManager'], '') 83 tmp_user = tmp_user.__of__(self.acl_users) 84 newSecurityManager(None, tmp_user) 86 tmp_user = tmp_user.__of__(self.acl_users) 87 newSecurityManager(None, tmp_user) 88 #print str(dict) 85 89 self.edit(mapping=dict) 86 90 … … 94 98 return False 95 99 100 security.declareProtected(View,"accommodationIsBooked") 101 def accommodationIsBooked(self): 102 """is the accommodation booked""" 103 if self.accommodation_sc_pin != '': 104 return True 105 return False 106 107 security.declareProtected(View,"accommodationIsPayed") 108 def accommodationIsPayed(self): 109 """is the accommodation payed""" 110 if self.accommodation_sc_pin != '': 111 return True 112 return False 113 114 security.declareProtected(View,"isRegisteredForCurrentLevel") 115 def isRegisteredForCurrentLevel(self): 116 """is the student registered for the current level""" 117 for l in self.aq_parent.objectValues(): 118 if l.portal_type == 'StudyLevel': 119 return True 120 return False 121 96 122 InitializeClass(Student) 97 123 … … 138 164 """Add a Students personal data.""" 139 165 ob = StudentPersonal(id, **kw) 166 return CPSBase_adder(container, ob, REQUEST=REQUEST) 167 168 ###) 169 170 studentdocuments_fti = { ###( 171 'title': 'WAeUP StudentDocuments', 172 'description': '', 173 'content_icon': 'student.gif', 174 'content_meta_type': 'StudentDocuments', 175 'factory': 'addStudent', 176 'immediate_view': 'temporary_view_all', 177 'global_allow': True, 178 'filter_content_types': True, 179 'allowed_content_types': (), 180 'allow_discussion': False, 181 } 182 183 ###) 184 185 class StudentDocuments(CPSDocument): ###( 186 """ 187 WAeUP Student container for the various student data 188 """ 189 meta_type = 'StudentDocuments' 190 portal_type = meta_type 191 security = ClassSecurityInfo() 192 193 security.declareProtected(View,"Title") 194 def Title(self): 195 """compose title""" 196 content = self.getContent() 197 return "Scanned Documents" 198 199 200 InitializeClass(StudentDocuments) 201 202 def addStudentDocuments(container, id, REQUEST=None, **kw): 203 """Add a Students documents""" 204 ob = StudentDocuments(id, **kw) 140 205 return CPSBase_adder(container, ob, REQUEST=REQUEST) 141 206 -
waeup_product/trunk/University.py
r139 r166 28 28 return self.REQUEST 29 29 30 31 ## security.declarePublic('backEnd') 32 ## def backEnd(self): 33 ## """ are we in back-end mode""" 34 ## mtool = self.portal_membership 35 ## member = mtool.getAuthenticatedMember() 36 ## roles = member.getRoles() 37 ## if 'UniversityManager' in roles or 'StudentManager' in roles: 38 ## return True 39 ## return False 40 ## 41 ## security.declarePublic('frontEnd') 42 ## def frontEnd(self): 43 ## """ are we in front-end mode""" 44 ## mtool = self.portal_membership 45 ## member = mtool.getAuthenticatedMember() 46 ## roles = member.getRoles() 47 ## if 'Student' in roles: 48 ## return True 49 ## return False 50 51 30 52 InitializeClass(University) 31 53 -
waeup_product/trunk/__init__.py
r139 r166 13 13 14 14 fti = (Students.student_fti, 15 Students.studentdocuments_fti, 15 16 Students.studentpersonal_fti, 16 17 Students.jamb_fti, … … 28 29 Students.StudentsFolder, 29 30 Students.Student, 31 Students.StudentDocuments, 30 32 Students.StudentPersonal, 31 33 Students.Jamb, … … 43 45 Students.addStudentsFolder, 44 46 Students.addStudent, 47 Students.addStudentDocuments, 45 48 Students.addStudentPersonal, 46 49 Students.addJamb, -
waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py
r164 r166 202 202 ###) 203 203 204 student_layout = { ###(205 'widgets': {206 'jamb_is_admitted': {207 'type': 'Boolean Widget',208 'data': {209 'title': 'JAMB Admission',210 'fields': ('jamb_is_admitted',),211 'is_required': False,212 'label': 'JAMB Admission',213 'label_edit': 'JAMB Admission',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 ## 'accommodation': {229 ## 'type': 'String Widget',230 ## 'data': {231 ## 'title': 'Accommodation',232 ## 'fields': ('accommodation',),233 ## 'is_required': False,234 ## 'label': 'Accommodation',235 ## 'label_edit': 'Accommodation',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 ## 'accommodation_sc_pin': {251 ## 'type': 'String Widget',252 ## 'data': {253 ## 'title': 'Accommodation SC Pin',254 ## 'fields': ('accommodation_sc_pin',),255 ## 'is_required': False,256 ## 'label': 'Accommodation SC Pin',257 ## 'label_edit': 'Accommodation SC Pin',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 'faculty': {273 'type': 'String Widget',274 'data': {275 'title': 'Faculty',276 'fields': ('faculty',),277 'is_required': False,278 'label': 'Faculty',279 'label_edit': 'Faculty',280 'description': '',281 'help': '',282 'is_i18n': False,283 'readonly_layout_modes': (),284 'hidden_layout_modes': (),285 'hidden_readonly_layout_modes': (),286 'hidden_empty': False,287 'hidden_if_expr': '',288 'css_class': '',289 'widget_mode_expr': '',290 'display_width': 10,291 'size_max': 0,292 },293 },294 },295 'layout': {296 'style_prefix': 'layout_default_',297 'flexible_widgets': (),298 'ncols': 1,299 'rows': [300 #[{'widget_id': 'jamb_is_admitted', 'ncols': 1},],301 #[{'widget_id': 'accommodation', 'ncols': 1},],302 #[{'widget_id': 'accommodation_sc_pin', 'ncols': 1},],303 #[{'widget_id': 'faculty', 'ncols': 1},],304 ]305 },306 }307 ###)308 309 204 firstname = { ###( 310 205 'type': 'String Widget', … … 473 368 ###) 474 369 370 student_layout = { ###( 371 'widgets': { 372 'jamb_is_admitted': { 373 'type': 'Boolean Widget', 374 'data': { 375 'title': 'JAMB Admission', 376 'fields': ('jamb_is_admitted',), 377 'is_required': False, 378 'label': 'JAMB Admission', 379 'label_edit': 'JAMB Admission', 380 'description': '', 381 'help': '', 382 'is_i18n': False, 383 'readonly_layout_modes': (), 384 'hidden_layout_modes': (), 385 'hidden_readonly_layout_modes': (), 386 'hidden_empty': False, 387 'hidden_if_expr': '', 388 'css_class': '', 389 'widget_mode_expr': '', 390 'display_width': 10, 391 'size_max': 0, 392 }, 393 }, 394 395 'faculty': { 396 'type': 'String Widget', 397 'data': { 398 'title': 'Faculty', 399 'fields': ('faculty',), 400 'is_required': False, 401 'label': 'Faculty', 402 'label_edit': 'Faculty', 403 'description': '', 404 'help': '', 405 'is_i18n': False, 406 'readonly_layout_modes': (), 407 'hidden_layout_modes': (), 408 'hidden_readonly_layout_modes': (), 409 'hidden_empty': False, 410 'hidden_if_expr': '', 411 'css_class': '', 412 'widget_mode_expr': '', 413 'display_width': 10, 414 'size_max': 0, 415 }, 416 }, 417 'accommodation': { 418 'type': 'String Widget', 419 'data': { 420 'title': 'Accommodation', 421 'fields': ('accommodation',), 422 'is_required': False, 423 'label': 'Accommodation', 424 'label_edit': 'Accommodation', 425 'description': '', 426 'help': '', 427 'is_i18n': False, 428 'readonly_layout_modes': (), 429 'hidden_layout_modes': (), 430 'hidden_readonly_layout_modes': (), 431 'hidden_empty': False, 432 'hidden_if_expr': '', 433 'css_class': '', 434 'widget_mode_expr': '', 435 'display_width': 10, 436 'size_max': 0, 437 }, 438 }, 439 'accommodation_sc_id': { ###( 440 'type': 'String Widget', 441 'data': { 442 'title': 'Accommodation SC ID', 443 'fields': ('accommodation_sc_id',), 444 'is_required': False, 445 'label': 'Accommodation SC ID', 446 'label_edit': 'Accommodation SC ID', 447 'description': '', 448 'help': '', 449 'is_i18n': False, 450 'readonly_layout_modes': (), 451 'hidden_layout_modes': (), 452 'hidden_readonly_layout_modes': (), 453 'hidden_empty': False, 454 'hidden_if_expr': '', 455 'css_class': '', 456 'widget_mode_expr': '', 457 'display_width': 10, 458 'size_max': 0, 459 }, 460 },###) 461 'accommodation_sc_pin': { ###( 462 'type': 'String Widget', 463 'data': { 464 'title': 'Accommodation SC Pin', 465 'fields': ('accommodation_sc_pin',), 466 'is_required': False, 467 'label': 'Accommodation SC Pin', 468 'label_edit': 'Accommodation SC Pin', 469 'description': '', 470 'help': '', 471 'is_i18n': False, 472 'readonly_layout_modes': (), 473 'hidden_layout_modes': (), 474 'hidden_readonly_layout_modes': (), 475 'hidden_empty': False, 476 'hidden_if_expr': '', 477 'css_class': '', 478 'widget_mode_expr': '', 479 'display_width': 10, 480 'size_max': 0, 481 }, 482 },###) 483 'accommodation_sc_value': { ###( 484 'type': 'Float Widget', 485 'data': { 486 'title': 'Accommodation SC Value', 487 'fields': ('accommodation_sc_value',), 488 'is_required': False, 489 'label': 'Accommodation SC Value', 490 'label_edit': 'Accommodation SC Value', 491 'description': '', 492 'help': '', 493 'is_i18n': False, 494 'readonly_layout_modes': (), 495 'hidden_layout_modes': (), 496 'hidden_readonly_layout_modes': (), 497 'hidden_empty': False, 498 'hidden_if_expr': '', 499 'css_class': '', 500 'widget_mode_expr': '', 501 'display_width': 10, 502 'size_max': 0, 503 }, 504 },###) 505 'accommodation_date': { ###( 506 'type': 'DateTime Widget', 507 'data': { 508 'title': 'Accommodation SC Pin', 509 'fields': ('accommodation_date',), 510 'is_required': False, 511 'label': 'Accommodation SC Date', 512 'label_edit': 'Accommodation SC Date', 513 'description': '', 514 'help': '', 515 'is_i18n': False, 516 'readonly_layout_modes': (), 517 'hidden_layout_modes': (), 518 'hidden_readonly_layout_modes': (), 519 'hidden_empty': False, 520 'hidden_if_expr': '', 521 'css_class': '', 522 'widget_mode_expr': '', 523 'display_width': 10, 524 'size_max': 0, 525 }, 526 },###) 527 'hostel_fee_sc_id': { ###( 528 'type': 'String Widget', 529 'data': { 530 'title': 'hostel_fee SC ID', 531 'fields': ('hostel_fee_sc_id',), 532 'is_required': False, 533 'label': 'Hostel Fee SC ID', 534 'label_edit': 'Hostel Fee SC ID', 535 'description': '', 536 'help': '', 537 'is_i18n': False, 538 'readonly_layout_modes': (), 539 'hidden_layout_modes': (), 540 'hidden_readonly_layout_modes': (), 541 'hidden_empty': False, 542 'hidden_if_expr': '', 543 'css_class': '', 544 'widget_mode_expr': '', 545 'display_width': 10, 546 'size_max': 0, 547 }, 548 },###) 549 'hostel_fee_sc_pin': { ###( 550 'type': 'String Widget', 551 'data': { 552 'title': 'hostel_fee SC Pin', 553 'fields': ('hostel_fee_sc_pin',), 554 'is_required': False, 555 'label': 'Hostel Fee SC Pin', 556 'label_edit': 'Hostel Fee SC Pin', 557 'description': '', 558 'help': '', 559 'is_i18n': False, 560 'readonly_layout_modes': (), 561 'hidden_layout_modes': (), 562 'hidden_readonly_layout_modes': (), 563 'hidden_empty': False, 564 'hidden_if_expr': '', 565 'css_class': '', 566 'widget_mode_expr': '', 567 'display_width': 10, 568 'size_max': 0, 569 }, 570 },###) 571 'hostel_fee_sc_value': { ###( 572 'type': 'Float Widget', 573 'data': { 574 'title': 'hostel_fee SC Value', 575 'fields': ('hostel_fee_sc_value',), 576 'is_required': False, 577 'label': 'Hostel Fee SC Value', 578 'label_edit': 'Hostel Fee SC Value', 579 'description': '', 580 'help': '', 581 'is_i18n': False, 582 'readonly_layout_modes': (), 583 'hidden_layout_modes': (), 584 'hidden_readonly_layout_modes': (), 585 'hidden_empty': False, 586 'hidden_if_expr': '', 587 'css_class': '', 588 'widget_mode_expr': '', 589 'display_width': 10, 590 'size_max': 0, 591 }, 592 },###) 593 'hostel_fee_date': { ###( 594 'type': 'DateTime Widget', 595 'data': { 596 'title': 'hostel_fee SC Pin', 597 'fields': ('hostel_fee_date',), 598 'is_required': False, 599 'label': 'Hostel Fee SC Date', 600 'label_edit': 'Hostel Fee SC Date', 601 'description': '', 602 'help': '', 603 'is_i18n': False, 604 'readonly_layout_modes': (), 605 'hidden_layout_modes': (), 606 'hidden_readonly_layout_modes': (), 607 'hidden_empty': False, 608 'hidden_if_expr': '', 609 'css_class': '', 610 'widget_mode_expr': '', 611 'display_width': 10, 612 'size_max': 0, 613 }, 614 },###) 615 'adm_check_sc_id': { ###( 616 'type': 'String Widget', 617 'data': { 618 'title': 'Admission check SC ID', 619 'fields': ('adm_check_sc_id',), 620 'is_required': False, 621 'label': 'Admission check SC ID', 622 'label_edit': 'Admission check SC ID', 623 'description': '', 624 'help': '', 625 'is_i18n': False, 626 'readonly_layout_modes': (), 627 'hidden_layout_modes': (), 628 'hidden_readonly_layout_modes': (), 629 'hidden_empty': False, 630 'hidden_if_expr': '', 631 'css_class': '', 632 'widget_mode_expr': '', 633 'display_width': 10, 634 'size_max': 0, 635 }, 636 },###) 637 'adm_check_sc_pin': { ###( 638 'type': 'String Widget', 639 'data': { 640 'title': 'Admission check SC Pin', 641 'fields': ('adm_check_sc_pin',), 642 'is_required': False, 643 'label': 'Admission check SC Pin', 644 'label_edit': 'Admission check SC Pin', 645 'description': '', 646 'help': '', 647 'is_i18n': False, 648 'readonly_layout_modes': (), 649 'hidden_layout_modes': (), 650 'hidden_readonly_layout_modes': (), 651 'hidden_empty': False, 652 'hidden_if_expr': '', 653 'css_class': '', 654 'widget_mode_expr': '', 655 'display_width': 10, 656 'size_max': 0, 657 }, 658 },###) 659 'adm_check_sc_value': { ###( 660 'type': 'Float Widget', 661 'data': { 662 'title': 'Admission check SC Value', 663 'fields': ('adm_check_sc_value',), 664 'is_required': False, 665 'label': 'Admission check SC Value', 666 'label_edit': 'Admission check SC Value', 667 'description': '', 668 'help': '', 669 'is_i18n': False, 670 'readonly_layout_modes': (), 671 'hidden_layout_modes': (), 672 'hidden_readonly_layout_modes': (), 673 'hidden_empty': False, 674 'hidden_if_expr': '', 675 'css_class': '', 676 'widget_mode_expr': '', 677 'display_width': 10, 678 'size_max': 0, 679 }, 680 },###) 681 'adm_check_date': { ###( 682 'type': 'DateTime Widget', 683 'data': { 684 'title': 'Admission check SC Pin', 685 'fields': ('adm_check_date',), 686 'is_required': False, 687 'label': 'Admission check SC Date', 688 'label_edit': 'Admission check SC Date', 689 'description': '', 690 'help': '', 691 'is_i18n': False, 692 'readonly_layout_modes': (), 693 'hidden_layout_modes': (), 694 'hidden_readonly_layout_modes': (), 695 'hidden_empty': False, 696 'hidden_if_expr': '', 697 'css_class': '', 698 'widget_mode_expr': '', 699 'display_width': 10, 700 'size_max': 0, 701 }, 702 },###) 703 'clearence_sc_id': { ###( 704 'type': 'String Widget', 705 'data': { 706 'title': 'Clearence SC ID', 707 'fields': ('clearence_sc_id',), 708 'is_required': False, 709 'label': 'Clearence SC ID', 710 'label_edit': 'Clearence SC ID', 711 'description': '', 712 'help': '', 713 'is_i18n': False, 714 'readonly_layout_modes': (), 715 'hidden_layout_modes': (), 716 'hidden_readonly_layout_modes': (), 717 'hidden_empty': False, 718 'hidden_if_expr': '', 719 'css_class': '', 720 'widget_mode_expr': '', 721 'display_width': 10, 722 'size_max': 0, 723 }, 724 },###) 725 'clearence_sc_pin': { ###( 726 'type': 'String Widget', 727 'data': { 728 'title': 'clearence SC Pin', 729 'fields': ('clearence_sc_pin',), 730 'is_required': False, 731 'label': 'Clearence SC Pin', 732 'label_edit': 'Clearence SC Pin', 733 'description': '', 734 'help': '', 735 'is_i18n': False, 736 'readonly_layout_modes': (), 737 'hidden_layout_modes': (), 738 'hidden_readonly_layout_modes': (), 739 'hidden_empty': False, 740 'hidden_if_expr': '', 741 'css_class': '', 742 'widget_mode_expr': '', 743 'display_width': 10, 744 'size_max': 0, 745 }, 746 },###) 747 'clearence_sc_value': { ###( 748 'type': 'Float Widget', 749 'data': { 750 'title': 'clearence SC Value', 751 'fields': ('clearence_sc_value',), 752 'is_required': False, 753 'label': 'Clearence SC Value', 754 'label_edit': 'Clearence SC Value', 755 'description': '', 756 'help': '', 757 'is_i18n': False, 758 'readonly_layout_modes': (), 759 'hidden_layout_modes': (), 760 'hidden_readonly_layout_modes': (), 761 'hidden_empty': False, 762 'hidden_if_expr': '', 763 'css_class': '', 764 'widget_mode_expr': '', 765 'display_width': 10, 766 'size_max': 0, 767 }, 768 },###) 769 'clearence_date': { ###( 770 'type': 'DateTime Widget', 771 'data': { 772 'title': 'clearence SC Pin', 773 'fields': ('clearence_date',), 774 'is_required': False, 775 'label': 'Clearence SC Date', 776 'label_edit': 'Clearence SC Date', 777 'description': '', 778 'help': '', 779 'is_i18n': False, 780 'readonly_layout_modes': (), 781 'hidden_layout_modes': (), 782 'hidden_readonly_layout_modes': (), 783 'hidden_empty': False, 784 'hidden_if_expr': '', 785 'css_class': '', 786 'widget_mode_expr': '', 787 'display_width': 10, 788 'size_max': 0, 789 }, 790 },###) 791 }, 792 'layout': { 793 'style_prefix': 'layout_default_', 794 'flexible_widgets': (), 795 'ncols': 1, 796 'rows': [ 797 [{'widget_id': 'adm_check_sc_id', 'ncols': 1},], 798 [{'widget_id': 'adm_check_sc_pin', 'ncols': 1},], 799 [{'widget_id': 'adm_check_sc_value', 'ncols': 1},], 800 [{'widget_id': 'adm_check_date', 'ncols': 1},], 801 [{'widget_id': 'clearence_sc_id', 'ncols': 1},], 802 [{'widget_id': 'clearence_sc_pin', 'ncols': 1},], 803 [{'widget_id': 'clearence_sc_value', 'ncols': 1},], 804 [{'widget_id': 'clearence_date', 'ncols': 1},], 805 [{'widget_id': 'accommodation', 'ncols': 1},], 806 [{'widget_id': 'accommodation_sc_id', 'ncols': 1},], 807 [{'widget_id': 'accommodation_sc_pin', 'ncols': 1},], 808 [{'widget_id': 'accommodation_sc_value', 'ncols': 1},], 809 [{'widget_id': 'accommodation_date', 'ncols': 1},], 810 [{'widget_id': 'hostel_fee_sc_id', 'ncols': 1},], 811 [{'widget_id': 'hostel_fee_sc_pin', 'ncols': 1},], 812 [{'widget_id': 'hostel_fee_sc_value', 'ncols': 1},], 813 [{'widget_id': 'hostel_fee_date', 'ncols': 1},], 814 ] 815 }, 816 }###) 817 475 818 student_personal_layout = { ###( 476 819 'widgets': { … … 499 842 'display_width': 10, 500 843 'size_max': 0, 501 },502 },503 'photo': {504 'type': 'Photo Widget',505 'data': {506 'title': '',507 'fields': ('photo',),508 'is_required': False,509 'label': 'Personal Picture',510 'label_edit': 'Personal Picture',511 'description': '',512 'help': '',513 'is_i18n': False,514 'readonly_layout_modes': (),515 'hidden_layout_modes': (),516 'hidden_readonly_layout_modes': (),517 'hidden_empty': False,518 'hidden_if_expr': '',519 'widget_mode_expr': '',520 'css_class': '',521 'css_class_expr': '',522 'javascript_expr': '',523 'deletable': True,524 'size_max': 4194304,525 'display_width': 90,526 'display_height': 180,527 'allow_resize': True,528 'render_position': 'left',529 'configurable': 'nothing',530 'keep_original': 1,531 },532 },533 'birth_certificate': {534 'type': 'Image Widget',535 'data': {536 'title': '',537 'fields': ('birth_certificate',),538 'is_required': False,539 'label': 'Birth Certificate',540 'label_edit': 'Birth Certificate',541 'description': '',542 'help': '',543 'is_i18n': False,544 'readonly_layout_modes': (),545 'hidden_layout_modes': (),546 'hidden_readonly_layout_modes': (),547 'hidden_empty': False,548 'hidden_if_expr': '',549 'widget_mode_expr': '',550 'css_class': '',551 'css_class_expr': '',552 'javascript_expr': '',553 'deletable': True,554 'size_max': 4194304,555 'display_width': 300,556 'display_height':600,557 'allow_resize': True,558 844 }, 559 845 }, … … 569 855 [{'widget_id': 'sex', 'ncols': 1},], 570 856 [{'widget_id': 'birthday', 'ncols': 1},], 857 ] 858 }, 859 }###) 860 861 student_documents = { ###( 862 'widgets': { 863 'photo': { ###( 864 'type': 'Photo Widget', 865 'data': { 866 'title': '', 867 'fields': ('photo',), 868 'is_required': True, 869 'label': 'Personal Picture', 870 'label_edit': 'Personal Picture', 871 'description': '', 872 'help': '', 873 'is_i18n': False, 874 'readonly_layout_modes': (), 875 'hidden_layout_modes': (), 876 'hidden_readonly_layout_modes': (), 877 'hidden_empty': False, 878 'hidden_if_expr': '', 879 'widget_mode_expr': '', 880 'css_class': '', 881 'css_class_expr': '', 882 'javascript_expr': '', 883 'deletable': True, 884 'size_max': 40960, 885 'display_width': 90, 886 'display_height': 180, 887 'allow_resize': True, 888 'render_position': 'left', 889 'configurable': 'nothing', 890 'keep_original': 1, 891 }, 892 },###) 893 'birth_certificate': { ###( 894 'type': 'Image Widget', 895 'data': { 896 'title': '', 897 'fields': ('birth_certificate',), 898 'is_required': True, 899 'label': 'Birth Certificate', 900 'label_edit': 'Birth Certificate', 901 'description': '', 902 'help': '', 903 'is_i18n': False, 904 'readonly_layout_modes': (), 905 'hidden_layout_modes': (), 906 'hidden_readonly_layout_modes': (), 907 'hidden_empty': False, 908 'hidden_if_expr': '', 909 'widget_mode_expr': '', 910 'css_class': '', 911 'css_class_expr': '', 912 'javascript_expr': '', 913 'deletable': True, 914 'size_max': 40960, 915 'display_width': 300, 916 'display_height':600, 917 'allow_resize': True, 918 }, 919 },###) 920 'passport': { ###( 921 'type': 'Image Widget', 922 'data': { 923 'title': '', 924 'fields': ('passport',), 925 'is_required': True, 926 'label': 'scanned Passport', 927 'label_edit': 'scanned Passport', 928 'description': '', 929 'help': '', 930 'is_i18n': False, 931 'readonly_layout_modes': (), 932 'hidden_layout_modes': (), 933 'hidden_readonly_layout_modes': (), 934 'hidden_empty': False, 935 'hidden_if_expr': '', 936 'widget_mode_expr': '', 937 'css_class': '', 938 'css_class_expr': '', 939 'javascript_expr': '', 940 'deletable': True, 941 'size_max': 40960, 942 'display_width': 300, 943 'display_height':600, 944 'allow_resize': True, 945 }, 946 },###) 947 'results_first': { ###( 948 'type': 'Image Widget', 949 'data': { 950 'title': '', 951 'fields': ('results_first',), 952 'is_required': True, 953 'label': '1st Sitting Results', 954 'label_edit': '1st Sitting Results', 955 'description': '', 956 'help': '', 957 'is_i18n': False, 958 'readonly_layout_modes': (), 959 'hidden_layout_modes': (), 960 'hidden_readonly_layout_modes': (), 961 'hidden_empty': False, 962 'hidden_if_expr': '', 963 'widget_mode_expr': '', 964 'css_class': '', 965 'css_class_expr': '', 966 'javascript_expr': '', 967 'deletable': True, 968 'size_max': 40960, 969 'display_width': 300, 970 'display_height':600, 971 'allow_resize': True, 972 }, 973 },###) 974 'results_second': { ###( 975 'type': 'Image Widget', 976 'data': { 977 'title': '', 978 'fields': ('results_second',), 979 'is_required': False, 980 'label': '2nd Sitting Results', 981 'label_edit': '2nd Sitting Results', 982 'description': '', 983 'help': '', 984 'is_i18n': False, 985 'readonly_layout_modes': (), 986 'hidden_layout_modes': (), 987 'hidden_readonly_layout_modes': (), 988 'hidden_empty': False, 989 'hidden_if_expr': '', 990 'widget_mode_expr': '', 991 'css_class': '', 992 'css_class_expr': '', 993 'javascript_expr': '', 994 'deletable': True, 995 'size_max': 40960, 996 'display_width': 300, 997 'display_height':600, 998 'allow_resize': True, 999 }, 1000 },###) 1001 }, 1002 'layout': { 1003 'style_prefix': 'layout_personal_', 1004 'flexible_widgets': (), 1005 'ncols': 1, 1006 'rows': [ 571 1007 [{'widget_id': 'photo', 'ncols': 1},], 572 1008 [{'widget_id': 'birth_certificate', 'ncols': 1},], 1009 [{'widget_id': 'passport', 'ncols': 1},], 1010 [{'widget_id': 'results_first', 'ncols': 1},], 1011 [{'widget_id': 'results_second', 'ncols': 1},], 573 1012 ] 574 1013 }, … … 759 1198 }, 760 1199 'layout': { 761 'style_prefix': 'layout_ admission_',1200 'style_prefix': 'layout_sc_', 762 1201 'flexible_widgets': (), 763 1202 'ncols': 1, … … 865 1304 }, 866 1305 'layout': { 867 'style_prefix': 'layout_ clearence_',1306 'style_prefix': 'layout_sc_', 868 1307 'flexible_widgets': (), 869 1308 'ncols': 1, … … 1614 2053 'data': { 1615 2054 'title': 'SC ID', 1616 'fields': (' accommodation_sc_id'),2055 'fields': ('sc_id'), 1617 2056 'is_required': False, 1618 2057 'label': 'Card Serial Number ', … … 1632 2071 } 1633 2072 },###) 1634 2073 'sc_pin': { ###( 1635 2074 'type': 'Scratchcard Pin Widget', 1636 2075 'data': { 1637 2076 'title': 'SC Pin', 1638 'fields': (' accommodation_sc_pin'),2077 'fields': ('sc_pin'), 1639 2078 'is_required': True, 1640 2079 'label': 'enter PIN', … … 1654 2093 }, 1655 2094 },###) 1656 2095 'sc_value': { ###( 1657 2096 'type': 'Float Widget', 1658 2097 'data': { 1659 2098 'title': 'Scratch card value', 1660 'fields': (' accommodation_sc_value',),2099 'fields': ('sc_value',), 1661 2100 'is_required': False, 1662 2101 'label': 'SC Value', … … 1678 2117 }, 1679 2118 'layout': { 1680 'style_prefix': 'layout_ accobook_',2119 'style_prefix': 'layout_sc_', 1681 2120 'flexible_widgets': (), 1682 2121 'ncols': 1, … … 1690 2129 ###) 1691 2130 2131 accopay = { ###( 2132 'widgets': { 2133 'sc_id': { ###( 2134 'type': 'String Widget', 2135 'data': { 2136 'title': 'SC ID', 2137 'fields': ('sc_id'), 2138 'is_required': False, 2139 'label': 'Card Serial Number ', 2140 'label_edit': 'Card Serial Number', 2141 'description': 'Card Serial Number ', 2142 'help': 'This can be found on the bottom right of the reverse side of your Scratch Card', 2143 'is_i18n': False, 2144 'readonly_layout_modes': (), 2145 'hidden_layout_modes': (), 2146 'hidden_readonly_layout_modes': (), 2147 'hidden_empty': False, 2148 'hidden_if_expr': 'python:1', 2149 'css_class': '', 2150 'widget_mode_expr': '', 2151 'display_width': 10, 2152 'size_max': 0, 2153 } 2154 },###) 2155 'sc_pin': { ###( 2156 'type': 'Scratchcard Pin Widget', 2157 'data': { 2158 'title': 'SC Pin', 2159 'fields': ('sc_pin'), 2160 'is_required': True, 2161 'label': 'enter PIN', 2162 'label_edit': 'enter an Hostel payment PIN', 2163 'description': '', 2164 'help': 'Please enter a PIN valid for paying hostel fee', 2165 'is_i18n': False, 2166 'readonly_layout_modes': (), 2167 'hidden_layout_modes': (), 2168 'hidden_readonly_layout_modes': (), 2169 'hidden_empty': False, 2170 'hidden_if_expr': '', 2171 'css_class': '', 2172 'widget_mode_expr': '', 2173 'display_width': 10, 2174 'size_max': 10, 2175 }, 2176 },###) 2177 'sc_value': { ###( 2178 'type': 'Float Widget', 2179 'data': { 2180 'title': 'Scratch card value', 2181 'fields': ('sc_value',), 2182 'is_required': False, 2183 'label': 'SC Value', 2184 'label_edit': 'Scratcard Value', 2185 'description': '', 2186 'help': '', 2187 'is_i18n': False, 2188 'readonly_layout_modes': ('create'), 2189 'hidden_layout_modes': (), 2190 'hidden_readonly_layout_modes': (), 2191 'hidden_empty': False, 2192 'hidden_if_expr': '', 2193 'css_class': '', 2194 'widget_mode_expr': '', 2195 'display_width': 10, 2196 'size_max': 10, 2197 }, 2198 },###) 2199 }, 2200 'layout': { 2201 'style_prefix': 'layout_sc_', 2202 'flexible_widgets': (), 2203 'ncols': 1, 2204 'rows': [ 2205 #[{'widget_id': 'sc_id', 'ncols': 1},], 2206 [{'widget_id': 'sc_value', 'ncols': 1},], 2207 [{'widget_id': 'sc_pin', 'ncols': 1},], 2208 ] 2209 }, 2210 }###) 2211 1692 2212 layouts = {} 1693 2213 layouts['university'] = common_layout … … 1695 2215 layouts['student'] = student_layout 1696 2216 layouts['study_level'] = study_level 2217 layouts['student_documents'] = student_documents 1697 2218 layouts['student_personal'] = student_personal_layout 1698 2219 layouts['student_eligibility'] = student_eligibility 1699 2220 layouts['accommodation'] = accommodation 1700 2221 layouts['accobook'] = accobook 2222 layouts['accopay'] = accopay 1701 2223 layouts['scratch_card'] = scratch_card 1702 2224 layouts['admission'] = admission -
waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py
r164 r166 45 45 sc_value = { ###( 46 46 'type': 'CPS Float Field', 47 'data': { 48 'default_expr': 'python:0.', 49 'is_searchabletext': True, 50 'acl_read_permissions': '', 51 'acl_read_roles': '', 52 'acl_read_expr': '', 53 'acl_write_permissions': '', 54 'acl_write_roles': '', 55 'acl_write_expr': '', 56 'read_ignore_storage': False, 57 'read_process_expr': '', 58 'read_process_dependent_fields': (), 59 'write_ignore_storage': False, 60 'write_process_expr': '', 61 }, 62 } 63 ###) 64 sc_date = { ###( 65 'type': 'CPS DateTime Field', 47 66 'data': { 48 67 'default_expr': 'python:500.', … … 137 156 'data': { 138 157 'is_searchabletext': 0, 139 'acl_write_roles': 'SectionReader',140 158 }, 141 159 }, … … 150 168 }, 151 169 }, 170 'accommodation' : { ###( 171 'type': 'CPS String Field', 172 'data': { 173 'default_expr': 'string:', 174 'is_searchabletext': True, 175 'acl_read_permissions': '', 176 'acl_read_roles': '', 177 'acl_read_expr': '', 178 'acl_write_permissions': '', 179 'acl_write_roles': '', 180 'acl_write_expr': '', 181 'read_ignore_storage': False, 182 'read_process_expr': '', 183 'read_process_dependent_fields': (), 184 'write_ignore_storage': False, 185 'write_process_expr': '', 186 }, 187 }, ###) 152 188 'accommodation_sc_id' : sc_id, 153 189 'accommodation_sc_pin' : sc_pin, … … 160 196 }, 161 197 }, 198 'hostel_fee_sc_id' : sc_id, 199 'hostel_fee_sc_pin' : sc_pin, 200 'hostel_fee_sc_value' : sc_value, 201 'hostel_fee_date' : { 202 'type': 'CPS DateTime Field', 203 'data': { 204 'is_searchabletext': 0, 205 'acl_write_roles': 'SectionReader', 206 }, 207 }, 162 208 } 163 209 ###) … … 205 251 ###) 206 252 253 student_hostel_fee = { ###( 254 'sc_id': sc_id, 255 'sc_pin': sc_pin, 256 'sc_value': { ###( 257 'type': 'CPS Float Field', 258 'data': { 259 'default_expr': 'python:2500.', 260 'is_searchabletext': True, 261 'acl_read_permissions': '', 262 'acl_read_roles': '', 263 'acl_read_expr': '', 264 'acl_write_permissions': '', 265 'acl_write_roles': '', 266 'acl_write_expr': '', 267 'read_ignore_storage': False, 268 'read_process_expr': '', 269 'read_process_dependent_fields': (), 270 'write_ignore_storage': False, 271 'write_process_expr': '', 272 }, 273 },###) 274 'accommodation': { 275 'type': 'CPS String Field', 276 'data': { 277 'default_expr': 'string:', 278 'is_searchabletext': True, 279 'acl_read_permissions': '', 280 'acl_read_roles': '', 281 'acl_read_expr': '', 282 'acl_write_permissions': '', 283 'acl_write_roles': '', 284 'acl_write_expr': '', 285 'read_ignore_storage': False, 286 'read_process_expr': '', 287 'read_process_dependent_fields': (), 288 'write_ignore_storage': False, 289 'write_process_expr': '', 290 }, 291 }, 292 } 293 ###) 294 207 295 student_admission = { ###( 208 296 'sc_id': sc_id, … … 346 434 }, 347 435 }, 436 } 437 ###) 438 439 student_documents = { ###( 348 440 'photo': { 349 441 'type': 'CPS Image Field', … … 353 445 }, 354 446 'birth_certificate': { 447 'type': 'CPS Image Field', 448 'data': { 449 'is_searchabletext': 0, 450 }, 451 }, 452 'passport': { 453 'type': 'CPS Image Field', 454 'data': { 455 'is_searchabletext': 0, 456 }, 457 }, 458 'results_first': { 459 'type': 'CPS Image Field', 460 'data': { 461 'is_searchabletext': 0, 462 }, 463 }, 464 'results_second': { 355 465 'type': 'CPS Image Field', 356 466 'data': { … … 764 874 schemas['student_admission'] = student_admission 765 875 schemas['student_clearence'] = student_clearence 876 schemas['student_documents'] = student_documents 766 877 schemas['student_eligibility'] = student_eligibility 767 878 schemas['student_accommodation'] = student_accommodation 879 schemas['student_hostel_fee'] = student_hostel_fee 768 880 schemas['study_level'] = study_level 769 881 schemas['course_results'] = course_results_schema -
waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py
r164 r166 154 154 ###) 155 155 156 student_type = { ###(157 'title': 'WAeUP Student',158 'description': '',159 'content_icon': 'student.gif',160 'content_meta_type': 'Student',161 'product': 'WAeUP',162 'factory': 'addStudent',163 'immediate_view': 'folder_view',164 'global_allow': True,165 'filter_content_types': True,166 'allowed_content_types': ('Jamb','StudentPersonal','StudyLevel'),167 'allow_discussion': False,168 'cps_is_searchable': True,169 'cps_proxy_type': 'folder',170 'cps_display_as_document_in_listing': True,171 'schemas': ['metadata','common','student'],172 'layouts': ['waeup_common','student'],173 'flexible_layouts': (),174 'layout_clusters': ['metadata:metadata'],175 'cps_section_wf': 'waeup_section_wf',176 'use_content_status_history': 0,177 'actions': (178 {'id': 'view',179 'name': 'Standard View',180 #'action': 'string:${object_url}/student_index_html',181 'action': 'temporary_view_all',182 'condition': 'object/memberIsOwner',183 'permission': (View,),184 'category': 'object',185 'visible': True,186 },187 {'id': 'metadata',188 'name': 'action_metadata',189 'action': 'cpsdocument_metadata',190 'condition': "python:member and 'Manager' in member.getRoles()",191 'permissions': (UniversityManage,)},192 {'id': 'localroles',193 'name': 'delegate',194 'action': 'folder_localrole_form',195 'permissions': (ModifyPortalContent),196 'visible' : 0,197 },198 {'id' : 'eligibility',199 'name' : 'eligibility',200 'action' : 'eligibility',201 'condition': 'object/memberIsOwner',202 'permission': (ModifyPortalContent,),203 'visible': False,204 },205 {'id' : 'JAMB',206 'name' : 'JAMB Data',207 'action' : 'string:${object/absolute_url}/JAMB',208 'condition': 'object/memberIsOwner',209 'permission': (ModifyPortalContent,)},210 {211 'id' : 'PERSONAL',212 'name' : 'Personal Data',213 'action' : 'string:${object/absolute_url}/PERSONAL',214 'condition': "python: object.getContent().memberIsOwner() and getattr(object,'PERSONAL',None)",215 'permission': (ModifyPortalContent,)},216 {217 'id' : 'study_level',218 'name' : 'Register for next Level',219 'action' : 'string:${object/absolute_url}/register_level',220 'condition': 'object/memberIsOwner',221 'permission': (ModifyPortalContent,)},222 {223 'id' : 'book_accomodation',224 'name' : 'Book Accomodation',225 'action' : 'string:${object/absolute_url}/book_accommodation',226 'condition': 'object/memberIsOwner',227 'permission': (ModifyPortalContent,)},228 )229 }230 ###)231 232 156 academics_folder_type = { ###( 233 157 'title': 'WAeUP Academics Folder', … … 323 247 ###) 324 248 249 student_type = { ###( 250 'title': 'WAeUP Student', 251 'description': '', 252 'content_icon': 'student.gif', 253 'content_meta_type': 'Student', 254 'product': 'WAeUP', 255 'factory': 'addStudent', 256 'immediate_view': 'folder_view', 257 'global_allow': True, 258 'filter_content_types': True, 259 'allowed_content_types': ('Jamb','StudentDocuments','StudentPersonal','StudyLevel'), 260 'allow_discussion': False, 261 'cps_is_searchable': True, 262 'cps_proxy_type': 'folder', 263 'cps_display_as_document_in_listing': True, 264 'schemas': ['metadata','common','student'], 265 'layouts': ['waeup_common','student'], 266 'flexible_layouts': (), 267 'layout_clusters': ['metadata:metadata'], 268 'cps_section_wf': 'waeup_section_wf', 269 'use_content_status_history': 0, 270 'actions': ( 271 {'id': 'view', 272 'name': 'Standard View', 273 #'action': 'string:${object_url}/student_index_html', 274 'action': 'string:${object_url}/temporary_view_all', 275 'condition': 'python:object.getContent().memberIsOwner()', 276 'permission': (View,), 277 'category': 'object', 278 'visible': True, 279 }, 280 {'id': 'metadata', 281 'name': 'action_metadata', 282 'action': 'cpsdocument_metadata', 283 'condition': "python:member and 'Manager' in member.getRoles()", 284 'permissions': (UniversityManage,), 285 }, 286 {'id': 'localroles', 287 'name': 'delegate', 288 'action': 'folder_localrole_form', 289 'permissions': (ModifyPortalContent), 290 'visible' : 0, 291 }, 292 {'id' : 'eligibility', 293 'name' : 'eligibility', 294 'action' : 'eligibility', 295 'condition': 'object/memberIsOwner', 296 'permission': (ModifyPortalContent,), 297 'visible': False, 298 }, 299 {'id' : 'JAMB', 300 'name' : 'JAMB Data', 301 'action' : 'string:${object/absolute_url}/JAMB', 302 'condition': 'python:object.getContent().memberIsOwner()', 303 'permission': (ModifyPortalContent,), 304 'visible': False, 305 }, 306 { 307 'id' : 'DOCUMENTS', 308 'name' : 'upload Documents', 309 'action' : 'string:${object/absolute_url}/DOCUMENTS', 310 'condition': "python: object.getContent().memberIsOwner() and getattr(object,'PERSONAL',None)", 311 'permission': (ModifyPortalContent,)}, 312 { 313 'id' : 'PERSONAL', 314 'name' : 'Personal Data', 315 'action' : 'string:${object/absolute_url}/PERSONAL', 316 'condition': "python: object.getContent().memberIsOwner() and getattr(object,'PERSONAL',None)", 317 'permission': (ModifyPortalContent,)}, 318 { 319 'id' : 'register_study_level', 320 'name' : 'Register for next Level', 321 'action' : 'string:${object/absolute_url}/register_level', 322 'condition': 'python: object.getContent().memberIsOwner() and not object.getContent().isRegisteredForCurrentLevel()', 323 'permission': (ModifyPortalContent,)}, 324 { 325 'id' : 'book_accomodation', 326 'name' : 'Book Accomodation', 327 'action' : 'string:${object/absolute_url}/book_accommodation', 328 'condition': 'python: object.getContent().memberIsOwner() and not object.getContent().accommodationIsBooked()', 329 'permission': (ModifyPortalContent,)}, 330 { 331 'id' : 'pay_hostel_fee', 332 'name' : 'Pay Hostel Fee', 333 'action' : 'string:${object/absolute_url}/pay_hostel_fee', 334 'condition': 'python: object.getContent().memberIsOwner() and not object.getContent().accommodationIsPayed()', 335 'permission': (ModifyPortalContent,)}, 336 ) 337 }###) 338 325 339 jamb_type = { ###( 326 340 'title': "JAMB data", … … 388 402 'product': 'WAeUP', 389 403 'factory': 'addStudentPersonal', 390 'immediate_view': ' student_personal_index_html',404 'immediate_view': 'temporary_view_all', 391 405 'global_allow': True, 392 406 'filter_content_types': True, … … 406 420 {'id': 'view', 407 421 'name': 'Standard View', 408 #'action': 'string:${object_url}/student_personal_index_html',409 #'action': 'string:${object_url}/cpsdocument_view',410 422 'action': 'temporary_view_all', 411 423 'permission': (View,), … … 415 427 'name': 'action_edit', 416 428 'action': 'string:${object_url}/student_personal_edit_form', 417 'condition': '',418 429 'permission': (ModifyPortalContent,), 419 430 'category': 'object', 420 431 'visible': True,}, 432 {'id': 'metadata', 433 'name': 'action_metadata', 434 'action': 'cpsdocument_metadata', 435 'condition': "python:member and 'Manager' in member.getRoles()", 436 'permissions': (UniversityManage,)}, 437 ) 438 } 439 ###) 440 441 student_documents = { ###( 442 'title': "Students documents data", 443 'description': '', 444 'content_icon': '', 445 'content_meta_type': 'StudentDocuments', 446 'product': 'WAeUP', 447 'factory': 'addStudentDocuments', 448 'immediate_view': 'temporary_view_all', 449 'global_allow': True, 450 'filter_content_types': True, 451 'allowed_content_types': (), 452 'allow_discussion': False, 453 'cps_is_searchable': True, 454 'cps_proxy_type': 'document', 455 'cps_display_as_document_in_listing': True, 456 'cps_is_portalbox': False, 457 'schemas': ['student_documents'], 458 'layouts': ['student_documents'], 459 'flexible_layouts': (), 460 'storage_methods': (), 461 'cps_workspace_wf': 'workspace_content_wf', 462 'cps_section_wf': 'section_content_wf', 463 'actions': ( 464 {'id': 'view', 465 'name': 'View', 466 'action': 'string:${object_url}/temporary_view_all', 467 'permission': (View), 468 'category': 'object', 469 'visible': True, 470 }, 471 {'id': 'edit', 472 'name': 'action_edit', 473 'action': 'string:${object_url}/student_documents_edit_form', 474 'permission': (ModifyPortalContent,), 475 'category': 'object', 476 'visible': True, 477 }, 421 478 {'id': 'metadata', 422 479 'name': 'action_metadata', … … 432 489 'description': '', 433 490 'content_icon': '', 434 'content_meta_type': ' Level',491 'content_meta_type': 'StudyLevel', 435 492 'product': 'WAeUP', 436 493 'factory': 'addStudyLevel', … … 453 510 'name': 'Standard View', 454 511 #'action': 'accommodation_index_html', 455 'action': ' temporary_view_all',512 'action': 'string:${object_url}/temporary_view_all', 456 513 'condition': '', 457 514 'permission': (View,), … … 877 934 types['AcademicsFolder'] = academics_folder_type 878 935 types['Student'] = student_type 936 types['StudentDocuments'] = student_documents 879 937 types['StudentPersonal'] = student_personal_type 880 938 types['StudyLevel'] = study_level_folder -
waeup_product/trunk/skins/waeup_default/portlet_session_info.pt
r155 r166 1 1 <tal:block define="mtool here/portal_membership; 2 anonymous mtool/isAnonymousUser; 3 member mtool/getAuthenticatedMember" 2 member mtool/getAuthenticatedMember; 3 isAnon mtool/isAnonymousUser; 4 roles member/getRoles; 5 backend python:'UniversityManager' in roles or 'StudentManager' in roles; 6 frontend python:'Student' in roles or isAnon;" 4 7 > 5 <tal:block condition="not:anonymous"> 6 <div i18n:translate="">You are currently logged in as 7 <em i18n:name="member" 8 tal:content="member" /><br />with Basic Roles <span tal:content="member/getRoles" /><br /> 9 <span tal:condition="python: 0" tal:content="python:mtool.getCPSCandidateLocalRoles(context)" /> 10 </div> 8 <tal:block condition="not:isAnon"> 9 <tal:block condition="backend"> 10 <em tal:content="member" /> is working in back-end mode<br /> 11 <span tal:condition="python: 1" > 12 with Basic Roles <span tal:content="member/getRoles" /><br /> 13 <span tal:condition="python: 0" tal:content="python:mtool.getCPSCandidateLocalRoles(context)" /> 14 </span> 15 </tal:block> 16 <tal:block condition="not:backend"> 17 <em tal:content="member" /> is working in front-end mode<br /> 18 <span tal:condition="python: 1" > 19 with Basic Roles <span tal:content="member/getRoles" /><br /> 20 <span tal:condition="python: 0" tal:content="python:mtool.getCPSCandidateLocalRoles(context)" /> 21 </span> 22 </tal:block> 11 23 <br /> 12 24 <a href="" tal:condition="python: 'Student' in member.getRoles() and not 'UniversityManager' in member.getRoles()" 13 14 25 tal:attributes="href string:${context/portal_url}/students/${member}"> 26 Go to your personal area 15 27 </a> 16 28 <br /> 17 29 <a href="" tal:condition="python: 0" 18 19 30 tal:attributes="href string:${context/portal_url}/cpsdirectory_entry_view?dirname=members&id=${member}"> 31 Edit your Preferences 20 32 </a> 21 33 <br /> 22 34 <a href="" i18n:translate="" 23 24 35 tal:attributes="href string:logout"> 36 Log out 25 37 </a> 26 27 38 </tal:block> 28 <tal:block condition=" anonymous">39 <tal:block condition="isAnon"> 29 40 <div>You are not logged in. </div> 30 41 <br /> … … 32 43 </tal:block> 33 44 </tal:block> 34 -
waeup_product/trunk/skins/waeup_default/temporary_view_all.py
r160 r166 1 ##parameters= REQUEST=None,psm=None,groups=None1 ##parameters=psm=None 2 2 # $Id$ 3 3 … … 6 6 7 7 member = context.portal_membership.getAuthenticatedMember() 8 9 if not context.portal_membership.isAnonymousUser(): 10 if 'UniversityManager' in member.getRoles(): 11 return context.folder_view() 12 index = getattr(context,'documents',None) 13 if index: 14 fp = getattr(index,'frontpage',None) 15 if fp: 16 return fp() 17 return context.university_view_all(psm=psm) 8 uname = str(member) 9 roles = member.getRoles() 10 cat = context.portal_catalog 11 request = context.REQUEST 12 url0 = request.get('URL0') 13 if context.portal_membership.isAnonymousUser(): 14 return context.temporary_view_all_form(psm=psm) 15 else: 16 if url0.find(uname) > 0 or 'UniversityManager' in roles: 17 return context.temporary_view_all_form(psm=psm) 18 elif 'Student' in roles: 19 res = cat(id=uname) 20 if len(res) > 0: 21 return res[0].getObject().temporary_view_all_form(psm=psm) 22 return context.temporary_view_all_form(psm=psm) -
waeup_product/trunk/skins/waeup_default/temporary_view_all_form.pt
r161 r166 1 1 <html metal:use-macro="here/content_lib_master/macros/master"> 2 3 2 <metal:block fill-slot="head_slot"> 4 3 </metal:block> … … 12 11 13 12 <metal:block fill-slot="main" 14 tal:define="folder here/getContent; 13 tal:define="roles member/getRoles; 14 backend python:'UniversityManager' in roles or 'StudentManager' in roles; 15 frontend python:'Student' in roles or isAnon; 16 folder here/getContent; 15 17 items python:context.filterContents(items=context.contentValues());" 16 18 > … … 22 24 23 25 <br /> 24 25 26 <span tal:condition="python:context.portal_type != 'University'" tal:omit-tag=""> 26 27 <p>Exemplary view of the <strong>object's data fields</strong>: </p> 27 28 <tal:block tal:content="structure rendered_main|python:doc.render(proxy=here)" /> 28 29 <p tal:condition="python: 0">(data field listing not yet implemented)</p>30 29 </span> 31 30 <br /> 32 31 <p>Exemplary view of the <strong>list of items attached to (or contained in) the object</strong>: </p> 33 34 35 36 32 <tal:block condition="python: len(items)"> 37 <table>38 <span tal:repeat="item items">39 <tr>40 <td>41 <span tal:content="item/portal_type" />:42 </td>43 <td>44 <i>45 <a href="xxx" tal:condition="python: checkPerm('View',item)"46 tal:attributes="href item/absolute_url"47 tal:content="item/title_or_id"></a>48 <span tal:condition="python: not checkPerm('View',item)" tal:content="item/title_or_id"/>49 </i>50 </td>51 </tr>52 </span>53 </table>33 <table> 34 <span tal:repeat="item items"> 35 <tr> 36 <td> 37 <span tal:content="item/portal_type" />: 38 </td> 39 <td> 40 <i> 41 <a href="xxx" tal:condition="backend" 42 tal:attributes="href item/absolute_url" 43 tal:content="item/title_or_id"></a> 44 <span tal:condition="frontend" tal:content="item/title_or_id"/> 45 </i> 46 </td> 47 </tr> 48 </span> 49 </table> 54 50 </tal:block> 55 51 -
waeup_product/trunk/skins/waeup_student/book_accommodation.py
r164 r166 4 4 book an accomodation 5 5 """ 6 import DateTime 7 current = DateTime.DateTime() 8 6 9 type_name = 'Student' 7 10 ti = context.portal_types[type_name] … … 16 19 17 20 res,psm,ds = lt.renderLayout(layout_id= 'accobook', 18 schema_id= 'student ',21 schema_id= 'student_accommodation', 19 22 context=context, 20 23 mapping=validate and REQUEST, 21 24 ob={}, 22 25 layout_mode='create', 23 create_action = 'book_accommodation', 26 submit = "book", 27 action = 'book_accommodation', 24 28 ) 25 29 if psm == 'invalid': … … 65 69 #psm = "Your not admitted" 66 70 psm = "h:%(heading)s free:%(nr_of_free)s %(beds_assigned)s" % dict 71 72 ds.set('sc_date',current) 73 sf.setScratchCardData('accommodation',ds) 74 67 75 return context.booked_accommodation(v=dict) -
waeup_product/trunk/skins/waeup_student/booked_accommodation.pt
r124 r166 8 8 > 9 9 You have successfully booked bed nr <span tal:content="acco/beds_assigned" /> in <span tal:content="acco/heading" />. 10 <br />Your next steps: 11 <ul> 12 <li>Buy a Hostel Scratch card</li> 13 <li>Login with your user_id and password </li> 14 <li>Klick on the pay Hostel Fee tab</li> 15 </ul> 10 16 </metal:block> 11 17 <metal:block fill-slot="sub"> -
waeup_product/trunk/skins/waeup_student/check_admission.py
r164 r166 5 5 return html renderer + psm 6 6 """ 7 import DateTime 8 current = DateTime.DateTime() 9 10 7 11 type_name = 'Jamb' 8 12 ti = context.portal_types[type_name] … … 22 26 ob={}, 23 27 layout_mode='create', 28 action = "check_admission", 29 submit = "check", 24 30 ) 25 31 if psm == 'invalid': … … 45 51 ds = ds, 46 52 ) 53 54 ds.set('sc_date',current) 47 55 student.getContent().setScratchCardData('adm_check',ds) 48 56 -
waeup_product/trunk/skins/waeup_student/clearence.py
r164 r166 5 5 return html renderer + psm 6 6 """ 7 import DateTime 8 current = DateTime.DateTime() 9 10 7 11 type_name = 'Jamb' 8 12 ti = context.portal_types[type_name] … … 22 26 ob={}, 23 27 layout_mode='create', 28 action = "clearence", 29 submit = "submit", 24 30 ) 31 25 32 if psm == 'invalid': 26 33 return context.clearence_form(rendered = res, … … 52 59 rset = REQUEST.set 53 60 student = getattr(context,s_id) 61 ds.set('sc_date',current) 54 62 student.getContent().setScratchCardData('clearence',ds) 55 63 sc_pin = ds.get('sc_pin') -
waeup_product/trunk/skins/waeup_student/layout_sc_create.pt
r160 r166 10 10 edit_form python:ti and ti.getActionById('edit', 'cpsdocument_edit_form') or 'cpsdocument_edit_form'; 11 11 metadata_form python:ti and ti.getActionById('metadata', 'cpsdocument_metadata') or 'cpsdocument_metadata'; 12 formaction string:check_admission_form; 12 formaction options/action; 13 submittext options/submit; 13 14 first_layout options/first_layout|python:0; 14 15 last_layout options/last_layout|python:0; … … 17 18 " 18 19 > 19 <form action='check_admission' method='post'20 <form action='check_admission' tal:attributes="action formaction" method='post' 20 21 enctype='multipart/form-data' class='workflow'> 21 22 <div class='group'> … … 76 77 </tr> 77 78 </table> 78 <input type="submit" class="standalone" name="cpsdocument_edit_button" value="check" /> 79 <input type="submit" class="standalone" name="cpsdocument_edit_button" 80 value="check" tal:attributes="value submittext"/> 79 81 </div> 80 82 </div> -
waeup_product/trunk/skins/waeup_student/pay_hostel_fee.py
r164 r166 4 4 book an accomodation 5 5 """ 6 import DateTime 7 current = DateTime.DateTime() 8 6 9 type_name = 'Student' 7 10 ti = context.portal_types[type_name] … … 15 18 pr = context.portal_registration 16 19 17 res,psm,ds = lt.renderLayout(layout_id= 'acco book',18 schema_id= 'student ',20 res,psm,ds = lt.renderLayout(layout_id= 'accopay', 21 schema_id= 'student_hostel_fee', 19 22 context=context, 20 23 mapping=validate and REQUEST, 21 24 ob={}, 22 25 layout_mode='create', 23 create_action = 'book_accommodation', 26 submit = "pay", 27 action = 'pay_hostel_fee', 24 28 ) 25 29 if psm == 'invalid': … … 35 39 elif psm == 'valid': 36 40 sf = context.getContent() 37 halls = getattr(context,'accommodation').contentValues() 38 beds = [] 39 student = context.PERSONAL.getContent() 40 sf = context.getContent() 41 for hall in halls: 42 h = hall.getContent() 43 ba = int(getattr(h,'beds_assigned',0)) 44 bal = getattr(h,'beds_assigned_list',[]) 45 nr_of_beds = int(h.nr_of_blocks) * int(h.nr_of_floors) * int(h.rooms_per_floor) * int(h.beds_per_room) 46 if h.which_sex == student.sex and nr_of_beds > len(bal): 47 break 48 dict = {'heading': h.heading, 49 'text': h.text, 50 'which_sex': h.which_sex, 51 'nr_of_blocks': h.nr_of_blocks, 52 'nr_of_floors': h.nr_of_floors, 53 'rooms_per_floor': h.rooms_per_floor, 54 'beds_per_room': h.beds_per_room, 55 'nr_of_free': nr_of_beds, 56 'beds_assigned': ba, 57 } 58 ba += 1 59 dict['beds_assigned'] = ba 60 bal.append(('%s:%d' % (pm.getAuthenticatedMember(),ba))) 61 dict['beds_assigned_list'] = bal 62 h.edit(mapping = dict) 63 ds.set('accommodation', "Bed # %(beds_assigned)s in %(heading)s" % dict) 64 sf.edit(mapping = ds) 65 #psm = "Your not admitted" 66 psm = "h:%(heading)s free:%(nr_of_free)s %(beds_assigned)s" % dict 67 return context.booked_accommodation(v=dict) 41 42 ds.set('sc_date',current) 43 sf.setScratchCardData('hostel_fee',ds) 44 45 return context.payed_hostel_fee(dict=ds) -
waeup_product/trunk/skins/waeup_student/payed_hostel_fee.pt
r160 r166 5 5 </metal:block> 6 6 <metal:block fill-slot="main" 7 tal:define="acco options/v" 7 tal:define="student context/getContent; 8 dict options/dict" 8 9 > 9 You have successfully booked bed nr <span tal:content="acco/beds_assigned" /> in <span tal:content="acco/heading" />. 10 You payed <span tal:content="student/accommodation" /><br /> 11 with Scratchcard PIN <span tal:content="dict/sc_pin" /> <br /> 12 on <span tal:content="dict/sc_date"/>. 13 10 14 </metal:block> 11 15 <metal:block fill-slot="sub"> -
waeup_product/trunk/skins/waeup_student/process_waeup_login.py
r164 r166 38 38 context.notifyCPSDocumentCreation(ob=pd) 39 39 40 pdid = 'DOCUMENTS' 41 ma.invokeFactory('StudentDocuments', pdid) 42 pd = getattr(ma,pdid) 43 context.notifyCPSDocumentCreation(ob=pd) 44 40 45 return response.redirect("%s/eligibility" % ma.absolute_url()) 41 46 return ma.eligibility(REQUEST=context.REQUEST)
Note: See TracChangeset for help on using the changeset viewer.