Changeset 45 for waeup_product/trunk/skins
- Timestamp:
- 11 Oct 2005, 12:10:17 (19 years ago)
- Location:
- waeup_product/trunk/skins
- Files:
-
- 2 added
- 4 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py
r29 r45 4 4 layouts = {} 5 5 6 # common header layout 7 common_layout = { 8 'widgets': { 9 'LanguageSelector': { 10 'type': 'Document Language Select Widget', 11 'data': { 12 'fields': ['Language'], 13 }, 14 }, 15 'Title': { 16 'type': 'Heading Widget', 17 'data': { 18 'fields': ['Title'], 19 'level': 1, 20 'is_i18n': 1, 21 'is_required': 1, 22 'label_edit': 'Name', 23 'display_width': 40, 24 'size_max': 200, 25 }, 26 }, 27 'Description': { 28 'type': 'Text Widget', 29 'data': { 30 'fields': ['Description'], 31 'is_i18n': 1, 32 'label_edit': 'cpsdoc_description_label_edit', 33 'label': '', 34 'css_class': 'ddescription', 35 'width': 72, 36 'height': 5, 37 'render_format': 'text', 38 'hidden_layout_modes': ('create','edit', 'view'), 39 }, 40 }, 41 'LanguageSelectorCreation': { 42 'type': 'Select Widget', 43 'data': { 44 'title': 'Language', 45 'fields': ('Language',), 46 'is_required': 0, 47 'label': 'label_language', 48 'label_edit': 'label_language', 49 'description': '', 50 'help': '', 51 'is_i18n': 0, 52 'readonly_layout_modes': (), 53 'hidden_layout_modes': ('create','edit', 'view'), 54 'hidden_readonly_layout_modes': (), 55 'hidden_empty': 0, 56 'hidden_if_expr': '', 57 'css_class': '', 58 'vocabulary': 'language_voc', 59 }, 60 }, 61 }, 62 'layout': { 63 'style_prefix': 'layout_default_', 64 'rows': [ 65 [{'widget_id': 'LanguageSelector'}], 66 [{'widget_id': 'Title'},], 67 [{'widget_id': 'Description'},], 68 [{'widget_id': 'LanguageSelectorCreation'}], 69 ], 70 }, 71 } 72 layouts['waeup_common'] = common_layout 73 # 74 # 6 75 student_layout = { 7 76 'widgets': { … … 108 177 } 109 178 layouts['student'] = student_layout 110 179 # 180 # 111 181 scratch_card = { 112 182 'widgets': { -
waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py
r29 r45 1 university_schema = { 2 'allow_discussion': { 3 'type': 'CPS Int Field', 4 'data': { 5 'default_expr': 'python:0', 6 'is_searchabletext': 0, 7 }, 8 }, 9 } 10 11 students_folder_schema = { 12 'allow_discussion': { 13 'type': 'CPS Int Field', 14 'data': { 15 'default_expr': 'python:0', 16 'is_searchabletext': 0, 17 }, 18 }, 19 } 20 1 21 student_schema = { 2 22 'allow_discussion': { … … 300 320 } 301 321 schemas = {} 322 schemas['university'] = university_schema 323 schemas['students'] = students_folder_schema 302 324 schemas['student'] = student_schema 303 325 schemas['jamb'] = jamb_schema -
waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py
r28 r45 8 8 ChangePermissions = 'Change permissions' 9 9 10 student_folder_type = { 10 university_type = { 11 'title': 'WAeUP Base Folder', 12 'description': 'The WAeUP Container', 13 'content_icon': 'students_folder.gif', 14 'content_meta_type': 'University', 15 'product': 'WAeUP', 16 'factory': 'addUniversity', 17 'immediate_view': 'folder_view', 18 'global_allow': 1, 19 'filter_content_types': 1, 20 'allowed_content_types': ('StudentsFolder'), 21 'allow_discussion': 0, 22 'cps_is_searchable': 1, 23 'cps_display_as_document_in_listing': 1, 24 'cps_proxy_type': 'folder', 25 'schemas': ['metadata', 'common', 'folder'], 26 'layouts': ['waeup_common', 'folder'], 27 'layout_clusters': ['metadata:metadata'], 28 'cps_section_wf': 'waeup_section_wf', 29 'actions': ({'id': 'view', 30 'name': 'action_view', 31 'action': 'folder_view', 32 'permissions': (View,)}, 33 {'id': 'new_content', 34 'name': 'action_new_content', 35 'action': 'folder_factories', 36 'permissions': (AddPortalContent,)}, 37 {'id': 'contents', 38 'name': 'action_folder_contents', 39 'action': 'folder_contents', 40 'permissions': (ModifyPortalContent,)}, 41 {'id': 'edit', 42 'name': 'action_edit', 43 'action': 'cpsdocument_edit_form', 44 'permissions': (ModifyPortalContent,)}, 45 {'id': 'metadata', 46 'name': 'action_metadata', 47 'action': 'cpsdocument_metadata', 48 'condition': 'not:portal/portal_membership/isAnonymousUser', 49 'permissions': (View,)}, 50 {'id': 'localroles', 51 'name': 'action_local_roles', 52 'action': 'folder_localrole_form', 53 'permissions': (ChangePermissions,)}, 54 ) 55 } 56 57 students_folder_type = { 11 58 'title': 'WAeUP Student Folder', 12 59 'description': 'The WAeUP Student Folder', 13 60 'content_icon': 'students_folder.gif', 14 'content_meta_type': ' Folder',15 'product': ' CPSDefault',16 'factory': 'add Folder',17 'immediate_view': ' student_folder_view',61 'content_meta_type': 'StudentsFolder', 62 'product': 'WAeUP', 63 'factory': 'addStudentsFolder', 64 'immediate_view': 'folder_view', 18 65 'global_allow': 1, 19 66 'filter_content_types': 1, … … 25 72 'cps_proxy_type': 'folder', 26 73 'schemas': ['metadata', 'common', 'folder'], 27 'layouts': [' folder'],74 'layouts': ['waeup_common','folder'], 28 75 'layout_clusters': ['metadata:metadata'], 29 76 'cps_section_wf': 'waeup_section_wf', … … 36 83 'action': 'folder_factories', 37 84 'permissions': (AddPortalContent,)}, 38 ##{'id': 'contents',39 ##'name': 'action_folder_contents',40 ##'action': 'folder_contents',41 ##'permissions': (ModifyPortalContent,)},85 {'id': 'contents', 86 'name': 'action_folder_contents', 87 'action': 'folder_contents', 88 'permissions': (ModifyPortalContent,)}, 42 89 {'id': 'edit', 43 90 'name': 'action_edit', … … 55 102 ) 56 103 } 104 57 105 student_type = { 58 106 'title': 'WAeUP Student', 59 107 'description': '', 60 108 'content_icon': 'student.gif', 61 'content_meta_type': ' CPS Document',109 'content_meta_type': 'Student', 62 110 'product': 'CPSDocument', 63 111 'factory': 'addCPSDocument', 64 112 'immediate_view': 'cpsdocument_view', 113 #'product': 'WAeUP', 114 #'factory': 'addStudent', 115 #'immediate_view': 'student_view', 65 116 'global_allow': True, 66 117 'filter_content_types': True, … … 70 121 'cps_proxy_type': 'document', 71 122 'cps_display_as_document_in_listing': True, 72 'schemas': ['student'], 73 'layouts': ['student'], 123 'schemas': ['metadata','common','student'], 124 'layouts': ['waeup_common','student'], 125 'flexible_layouts': (), 126 'layout_clusters': ['metadata:metadata'], 74 127 'cps_workspace_wf': 'waeup_workspace_wf', 75 128 'cps_section_wf': 'waeup_section_wf', … … 77 130 {'id': 'view', 78 131 'name': 'action_view', 79 'action': 'string:${object_url}/student_view', 132 #'action': 'string:${object_url}/student_view', 133 'action': 'string:${object_url}/cpsdocument_view', 80 134 'condition': '', 81 135 'permission': ('View',), … … 109 163 'description': '', 110 164 'content_icon': 'student.gif', 111 'content_meta_type': ' CPS Document',165 'content_meta_type': 'Scratch Card', 112 166 'product': 'CPSDocument', 113 167 'factory': 'addCPSDocument', … … 183 237 184 238 types = {} 185 types['StudentFolder'] = student_folder_type 239 types['University'] = university_type 240 types['StudentsFolder'] = students_folder_type 186 241 types['Student'] = student_type 187 242 types['ScratchCard'] = scratch_card -
waeup_product/trunk/skins/waeup_student/create_student_form.pt
r44 r45 14 14 tal:define="items here/contentValues" 15 15 > 16 <form action="content_create" tal:attributes="action string:${here_url}/c ontent_create"16 <form action="content_create" tal:attributes="action string:${here_url}/create_student" 17 17 method="post" class="group"> 18 18 <dt> -
waeup_product/trunk/skins/waeup_student/student_view_main.pt
r19 r45 13 13 <metal:block fill-slot="main" 14 14 tal:define="student here/getContent; 15 items here/contentValues"> 16 <span tal:condition="python: 0" tal:content="items" /> 17 <table cellspacing="0" cellpadding="0"> 18 <tal:block condition="python: len(items)"> 19 <tr tal:repeat="item items"> 20 <td colspan="1"> 21 <a href="jamb" 22 tal:attributes="href item/absolute_url" 23 tal:content="item/title_or_id"></a> 24 </td> 15 items here/contentValues" 16 > 17 <span tal:condition="python: 0" tal:content="items" /> 18 <tal:block tal:content="structure student/jamb_where_admitted" /> 19 <table cellspacing="0" cellpadding="0"> 20 <tal:block condition="python: len(items)"> 21 <tr tal:repeat="item items"> 22 <td colspan="1"> 23 <a href="jamb" 24 tal:attributes="href item/absolute_url" 25 tal:content="item/title_or_id"></a> 26 </td> 27 </tr> 28 </tal:block> 29 <tr tal:condition="python:not len(items)"> 30 <td> 31 no Items yet ! 32 </td> 25 33 </tr> 26 </tal:block> 27 <tr tal:condition="python:not len(items)"> 28 <td> 29 no Items yet ! 30 </td> 31 </tr> 32 </table> 33 </metal:block> 34 </table> 35 </metal:block> 34 36 </html>
Note: See TracChangeset for help on using the changeset viewer.