182 lines
6.5 KiB
XML
182 lines
6.5 KiB
XML
<!-- ZPT macros for loops.knowledge.survey views -->
|
|
<html i18n:domain="loops">
|
|
|
|
|
|
<metal:block define-macro="survey"
|
|
tal:define="feedback item/results;
|
|
report request/report|nothing;
|
|
reportMacro python:
|
|
'report_' + (report or 'standard');
|
|
errors item/errors;
|
|
message item/message;
|
|
dummy item/update">
|
|
<metal:title use-macro="item/conceptMacros/concepttitle_only" />
|
|
<tal:description condition="not:feedback">
|
|
<div tal:define="header item/adapted/questionnaireHeader"
|
|
tal:condition="header"
|
|
tal:content="structure python:
|
|
item.renderText(header, 'text/restructured')" />
|
|
</tal:description>
|
|
|
|
<div tal:condition="feedback">
|
|
<metal:block use-macro="item/template/macros/?reportMacro" />
|
|
</div>
|
|
|
|
<div id="questionnaire"
|
|
tal:condition="not:feedback">
|
|
<tal:inst condition="item/adapted/teamBasedEvaluation">
|
|
<metal:inst use-macro="item/knowledge_macros/select_institution" />
|
|
</tal:inst>
|
|
<div class="button"
|
|
tal:define="reports item/teamReports"
|
|
tal:condition="reports">
|
|
<b i18n:translate="label_survey_show_report">Show Report</b>:
|
|
<a tal:repeat="report reports"
|
|
tal:attributes="href string:${request/URL}?report=${report/name}"
|
|
i18n:translate=""
|
|
tal:content="report/label" />
|
|
<br /><br />
|
|
</div>
|
|
<h3 i18n:translate="">Questionnaire</h3>
|
|
<div class="error"
|
|
tal:condition="errors">
|
|
<div tal:repeat="error errors">
|
|
<span i18n:translate=""
|
|
tal:content="error/text" />
|
|
</div>
|
|
</div>
|
|
<div class="message"
|
|
tal:condition="message"
|
|
i18n:translate=""
|
|
tal:content="message" />
|
|
<form method="post">
|
|
<table class="listing">
|
|
<input type="hidden" name="person"
|
|
tal:define="personId request/person|nothing"
|
|
tal:condition="personId"
|
|
tal:attributes="value personId" />
|
|
<tal:group repeat="group item/groups">
|
|
<tr>
|
|
<td> </td>
|
|
<td tal:repeat="opt item/answerOptions"> </td></tr>
|
|
<tr class="vpad">
|
|
<td tal:define="infoText group/infoText">
|
|
<b i18n:translate=""
|
|
tal:content="group/title" />
|
|
<div class="infotext"
|
|
tal:condition="infoText">
|
|
<span tal:content="structure infoText" />
|
|
</div>
|
|
</td>
|
|
<td tal:repeat="opt item/answerOptions"
|
|
style="text-align: center"
|
|
i18n:translate=""
|
|
i18n:attributes="title"
|
|
tal:attributes="title opt/description|string:"
|
|
tal:content="opt/label|string:" />
|
|
</tr>
|
|
<tal:question repeat="question group/questions">
|
|
<tal:question define="qutype python:
|
|
question.questionType or 'value_selection'">
|
|
<metal:question use-macro="item/template/macros/?qutype" />
|
|
</tal:question>
|
|
</tal:question>
|
|
</tal:group>
|
|
</table>
|
|
<input type="submit" name="submit" value="Evaluate Questionnaire"
|
|
i18n:attributes="value" />
|
|
<input type="submit" name="save" value="Save Data"
|
|
i18n:attributes="value" />
|
|
<input type="button" name="reset_responses" value="Reset Responses Entered"
|
|
i18n:attributes="value"
|
|
onclick="setRadioButtons('none'); return false" />
|
|
</form>
|
|
</div>
|
|
</metal:block>
|
|
|
|
|
|
<metal:block define-macro="value_selection">
|
|
<tr tal:attributes="class python:item.getCssClass(question)">
|
|
<td tal:content="question/text" />
|
|
<td style="white-space: nowrap; text-align: center"
|
|
tal:repeat="value python:item.getValues(question)">
|
|
<input type="radio"
|
|
i18n:attributes="title"
|
|
tal:attributes="name string:question_${question/uid};
|
|
value value/value;
|
|
checked value/checked;
|
|
title value/title" />
|
|
</td>
|
|
</tr>
|
|
</metal:block>
|
|
|
|
|
|
<metal:block define-macro="text">
|
|
<tr tal:attributes="class python:item.getCssClass(question)">
|
|
<td>
|
|
<div tal:content="question/text" />
|
|
<textarea style="width: 90%; margin-left: 20px"
|
|
tal:content="python:item.getTextValue(question)"
|
|
tal:attributes="name string:question_${question/uid}">
|
|
</textarea>
|
|
</td>
|
|
<td tal:repeat="opt item/answerOptions" />
|
|
</tr>
|
|
</metal:block>
|
|
|
|
|
|
<metal:block define-macro="report_standard">
|
|
<h3 i18n:translate="">Feedback</h3>
|
|
<div tal:define="header item/adapted/feedbackHeader"
|
|
tal:condition="header"
|
|
tal:content="structure python:
|
|
item.renderText(header, 'text/restructured')" />
|
|
<table class="listing">
|
|
<tr>
|
|
<th i18n:translate="">Category</th>
|
|
<th tal:repeat="col item/feedbackColumns"
|
|
i18n:translate=""
|
|
tal:attributes="class python:
|
|
col['name'] != 'text' and 'center' or None"
|
|
tal:content="col/label" />
|
|
</tr>
|
|
<tr style="vertical-align: top"
|
|
tal:repeat="fbitem feedback">
|
|
<td style="vertical-align: top"
|
|
tal:content="fbitem/category" />
|
|
<tal:cols repeat="col item/feedbackColumns">
|
|
<td style="vertical-align: top"
|
|
tal:define="name col/name"
|
|
tal:attributes="class python:name != 'text' and 'center' or None"
|
|
tal:content="fbitem/?name|string:" />
|
|
</tal:cols>
|
|
</tr>
|
|
</table>
|
|
<p tal:define="teamData item/teamData"
|
|
tal:condition="teamData">
|
|
<b><span i18n:translate="">Team Size</span>:
|
|
<span tal:content="python:len(teamData)" /></b><br />
|
|
</p>
|
|
<div class="button" id="show_questionnaire">
|
|
<a href="" xxonclick="back(); return false"
|
|
i18n:translate=""
|
|
tal:attributes="href string:${request/URL}${item/urlParamString}">
|
|
Back to Questionnaire</a>
|
|
<br />
|
|
</div>
|
|
<div tal:define="footer item/adapted/feedbackFooter"
|
|
tal:condition="footer"
|
|
tal:content="structure python:
|
|
item.renderText(footer, 'text/restructured')" />
|
|
</metal:block>
|
|
|
|
|
|
<metal:block define-macro="report_questions">
|
|
<h3 i18n:translate="label_survey_report_questions"></h3>
|
|
<div>
|
|
Not yet implemented
|
|
</div>
|
|
</metal:block>
|
|
|
|
|
|
</html>
|