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

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

=temporary view all fixed accomodation view

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