[IMP] survey: better display for survey managers/website editors

This commit is contained in:
Richard Mathot 2014-06-12 10:18:40 +02:00
parent 58a84c901e
commit 01cceb37a5
2 changed files with 8 additions and 8 deletions

View File

@ -14,8 +14,8 @@
<div class="container">
<div class="jumbotron mt32">
<t t-set="survey" t-value="survey_dict['survey']"/>
<h1><span t-field="survey.title"></span> <span style="font-size:1.5em;" class="fa fa-bar-chart-o pull-right "/></h1>
<h2><span t-field="survey.description"></span></h2>
<h1><span t-field="survey.title" /> <span style="font-size:1.5em;" class="fa fa-bar-chart-o pull-right "/></h1>
<div t-field="survey.description" class="oe_no_empty" />
</div>
<div class="panel panel-default hidden-print">
<div class="panel-heading"><span class="fa fa-filter"></span> Filters <span t-if="filter_display_data" class="pull-right text-primary clear_survey_filter"><i class="fa fa-times"></i> Clear All Filters</span></div>

View File

@ -56,7 +56,7 @@
</div>
<div class='jumbotron mt32'>
<h1 t-field='survey.title' />
<div t-field='survey.description' />
<div t-field='survey.description' class="oe_no_empty"/>
<a class="btn btn-primary btn-lg" t-att-href="'/survey/fill/%s/%s' % (slug(survey), token)">
Start Survey
</a>
@ -91,7 +91,7 @@
<div class="page-header">
<p class="pull-right">Page <span t-raw='page_nr + 1'/> on <span t-raw="len(survey.page_ids)"/></p>
<h1 t-field='page.title' />
<div t-field='page.description'/>
<div t-field='page.description' class="oe_no_empty"/>
</div>
<form role="form" method="post" class="js_surveyform" t-att-name="'%s_%s' % (survey.id, page.id)" t-att-action="'/survey/fill/%s/%s' % (slug(survey), token)" t-att-data-prefill="'/survey/prefill/%s/%s/%s' % (slug(survey), token, slug(page))" t-att-data-validate="'/survey/validate/%s' % (slug(survey))" t-att-data-submit="'/survey/submit/%s' % (slug(survey))">
@ -104,7 +104,7 @@
<span t-field='question.question' />
<span t-if="question.constr_mandatory" class="text-danger">*</span>
</h2>
<div t-field='question.description' class="text-muted"/>
<div t-field='question.description' class="text-muted oe_no_empty"/>
<t t-if="question.type == 'free_text'"><t t-call="survey.free_text"/></t>
<t t-if="question.type == 'textbox'"><t t-call="survey.textbox"/></t>
<t t-if="question.type == 'numerical_box'"><t t-call="survey.numerical_box"/></t>
@ -254,13 +254,13 @@
<div class="row">
<div class='jumbotron mt32'>
<h1><span t-field='survey.title'/></h1>
<t t-if="survey.description"><div t-field='survey.description'/></t>
<t t-if="survey.description"><div t-field='survey.description' class="oe_no_empty"/></t>
</div>
<form role="form" method="post" class="js_surveyform" t-att-name="'%s' % (survey.id)" t-att-data-prefill="'/survey/prefill/%s/%s' % (slug(survey), token)" t-att-data-scores="'/survey/scores/%s/%s' % (slug(survey), token) if quizz_correction else ''">
<t t-foreach="survey.page_ids" t-as="page">
<div class="page-header">
<h1 t-field='page.title' />
<t t-if="page.description"><div t-field='page.description'/></t>
<t t-if="page.description"><div t-field='page.description' class="oe_no_empty"/></t>
</div>
<t t-foreach='page.question_ids' t-as='question'>
<t t-set="prefix" t-value="'%s_%s_%s' % (survey.id, page.id, question.id)" />
@ -270,7 +270,7 @@
<span t-if="question.constr_mandatory" class="text-danger">*</span>
<span t-if="quizz_correction" class="badge" t-att-data-score-question="question.id"></span>
</h2>
<t t-if="question.description"><div class="text-muted" t-field='question.description' /></t>
<t t-if="question.description"><div class="text-muted oe_no_empty" t-field='question.description'/></t>
<t t-if="question.type == 'free_text'"><t t-call="survey.free_text"/></t>
<t t-if="question.type == 'textbox'"><t t-call="survey.textbox"/></t>
<t t-if="question.type == 'numerical_box'"><t t-call="survey.numerical_box"/></t>