allow fine-tuning of answer option header cells via colspan and CSS class
This commit is contained in:
parent
4833ebd54b
commit
a97ea1b5d1
2 changed files with 8 additions and 4 deletions
|
@ -67,7 +67,9 @@ class IQuestionnaire(IConceptSchema, interfaces.IQuestionnaire):
|
||||||
answerOptions.column_types = [
|
answerOptions.column_types = [
|
||||||
schema.Text(__name__='value', title=u'Value',),
|
schema.Text(__name__='value', title=u'Value',),
|
||||||
schema.Text(__name__='label', title=u'Label'),
|
schema.Text(__name__='label', title=u'Label'),
|
||||||
schema.Text(__name__='description', title=u'Description'),]
|
schema.Text(__name__='description', title=u'Description'),
|
||||||
|
schema.Text(__name__='colspan', title=u'ColSpan'),
|
||||||
|
schema.Text(__name__='cssclass', title=u'CSS Class'),]
|
||||||
|
|
||||||
noGrouping = schema.Bool(
|
noGrouping = schema.Bool(
|
||||||
title=_(u'No Grouping of Questions'),
|
title=_(u'No Grouping of Questions'),
|
||||||
|
|
|
@ -76,11 +76,13 @@
|
||||||
<span tal:content="structure infoText" />
|
<span tal:content="structure infoText" />
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td tal:repeat="opt item/answerOptions"
|
<td tal:repeat="opt python:[opt for opt in item.answerOptions
|
||||||
style="text-align: center"
|
if opt.get('colspan') != '0']"
|
||||||
i18n:translate=""
|
i18n:translate=""
|
||||||
i18n:attributes="title"
|
i18n:attributes="title"
|
||||||
tal:attributes="title opt/description|string:"
|
tal:attributes="title opt/description|string:;
|
||||||
|
class python:opt.get('cssclass') or 'center';
|
||||||
|
colspan python:opt.get('colspan')"
|
||||||
tal:content="opt/label|string:" />
|
tal:content="opt/label|string:" />
|
||||||
</tr>
|
</tr>
|
||||||
<tal:question repeat="question group/questions">
|
<tal:question repeat="question group/questions">
|
||||||
|
|
Loading…
Add table
Reference in a new issue