source: waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py @ 163

Last change on this file since 163 was 161, checked in by joachim, 19 years ago

=added Photo and birth_certificate in studentPersonal

  • Property svn:keywords set to Id
File size: 41.0 KB
RevLine 
[47]1#-*- mode: python; mode: fold -*-
[19]2##parameters=
3# $Id: getWAeUPLayouts.py 161 2005-11-08 09:07:53Z joachim $
4"""Return custom layouts types."""
5
[47]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
[96]31Heading = { ###(
32         'type': 'Heading Widget',
33         'data': {
34                'fields': ['heading'],
35                'level': 1,
36                'is_i18n': 0,
37                'is_required': 1,
38                'label_edit': 'Headline',
39                'help': 'a short headline',
40                'display_width': 40,
41                'size_max': 200,
42            },
43        }###)
44
45Text = { ###(
46            'type': 'Text Widget',
[45]47            'data': {
[96]48                'fields': ['text'],
49                'is_i18n': 1,
50                'label_edit': 'Text',
51                'label': 'Text',
52                'help': 'a short Description',
53                'css_class': 'description',
54                'width': 72,
55                'height': 5,
56                'render_format': 'text',
57                'hidden_layout_modes': (),
[45]58            },
[96]59        }###)
60
61Title = { ###(
[137]62         'type': 'String Widget',
[96]63         'data': {
[45]64                'fields': ['Title'],
[96]65                'is_i18n': 0,
[45]66                'is_required': 1,
[137]67                'label': 'Title',
68                'label_edit': 'Title',
[45]69                'display_width': 40,
70                'size_max': 200,
71            },
[96]72        }###)
73
74Description = { ###(
[45]75            'type': 'Text Widget',
76            'data': {
77                'fields': ['Description'],
78                'is_i18n': 1,
[96]79                'label_edit': 'Description',
80                'label': 'Description',
81                'css_class': 'description',
[45]82                'width': 72,
83                'height': 5,
84                'render_format': 'text',
[96]85                'hidden_layout_modes': (),
[45]86            },
[96]87        }###)
88
89common_layout = {###(
90    'widgets': {
91        'LanguageSelector': {
92            'type': 'Document Language Select Widget',
93            'data': {
94                'fields': ['Language'],
95            },
[45]96        },
[96]97        'Title': Title,
98        'Description': Description,
[45]99        'LanguageSelectorCreation': {
100            'type': 'Select Widget',
101            'data': {
102                'title': 'Language',
103                'fields': ('Language',),
104                'is_required': 0,
105                'label': 'label_language',
106                'label_edit': 'label_language',
107                'description': '',
108                'help': '',
109                'is_i18n': 0,
110                'readonly_layout_modes': (),
111                'hidden_layout_modes': ('create','edit', 'view'),
112                'hidden_readonly_layout_modes': (),
113                'hidden_empty': 0,
114                'hidden_if_expr': '',
115                'css_class': '',
116                'vocabulary': 'language_voc',
117            },
118        },
119    },
120    'layout': {
[84]121        'style_prefix': 'layout_waeup_',
[45]122        'rows': [
[84]123            #[{'widget_id': 'LanguageSelector'}],
[45]124            [{'widget_id': 'Title'},],
125            [{'widget_id': 'Description'},],
[84]126            #[{'widget_id': 'LanguageSelectorCreation'}],
[45]127            ],
128        },
129    }
130#
[47]131###)
132
133student_layout = { ###(
[19]134    'widgets': {
135        'jamb_is_admitted': {
136            'type': 'Boolean Widget',
137            'data': {
[133]138                'title': 'JAMB Admission',
[49]139                'fields': ('jamb_is_admitted',),
[19]140                'is_required': False,
[133]141                'label': 'JAMB Admission',
142                'label_edit': 'JAMB Admission',
[19]143                'description': '',
144                'help': '',
145                'is_i18n': False,
146                'readonly_layout_modes': (),
147                'hidden_layout_modes': (),
148                'hidden_readonly_layout_modes': (),
149                'hidden_empty': False,
150                'hidden_if_expr': '',
151                'css_class': '',
152                'widget_mode_expr': '',
153                'display_width': 10,
154                'size_max': 0,
155            },
156        },
[49]157##        'jamb_where_admitted': {
158##            'type': 'String Widget',
159##            'data': {
160##                'title': 'Jamb Admission Location',
161##                'fields': ('jamb_where_admitted',),
162##                'is_required': False,
163##                'label': 'University',
164##                'label_edit': 'University',
165##                'description': '',
166##                'help': '',
167##                'is_i18n': False,
168##                'readonly_layout_modes': (),
169##                'hidden_layout_modes': (),
170##                'hidden_readonly_layout_modes': (),
171##                'hidden_empty': False,
172##                'hidden_if_expr': '',
173##                'css_class': '',
174##                'widget_mode_expr': '',
175##                'display_width': 10,
176##                'size_max': 0,
177##            },
178##        },
[47]179        'faculty': {
180            'type': 'String Widget',
[25]181            'data': {
[47]182                'title': 'Faculty',
183                'fields': ('faculty',),
[25]184                'is_required': False,
[47]185                'label': 'Faculty',
186                'label_edit': 'Faculty',
[25]187                'description': '',
[47]188                'help': '',
[25]189                'is_i18n': False,
190                'readonly_layout_modes': (),
191                'hidden_layout_modes': (),
192                'hidden_readonly_layout_modes': (),
193                'hidden_empty': False,
194                'hidden_if_expr': '',
195                'css_class': '',
196                'widget_mode_expr': '',
[47]197                'display_width': 10,
198                'size_max': 0,
[25]199            },
200        },
[47]201    },
202    'layout': {
203        'style_prefix': 'layout_default_',
204        'flexible_widgets': (),
205        'ncols': 1,
206        'rows': [
[139]207            #[{'widget_id': 'jamb_is_admitted', 'ncols': 1},],
[49]208            #[{'widget_id': 'jamb_where_admitted', 'ncols': 1},],
[47]209            #[{'widget_id': 'jamb_pin_usage', 'ncols': 1},],
[139]210            #[{'widget_id': 'faculty', 'ncols': 1},],
[47]211        ]
212    },
213}
214###)
215
[76]216firstname = { ###(
[19]217            'type': 'String Widget',
218            'data': {
[76]219                'title': 'First Name',
[47]220                'fields': ('firstname',),
[19]221                'is_required': False,
[134]222                'label': 'First Name',
223                'label_edit': 'First Name',
[76]224                'description': 'First Name',
225                'help': 'First name',
[19]226                'is_i18n': False,
[76]227                'display_width': 40,
228                },
229            }
230middlename = {
[47]231            'type': 'String Widget',
232            'data': {
233                'title': '',
234                'fields': ('middlename',),
235                'is_required': False,
[134]236                'label': 'Middle Name',
237                'label_edit': 'Middle Name',
[47]238                'description': '',
[76]239                'help': 'middle name',
[47]240                'is_i18n': False,
241                'readonly_layout_modes': (),
242                'hidden_layout_modes': (),
243                'hidden_readonly_layout_modes': (),
[76]244                'hidden_empty': True,
[47]245                'hidden_if_expr': '',
246                'css_class': '',
247                'widget_mode_expr': '',
[76]248                'display_width': 40,
[47]249                'size_max': 0,
[76]250                },
251            }
252
253lastname = {
[47]254            'type': 'String Widget',
255            'data': {
256                'title': '',
257                'fields': ('lastname',),
258                'is_required': False,
[134]259                'label': 'Surname',
260                'label_edit': 'Surname',
[47]261                'description': '',
[76]262                'help': 'Surname',
[47]263                'is_i18n': False,
264                'readonly_layout_modes': (),
265                'hidden_layout_modes': (),
266                'hidden_readonly_layout_modes': (),
267                'hidden_empty': False,
268                'hidden_if_expr': '',
269                'css_class': '',
270                'widget_mode_expr': '',
[76]271                'display_width': 40,
[47]272                'size_max': 0,
273            },
[76]274        }
275sex = {
[47]276            'type': 'Boolean Widget',
277            'data': {
278                'title': '',
279                'fields': ('sex',),
280                'is_required': False,
[134]281                'label': 'Sex',
282                'label_edit': 'Sex',
[47]283                'label_false': 'male',
284                'label_true': 'female',
285                'description': '',
286                'help': '',
287                'is_i18n': False,
288                'readonly_layout_modes': (),
289                'hidden_layout_modes': (),
290                'hidden_readonly_layout_modes': (),
291                'hidden_empty': False,
292                'hidden_if_expr': '',
293                'css_class': '',
294                'widget_mode_expr': '',
[76]295                'display_width': 20,
[47]296                'size_max': 0,
[76]297            }
298        }
[133]299
[76]300###)
301
302student_personal_layout = { ###(
303    'widgets': {
304        'firstname': firstname,
305        'middlename': middlename,
306        'lastname': lastname,
307        'sex': sex,
[47]308        'birthday': {
309            'type': 'Date Widget',
310            'data': {
311                'title': '',
312                'fields': ('birthday',),
313                'is_required': False,
[161]314                'label': 'Day of birth',
[47]315                'label_edit': 'Day of birth',
316                'description': 'Day of birth',
317                'help': '',
318                'is_i18n': False,
319                'readonly_layout_modes': (),
320                'hidden_layout_modes': (),
321                'hidden_readonly_layout_modes': (),
322                'hidden_empty': False,
323                'hidden_if_expr': '',
324                'css_class': '',
325                'widget_mode_expr': '',
326                'display_width': 10,
327                'size_max': 0,
328            },
329        },
[161]330        'photo': {
331            'type': 'Photo Widget',
332            'data': {
333                'title': '',
334                'fields': ('photo',),
335                'is_required': False,
336                'label': 'Personal Picture',
337                'label_edit': 'Personal Picture',
338                'description': '',
339                'help': '',
340                'is_i18n': False,
341                'readonly_layout_modes': (),
342                'hidden_layout_modes': (),
343                'hidden_readonly_layout_modes': (),
344                'hidden_empty': False,
345                'hidden_if_expr': '',
346                'widget_mode_expr': '',
347                'css_class': '',
348                'css_class_expr': '',
349                'javascript_expr': '',
350                'deletable': True,
351                'size_max': 4194304,
352                'display_width': 90,
353                'display_height': 180,
354                'allow_resize': True,
355                'render_position': 'left',
356                'configurable': 'nothing',
357                'keep_original': 1,
358            },
359        },
360        'birth_certificate': {
361            'type': 'Image Widget',
362            'data': {
363                'title': '',
364                'fields': ('birth_certificate',),
365                'is_required': False,
366                'label': 'Birth Certificate',
367                'label_edit': 'Birth Certificate',
368                'description': '',
369                'help': '',
370                'is_i18n': False,
371                'readonly_layout_modes': (),
372                'hidden_layout_modes': (),
373                'hidden_readonly_layout_modes': (),
374                'hidden_empty': False,
375                'hidden_if_expr': '',
376                'widget_mode_expr': '',
377                'css_class': '',
378                'css_class_expr': '',
379                'javascript_expr': '',
380                'deletable': True,
381                'size_max': 4194304,
382                'display_width': 300,
383                'display_height':600,
384                'allow_resize': True,
385            },
386        },
[19]387    },
388    'layout': {
[76]389        'style_prefix': 'layout_personal_',
[19]390        'flexible_widgets': (),
391        'ncols': 1,
392        'rows': [
[47]393            [{'widget_id': 'firstname', 'ncols': 1},],
394            [{'widget_id': 'middlename', 'ncols': 1},],
395            [{'widget_id': 'lastname', 'ncols': 1},],
396            [{'widget_id': 'sex', 'ncols': 1},],
397            [{'widget_id': 'birthday', 'ncols': 1},],
[161]398            [{'widget_id': 'photo', 'ncols': 1},],
399            [{'widget_id': 'birth_certificate', 'ncols': 1},],
[19]400        ]
401    },
402}
[47]403
404###)
405
406scratch_card = { ###(
[20]407    'widgets': {
[27]408        'sc_id': {
409            'type': 'String Widget',
[20]410            'data': {
[27]411                'title': 'SC ID',
412                'fields': ('sc_id',),
[20]413                'is_required': True,
[27]414                'label': 'Scratch card ID',
415                'label_edit': 'Scratch card ID',
[20]416                'description': '',
417                'help': '',
418                'is_i18n': False,
419                'readonly_layout_modes': (),
420                'hidden_layout_modes': (),
421                'hidden_readonly_layout_modes': (),
422                'hidden_empty': False,
423                'hidden_if_expr': '',
424                'css_class': '',
425                'widget_mode_expr': '',
426                'display_width': 10,
427                'size_max': 0,
428            },
429        },
430        'sc_pin': {
431            'type': 'Scratchcard Pin Widget',
432            'data': {
433                'title': 'SC Pin',
[25]434                'fields': ('sc_pin'),
[20]435                'is_required': True,
436                'label': 'Scratchcard Pin',
437                'label_edit': 'Scratchcard Pin',
438                'description': '',
439                'help': 'Please enter a valid Scratch card pin',
440                'is_i18n': False,
441                'readonly_layout_modes': (),
442                'hidden_layout_modes': (),
443                'hidden_readonly_layout_modes': (),
444                'hidden_empty': False,
445                'hidden_if_expr': '',
446                'css_class': '',
447                'widget_mode_expr': '',
448                'display_width': 10,
449                'size_max': 10,
450            },
451        },
452    },
453   'layout': {
[27]454        'style_prefix': 'layout_default_',
[20]455        'flexible_widgets': (),
456        'ncols': 1,
457        'rows': [
458            [{'widget_id': 'reg_nr', 'ncols': 1},],
459            [{'widget_id': 'sc_pin', 'ncols': 1},],
460        ]
461    },
462}
[68]463###)
[20]464
[76]465jamb_id = { ###(
[68]466           'type': 'StudentId Widget',
467           'data': {
468                'title': 'Registration Number',
469                'fields': ('reg_nr'),
470                'is_required': True,
471                'label': 'Registration Number',
472                'label_edit': 'Registration Number',
473                'description': '',
474                'help': 'This is the combination of 8 digits and 2 letters you are assigned when you purchase an examination form.',
475                'is_i18n': False,
476                'readonly_layout_modes': (),
477                'hidden_layout_modes': (),
478                'hidden_readonly_layout_modes': (),
479                'hidden_empty': False,
480                'hidden_if_expr': '',
481                'css_class': '',
482                'widget_mode_expr': '',
483                'display_width': 10,
484                'size_max': 10,
485                 },
486           }
[20]487
[76]488###)
489
[47]490admission = { ###(
[19]491    'widgets': {
[47]492        'sc_id': {
493            'type': 'String Widget',
494            'data': {
495                'title': 'SC ID',
496                'fields': ('admission_sc_id',),
497                'is_required': False,
498                'label': 'Card Serial Number ',
499                'label_edit': 'Card Serial Number',
500                'description': 'Card Serial Number ',
501                'help': 'This can be found on the bottom right of the reverse side of your Scratch Card',
502                'is_i18n': False,
503                'readonly_layout_modes': (),
504                'hidden_layout_modes': (),
505                'hidden_readonly_layout_modes': (),
506                'hidden_empty': False,
507                'hidden_if_expr': 'python:1',
508                'css_class': '',
509                'widget_mode_expr': '',
510                'display_width': 10,
511                'size_max': 0,
512            },
513        },
514        'sc_pin': {
[57]515            'type': 'Scratchcard Pin Widget',
[47]516            'data': {
517                'title': 'SC Pin',
518                'fields': ('admission_sc_pin'),
519                'is_required': True,
520                'label': 'PIN',
521                'label_edit': 'PIN',
522                'description': '',
523                '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',
524                'is_i18n': False,
525                'readonly_layout_modes': (),
526                'hidden_layout_modes': (),
527                'hidden_readonly_layout_modes': (),
528                'hidden_empty': False,
529                'hidden_if_expr': '',
530                'css_class': '',
531                'widget_mode_expr': '',
532                'display_width': 10,
533                'size_max': 10,
534            },
535        },
[68]536        'jamb_id' : jamb_id,
537    },
538   'layout': {
539        'style_prefix': 'layout_admission_',
540        'flexible_widgets': (),
541        'ncols': 1,
542        'rows': [
543            [{'widget_id': 'sc_id', 'ncols': 1},],
544            [{'widget_id': 'sc_pin', 'ncols': 1},],
545            [{'widget_id': 'jamb_id', 'ncols': 1},],
546        ]
547    },
548}
549###)
550
551admission_status = { ###(
[133]552    'widgets': {
[68]553       'quick_search': {
554            'type': 'String Widget',
[47]555            'data': {
[68]556                'title': 'A search string',
557                'fields': ('admission_sc_id',),
558                'is_required': False,
559                'label': 'Quick Search',
560                'label_edit': 'Quick Search',
561                'description': 'Search',
562                'help': '',
[47]563                'is_i18n': False,
564                'readonly_layout_modes': (),
565                'hidden_layout_modes': (),
566                'hidden_readonly_layout_modes': (),
567                'hidden_empty': False,
[68]568                'hidden_if_expr': 'python:0',
[47]569                'css_class': '',
570                'widget_mode_expr': '',
[68]571                'display_width': 20,
572                'size_max': 0,
[47]573            },
574        },
[68]575
[47]576    },
577   'layout': {
[68]578        'style_prefix': 'layout_admission_status_',
[47]579        'flexible_widgets': (),
[68]580        'ncols': 2,
[47]581        'rows': [
[68]582            [{'widget_id': 'quick_search', 'ncols': 2},],
[47]583        ]
584    },
585}
586###)
587
[57]588jamb_widgets = { ###(
[49]589        'reg_nr': {
590            'type': 'StudentId Widget',
591            'data': {
[76]592                'title': 'registration nr',
[49]593                'fields': ('reg_nr',),
594                'is_required': True,
[133]595                'label': 'Registration Nr',
596                'label_edit': 'Registration Nr',
597                'description': 'The student id from JAMB',
598                'help': 'The student id from JAMB',
[49]599                'is_i18n': False,
[57]600                'display_width': 10,
601                'size_max': 10,
602            },
603        },
[76]604        'firstname': firstname,
605        'middlename': middlename,
606        'lastname': lastname,
[49]607        'age': {
608            'type': 'Int Widget',
609            'data': {
610                'title': '',
611                'fields': ('age',),
612                'is_required': False,
613                'label': 'Age',
614                'label_edit': 'Age',
615                'description': '',
616                'help': '',
617                'is_i18n': False,
618                'readonly_layout_modes': (),
619                'hidden_layout_modes': (),
620                'hidden_readonly_layout_modes': (),
621                'hidden_empty': False,
622                'hidden_if_expr': '',
623                'css_class': '',
624                'widget_mode_expr': '',
625                'display_width': 2,
626                'size_max': 2,
627            },
628        },
[76]629        'sex': sex,
[49]630        'state': {
[57]631            'type': 'Select Widget',
[49]632            'data': {
633                'title': '',
[57]634                'fields': ('state',),
[49]635                'is_required': False,
[133]636                'label': 'State of Origin',
637                'label_edit': 'State of Origin',
[49]638                'description': '',
639                'help': '',
640                'is_i18n': False,
[57]641                'vocabulary': 'nigerian_states',
[49]642            },
643        },
644        'exam_results': {
645            'type': 'String Widget',
646            'data': {
647                'title': '',
648                'fields': ('exam_results',),
649                'is_required': False,
[133]650                'label': 'JAMB Results',
651                'label_edit': 'JAMB Results',
[49]652                'description': '',
653                'help': '',
654                'is_i18n': False,
655                'readonly_layout_modes': (),
656                'hidden_layout_modes': (),
657                'hidden_readonly_layout_modes': (),
658                'hidden_empty': False,
659                'hidden_if_expr': '',
660                'css_class': '',
661                'widget_mode_expr': '',
662                'display_width': 20,
663                'size_max': 0,
664            },
665        },
666        'aggregate': {
[57]667            'type': 'Int Widget',
[49]668            'data': {
669                'title': 'Agregate',
670                'fields': ('aggregate',),
671                'is_required': False,
[57]672                'label': 'Score',
673                'label_edit': 'Score',
[49]674                'description': '',
675                'help': '',
676                'is_i18n': False,
677            },
678        },
[57]679        'faculty': {
680            'type': 'Select Widget',
[49]681            'data': {
[57]682                'title': 'Faculty',
683                'fields': ('faculty',),
[106]684                'is_required': True,
[133]685                'label': 'Faculty',
686                'label_edit': 'Faculty',
[49]687                'description': '',
[57]688                'help': '',
[49]689                'is_i18n': False,
[57]690                'vocabulary': 'faculties',
[49]691            },
692        },
[106]693        'course': {
694            'type': 'String Widget',
695            'data': {
696                'title': 'Study Course',
697                'fields': ('course',),
698                'is_required': True,
699                'label': 'Study Course',
700                'label_edit': 'Study Course',
701                'description': '',
702                'help': 'The course to study',
703                'is_i18n': False,
704            },
705        },
[57]706        'listing_date': {
707            'type': 'Date Widget',
[49]708            'data': {
[57]709                'title': 'Listing Date',
710                'fields': ('listing_date',),
[49]711                'is_required': False,
[57]712                'label': 'Listing Date',
713                'label_edit': 'Listing Date',
714                'description': '',
715                'help': '',
[49]716                'is_i18n': False,
717                'readonly_layout_modes': (),
718                'hidden_layout_modes': (),
719                'hidden_readonly_layout_modes': (),
720                'hidden_empty': False,
721                'hidden_if_expr': '',
722                'css_class': '',
723                'widget_mode_expr': '',
[57]724                'display_width': 3,
[49]725                'size_max': 0,
726            },
727        },
[57]728##        '2nd_choice': { ###(
729##            'type': 'String Widget',
730##            'data': {
731##                'title': 'Second choice',
732##                'fields': ('2nd_choice',),
733##                'is_required': False,
734##                'label': 'Second choice',
735##                'label_edit': 'Second choice',
736##                'description': '',
737##                'help': 'second_choice',
738##                'is_i18n': False,
739##                'readonly_layout_modes': (),
740##                'hidden_layout_modes': (),
741##                'hidden_readonly_layout_modes': (),
742##                'hidden_empty': False,
743##                'hidden_if_expr': '',
744##                'css_class': '',
745##                'widget_mode_expr': '',
746##                'display_width': 20,
747##                'size_max': 0,
748##            },
749##        },
[133]750##
[57]751##        '3rd_choice': {
752##            'type': 'String Widget',
753##            'data': {
754##                'title': 'Third_choice',
755##                'fields': ('3rd_choice',),
756##                'is_required': False,
757##                'label': 'Third choice',
758##                'label_edit': 'Third choice',
759##                'description': 'third_choice',
760##                'help': 'third_choice',
761##                'is_i18n': False,
762##                'readonly_layout_modes': (),
763##                'hidden_layout_modes': (),
764##                'hidden_readonly_layout_modes': (),
765##                'hidden_empty': False,
766##                'hidden_if_expr': '',
767##                'css_class': '',
768##                'widget_mode_expr': '',
769##                'display_width': 20,
770##                'size_max': 0,
771##            },
772##        },
773###)
774
[49]775        'sc_id': {
776            'type': 'String Widget',
777            'data': {
778                'title': '',
779                'fields': ('admission_sc_id',),
780                'is_required': False,
781                'label': 'Scratch card ID used',
782                'label_edit': 'Scratch card ID used',
783                'description': '',
784                'help': '',
785                'is_i18n': False,
786                'readonly_layout_modes': (),
787                'hidden_layout_modes': (),
788                'hidden_readonly_layout_modes': (),
789                'hidden_empty': False,
790                'hidden_if_expr': '',
791                'css_class': '',
792                'widget_mode_expr': '',
793                'display_width': 20,
794                'size_max': 0,
795            },
796        },
797        'sc_pin': {
798            'type': 'String Widget',
799            'data': {
800                'title': '',
801                'fields': ('admission_sc_pin',),
802                'is_required': False,
[151]803                'label': 'Scratch Card PIN',
804                'label_edit': 'Scratch Card PIN',
[49]805                'description': '',
806                'help': '',
807                'is_i18n': False,
808                'readonly_layout_modes': (),
809                'hidden_layout_modes': (),
810                'hidden_readonly_layout_modes': (),
811                'hidden_empty': False,
812                'hidden_if_expr': '',
813                'css_class': '',
814                'widget_mode_expr': '',
815                'display_width': 20,
816                'size_max': 0,
817            },
818        },
[57]819    }
820###)
821
822jamb_layoutcreate = { ###(
823    'widgets': jamb_widgets,
[49]824    'layout': {
825        'style_prefix': 'layout_jambcreate_',
826        'flexible_widgets': (),
827        'ncols': 1,
828        'rows': [
829            [{'widget_id': 'reg_nr', 'ncols': 1},],
[57]830            [{'widget_id': 'firstname', 'ncols': 1},],
831            [{'widget_id': 'middlename', 'ncols': 1},],
832            [{'widget_id': 'lastname', 'ncols': 1},],
[49]833            #[{'widget_id': 'sc_id', 'ncols': 1},],
834            #[{'widget_id': 'sc_pin', 'ncols': 1},],
835            [{'widget_id': 'age', 'ncols': 1},],
836            [{'widget_id': 'sex', 'ncols': 1},],
837            [{'widget_id': 'state', 'ncols': 1},],
[57]838            #[{'widget_id': 'exam_results', 'ncols': 1},],
[49]839            [{'widget_id': 'aggregate', 'ncols': 1},],
[57]840            [{'widget_id': 'faculty', 'ncols': 1},],
[106]841            [{'widget_id': 'course', 'ncols': 1},],
[57]842            [{'widget_id': 'listing_date', 'ncols': 1},],
843            #[{'widget_id': '2nd_choice', 'ncols': 1},],
844            #[{'widget_id': '3rd_choice', 'ncols': 1},],
[49]845        ]
846    },
847}
848###)
849
[47]850jamb_layout = { ###(
[57]851    'widgets': jamb_widgets,
[19]852    'layout': {
[76]853        'style_prefix': 'layout_waeup_',
[19]854        'flexible_widgets': (),
855        'ncols': 1,
856        'rows': [
857            [{'widget_id': 'reg_nr', 'ncols': 1},],
[57]858            [{'widget_id': 'firstname', 'ncols': 1},],
859            [{'widget_id': 'middlename', 'ncols': 1},],
860            [{'widget_id': 'lastname', 'ncols': 1},],
861            #[{'widget_id': 'sc_id', 'ncols': 1},],
[76]862            [{'widget_id': 'sc_pin', 'ncols': 1},],
[19]863            [{'widget_id': 'age', 'ncols': 1},],
864            [{'widget_id': 'sex', 'ncols': 1},],
865            [{'widget_id': 'state', 'ncols': 1},],
[57]866            #[{'widget_id': 'exam_results', 'ncols': 1},],
[19]867            [{'widget_id': 'aggregate', 'ncols': 1},],
[57]868            [{'widget_id': 'faculty', 'ncols': 1},],
[106]869            [{'widget_id': 'course', 'ncols': 1},],
[57]870            [{'widget_id': 'listing_date', 'ncols': 1},],
871            #[{'widget_id': '2nd_choice', 'ncols': 1},],
872            #[{'widget_id': '3rd_choice', 'ncols': 1},],
[19]873        ]
874    },
875}
[47]876###)
[19]877
[68]878course = { ###(
879    'widgets': {
[103]880        'heading': {
[144]881         'type': 'String Widget',
[103]882         'data': {
883                'fields': ['heading'],
884                'is_i18n': 0,
885                'is_required': 1,
[139]886                'label': 'Title',
[103]887                'label_edit': 'Title',
888                'help': 'Course Title',
889                'display_width': 40,
890                'size_max': 40,
891            },
892        },
[96]893        'text': Text,
[68]894        'level': {
[103]895            'type': 'Select Widget',
[68]896            'data': {
897                'title': '',
898                'fields': ('level',),
899                'is_required': True,
900                'label': 'Level',
901                'label_edit': 'Level',
902                'description': '',
903                'help': '',
904                'is_i18n': False,
[103]905                'vocabulary': 'courselevel',
[68]906            },
907        },
908        'code': {
909            'type': 'String Widget',
910            'data': {
911                'title': 'Code',
912                'fields': ('code',),
913                'is_required': True,
914                'label': 'Code',
915                'label_edit': 'Code',
916                'description': '',
917                'help': '',
918                'is_i18n': False,
919                'display_width': 10,
920                'size_max': 0,
921            },
922        },
923        'semester': {
924            'type': 'Boolean Widget',
925            'data': {
926                'title': '',
927                'fields': ('semester',),
928                'is_required': True,
929                'label': 'Semester',
930                'label_edit': 'Semester',
931                'label_false': 'Second Semester',
932                'label_true': 'First Semester',
933                'description': '',
934                'help': '',
935                'is_i18n': False,
936                'display_width': 10,
937                'size_max': 0,
938            },
939        },
940        'credit': {
941            'type': 'Int Widget',
942            'data': {
943                'title': '',
944                'fields': ('credit',),
945                'is_required': True,
946                'label': 'Credit',
947                'label_edit': 'Credit',
948                'description': '',
949                'help': '',
950                'is_i18n': False,
[78]951                'display_width': 2,
[68]952                'size_max': 0,
953            },
954        },
955        'core_elective': {
956            'type': 'Boolean Widget',
957            'data': {
958                'title': '',
959                'fields': ('core_elective',),
960                'is_required': True,
961                'label': 'Core or elective',
962                'label_edit': 'Core or elective',
963                'label_true': 'Core Course',
964                'label_false': 'Elective Course',
965                'description': '',
966                'help': '',
967                'is_i18n': False,
968                'display_width': 10,
969                'size_max': 0,
970            },
971        },
972    },
973   'layout': {
[84]974        'style_prefix': 'layout_waeup_',
[68]975        'flexible_widgets': (),
976        'ncols': 1,
977        'rows': [
[144]978            [{'widget_id': 'heading', 'ncols': 1},],
979            #[{'widget_id': 'Title', 'ncols': 1},],
[96]980            [{'widget_id': 'text', 'ncols': 1},],
[68]981            [{'widget_id': 'level', 'ncols': 1},],
982            [{'widget_id': 'code', 'ncols': 1},],
983            [{'widget_id': 'semester', 'ncols': 1},],
984            [{'widget_id': 'credit', 'ncols': 1},],
985            [{'widget_id': 'core_elective', 'ncols': 1},],
986        ]
987    },
988}
989###)
990
[139]991course_results = { ###(
992    'widgets': {
993        'points': {
994            'type': 'Int Widget',
995            'data': {
996                'title': '',
997                'fields': ('points',),
998                'is_required': False,
999                'label': 'Points',
1000                'label_edit': 'Points',
1001                'description': '',
1002                'help': '',
1003                'is_i18n': False,
1004                'readonly_layout_modes': (),
1005                'hidden_layout_modes': (),
1006                'hidden_readonly_layout_modes': (),
1007                'hidden_empty': False,
1008                'hidden_if_expr': '',
1009                'css_class': '',
1010                'widget_mode_expr': '',
1011                'display_width': 3,
1012                'size_max': 3,
1013            },
1014        },
1015        'grade': {
1016            'type': 'String Widget',
1017            'data': {
1018                'title': '',
1019                'fields': ('grade'),
1020                'is_required': False,
1021                'label': 'Grade',
1022                'label_edit': 'Grade',
1023                'description': '',
1024                'help': '',
1025                'is_i18n': False,
1026                'readonly_layout_modes': (),
1027                'hidden_layout_modes': (),
1028                'hidden_readonly_layout_modes': (),
1029                'hidden_empty': False,
1030                'hidden_if_expr': '',
1031                'css_class': '',
1032                'widget_mode_expr': '',
1033                'display_width': 2,
1034                'size_max': 1,
1035            },
1036        },
1037    },
1038   'layout': {
1039        'style_prefix': 'layout_default_',
1040        'flexible_widgets': (),
1041        'ncols': 1,
1042        'rows': [
1043            [{'widget_id': 'points', 'ncols': 1},],
1044            [{'widget_id': 'grade', 'ncols': 1},],
1045        ]
1046    },
1047}
1048###)
1049
[141]1050study_level = { ###(
1051    'widgets': {
[142]1052        'Title': {
[141]1053            'type': 'Select Widget',
1054            'data': {
1055                'title': '',
1056                'fields': ('Title',),
[142]1057                'is_required': False,
[141]1058                'label': 'Study Level',
1059                'label_edit': 'Study Level',
1060                'description': '',
1061                'help': '',
1062                'vocabulary': 'courselevel',
1063                'is_i18n': False,
1064                'readonly_layout_modes': (),
1065                'hidden_layout_modes': (),
1066                'hidden_readonly_layout_modes': (),
1067                'hidden_empty': False,
1068                'hidden_if_expr': '',
1069                'css_class': '',
1070                'widget_mode_expr': '',
1071                'display_width': 20,
1072                'size_max': 0,
1073            },
1074        },
1075    },
1076   'layout': {
1077        'style_prefix': 'layout_waeup_',
1078        'flexible_widgets': (),
1079        'ncols': 1,
1080        'rows': [
[142]1081            [{'widget_id': 'Title', 'ncols': 1},],
[152]1082            #[{'widget_id': 'Year', 'ncols': 1},],
[141]1083        ]
1084    },
1085}
1086###)
1087
[103]1088accommodation = { ###(
[101]1089    'widgets': {
[103]1090        'heading': {
[144]1091         'type': 'String Widget',
[103]1092         'data': {
1093                'fields': ['heading'],
[139]1094                'level': 2,
[103]1095                'is_i18n': 0,
1096                'is_required': 1,
[139]1097                'label': 'Hall Name',
[133]1098                'label_edit': 'Hall Name',
[103]1099                'help': '',
1100                'display_width': 40,
1101                'size_max': 40,
1102            },
1103        },
[101]1104        'text': Text,
[103]1105        'which_sex': {
1106            'type': 'Boolean Widget',
[101]1107            'data': {
1108                'title': '',
[103]1109                'fields': ('which_sex',),
1110                'is_required': False,
[133]1111                'label': 'Sex',
1112                'label_edit': 'Sex',
[103]1113                'label_false': 'male',
1114                'label_true': 'female',
[101]1115                'description': '',
1116                'help': '',
1117                'is_i18n': False,
1118            },
1119        },
[103]1120        'nr_of_blocks': {
1121            'type': 'Select Widget',
[101]1122            'data': {
[103]1123                'title': '',
1124                'fields': ('nr_of_blocks',),
[101]1125                'is_required': True,
[103]1126                'label': 'Nr of Blocks',
1127                'label_edit': 'Nr of Blocks',
[101]1128                'description': '',
[133]1129                'help': 'Number of blocks',
[101]1130                'is_i18n': False,
[103]1131                'vocabulary': 'range10',
[101]1132            },
1133        },
[103]1134        'nr_of_floors': {
1135            'type': 'Select Widget',
[101]1136            'data': {
1137                'title': '',
[103]1138                'fields': ('nr_of_floors',),
[101]1139                'is_required': True,
[103]1140                'label': 'Nr of Floors ',
1141                'label_edit': 'Nr of Floors',
[101]1142                'description': '',
[133]1143                'help': 'Number of floors per block',
[101]1144                'is_i18n': False,
[103]1145                'vocabulary': 'range5',
[101]1146            },
1147        },
[103]1148        'rooms_per_floor': {
1149            'type': 'Select Widget',
[101]1150            'data': {
1151                'title': '',
[103]1152                'fields': ('rooms_per_floor',),
[101]1153                'is_required': True,
[103]1154                'label': 'Rooms per Floor',
1155                'label_edit': 'Rooms per Floor',
[101]1156                'description': '',
[133]1157                'help': 'Number of rooms per floor',
[101]1158                'is_i18n': False,
[103]1159                'vocabulary': 'range50',
[101]1160            },
1161        },
[103]1162        'beds_per_room': {
1163            'type': 'Select Widget',
[101]1164            'data': {
1165                'title': '',
[103]1166                'fields': ('beds_per_room',),
[101]1167                'is_required': True,
[103]1168                'label': 'Beds per Room',
1169                'label_edit': 'Beds per Room',
[101]1170                'description': '',
[133]1171                'help': 'Number of beds per room',
[101]1172                'is_i18n': False,
[103]1173                'vocabulary': 'range10',
[101]1174            },
1175        },
[107]1176        'beds_assigned': {
1177            'type': 'Int Widget',
1178            'data': {
1179                'title': '',
1180                'fields': ('beds_assigned',),
1181                'is_required': True,
1182                'label': 'Assigned Beds',
[133]1183                'label_edit': 'Assigned Beds',
[107]1184                'description': '',
[133]1185                'help': 'Number of beds already assined to students',
[107]1186                'is_i18n': False,
1187            },
1188        },
[101]1189    },
1190   'layout': {
1191        'style_prefix': 'layout_waeup_',
1192        'flexible_widgets': (),
1193        'ncols': 1,
1194        'rows': [
[144]1195            [{'widget_id': 'heading', 'ncols': 1},],
1196            #[{'widget_id': 'Title', 'ncols': 1},],
[101]1197            [{'widget_id': 'text', 'ncols': 1},],
[103]1198            [{'widget_id': 'which_sex', 'ncols': 1},],
1199            [{'widget_id': 'nr_of_blocks', 'ncols': 1},],
1200            [{'widget_id': 'nr_of_floors', 'ncols': 1},],
1201            [{'widget_id': 'rooms_per_floor', 'ncols': 1},],
1202            [{'widget_id': 'beds_per_room', 'ncols': 1},],
[107]1203            [{'widget_id': 'beds_assigned', 'ncols': 1},],
[101]1204        ]
1205    },
1206}
1207###)
1208
[139]1209accobook = { ###(
1210    'widgets': {
1211        'sc_id': {
1212            'type': 'String Widget',
1213            'data': {
1214                'title': 'SC ID',
1215                'fields': ('accommodation_sc_id',),
1216                'is_required': False,
1217                'label': 'Card Serial Number ',
1218                'label_edit': 'Card Serial Number',
1219                'description': 'Card Serial Number ',
1220                'help': 'This can be found on the bottom right of the reverse side of your Scratch Card',
1221                'is_i18n': False,
1222                'readonly_layout_modes': (),
1223                'hidden_layout_modes': (),
1224                'hidden_readonly_layout_modes': (),
1225                'hidden_empty': False,
1226                'hidden_if_expr': 'python:1',
1227                'css_class': '',
1228                'widget_mode_expr': '',
1229                'display_width': 10,
1230                'size_max': 0,
1231            },
1232        },
1233        'sc_pin': {
1234            'type': 'Scratchcard Pin Widget',
1235            'data': {
1236                'title': 'SC Pin',
1237                'fields': ('accommodation_sc_pin'),
1238                'is_required': True,
1239                'label': 'enter an Accommodation PIN',
1240                'label_edit': 'enter an Accommodation PIN',
1241                'description': '',
1242                'help': 'Please enter a PIN valid for Accomodation booking',
1243                'is_i18n': False,
1244                'readonly_layout_modes': (),
1245                'hidden_layout_modes': (),
1246                'hidden_readonly_layout_modes': (),
1247                'hidden_empty': False,
1248                'hidden_if_expr': '',
1249                'css_class': '',
1250                'widget_mode_expr': '',
1251                'display_width': 10,
1252                'size_max': 10,
1253            },
1254        },
1255    },
1256   'layout': {
1257        'style_prefix': 'layout_accobook_',
1258        'flexible_widgets': (),
1259        'ncols': 1,
1260        'rows': [
1261            #[{'widget_id': 'sc_id', 'ncols': 1},],
1262            [{'widget_id': 'sc_pin', 'ncols': 1},],
1263        ]
1264    },
1265}
1266###)
1267
[47]1268layouts = {}
[96]1269layouts['university'] = common_layout
[47]1270layouts['waeup_common'] = common_layout
1271layouts['student'] = student_layout
[141]1272layouts['study_level'] = study_level
[47]1273layouts['student_personal'] = student_personal_layout
[133]1274layouts['accommodation'] = accommodation
1275layouts['accobook'] = accobook
[47]1276layouts['scratch_card'] = scratch_card
1277layouts['admission'] = admission
[49]1278layouts['jambcreate'] = jamb_layoutcreate
[19]1279layouts['jamb'] = jamb_layout
[96]1280layouts['faculty'] = common_layout
1281layouts['department'] = common_layout
[68]1282layouts['course'] = course
1283layouts['admission_status'] = admission_status
[19]1284return layouts
Note: See TracBrowser for help on using the repository browser.