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

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

=added register_level

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