diff --git a/knowledge/survey/browser.py b/knowledge/survey/browser.py index 04a46d1..205ad5b 100644 --- a/knowledge/survey/browser.py +++ b/knowledge/survey/browser.py @@ -44,6 +44,7 @@ class SurveyView(ConceptView): data = None errors = None + minBatchSize = 10 @Lazy def macro(self): @@ -55,6 +56,26 @@ class SurveyView(ConceptView): if self.editable: return 'index.html' + @Lazy + def groups(self): + result = [] + if self.adapted.noGrouping: + questions = list(self.adapted.questions) + questions.sort(key=lambda x: x.title) + size = len(questions) + nb = size / self.minBatchSize + rem = size % self.minBatchSize + bs = self.minBatchSize + ((rem + self.minBatchSize) / nb) + for idx in range(0, size, bs): + result.append(dict(title=u'Question', infoText=None, + questions=questions[idx:idx+bs])) + else: + for group in self.adapted.questionGroups: + result.append(dict(title=group.title, + infoText=self.getInfoText(group), + questions=group.questions)) + return result + @Lazy def answerOptions(self): opts = self.adapted.answerOptions diff --git a/knowledge/survey/view_macros.pt b/knowledge/survey/view_macros.pt index 8f5ec42..cd14558 100644 --- a/knowledge/survey/view_macros.pt +++ b/knowledge/survey/view_macros.pt @@ -61,11 +61,14 @@
- - + + + + - + tal:repeat="question group/questions"> - +
 
  
- + +
@@ -77,7 +80,7 @@ tal:content="opt/label" />
@@ -90,7 +93,7 @@ title value/title" />
diff --git a/locales/de/LC_MESSAGES/loops.mo b/locales/de/LC_MESSAGES/loops.mo index 26ec710..775094e 100644 Binary files a/locales/de/LC_MESSAGES/loops.mo and b/locales/de/LC_MESSAGES/loops.mo differ diff --git a/locales/de/LC_MESSAGES/loops.po b/locales/de/LC_MESSAGES/loops.po index a478092..301c025 100644 --- a/locales/de/LC_MESSAGES/loops.po +++ b/locales/de/LC_MESSAGES/loops.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: 0.13.0\n" "POT-Creation-Date: 2007-05-22 12:00 CET\n" -"PO-Revision-Date: 2014-05-25 12:00 CET\n" +"PO-Revision-Date: 2014-06-03 12:00 CET\n" "Last-Translator: Helmut Merz \n" "Language-Team: loops developers \n" "MIME-Version: 1.0\n" @@ -178,6 +178,18 @@ msgstr "Glossareintrag anlegen." msgid "Answer Range" msgstr "Abstufung Bewertungen" +msgid "Answer Options" +msgstr "Antwortmöglichkeiten" + +msgid "Values to select from with corresponding column labels and descriptions. There should be at least answer range items with numeric values." +msgstr "Auszuwählende Werte mit zugehörigen Spaltenüberschriften und Beschreibungen. Es sollte mindestens so viele Einträge mit numerischen Werten geben wie durch das Feld 'Abstufung Bewertungen' vorgegeben." + +msgid "No Grouping of Questions" +msgstr "Keine Gruppierung der Fragen" + +msgid "The questions should be presented in a linear manner, not grouped by categories or question groups." +msgstr "Die Fragen sollen in linearer Reihenfolge ausgegeben und nicht nach Fragengruppen bzw. Kategorien gruppiert werden." + msgid "Feedback Footer" msgstr "Auswertungs-Hinweis" @@ -205,6 +217,9 @@ msgstr "Negative Polarität" msgid "Value inversion: High selection means low value." msgstr "Invertierung der Bewertung: Hohe gewählte Stufe bedeutet niedriger Wert." +msgid "Question" +msgstr "Frage" + msgid "Questionnaire" msgstr "Fragebogen"