10 | | s3.crud_fields[table]=['name'] |
11 | | db[table].exposes=s3.crud_fields[table] |
12 | | # Moved to Controller - allows us to redefine for different scenarios (& also better MVC separation) |
13 | | #db[table].displays=s3.crud_fields[table] |
14 | | # NB Beware of lambdas & %s substitution as they get evaluated when called, not when defined! |
15 | | #db[table].represent=lambda table:shn_list_item(table,resource='shelter',action='display') |
16 | | db[table].uuid.requires=IS_NOT_IN_DB(db,'%s.uuid' % table) |
17 | | title_create=T('Add Shelter') |
18 | | title_display=T('Shelter Details') |
19 | | title_list=T('List Shelters') |
20 | | title_update=T('Edit Shelter') |
21 | | subtitle_create=T('Add New Shelter') |
22 | | subtitle_list=T('Shelters') |
23 | | label_list_button=T('List Shelters') |
24 | | label_create_button=T('Add Shelter') |
25 | | msg_record_created=T('Shelter added') |
26 | | msg_record_modified=T('Shelter updated') |
27 | | msg_record_deleted=T('Shelter deleted') |
28 | | msg_list_empty=T('No Shelters currently registered') |
29 | | s3.crud_strings[table]=Storage(title_create=title_create, title_display=title_display, title_list=title_list, title_update=title_update, subtitle_create=subtitle_create, subtitle_list=subtitle_list, label_list_button=label_list_button, label_create_button=label_create_button, msg_record_created=msg_record_created, msg_record_modified=msg_record_modified, msg_record_deleted=msg_record_deleted, msg_list_empty=msg_list_empty) |
| 10 | s3.crud_fields[table] = ['name'] |
| 11 | db[table].exposes = s3.crud_fields[table] |
| 12 | db[table].uuid.requires = IS_NOT_IN_DB(db, '%s.uuid' % table) |
| 13 | title_create = T('Add Shelter') |
| 14 | title_display = T('Shelter Details') |
| 15 | title_list = T('List Shelters') |
| 16 | title_update = T('Edit Shelter') |
| 17 | subtitle_create = T('Add New Shelter') |
| 18 | subtitle_list = T('Shelters') |
| 19 | label_list_button = T('List Shelters') |
| 20 | label_create_button = T('Add Shelter') |
| 21 | msg_record_created = T('Shelter added') |
| 22 | msg_record_modified = T('Shelter updated') |
| 23 | msg_record_deleted = T('Shelter deleted') |
| 24 | msg_list_empty = T('No Shelters currently registered') |
| 25 | s3.crud_strings[table] = Storage(title_create=title_create, title_display=title_display, title_list=title_list, title_update=title_update, subtitle_create=subtitle_create, subtitle_list=subtitle_list, label_list_button=label_list_button, label_create_button=label_create_button, msg_record_created=msg_record_created, msg_record_modified=msg_record_modified, msg_record_deleted=msg_record_deleted, msg_list_empty=msg_list_empty) |