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

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

=fixes for Henrik

  • Property svn:keywords set to Id
File size: 36.3 KB
Line 
1#-*- mode: python; mode: fold -*-
2##parameters=
3# $Id: getWAeUPLayouts.py 106 2005-10-27 19:30:56Z 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': 'Heading Widget',
63         'data': {
64                'fields': ['Title'],
65                'level': 1,
66                'is_i18n': 0,
67                'is_required': 1,
68                'label_edit': 'Name',
69                'display_width': 40,
70                'size_max': 200,
71            },
72        }###)
73
74Description = { ###(
75            'type': 'Text Widget',
76            'data': {
77                'fields': ['Description'],
78                'is_i18n': 1,
79                'label_edit': 'Description',
80                'label': 'Description',
81                'css_class': 'description',
82                'width': 72,
83                'height': 5,
84                'render_format': 'text',
85                'hidden_layout_modes': (),
86            },
87        }###)
88
89common_layout = {###(
90    'widgets': {
91        'LanguageSelector': {
92            'type': 'Document Language Select Widget',
93            'data': {
94                'fields': ['Language'],
95            },
96        },
97        'Title': Title,
98        'Description': Description,
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': {
121        'style_prefix': 'layout_waeup_',
122        'rows': [
123            #[{'widget_id': 'LanguageSelector'}],
124            [{'widget_id': 'Title'},],
125            [{'widget_id': 'Description'},],
126            #[{'widget_id': 'LanguageSelectorCreation'}],
127            ],
128        },
129    }
130#
131###)
132
133student_layout = { ###(
134    'widgets': {
135        'jamb_is_admitted': {
136            'type': 'Boolean Widget',
137            'data': {
138                'title': 'Jamb Admission',
139                'fields': ('jamb_is_admitted',),
140                'is_required': False,
141                'label': 'Jamb Admission',
142                'label_edit': 'Jamb Admission',
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        },
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##        },
179##        'jamb_pin_usage': {
180##            'type': 'Int Widget',
181##            'data': {
182##                'title': 'Jamb Pin usage',
183##                'fields': ('jamb_pin_usage',),
184##                'is_required': False,
185##                'label': 'Nr of Cardusage',
186##                'label_edit': 'Nr of Cardusage',
187##                'description': '',
188##                'help': 'How many times has the scratchcard been used',
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': '',
197##                'display_width': 2,
198##                'size_max': 2,
199##            },
200##        },
201        'faculty': {
202            'type': 'String Widget',
203            'data': {
204                'title': 'Faculty',
205                'fields': ('faculty',),
206                'is_required': False,
207                'label': 'Faculty',
208                'label_edit': 'Faculty',
209                'description': '',
210                'help': '',
211                'is_i18n': False,
212                'readonly_layout_modes': (),
213                'hidden_layout_modes': (),
214                'hidden_readonly_layout_modes': (),
215                'hidden_empty': False,
216                'hidden_if_expr': '',
217                'css_class': '',
218                'widget_mode_expr': '',
219                'display_width': 10,
220                'size_max': 0,
221            },
222        },
223    },
224    'layout': {
225        'style_prefix': 'layout_default_',
226        'flexible_widgets': (),
227        'ncols': 1,
228        'rows': [
229            [{'widget_id': 'jamb_is_admitted', 'ncols': 1},],
230            #[{'widget_id': 'jamb_where_admitted', 'ncols': 1},],
231            #[{'widget_id': 'jamb_pin_usage', 'ncols': 1},],
232            [{'widget_id': 'faculty', 'ncols': 1},],
233        ]
234    },
235}
236###)
237
238firstname = { ###(
239            'type': 'String Widget',
240            'data': {
241                'title': 'First Name',
242                'fields': ('firstname',),
243                'is_required': False,
244                'label': 'first name',
245                'label_edit': 'first name',
246                'description': 'First Name',
247                'help': 'First name',
248                'is_i18n': False,
249                'display_width': 40,
250                },
251            }
252middlename = {
253            'type': 'String Widget',
254            'data': {
255                'title': '',
256                'fields': ('middlename',),
257                'is_required': False,
258                'label': 'middle name',
259                'label_edit': 'middle name',
260                'description': '',
261                'help': 'middle name',
262                'is_i18n': False,
263                'readonly_layout_modes': (),
264                'hidden_layout_modes': (),
265                'hidden_readonly_layout_modes': (),
266                'hidden_empty': True,
267                'hidden_if_expr': '',
268                'css_class': '',
269                'widget_mode_expr': '',
270                'display_width': 40,
271                'size_max': 0,
272                },
273            }
274
275lastname = {
276            'type': 'String Widget',
277            'data': {
278                'title': '',
279                'fields': ('lastname',),
280                'is_required': False,
281                'label': 'surname',
282                'label_edit': 'surname',
283                'description': '',
284                'help': 'Surname',
285                'is_i18n': False,
286                'readonly_layout_modes': (),
287                'hidden_layout_modes': (),
288                'hidden_readonly_layout_modes': (),
289                'hidden_empty': False,
290                'hidden_if_expr': '',
291                'css_class': '',
292                'widget_mode_expr': '',
293                'display_width': 40,
294                'size_max': 0,
295            },
296        }
297sex = {
298            'type': 'Boolean Widget',
299            'data': {
300                'title': '',
301                'fields': ('sex',),
302                'is_required': False,
303                'label': 'sex',
304                'label_edit': 'sex',
305                'label_false': 'male',
306                'label_true': 'female',
307                'description': '',
308                'help': '',
309                'is_i18n': False,
310                'readonly_layout_modes': (),
311                'hidden_layout_modes': (),
312                'hidden_readonly_layout_modes': (),
313                'hidden_empty': False,
314                'hidden_if_expr': '',
315                'css_class': '',
316                'widget_mode_expr': '',
317                'display_width': 20,
318                'size_max': 0,
319            }
320        }
321           
322###)
323
324student_personal_layout = { ###(
325    'widgets': {
326        'firstname': firstname,
327        'middlename': middlename,
328        'lastname': lastname,
329        'sex': sex,
330        'birthday': {
331            'type': 'Date Widget',
332            'data': {
333                'title': '',
334                'fields': ('birthday',),
335                'is_required': False,
336                'label': '',
337                'label_edit': 'Day of birth',
338                'description': 'Day of birth',
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                'css_class': '',
347                'widget_mode_expr': '',
348                'display_width': 10,
349                'size_max': 0,
350            },
351        },
352    },
353    'layout': {
354        'style_prefix': 'layout_personal_',
355        'flexible_widgets': (),
356        'ncols': 1,
357        'rows': [
358            [{'widget_id': 'firstname', 'ncols': 1},],
359            [{'widget_id': 'middlename', 'ncols': 1},],
360            [{'widget_id': 'lastname', 'ncols': 1},],
361            [{'widget_id': 'sex', 'ncols': 1},],
362            [{'widget_id': 'birthday', 'ncols': 1},],
363        ]
364    },
365}
366
367###)
368
369scratch_card = { ###(
370    'widgets': {
371        'sc_id': {
372            'type': 'String Widget',
373            'data': {
374                'title': 'SC ID',
375                'fields': ('sc_id',),
376                'is_required': True,
377                'label': 'Scratch card ID',
378                'label_edit': 'Scratch card ID',
379                'description': '',
380                'help': '',
381                'is_i18n': False,
382                'readonly_layout_modes': (),
383                'hidden_layout_modes': (),
384                'hidden_readonly_layout_modes': (),
385                'hidden_empty': False,
386                'hidden_if_expr': '',
387                'css_class': '',
388                'widget_mode_expr': '',
389                'display_width': 10,
390                'size_max': 0,
391            },
392        },
393        'sc_pin': {
394            'type': 'Scratchcard Pin Widget',
395            'data': {
396                'title': 'SC Pin',
397                'fields': ('sc_pin'),
398                'is_required': True,
399                'label': 'Scratchcard Pin',
400                'label_edit': 'Scratchcard Pin',
401                'description': '',
402                'help': 'Please enter a valid Scratch card pin',
403                'is_i18n': False,
404                'readonly_layout_modes': (),
405                'hidden_layout_modes': (),
406                'hidden_readonly_layout_modes': (),
407                'hidden_empty': False,
408                'hidden_if_expr': '',
409                'css_class': '',
410                'widget_mode_expr': '',
411                'display_width': 10,
412                'size_max': 10,
413            },
414        },
415    },
416   'layout': {
417        'style_prefix': 'layout_default_',
418        'flexible_widgets': (),
419        'ncols': 1,
420        'rows': [
421            [{'widget_id': 'reg_nr', 'ncols': 1},],
422            [{'widget_id': 'sc_pin', 'ncols': 1},],
423        ]
424    },
425}
426###)
427
428jamb_id = { ###(
429           'type': 'StudentId Widget',
430           'data': {
431                'title': 'Registration Number',
432                'fields': ('reg_nr'),
433                'is_required': True,
434                'label': 'Registration Number',
435                'label_edit': 'Registration Number',
436                'description': '',
437                'help': 'This is the combination of 8 digits and 2 letters you are assigned when you purchase an examination form.',
438                'is_i18n': False,
439                'readonly_layout_modes': (),
440                'hidden_layout_modes': (),
441                'hidden_readonly_layout_modes': (),
442                'hidden_empty': False,
443                'hidden_if_expr': '',
444                'css_class': '',
445                'widget_mode_expr': '',
446                'display_width': 10,
447                'size_max': 10,
448                 },
449           }
450
451###)
452
453admission = { ###(
454    'widgets': {
455        'sc_id': {
456            'type': 'String Widget',
457            'data': {
458                'title': 'SC ID',
459                'fields': ('admission_sc_id',),
460                'is_required': False,
461                'label': 'Card Serial Number ',
462                'label_edit': 'Card Serial Number',
463                'description': 'Card Serial Number ',
464                'help': 'This can be found on the bottom right of the reverse side of your Scratch Card',
465                'is_i18n': False,
466                'readonly_layout_modes': (),
467                'hidden_layout_modes': (),
468                'hidden_readonly_layout_modes': (),
469                'hidden_empty': False,
470                'hidden_if_expr': 'python:1',
471                'css_class': '',
472                'widget_mode_expr': '',
473                'display_width': 10,
474                'size_max': 0,
475            },
476        },
477        'sc_pin': {
478            'type': 'Scratchcard Pin Widget',
479            'data': {
480                'title': 'SC Pin',
481                'fields': ('admission_sc_pin'),
482                'is_required': True,
483                'label': 'PIN',
484                'label_edit': 'PIN',
485                'description': '',
486                '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',
487                'is_i18n': False,
488                'readonly_layout_modes': (),
489                'hidden_layout_modes': (),
490                'hidden_readonly_layout_modes': (),
491                'hidden_empty': False,
492                'hidden_if_expr': '',
493                'css_class': '',
494                'widget_mode_expr': '',
495                'display_width': 10,
496                'size_max': 10,
497            },
498        },
499        'jamb_id' : jamb_id,
500    },
501   'layout': {
502        'style_prefix': 'layout_admission_',
503        'flexible_widgets': (),
504        'ncols': 1,
505        'rows': [
506            [{'widget_id': 'sc_id', 'ncols': 1},],
507            [{'widget_id': 'sc_pin', 'ncols': 1},],
508            [{'widget_id': 'jamb_id', 'ncols': 1},],
509        ]
510    },
511}
512###)
513
514accobook = { ###(
515    'widgets': {
516        'sc_id': {
517            'type': 'String Widget',
518            'data': {
519                'title': 'SC ID',
520                'fields': ('accommodation_sc_id',),
521                'is_required': False,
522                'label': 'Card Serial Number ',
523                'label_edit': 'Card Serial Number',
524                'description': 'Card Serial Number ',
525                'help': 'This can be found on the bottom right of the reverse side of your Scratch Card',
526                'is_i18n': False,
527                'readonly_layout_modes': (),
528                'hidden_layout_modes': (),
529                'hidden_readonly_layout_modes': (),
530                'hidden_empty': False,
531                'hidden_if_expr': 'python:1',
532                'css_class': '',
533                'widget_mode_expr': '',
534                'display_width': 10,
535                'size_max': 0,
536            },
537        },
538        'sc_pin': {
539            'type': 'Scratchcard Pin Widget',
540            'data': {
541                'title': 'SC Pin',
542                'fields': ('accommodation_sc_pin'),
543                'is_required': True,
544                'label': 'PIN',
545                'label_edit': 'PIN',
546                'description': '',
547                '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',
548                'is_i18n': False,
549                'readonly_layout_modes': (),
550                'hidden_layout_modes': (),
551                'hidden_readonly_layout_modes': (),
552                'hidden_empty': False,
553                'hidden_if_expr': '',
554                'css_class': '',
555                'widget_mode_expr': '',
556                'display_width': 10,
557                'size_max': 10,
558            },
559        },
560    },
561   'layout': {
562        'style_prefix': 'layout_accobook_',
563        'flexible_widgets': (),
564        'ncols': 1,
565        'rows': [
566            #[{'widget_id': 'sc_id', 'ncols': 1},],
567            [{'widget_id': 'sc_pin', 'ncols': 1},],
568            [{'widget_id': 'jamb_id', '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': 'Hallname',
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 this Hall has',
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 this Hall has',
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 this Hall has',
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 this Hall has',
1096                'is_i18n': False,
1097                'vocabulary': 'range10',
1098            },
1099        },
1100    },
1101   'layout': {
1102        'style_prefix': 'layout_waeup_',
1103        'flexible_widgets': (),
1104        'ncols': 1,
1105        'rows': [
1106            [{'widget_id': 'heading', 'ncols': 1},],
1107            [{'widget_id': 'text', 'ncols': 1},],
1108            [{'widget_id': 'which_sex', 'ncols': 1},],
1109            [{'widget_id': 'nr_of_blocks', 'ncols': 1},],
1110            [{'widget_id': 'nr_of_floors', 'ncols': 1},],
1111            [{'widget_id': 'rooms_per_floor', 'ncols': 1},],
1112            [{'widget_id': 'beds_per_room', 'ncols': 1},],
1113        ]
1114    },
1115}
1116###)
1117
1118layouts = {}
1119layouts['university'] = common_layout
1120layouts['waeup_common'] = common_layout
1121layouts['student'] = student_layout
1122layouts['student_personal'] = student_personal_layout
1123layouts['accommodation'] = accommodation
1124layouts['scratch_card'] = scratch_card
1125layouts['admission'] = admission
1126layouts['jambcreate'] = jamb_layoutcreate
1127layouts['jamb'] = jamb_layout
1128layouts['faculty'] = common_layout
1129layouts['department'] = common_layout
1130layouts['course'] = course
1131layouts['admission_status'] = admission_status
1132return layouts
Note: See TracBrowser for help on using the repository browser.