Merge lp:~graeme-acm/sahana-eden/RMS into lp:sahana-eden

Proposed by Graeme Foster
Status: Superseded
Proposed branch: lp:~graeme-acm/sahana-eden/RMS
Merge into: lp:sahana-eden
Diff against target: 478 lines (+226/-39)
6 files modified
controllers/survey.py (+50/-20)
models/01_menu.py (+1/-1)
models/survey.py (+166/-12)
modules/s3/s3import.py (+4/-1)
private/prepopulate/demo/ADAT/questionnaire24H.csv (+1/-1)
private/prepopulate/demo/ADAT/questionnaire72H.csv (+4/-4)
To merge this branch: bzr merge lp:~graeme-acm/sahana-eden/RMS
Reviewer Review Type Date Requested Status
Fran Boon Pending
Review via email: mp+72342@code.launchpad.net

This proposal has been superseded by a proposal from 2011-08-21.

Description of the change

Crud strings added
Removed Crud buttons where not required
Improved work flow by using a fake component

To post a comment you must log in.
lp:~graeme-acm/sahana-eden/RMS updated
1994. By Fran Boon

merge Trunk: ADAT progress

1995. By Fran Boon

merge Trunk: ADAT progress

1996. By Fran Boon

merge Trunk: Fix HRM site_orgs check

1997. By Fran Boon

Fix DateWidget in HRM - display 100 years in dropdown

1998. By Fran Boon

merge Trunk: ADAT progress

1999. By Fran Boon

pre-merge commit: Survey permissions

2000. By Fran Boon

merge Trunk: Survey debug

2001. By Fran Boon

merge Trunk: survey diagnostics to try and workout why the import is not working on the server

2002. By Fran Boon

merge Trunk: change test for MatPlotLib imported to a try except

2003. By Fran Boon

merge Trunk: ADAT

2004. By Fran Boon

merge Trunk: Survey progress inc XLS

2005. By Fran Boon

merge Trunk: Survey debug

2006. By Fran Boon

merge Trunk: Survey Map

2007. By Fran Boon

merge Trunk: Fix Map bounds being clobbered

2008. By Fran Boon

en-gb as default language (Movement std)

2009. By Fran Boon

Change source of TRMM layers to the new IFRC Prod box

2010. By Fran Boon

merge Trunk: more en-gb: catalogue

2011. By Fran Boon

merge Trunk: Asset fixes, S3Search enhancements

2012. By Fran Boon

merge Trunk: S3Search - Disable the dataTables search box to avoid duplicate/confusion

2013. By Fran Boon

merge Trunk: Asset fixes, ADAT progress

2014. By Fran Boon

Merge Trunk: Asset tweaks - Import shouldn't have response.s3.actions clobbered, add to Index page

2015. By Fran Boon

merge Trunk: mail.server_tls deployment_setting (needs to be False for default Debian)

2016. By Fran Boon

merge Trunk: Fix to Add Item Category (colorbox) link

2017. By Fran Boon

merge Trunk: Fixes for Asset log site/location toggle; add Oxfam Hong Kong to prepop

2018. By Fran Boon

merge Trunk: Fix import of Assets - Rooms & Dedup

2019. By Fran Boon

merge Trunk: Bug fixes in Colorboxes

2020. By Fran Boon

merge Trunk: mandatory last_name as conditional validator instead of DB constraint

2021. By Fran Boon

merge Trunk: Tweak Python version test & clarify warning message

2022. By Fran Boon

Map: HRM Popup now has an Edit button

2023. By Fran Boon

merge Trunk: Don't cache options() as otherwise Colorbox 'Add XXX' can't refresh the dropdown reliably

2024. By Fran Boon

Map: Cluster Popups should show all records, not just 1st 10

2025. By Fran Boon

merger Trunk: ADAT fixes/enhancements

2026. By Fran Boon

Remove duplicate menu entry

2027. By Fran Boon

Catalogue in en-gb

2028. By Fran Boon

Office controller filters-out warehouses

2029. By Fran Boon

Filter is only when inv enabled

2030. By Fran Boon

merge Trunk

2031. By Fran Boon

New theme - 1st cut

2032. By Fran Boon

Theme progress

2033. By Fran Boon

build

2034. By Fran Boon

Org: Add Region, Prepopulate countries, style tweaks

2035. By Fran Boon

merge Trunk: Org import templates

2036. By Fran Boon

All offices on the starting Map, Tweak Org RHeader & theme

2037. By Fran Boon

merge Trunk (SUrvey & code2 for GADM import)

2038. By Fran Boon

Some more CSS updates

2039. By Fran Boon

Style/content tweaks

2040. By Fran Boon

merge trunk: S3Cube works with Python 2.6

2041. By Fran Boon

Tweak default Map settings

2042. By Fran Boon

merge Trunk: S3Cube tweaks

2043. By Fran Boon

GIS: Improve error reporting when layer loading fails

2044. By Fran Boon

merge Trunk: HRM report on expiring contracts

2045. By Fran Boon

Style/Menu/Label updates

2046. By Fran Boon

Custom Ext Theme (& also Tabs & Action buttons harmonised with the rest of the IFRC theme)

2047. By Fran Boon

Map: New Markers

2048. By Fran Boon

Tweak map legend

2049. By Fran Boon

Don't hide Map popup links!

2050. By Fran Boon

GIS: Deprecate Yahoo layers, Hide Assessments from the Map Legend as we have no way of showing these easily on the main map right now

2051. By Fran Boon

merge Trunk: Project, Cube & Prepop

2052. By Fran Boon

Fixes to MapConfig handling

2053. By Fran Boon

prepop of Courses

2054. By Fran Boon

Tweaks to Permissions, Menus, HRM

2055. By Fran Boon

Assets as components of (HR) persons

2056. By Fran Boon

Fix s3_asset_prep's hiding of fields

2057. By Fran Boon

merge Trunk: S3CSV common templates, ReplaceOption for upload form, HR de-duplicator

2058. By Fran Boon

Training Report: 1st cut

2059. By Fran Boon

merge nursix: Organisation ID in warehouse upload form defaults to current user's org.

2060. By Fran Boon

Fix GeoRSS Layers, merge Graeme: inv_item stylesheet enhancements, speed up inv_item search (don't include site in simple)

2061. By Fran Boon

Menu Entry for inv_item, hide uploaded files in Importer

2062. By Fran Boon

RemoveOption for Stock items

2063. By Fran Boon

Not that simple to disable the dataTable of uploaded Imports :/

2064. By Fran Boon

Remove Default for warehouse Data (preventing Imports)

2065. By Fran Boon

merge nursix: S3Cube fix represent, HR Training report: aggregate by month

2066. By graeme-acm

ifrc base

2067. By graeme-acm

merge with ifrc

2068. By graeme-acm

merge with ifrc

2069. By graeme-acm

fix map pop up and some css styling

2070. By graeme-acm

map legend issue

2071. By graeme-acm

merge trunk

Unmerged revisions

2071. By graeme-acm

merge trunk

2070. By graeme-acm

map legend issue

2069. By graeme-acm

fix map pop up and some css styling

2068. By graeme-acm

merge with ifrc

2067. By graeme-acm

merge with ifrc

2066. By graeme-acm

ifrc base

2065. By Fran Boon

merge nursix: S3Cube fix represent, HR Training report: aggregate by month

2064. By Fran Boon

Remove Default for warehouse Data (preventing Imports)

2063. By Fran Boon

Not that simple to disable the dataTable of uploaded Imports :/

2062. By Fran Boon

RemoveOption for Stock items

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'controllers/survey.py'
--- controllers/survey.py 2011-08-20 09:29:54 +0000
+++ controllers/survey.py 2011-08-21 15:15:26 +0000
@@ -42,24 +42,8 @@
42 tablename = "%s_%s" % (prefix, resourcename)42 tablename = "%s_%s" % (prefix, resourcename)
43 s3mgr.load(tablename)43 s3mgr.load(tablename)
44 table = db[tablename]44 table = db[tablename]
45
45 46
46 # CRUD Strings
47 s3.crud_strings[tablename] = Storage(
48 title_create = T("Add Survey Template"),
49 title_display = T("Survey Template Details"),
50 title_list = T("List Survey Templates"),
51 title_update = T("Edit Survey Template"),
52 subtitle_create = T("Add New Survey Template"),
53 subtitle_list = T("Survey Templates"),
54 label_list_button = T("List Survey Templates"),
55 label_create_button = T("Add Survey Template"),
56 label_delete_button = T("Delete Survey Template"),
57 msg_record_created = T("Survey Template added"),
58 msg_record_modified = T("Survey Template updated"),
59 msg_record_deleted = T("Survey Template deleted"),
60 msg_list_empty = T("No Survey Template currently registered"))
61
62
63 def prep(r):47 def prep(r):
64 s3_action_buttons(r)48 s3_action_buttons(r)
65 query = (r.table.status == 1) # Status of Pending49 query = (r.table.status == 1) # Status of Pending
@@ -158,7 +142,7 @@
158142
159 def prep(r):143 def prep(r):
160 if r.interactive:144 if r.interactive:
161 if r.id and (r.method == "update" or r.method == "create"):145 if r.id and (r.method == "update"):
162 if "post_vars" in current.request and len(current.request.post_vars) > 0:146 if "post_vars" in current.request and len(current.request.post_vars) > 0:
163 series_id = r.id147 series_id = r.id
164 complete_id = r.component_id148 complete_id = r.component_id
@@ -175,8 +159,11 @@
175 return True159 return True
176160
177 def postp(r, output):161 def postp(r, output):
178 response.s3.survey_answerlist_dataTable_post(r)162 if r.component_name == None:
179 if r.id and (r.method == "update" or r.method == "create"):163 response.s3.survey_serieslist_dataTable_post(r)
164 elif r.component_name == "complete":
165 response.s3.survey_answerlist_dataTable_post(r)
166 if r.id and (r.method == "update"):
180 series_id = r.id167 series_id = r.id
181 complete_id = r.component_id168 complete_id = r.component_id
182 form = response.s3.survey_build_series_questions(series_id, complete_id)169 form = response.s3.survey_build_series_questions(series_id, complete_id)
@@ -184,6 +171,8 @@
184 return output171 return output
185172
186 # remove CRUD generate buttons in the tabs173 # remove CRUD generate buttons in the tabs
174 s3mgr.configure("survey_series",
175 deletable = False,)
187 s3mgr.configure("survey_complete",176 s3mgr.configure("survey_complete",
188 listadd=False,177 listadd=False,
189 deletable=False)178 deletable=False)
@@ -203,6 +192,7 @@
203192
204 def prep(r):193 def prep(r):
205 s3mgr.configure(r.tablename,194 s3mgr.configure(r.tablename,
195 deletable = False,
206 orderby = r.tablename+".posn",196 orderby = r.tablename+".posn",
207 )197 )
208 return True198 return True
@@ -273,6 +263,40 @@
273 output = s3_rest_controller(prefix, resourcename)263 output = s3_rest_controller(prefix, resourcename)
274 return output264 return output
275265
266def newAssessment():
267 # Load Model
268 prefix = "survey"
269 resourcename = "complete"
270 tablename = "%s_%s" % (prefix, resourcename)
271 s3mgr.load(tablename)
272 table = db[tablename]
273
274 def prep(r):
275 if r.interactive:
276 if "post_vars" in current.request and len(current.request.post_vars) > 0:
277 dummy, series_id = current.request.vars.viewing.split(".")
278 id = response.s3.survey_save_answers_for_series(series_id,
279 None, # Insert
280 current.request.post_vars)
281 response.flash = response.s3.crud_strings["survey_complete"].msg_record_created
282 return True
283
284 def postp(r, output):
285 response.s3.survey_answerlist_dataTable_post(r)
286 tablename, series_id = current.request.vars.viewing.split(".")
287 form = response.s3.survey_build_series_questions(series_id, None)
288 output["form"] = form
289 return output
290
291 response.s3.prep = prep
292 response.s3.postp = postp
293 output = s3_rest_controller(prefix,
294 resourcename,
295 method = "create",
296 rheader=response.s3.survey_series_rheader
297 )
298 return output
299
276def complete():300def complete():
277 """ RESTful CRUD controller """301 """ RESTful CRUD controller """
278 # Load Model302 # Load Model
@@ -304,6 +328,9 @@
304 response.s3.survey_answerlist_dataTable_post(r)328 response.s3.survey_answerlist_dataTable_post(r)
305 return output329 return output
306330
331 s3mgr.configure("survey_complete",
332 listadd=False,
333 deletable=False)
307 response.s3.prep = prep334 response.s3.prep = prep
308 response.s3.postp = postp335 response.s3.postp = postp
309 output = s3_rest_controller(prefix, resourcename)336 output = s3_rest_controller(prefix, resourcename)
@@ -329,5 +356,8 @@
329 template_id = request.args[0]356 template_id = request.args[0]
330 except:357 except:
331 pass358 pass
359 s3mgr.configure("survey_complete",
360 listadd=False,
361 deletable=False)
332 output = s3_rest_controller(prefix, "complete")362 output = s3_rest_controller(prefix, "complete")
333 return output363 return output
334364
=== modified file 'models/01_menu.py'
--- models/01_menu.py 2011-08-20 22:11:46 +0000
+++ models/01_menu.py 2011-08-21 15:15:26 +0000
@@ -865,7 +865,7 @@
865 ]],865 ]],
866 [T("Response"), False, aURL(f="complete"), [866 [T("Response"), False, aURL(f="complete"), [
867# [T("New"), False, aURL(p="create", f="complete", args="create")],867# [T("New"), False, aURL(p="create", f="complete", args="create")],
868 [T("List All"), False, aURL(f="complete")],868# [T("List All"), False, aURL(f="complete")],
869 [T("Import Completed Responses"), False, aURL(f="complete", args="import.xml")]869 [T("Import Completed Responses"), False, aURL(f="complete", args="import.xml")]
870 ]],870 ]],
871 ]871 ]
872872
=== modified file 'models/survey.py'
--- models/survey.py 2011-08-20 13:25:04 +0000
+++ models/survey.py 2011-08-21 15:15:26 +0000
@@ -66,7 +66,24 @@
66 readable=True,66 readable=True,
67 writable=False),67 writable=False),
68 *s3_meta_fields())68 *s3_meta_fields())
69 69
70 # CRUD Strings
71 s3.crud_strings[tablename] = Storage(
72 title_create = T("Add Survey Template"),
73 title_display = T("Survey Template Details"),
74 title_list = T("List of Survey Templates"),
75 title_update = T("Edit Survey Template"),
76 subtitle_create = T("Add a new Survey Template"),
77 subtitle_list = T("Survey Templates"),
78 label_list_button = T("List all Survey Templates"),
79 label_create_button = T("Add a new Survey Template"),
80 label_delete_button = T("Delete this Survey Template"),
81 msg_record_created = T("Survey Template added"),
82 msg_record_modified = T("Survey Template updated"),
83 msg_record_deleted = T("Survey Template deleted"),
84 msg_list_empty = T("No Survey Template currently registered"))
85
86
70 def survey_template_rheader(r, tabs=[]):87 def survey_template_rheader(r, tabs=[]):
71 if r.representation == "html":88 if r.representation == "html":
72 89
@@ -80,8 +97,12 @@
80 rheader_tabs = s3_rheader_tabs(r, tabs)97 rheader_tabs = s3_rheader_tabs(r, tabs)
81 98
82 sectionTable = db["survey_section"]99 sectionTable = db["survey_section"]
83 query = (sectionTable.template_id == record.id)100 qlistTable = db["survey_question_list"]
84 rows = db(query).select(orderby = sectionTable.posn)101 query = (qlistTable.template_id == r.id) & \
102 (qlistTable.section_id == sectionTable.id)
103 rows = db(query).select(sectionTable.id,
104 sectionTable.name,
105 orderby = qlistTable.posn)
85 tsection = TABLE(_class="survey-section-list")106 tsection = TABLE(_class="survey-section-list")
86 lblSection = SPAN(T("Sections that are part of this template"),107 lblSection = SPAN(T("Sections that are part of this template"),
87 _style="font-weight:bold;")108 _style="font-weight:bold;")
@@ -90,11 +111,15 @@
90 else:111 else:
91 rsection = TR()112 rsection = TR()
92 count = 0113 count = 0
114 lastSection = ""
93 for section in rows:115 for section in rows:
116 if section.name == lastSection:
117 continue
94 rsection.append(TD(A(section.name,118 rsection.append(TD(A(section.name,
95 _href=URL(c="survey",119 _href=URL(c="survey",
96 f="section",120 f="section",
97 args="%s" % section.id))))121 args="%s" % section.id))))
122 lastSection = section.name
98 count += 1123 count += 1
99 if count % 4 == 0:124 if count % 4 == 0:
100 tsection.append(rsection)125 tsection.append(rsection)
@@ -161,7 +186,24 @@
161 ),186 ),
162 template_id(),187 template_id(),
163 *s3_meta_fields())188 *s3_meta_fields())
164 189
190 # CRUD Strings
191 s3.crud_strings[tablename] = Storage(
192 title_create = T("Add Template Section"),
193 title_display = T("Template Section Details"),
194 title_list = T("List of Template Sections"),
195 title_update = T("Edit Template Section"),
196 subtitle_create = T("Add a new Template Section"),
197 subtitle_list = T("Template Sections"),
198 label_list_button = T("List all Template Sections"),
199 label_create_button = T("Add a new Template Section"),
200 label_delete_button = T("Delete this Template Section"),
201 msg_record_created = T("Template Section added"),
202 msg_record_modified = T("Template Section updated"),
203 msg_record_deleted = T("Template Section deleted"),
204 msg_list_empty = T("No Template Section currently registered"))
205
206
165 s3mgr.configure(tablename, orderby = tablename+".posn")207 s3mgr.configure(tablename, orderby = tablename+".posn")
166 208
167 # Section as component of Template209 # Section as component of Template
@@ -270,6 +312,23 @@
270 *s3_meta_fields()312 *s3_meta_fields()
271 )313 )
272314
315 # CRUD Strings
316 s3.crud_strings[tablename] = Storage(
317 title_create = T("Add an Assessment Question"),
318 title_display = T("Assessment Question Details"),
319 title_list = T("List of Assessment Questions"),
320 title_update = T("Edit Assessment Question"),
321 subtitle_create = T("Add a new Assessment Question"),
322 subtitle_list = T("Survey Templates"),
323 label_list_button = T("List all Assessment Questions"),
324 label_create_button = T("Add a new Assessment Question"),
325 label_delete_button = T("Delete this Assessment Question"),
326 msg_record_created = T("Assessment Question added"),
327 msg_record_modified = T("Assessment Question updated"),
328 msg_record_deleted = T("Assessment Question deleted"),
329 msg_list_empty = T("No Assessment Question currently registered"))
330
331
273 332
274 # Question Metadata333 # Question Metadata
275 """ This table is referenced by the questions table and is used to manage 334 """ This table is referenced by the questions table and is used to manage
@@ -304,9 +363,25 @@
304 *s3_meta_fields()363 *s3_meta_fields()
305 )364 )
306365
307366 # CRUD Strings
308 367 s3.crud_strings[tablename] = Storage(
309 368 title_create = T("Add Question Meta-Data"),
369 title_display = T("Question Meta-Data Details"),
370 title_list = T("List of Question Meta-Data"),
371 title_update = T("Edit Question Meta-Data"),
372 subtitle_create = T("Add new Question Meta-Data"),
373 subtitle_list = T("Question Meta-Data"),
374 label_list_button = T("List all Question Meta-Data"),
375 label_create_button = T("Add new Question Meta-Data"),
376 label_delete_button = T("Delete this Question Meta-Data"),
377 msg_record_created = T("Question Meta-Data added"),
378 msg_record_modified = T("Question Meta-Data updated"),
379 msg_record_deleted = T("Question Meta-Data deleted"),
380 msg_list_empty = T("No Question Meta-Data currently registered"),
381 uploadTitle = T("Upload a Question List import file")
382 )
383
384
310 # Question Types385 # Question Types
311 def survey_stringType():386 def survey_stringType():
312 return S3QuestionTypeStringWidget()387 return S3QuestionTypeStringWidget()
@@ -366,6 +441,11 @@
366 *s3_meta_fields()441 *s3_meta_fields()
367 )442 )
368443
444 # CRUD Strings
445 s3.crud_strings[tablename] = Storage(
446 uploadTitle = T("Upload a Survey Template import file")
447 )
448
369 def getAllQuestionsForTemplate(template_id):449 def getAllQuestionsForTemplate(template_id):
370 """450 """
371 function to return the list of questions for the given template451 function to return the list of questions for the given template
@@ -528,7 +608,24 @@
528 Field("start_date", "date", default=None),608 Field("start_date", "date", default=None),
529 Field("end_date", "date", default=None),609 Field("end_date", "date", default=None),
530 *s3_meta_fields())610 *s3_meta_fields())
531 611
612 # CRUD Strings
613 s3.crud_strings[tablename] = Storage(
614 title_create = T("Add Survey Series"),
615 title_display = T(" Survey Series Details"),
616 title_list = T("List of Survey Series"),
617 title_update = T("Edit Survey Series"),
618 subtitle_create = T("Add a new Survey Series"),
619 subtitle_list = T("Survey Series"),
620 label_list_button = T("List all Survey Series"),
621 label_create_button = T("Add a new Survey Series"),
622 label_delete_button = T("Delete this Survey Series"),
623 msg_record_created = T("Survey Series added"),
624 msg_record_modified = T("Survey Series updated"),
625 msg_record_deleted = T("Survey Series deleted"),
626 msg_list_empty = T("No Survey Series currently registered"))
627
628
532 def survey_series_rheader(r, tabs=[]):629 def survey_series_rheader(r, tabs=[]):
533 if r.representation == "html":630 if r.representation == "html":
534 631
@@ -536,9 +633,9 @@
536 if tablename == "survey_series" and record:633 if tablename == "survey_series" and record:
537 634
538 # Tabs635 # Tabs
539 tabs = [#(T("New Response"), "complete"),636 tabs = [(T("New Assessment"), "newAssessment/"),
637 (T("Completed Assessments"), "complete"),
540 (T("Series Details"), None),638 (T("Series Details"), None),
541 (T("Completed Questionnaires"), "complete"),
542 ]639 ]
543 rheader_tabs = s3_rheader_tabs(r, tabs)640 rheader_tabs = s3_rheader_tabs(r, tabs)
544 641
@@ -602,10 +699,32 @@
602 list_fields = ["created_on", "series_id", "answer_list"]699 list_fields = ["created_on", "series_id", "answer_list"]
603 s3mgr.configure("survey_complete", list_fields=list_fields)700 s3mgr.configure("survey_complete", list_fields=list_fields)
604701
702 def survey_serieslist_dataTable_post(r):
703 s3_action_buttons(r)
704 response.s3.actions = [
705 dict(label=str(T("Open")),
706 _class="action-btn",
707 url=URL(c=module,
708 f="newAssessment",
709 vars={"viewing":"survey_series.[id]"})
710 ),
711 dict(label=str(T("Analysis")),
712 _class="action-btn",
713 url=URL(c=module,
714 f="analysis",
715 args=["[id]"])
716 ),
717 ]
718
605 def survey_answerlist_dataTable_post(r):719 def survey_answerlist_dataTable_post(r):
606 s3_action_buttons(r)720 s3_action_buttons(r)
607 response.s3.actions = \721 response.s3.actions = [
608 response.s3.actions + [722 dict(label=str(T("Open")),
723 _class="action-btn",
724 url=URL(c=module,
725 f="series",
726 args=[r.id,"complete","[id]","update"])
727 ),
609 dict(label=str(T("Analysis")),728 dict(label=str(T("Analysis")),
610 _class="action-btn",729 _class="action-btn",
611 url=URL(c=module,730 url=URL(c=module,
@@ -630,6 +749,24 @@
630 ),749 ),
631 *s3_meta_fields())750 *s3_meta_fields())
632751
752 # CRUD Strings
753 s3.crud_strings[tablename] = Storage(
754 title_create = T("Complete a new Assessment"),
755 title_display = T("Completed Assessment Details"),
756 title_list = T("List of Completed Assessments"),
757 title_update = T("Edit Completed Assessment"),
758 subtitle_create = T("Add a new Completed Assessment"),
759 subtitle_list = T("Completed Assessment"),
760 label_list_button = T("List all Completed Assessment"),
761 label_create_button = T("Add a new Completed Assessment"),
762 label_delete_button = T("Delete this Completed Assessment"),
763 msg_record_created = T("Completed Assessment added"),
764 msg_record_modified = T("Completed Assessment updated"),
765 msg_record_deleted = T("Completed Assessment deleted"),
766 msg_list_empty = T("No Completed Assessments currently registered"),
767 uploadTitle = T("Upload the Completed Assessments import file")
768 )
769
633 def survey_complete_onaccept(form):770 def survey_complete_onaccept(form):
634 """771 """
635 All of the answers will be stored in the answer_list in the format772 All of the answers will be stored in the answer_list in the format
@@ -701,6 +838,22 @@
701 *s3_meta_fields())838 *s3_meta_fields())
702839
703840
841 # CRUD Strings
842 s3.crud_strings[tablename] = Storage(
843 title_create = T("Add Assessment Answer"),
844 title_display = T("Assessment Answer Details"),
845 title_list = T("List of Assessment Answers"),
846 title_update = T("Edit Assessment Answer"),
847 subtitle_create = T("Add a new Assessment Answer"),
848 subtitle_list = T("Assessment Answer"),
849 label_list_button = T("List all Assessment Answer"),
850 label_create_button = T("Add a new Assessment Answer"),
851 label_delete_button = T("Delete this Assessment Answer"),
852 msg_record_created = T("Assessment Answer added"),
853 msg_record_modified = T("Assessment Answer updated"),
854 msg_record_deleted = T("Assessment Answer deleted"),
855 msg_list_empty = T("No Assessment Answers currently registered"))
856
704 857
705 858
706 859
@@ -816,6 +969,7 @@
816 survey_answer_list_represent = survey_answer_list_represent,969 survey_answer_list_represent = survey_answer_list_represent,
817 survey_answerlist_dataTable_pre = survey_answerlist_dataTable_pre,970 survey_answerlist_dataTable_pre = survey_answerlist_dataTable_pre,
818 survey_answerlist_dataTable_post = survey_answerlist_dataTable_post,971 survey_answerlist_dataTable_post = survey_answerlist_dataTable_post,
972 survey_serieslist_dataTable_post = survey_serieslist_dataTable_post,
819 survey_save_answers_for_series = survey_save_answers_for_series,973 survey_save_answers_for_series = survey_save_answers_for_series,
820 survey_build_series_questions = survey_build_series_questions,974 survey_build_series_questions = survey_build_series_questions,
821 survey_build_template_questions = survey_build_template_questions,975 survey_build_template_questions = survey_build_template_questions,
822976
=== modified file 'modules/s3/s3import.py'
--- modules/s3/s3import.py 2011-08-20 13:47:18 +0000
+++ modules/s3/s3import.py 2011-08-21 15:15:26 +0000
@@ -197,7 +197,10 @@
197 self.ErrorUploadFileMissing = T("The file to upload is missing")197 self.ErrorUploadFileMissing = T("The file to upload is missing")
198 self.WarningNoRecords = T("No records to import")198 self.WarningNoRecords = T("No records to import")
199 self.WarningNoJobToDelete = T("No job to delete, maybe it has already been deleted.")199 self.WarningNoJobToDelete = T("No job to delete, maybe it has already been deleted.")
200 self.uploadTitle = T("Upload a %s import file" % r.function)200 if "uploadTitle" in current.response.s3.crud_strings[self.tablename]:
201 self.uploadTitle = current.response.s3.crud_strings[self.tablename].uploadTitle
202 else:
203 self.uploadTitle = T("Upload a %s import file" % r.function)
201 self.displayJobTitle = T("Details of the selected import job")204 self.displayJobTitle = T("Details of the selected import job")
202 self.displayJobListTitle = T("List of import items")205 self.displayJobListTitle = T("List of import items")
203 self.fileUploaded = T("Import file uploaded")206 self.fileUploaded = T("Import file uploaded")
204207
=== modified file 'private/prepopulate/demo/ADAT/questionnaire24H.csv'
--- private/prepopulate/demo/ADAT/questionnaire24H.csv 2011-08-20 09:29:54 +0000
+++ private/prepopulate/demo/ADAT/questionnaire24H.csv 2011-08-21 15:15:26 +0000
@@ -45,7 +45,7 @@
45"24Hour","Rapid onset disaster. First 24 hours, rapid field assessment form (B)","Response",7,"Is the community responding to the disaster?","YesNoDontKnow",,44,"24H-Re-2",,,,,,45"24Hour","Rapid onset disaster. First 24 hours, rapid field assessment form (B)","Response",7,"Is the community responding to the disaster?","YesNoDontKnow",,44,"24H-Re-2",,,,,,
46"24Hour","Rapid onset disaster. First 24 hours, rapid field assessment form (B)","Response",7,"Are NGOs responding in the disaster area?","YesNoDontKnow",,45,"24H-Re-3",,,,,,46"24Hour","Rapid onset disaster. First 24 hours, rapid field assessment form (B)","Response",7,"Are NGOs responding in the disaster area?","YesNoDontKnow",,45,"24H-Re-3",,,,,,
47"24Hour","Rapid onset disaster. First 24 hours, rapid field assessment form (B)","Response",7,"Which NGOs responding in the disaster area?","Text",,46,"24H-Re-4",,,,,,47"24Hour","Rapid onset disaster. First 24 hours, rapid field assessment form (B)","Response",7,"Which NGOs responding in the disaster area?","Text",,46,"24H-Re-4",,,,,,
48"24Hour","Rapid onset disaster. First 24 hours, rapid field assessment form (B)","Response",7,"Expected needs","Option",,47,"24H-Re-5","Length",3,1,"Rural",2,"Peri–Urban"48"24Hour","Rapid onset disaster. First 24 hours, rapid field assessment form (B)","Response",7,"Expected needs","Option",,47,"24H-Re-5","Length",3,1,"Rural",2,"Peri-Urban"
49"24Hour","Rapid onset disaster. First 24 hours, rapid field assessment form (B)","Response",7,"Expected needs","Option",,47,"24H-Re-5",3,"Urban ",,,,49"24Hour","Rapid onset disaster. First 24 hours, rapid field assessment form (B)","Response",7,"Expected needs","Option",,47,"24H-Re-5",3,"Urban ",,,,
50"24Hour","Rapid onset disaster. First 24 hours, rapid field assessment form (B)","Risks",5,"Concerns for Toxic spills","YesNo",,48,"24H-Ri-1",,,,,,50"24Hour","Rapid onset disaster. First 24 hours, rapid field assessment form (B)","Risks",5,"Concerns for Toxic spills","YesNo",,48,"24H-Ri-1",,,,,,
51"24Hour","Rapid onset disaster. First 24 hours, rapid field assessment form (B)","Risks",5,"Concerns for Oil spills","YesNo",,49,"24H-Ri-2",,,,,,51"24Hour","Rapid onset disaster. First 24 hours, rapid field assessment form (B)","Risks",5,"Concerns for Oil spills","YesNo",,49,"24H-Ri-2",,,,,,
5252
=== modified file 'private/prepopulate/demo/ADAT/questionnaire72H.csv'
--- private/prepopulate/demo/ADAT/questionnaire72H.csv 2011-08-19 04:23:49 +0000
+++ private/prepopulate/demo/ADAT/questionnaire72H.csv 2011-08-21 15:15:26 +0000
@@ -39,11 +39,11 @@
39"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Explain","String",,38,"72B12.3.1",,,,,,39"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Explain","String",,38,"72B12.3.1",,,,,,
40"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Is this food accessible to all the affected people, or do only a few have access?","String",,39,"72B12.4",,,,,,40"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Is this food accessible to all the affected people, or do only a few have access?","String",,39,"72B12.4",,,,,,
41"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Do people have access to cooking facilities? ","YesNo",,40,"72B12.5",,,,,,41"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Do people have access to cooking facilities? ","YesNo",,40,"72B12.5",,,,,,
42"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Utensils:","Option",,41,"72B12.5.1","Length",3,1,"“None”",2,"Few"42"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Utensils:","Option",,41,"72B12.5.1","Length",3,1,"'None'",2,"Few"
43"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Utensils:","Option",,41,"72B12.5.1",3,"Many",,,,43"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Utensils:","Option",,41,"72B12.5.1",3,"Many",,,,
44"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Fuel","Option",,42,"72B12.5.2","Length",3,1,"“None”",2,"Few"44"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Fuel","Option",,42,"72B12.5.2","Length",3,1,"'None'",2,"Few"
45"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Fuel","Option",,42,"72B12.5.2",3,"Many",,,,45"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Fuel","Option",,42,"72B12.5.2",3,"Many",,,,
46"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Pots","Option",,43,"72B12.5.3","Length",3,1,"“None”",2,"Few"46"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Pots","Option",,43,"72B12.5.3","Length",3,1,"None",2,"Few"
47"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Pots","Option",,43,"72B12.5.3",3,"Many",,,,47"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Pots","Option",,43,"72B12.5.3",3,"Many",,,,
48"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Other","String",,44,"72B12.5.4",,,,,,48"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Other","String",,44,"72B12.5.4",,,,,,
49"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Do people have access to a safe place to prepare food and eat it?","YesNo",,45,"72B12.6",,,,,,49"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Nutrition",6,"Do people have access to a safe place to prepare food and eat it?","YesNo",,45,"72B12.6",,,,,,
@@ -155,5 +155,5 @@
155"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Response",12,"Is the community responding to the disaster? ","YesNoDontKnow",,143,"72B19.2",,,,,,155"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Response",12,"Is the community responding to the disaster? ","YesNoDontKnow",,143,"72B19.2",,,,,,
156"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Response",12,"Are NGOs responding in the disaster area? ","YesNoDontKnow",,144,"72B19.3",,,,,,156"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Response",12,"Are NGOs responding in the disaster area? ","YesNoDontKnow",,144,"72B19.3",,,,,,
157"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Response",12,"Which ones","String",,145,"72B19.3.1",,,,,,157"72Hour","Rapid onset disaster. First 72 hours, rapid field assessment form (B)","Response",12,"Which ones","String",,145,"72B19.3.1",,,,,,
158"24Hour",,"Response",7,"Expected needs","Option",,146,"72H-Re-5","Length",3,1,"Rural",2,"Peri–Urban"158"24Hour",,"Response",7,"Expected needs","Option",,146,"72H-Re-5","Length",3,1,"Rural",2,"Peri-Urban"
159"24Hour",,"Response",7,"Expected needs","Option",,146,"72H-Re-5",3,"Urban ",,,,159"24Hour",,"Response",7,"Expected needs","Option",,146,"72H-Re-5",3,"Urban ",,,,