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

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

=student accomodation

  • Property svn:keywords set to Id
File size: 36.8 KB
Line 
1#-*- mode: python; mode: fold -*-
2##parameters=
3# $Id: getWAeUPLayouts.py 107 2005-10-27 23:58:38Z 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': 'enter an Accommodation PIN',
545                'label_edit': 'enter an Accommodation PIN',
546                'description': '',
547                'help': 'Please enter a PIN valid for Accomodation booking',
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        ]
569    },
570}
571###)
572
573admission_status = { ###(
574    'widgets': {       
575       'quick_search': {
576            'type': 'String Widget',
577            'data': {
578                'title': 'A search string',
579                'fields': ('admission_sc_id',),
580                'is_required': False,
581                'label': 'Quick Search',
582                'label_edit': 'Quick Search',
583                'description': 'Search',
584                'help': '',
585                'is_i18n': False,
586                'readonly_layout_modes': (),
587                'hidden_layout_modes': (),
588                'hidden_readonly_layout_modes': (),
589                'hidden_empty': False,
590                'hidden_if_expr': 'python:0',
591                'css_class': '',
592                'widget_mode_expr': '',
593                'display_width': 20,
594                'size_max': 0,
595            },
596        },
597
598    },
599   'layout': {
600        'style_prefix': 'layout_admission_status_',
601        'flexible_widgets': (),
602        'ncols': 2,
603        'rows': [
604            [{'widget_id': 'quick_search', 'ncols': 2},],
605        ]
606    },
607}
608###)
609
610jamb_widgets = { ###(
611        'reg_nr': {
612            'type': 'StudentId Widget',
613            'data': {
614                'title': 'registration nr',
615                'fields': ('reg_nr',),
616                'is_required': True,
617                'label': 'registration nr',
618                'label_edit': 'registration nr',
619                'description': 'The Student ID from JAMB',
620                'help': 'The Student ID from JAMB',
621                'is_i18n': False,
622                'display_width': 10,
623                'size_max': 10,
624            },
625        },
626        'firstname': firstname,
627        'middlename': middlename,
628        'lastname': lastname,
629        'age': {
630            'type': 'Int Widget',
631            'data': {
632                'title': '',
633                'fields': ('age',),
634                'is_required': False,
635                'label': 'Age',
636                'label_edit': 'Age',
637                'description': '',
638                'help': '',
639                'is_i18n': False,
640                'readonly_layout_modes': (),
641                'hidden_layout_modes': (),
642                'hidden_readonly_layout_modes': (),
643                'hidden_empty': False,
644                'hidden_if_expr': '',
645                'css_class': '',
646                'widget_mode_expr': '',
647                'display_width': 2,
648                'size_max': 2,
649            },
650        },
651        'sex': sex,
652        'state': {
653            'type': 'Select Widget',
654            'data': {
655                'title': '',
656                'fields': ('state',),
657                'is_required': False,
658                'label': 'state of origin',
659                'label_edit': 'state of origin',
660                'description': '',
661                'help': '',
662                'is_i18n': False,
663                'vocabulary': 'nigerian_states',
664            },
665        },
666        'exam_results': {
667            'type': 'String Widget',
668            'data': {
669                'title': '',
670                'fields': ('exam_results',),
671                'is_required': False,
672                'label': 'Jamb Results',
673                'label_edit': 'Jamb Results',
674                'description': '',
675                'help': '',
676                'is_i18n': False,
677                'readonly_layout_modes': (),
678                'hidden_layout_modes': (),
679                'hidden_readonly_layout_modes': (),
680                'hidden_empty': False,
681                'hidden_if_expr': '',
682                'css_class': '',
683                'widget_mode_expr': '',
684                'display_width': 20,
685                'size_max': 0,
686            },
687        },
688        'aggregate': {
689            'type': 'Int Widget',
690            'data': {
691                'title': 'Agregate',
692                'fields': ('aggregate',),
693                'is_required': False,
694                'label': 'Score',
695                'label_edit': 'Score',
696                'description': '',
697                'help': '',
698                'is_i18n': False,
699            },
700        },
701        'faculty': {
702            'type': 'Select Widget',
703            'data': {
704                'title': 'Faculty',
705                'fields': ('faculty',),
706                'is_required': True,
707                'label': 'faculty',
708                'label_edit': 'faculty',
709                'description': '',
710                'help': '',
711                'is_i18n': False,
712                'vocabulary': 'faculties',
713            },
714        },
715        'course': {
716            'type': 'String Widget',
717            'data': {
718                'title': 'Study Course',
719                'fields': ('course',),
720                'is_required': True,
721                'label': 'Study Course',
722                'label_edit': 'Study Course',
723                'description': '',
724                'help': 'The course to study',
725                'is_i18n': False,
726            },
727        },
728        'listing_date': {
729            'type': 'Date Widget',
730            'data': {
731                'title': 'Listing Date',
732                'fields': ('listing_date',),
733                'is_required': False,
734                'label': 'Listing Date',
735                'label_edit': 'Listing Date',
736                'description': '',
737                'help': '',
738                'is_i18n': False,
739                'readonly_layout_modes': (),
740                'hidden_layout_modes': (),
741                'hidden_readonly_layout_modes': (),
742                'hidden_empty': False,
743                'hidden_if_expr': '',
744                'css_class': '',
745                'widget_mode_expr': '',
746                'display_width': 3,
747                'size_max': 0,
748            },
749        },
750##        '2nd_choice': { ###(
751##            'type': 'String Widget',
752##            'data': {
753##                'title': 'Second choice',
754##                'fields': ('2nd_choice',),
755##                'is_required': False,
756##                'label': 'Second choice',
757##                'label_edit': 'Second choice',
758##                'description': '',
759##                'help': 'second_choice',
760##                'is_i18n': False,
761##                'readonly_layout_modes': (),
762##                'hidden_layout_modes': (),
763##                'hidden_readonly_layout_modes': (),
764##                'hidden_empty': False,
765##                'hidden_if_expr': '',
766##                'css_class': '',
767##                'widget_mode_expr': '',
768##                'display_width': 20,
769##                'size_max': 0,
770##            },
771##        },
772##       
773##        '3rd_choice': {
774##            'type': 'String Widget',
775##            'data': {
776##                'title': 'Third_choice',
777##                'fields': ('3rd_choice',),
778##                'is_required': False,
779##                'label': 'Third choice',
780##                'label_edit': 'Third choice',
781##                'description': 'third_choice',
782##                'help': 'third_choice',
783##                'is_i18n': False,
784##                'readonly_layout_modes': (),
785##                'hidden_layout_modes': (),
786##                'hidden_readonly_layout_modes': (),
787##                'hidden_empty': False,
788##                'hidden_if_expr': '',
789##                'css_class': '',
790##                'widget_mode_expr': '',
791##                'display_width': 20,
792##                'size_max': 0,
793##            },
794##        },
795###)
796
797        'sc_id': {
798            'type': 'String Widget',
799            'data': {
800                'title': '',
801                'fields': ('admission_sc_id',),
802                'is_required': False,
803                'label': 'Scratch card ID used',
804                'label_edit': 'Scratch card ID used',
805                'description': '',
806                'help': '',
807                'is_i18n': False,
808                'readonly_layout_modes': (),
809                'hidden_layout_modes': (),
810                'hidden_readonly_layout_modes': (),
811                'hidden_empty': False,
812                'hidden_if_expr': '',
813                'css_class': '',
814                'widget_mode_expr': '',
815                'display_width': 20,
816                'size_max': 0,
817            },
818        },
819        'sc_pin': {
820            'type': 'String Widget',
821            'data': {
822                'title': '',
823                'fields': ('admission_sc_pin',),
824                'is_required': False,
825                'label': 'pin card code',
826                'label_edit': 'pin card code',
827                'description': '',
828                'help': '',
829                'is_i18n': False,
830                'readonly_layout_modes': (),
831                'hidden_layout_modes': (),
832                'hidden_readonly_layout_modes': (),
833                'hidden_empty': False,
834                'hidden_if_expr': '',
835                'css_class': '',
836                'widget_mode_expr': '',
837                'display_width': 20,
838                'size_max': 0,
839            },
840        },
841    }
842###)
843
844jamb_layoutcreate = { ###(
845    'widgets': jamb_widgets,
846    'layout': {
847        'style_prefix': 'layout_jambcreate_',
848        'flexible_widgets': (),
849        'ncols': 1,
850        'rows': [
851            [{'widget_id': 'reg_nr', 'ncols': 1},],
852            [{'widget_id': 'firstname', 'ncols': 1},],
853            [{'widget_id': 'middlename', 'ncols': 1},],
854            [{'widget_id': 'lastname', 'ncols': 1},],
855            #[{'widget_id': 'sc_id', 'ncols': 1},],
856            #[{'widget_id': 'sc_pin', 'ncols': 1},],
857            [{'widget_id': 'age', 'ncols': 1},],
858            [{'widget_id': 'sex', 'ncols': 1},],
859            [{'widget_id': 'state', 'ncols': 1},],
860            #[{'widget_id': 'exam_results', 'ncols': 1},],
861            [{'widget_id': 'aggregate', 'ncols': 1},],
862            [{'widget_id': 'faculty', 'ncols': 1},],
863            [{'widget_id': 'course', 'ncols': 1},],
864            [{'widget_id': 'listing_date', 'ncols': 1},],
865            #[{'widget_id': '2nd_choice', 'ncols': 1},],
866            #[{'widget_id': '3rd_choice', 'ncols': 1},],
867        ]
868    },
869}
870###)
871
872jamb_layout = { ###(
873    'widgets': jamb_widgets,
874    'layout': {
875        'style_prefix': 'layout_waeup_',
876        'flexible_widgets': (),
877        'ncols': 1,
878        'rows': [
879            [{'widget_id': 'reg_nr', 'ncols': 1},],
880            [{'widget_id': 'firstname', 'ncols': 1},],
881            [{'widget_id': 'middlename', 'ncols': 1},],
882            [{'widget_id': 'lastname', 'ncols': 1},],
883            #[{'widget_id': 'sc_id', 'ncols': 1},],
884            [{'widget_id': 'sc_pin', 'ncols': 1},],
885            [{'widget_id': 'age', 'ncols': 1},],
886            [{'widget_id': 'sex', 'ncols': 1},],
887            [{'widget_id': 'state', 'ncols': 1},],
888            #[{'widget_id': 'exam_results', 'ncols': 1},],
889            [{'widget_id': 'aggregate', 'ncols': 1},],
890            [{'widget_id': 'faculty', 'ncols': 1},],
891            [{'widget_id': 'course', 'ncols': 1},],
892            [{'widget_id': 'listing_date', 'ncols': 1},],
893            #[{'widget_id': '2nd_choice', 'ncols': 1},],
894            #[{'widget_id': '3rd_choice', 'ncols': 1},],
895        ]
896    },
897}
898###)
899
900course = { ###(
901    'widgets': {
902        'heading': {
903         'type': 'Heading Widget',
904         'data': {
905                'fields': ['heading'],
906                'level': 1,
907                'is_i18n': 0,
908                'is_required': 1,
909                'label_edit': 'Title',
910                'help': 'Course Title',
911                'display_width': 40,
912                'size_max': 40,
913            },
914        },
915        'text': Text,
916        'level': {
917            'type': 'Select Widget',
918            'data': {
919                'title': '',
920                'fields': ('level',),
921                'is_required': True,
922                'label': 'Level',
923                'label_edit': 'Level',
924                'description': '',
925                'help': '',
926                'is_i18n': False,
927                'vocabulary': 'courselevel',
928            },
929        },
930        'code': {
931            'type': 'String Widget',
932            'data': {
933                'title': 'Code',
934                'fields': ('code',),
935                'is_required': True,
936                'label': 'Code',
937                'label_edit': 'Code',
938                'description': '',
939                'help': '',
940                'is_i18n': False,
941                'display_width': 10,
942                'size_max': 0,
943            },
944        },
945        'semester': {
946            'type': 'Boolean Widget',
947            'data': {
948                'title': '',
949                'fields': ('semester',),
950                'is_required': True,
951                'label': 'Semester',
952                'label_edit': 'Semester',
953                'label_false': 'Second Semester',
954                'label_true': 'First Semester',
955                'description': '',
956                'help': '',
957                'is_i18n': False,
958                'display_width': 10,
959                'size_max': 0,
960            },
961        },
962        'credit': {
963            'type': 'Int Widget',
964            'data': {
965                'title': '',
966                'fields': ('credit',),
967                'is_required': True,
968                'label': 'Credit',
969                'label_edit': 'Credit',
970                'description': '',
971                'help': '',
972                'is_i18n': False,
973                'display_width': 2,
974                'size_max': 0,
975            },
976        },
977        'core_elective': {
978            'type': 'Boolean Widget',
979            'data': {
980                'title': '',
981                'fields': ('core_elective',),
982                'is_required': True,
983                'label': 'Core or elective',
984                'label_edit': 'Core or elective',
985                'label_true': 'Core Course',
986                'label_false': 'Elective Course',
987                'description': '',
988                'help': '',
989                'is_i18n': False,
990                'display_width': 10,
991                'size_max': 0,
992            },
993        },
994    },
995   'layout': {
996        'style_prefix': 'layout_waeup_',
997        'flexible_widgets': (),
998        'ncols': 1,
999        'rows': [
1000            [{'widget_id': 'heading', 'ncols': 1},],
1001            [{'widget_id': 'text', 'ncols': 1},],
1002            [{'widget_id': 'level', 'ncols': 1},],
1003            [{'widget_id': 'code', 'ncols': 1},],
1004            [{'widget_id': 'semester', 'ncols': 1},],
1005            [{'widget_id': 'credit', 'ncols': 1},],
1006            [{'widget_id': 'core_elective', 'ncols': 1},],
1007        ]
1008    },
1009}
1010###)
1011
1012accommodation = { ###(
1013    'widgets': {
1014        'heading': {
1015         'type': 'Heading Widget',
1016         'data': {
1017                'fields': ['heading'],
1018                'level': 1,
1019                'is_i18n': 0,
1020                'is_required': 1,
1021                'label_edit': 'Hallname',
1022                'help': '',
1023                'display_width': 40,
1024                'size_max': 40,
1025            },
1026        },
1027        'text': Text,
1028        'which_sex': {
1029            'type': 'Boolean Widget',
1030            'data': {
1031                'title': '',
1032                'fields': ('which_sex',),
1033                'is_required': False,
1034                'label': 'sex',
1035                'label_edit': 'sex',
1036                'label_false': 'male',
1037                'label_true': 'female',
1038                'description': '',
1039                'help': '',
1040                'is_i18n': False,
1041            },
1042        },
1043        'nr_of_blocks': {
1044            'type': 'Select Widget',
1045            'data': {
1046                'title': '',
1047                'fields': ('nr_of_blocks',),
1048                'is_required': True,
1049                'label': 'Nr of Blocks',
1050                'label_edit': 'Nr of Blocks',
1051                'description': '',
1052                'help': 'Number of Blocks this Hall has',
1053                'is_i18n': False,
1054                'vocabulary': 'range10',
1055            },
1056        },
1057        'nr_of_floors': {
1058            'type': 'Select Widget',
1059            'data': {
1060                'title': '',
1061                'fields': ('nr_of_floors',),
1062                'is_required': True,
1063                'label': 'Nr of Floors ',
1064                'label_edit': 'Nr of Floors',
1065                'description': '',
1066                'help': 'Number of Floors per Block this Hall has',
1067                'is_i18n': False,
1068                'vocabulary': 'range5',
1069            },
1070        },
1071        'rooms_per_floor': {
1072            'type': 'Select Widget',
1073            'data': {
1074                'title': '',
1075                'fields': ('rooms_per_floor',),
1076                'is_required': True,
1077                'label': 'Rooms per Floor',
1078                'label_edit': 'Rooms per Floor',
1079                'description': '',
1080                'help': 'Number of Rooms per Floor this Hall has',
1081                'is_i18n': False,
1082                'vocabulary': 'range50',
1083            },
1084        },
1085        'beds_per_room': {
1086            'type': 'Select Widget',
1087            'data': {
1088                'title': '',
1089                'fields': ('beds_per_room',),
1090                'is_required': True,
1091                'label': 'Beds per Room',
1092                'label_edit': 'Beds per Room',
1093                'description': '',
1094                'help': 'Number of Beds per Room this Hall has',
1095                'is_i18n': False,
1096                'vocabulary': 'range10',
1097            },
1098        },
1099        'beds_assigned': {
1100            'type': 'Int Widget',
1101            'data': {
1102                'title': '',
1103                'fields': ('beds_assigned',),
1104                'is_required': True,
1105                'label': 'Assigned Beds',
1106                'label_edit': 'Assigned',
1107                'description': '',
1108                'help': 'Number of Beds already assined',
1109                'is_i18n': False,
1110            },
1111        },
1112    },
1113   'layout': {
1114        'style_prefix': 'layout_waeup_',
1115        'flexible_widgets': (),
1116        'ncols': 1,
1117        'rows': [
1118            [{'widget_id': 'heading', 'ncols': 1},],
1119            [{'widget_id': 'text', 'ncols': 1},],
1120            [{'widget_id': 'which_sex', 'ncols': 1},],
1121            [{'widget_id': 'nr_of_blocks', 'ncols': 1},],
1122            [{'widget_id': 'nr_of_floors', 'ncols': 1},],
1123            [{'widget_id': 'rooms_per_floor', 'ncols': 1},],
1124            [{'widget_id': 'beds_per_room', 'ncols': 1},],
1125            [{'widget_id': 'beds_assigned', 'ncols': 1},],
1126        ]
1127    },
1128}
1129###)
1130
1131layouts = {}
1132layouts['university'] = common_layout
1133layouts['waeup_common'] = common_layout
1134layouts['student'] = student_layout
1135layouts['student_personal'] = student_personal_layout
1136layouts['accommodation'] = accommodation
1137layouts['accobook'] = accobook
1138layouts['scratch_card'] = scratch_card
1139layouts['admission'] = admission
1140layouts['jambcreate'] = jamb_layoutcreate
1141layouts['jamb'] = jamb_layout
1142layouts['faculty'] = common_layout
1143layouts['department'] = common_layout
1144layouts['course'] = course
1145layouts['admission_status'] = admission_status
1146return layouts
Note: See TracBrowser for help on using the repository browser.