Changeset 20 for waeup_product/trunk
- Timestamp:
- 29 Sep 2005, 23:23:25 (19 years ago)
- Location:
- waeup_product/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup_product/trunk/Extensions/install.py
r19 r20 1 1 from Products.CPSInstaller.CPSInstaller import CPSInstaller 2 from Products.CMFCore.CMFCorePermissions import View 2 from Products.CMFCore.CMFCorePermissions import View, ModifyPortalContent 3 3 try: 4 4 from Products.CPSSubscriptions.CPSSubscriptionsPermissions import \ … … 58 58 59 59 ########################################## 60 # SKINS 60 # actions 61 ########################################## 62 actions = ( { 'tool' : 'portal_actions', 63 'id' : 'checkadmission', 64 'name' : 'Check Admission', 65 'action' : 'string:${portal_url}/check_admission_form', 66 'permission': (View, ), 67 'condition' : '', 68 'category' : 'ostudent', 69 'visible' : 1, 70 }, 71 { 'tool' : 'portal_actions', 72 'id' : 'new_student', 73 'name' : 'Add Student', 74 'action' : 'folder_factories', 75 'permission': (View, ), 76 'condition' : 'python: here.portal_type == "StudentFolder"', 77 'category' : 'student', 78 'visible' : 1, 79 }, 80 { 'tool' : 'portal_actions', 81 'id' : 'edit_student', 82 'name' : 'Edit Student', 83 'action' : 'cpsdocument_edit_form', 84 'permission': (ModifyPortalContent, ), 85 'condition' : 'python: here.portal_type == "Student"', 86 'category' : 'student', 87 'visible' : 1, 88 }, 89 { 'tool' : 'portal_actions', 90 'id' : 'edit_student', 91 'name' : 'Add Jamb Data', 92 'action' : 'folder_factories', 93 'permission': (ModifyPortalContent, ), 94 'condition' : 'python:len(object.contentItems()) == 0', 95 'category' : 'student', 96 'visible' : 1, 97 }, 98 ) 99 self.verifyActions(actions) 100 ########################################## 101 # skins 61 102 ########################################## 62 103 self.log("Verifying %(product_name)s skinss" % vars()) … … 67 108 self.resetSkinCache() 68 109 ########################################## 69 # PORTAL TYPES110 # portal types 70 111 ########################################## 71 112 dtypes = portal.getWAeUPTypes() … … 87 128 self.verifyContentTypes(ptypes) 88 129 ########################################## 89 # PORTALSchemas130 # Schemas 90 131 ########################################## 91 132 self.log("Verifying %(product_name)s schemas" % vars()) 92 133 self.verifySchemas(portal.getWAeUPSchemas()) 93 134 ########################################## 94 # PORTAL layouts 135 # widgets 136 ########################################## 137 self.log("Verifying %(product_name)s widgets" % vars()) 138 self.verifyWidgets(portal.getWAeUPWidgets()) 139 ########################################## 140 # layouts 95 141 ########################################## 96 142 self.log("Verifying %(product_name)s layouts" % vars()) 97 143 self.verifyLayouts(portal.getWAeUPLayouts()) 98 144 ########################################## 99 # PORTALVocabularies145 # Vocabularies 100 146 ########################################## 101 147 self.log("Verifying %(product_name)s vocabularies" % vars()) -
waeup_product/trunk/__init__.py
r19 r20 6 6 7 7 import Student 8 #import JambData 8 import Widgets 9 9 10 10 fti = () -
waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py
r19 r20 2 2 # $Id$ 3 3 """Return custom layouts types.""" 4 layouts = {} 4 5 5 6 student_layout = { … … 83 84 }, 84 85 } 85 86 jamb_layout = { 86 layouts['student'] = student_layout 87 88 checkadmission = { 87 89 'widgets': { 88 90 'reg_nr': { 89 'type': 'St ringWidget',91 'type': 'StudentId Widget', 90 92 'data': { 91 93 'title': 'Student ID', … … 108 110 }, 109 111 }, 112 'sc_pin': { 113 'type': 'Scratchcard Pin Widget', 114 'data': { 115 'title': 'SC Pin', 116 'fields': (), 117 'is_required': True, 118 'label': 'Scratchcard Pin', 119 'label_edit': 'Scratchcard Pin', 120 'description': '', 121 'help': 'Please enter a valid Scratch card pin', 122 'is_i18n': False, 123 'readonly_layout_modes': (), 124 'hidden_layout_modes': (), 125 'hidden_readonly_layout_modes': (), 126 'hidden_empty': False, 127 'hidden_if_expr': '', 128 'css_class': '', 129 'widget_mode_expr': '', 130 'display_width': 10, 131 'size_max': 10, 132 }, 133 }, 134 }, 135 'layout': { 136 'style_prefix': 'layout_admission_', 137 'flexible_widgets': (), 138 'ncols': 1, 139 'rows': [ 140 [{'widget_id': 'reg_nr', 'ncols': 1},], 141 [{'widget_id': 'sc_pin', 'ncols': 1},], 142 ] 143 }, 144 } 145 146 layouts['checkadmission'] = checkadmission 147 148 jamb_layout = { 149 'widgets': { 150 'reg_nr': { 151 'type': 'StudentId Widget', 152 'data': { 153 'title': 'Student ID', 154 'fields': ('reg_nr',), 155 'is_required': True, 156 'label': 'Student ID', 157 'label_edit': 'Student ID', 158 'description': '', 159 'help': '', 160 'is_i18n': False, 161 'readonly_layout_modes': (), 162 'hidden_layout_modes': (), 163 'hidden_readonly_layout_modes': (), 164 'hidden_empty': False, 165 'hidden_if_expr': '', 166 'css_class': '', 167 'widget_mode_expr': '', 168 'display_width': 10, 169 'size_max': 0, 170 }, 171 }, 110 172 'name': { 111 173 'type': 'String Widget', … … 117 179 'label_edit': 'Name', 118 180 'description': '', 119 'help': ' ',120 'is_i18n': False, 121 'readonly_layout_modes': (), 122 'hidden_layout_modes': (), 123 'hidden_readonly_layout_modes': (), 124 'hidden_empty': False, 125 'hidden_if_expr': '', 126 'css_class': '', 127 'widget_mode_expr': '', 128 'display_width': 20,181 'help': 'Please enter your full name.', 182 'is_i18n': False, 183 'readonly_layout_modes': (), 184 'hidden_layout_modes': (), 185 'hidden_readonly_layout_modes': (), 186 'hidden_empty': False, 187 'hidden_if_expr': '', 188 'css_class': '', 189 'widget_mode_expr': '', 190 'display_width': 40, 129 191 'size_max': 0, 130 192 }, … … 148 210 'css_class': '', 149 211 'widget_mode_expr': '', 150 'display_width': 20,212 'display_width': 10, 151 213 'size_max': 0, 152 214 }, 153 215 }, 154 216 'sex': { 155 'type': ' StringWidget',217 'type': 'Boolean Widget', 156 218 'data': { 157 219 'title': '', … … 160 222 'label': 'sex', 161 223 'label_edit': 'sex', 224 'label_false': 'male', 225 'label_true': 'female', 162 226 'description': '', 163 227 'help': '', … … 303 367 } 304 368 305 layouts = {}306 layouts['student'] = student_layout307 369 layouts['jamb'] = jamb_layout 308 370 -
waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py
r19 r20 48 48 'default_expr': 'string:', 49 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 'jamb_pin_usage': { 64 'type': 'CPS Int Field', 65 'data': { 66 'default_expr': 'python:0', 67 'is_searchabletext': False, 50 68 'acl_read_permissions': '', 51 69 'acl_read_roles': '', -
waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py
r19 r20 35 35 'action': 'folder_factories', 36 36 'permissions': (AddPortalContent,)}, 37 {'id': 'contents',38 'name': 'action_folder_contents',39 'action': 'folder_contents',40 'permissions': (ModifyPortalContent,)},37 ## {'id': 'contents', 38 ## 'name': 'action_folder_contents', 39 ## 'action': 'folder_contents', 40 ## 'permissions': (ModifyPortalContent,)}, 41 41 {'id': 'edit', 42 42 'name': 'action_edit', -
waeup_product/trunk/skins/waeup_default/getWAeUPWidgets.py
r19 r20 1 1 widgets = { 2 ## 'MyProject Week Date Time Widget': { 3 ## 'type': 'MyProject Week Date Time Widget Type', 4 ## 'data': {}, 5 ## }, 2 'StudentId Widget': { 3 'type': 'StudentId Widget Type', 4 'data': {}, 5 }, 6 'Scratchcard Pin Widget': { 7 'type': 'StudentId Widget Type', 8 'data': {}, 9 }, 6 10 } 7 11
Note: See TracChangeset for help on using the changeset viewer.