[FIX] survey: minor view fixes
authorRichard Mathot <rim@openerp.com>
Wed, 16 Jul 2014 12:50:19 +0000 (14:50 +0200)
committerRichard Mathot <rim@openerp.com>
Fri, 25 Jul 2014 11:47:42 +0000 (13:47 +0200)
addons/survey/views/survey_result.xml
addons/survey/views/survey_templates.xml

index 40a8a75..c6be07f 100644 (file)
@@ -15,7 +15,7 @@
                 <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>
+                    <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>
@@ -34,6 +34,7 @@
                 <div t-foreach="survey_dict['page_ids']" t-as='page_ids'>
                     <t t-set="page" t-value="page_ids['page']"/>
                     <h1 class="mt16" t-field='page.title'></h1>
+                    <div t-field="page.description" class="oe_no_empty" />
                     <hr/>
                     <div t-foreach="page_ids['question_ids']" t-as='question_ids' class="mt16">
                         <t t-set="input_summary" t-value="question_ids['input_summary']"/>
@@ -56,7 +57,7 @@
                         </h4>
                         <t t-if="input_summary['answered'] != 0">
                             <t t-if="question.description">
-                                <h5><span class="text-muted" t-field="question.description"></span></h5>
+                                <div class="text-muted oe_no_empty" t-field="question.description" />
                             </t>
                             <t t-if="question.type in ['textbox', 'free_text', 'datetime']">
                                 <t t-call="survey.result_text"></t>
                     <tbody>
                         <tr class="hidden" t-foreach="number_result['input_lines']" t-as="user_input">
                             <td><a t-att-href="'%s/%s' % (user_input.user_input_id.print_url, user_input.user_input_id.token)"><t t-esc="user_input_index + 1"></t></a></td>
-<!--                             <td><t t-esc="user_input_index+1"></t></td>
- -->                                <td>
-                                    <span t-field="user_input.value_number"></span><br/>
-                                </td>
+                            <td><span t-field="user_input.value_number"></span><br/></td>
                         </tr>
                     </tbody>
                 </table>
index 9ae973b..449a6b1 100644 (file)
@@ -8,7 +8,7 @@
                 <div class="container">
                     <div class="jumbotron mt32">
                         <h1>Thank you!</h1>
-                        <div t-field="survey.thank_you_message" />
+                        <div t-field="survey.thank_you_message" class="oe_no_empty" />
                         <div t-if='survey.quizz_mode'>You scored <t t-esc="user_input.quizz_score" /> points.</div>
                         <div>If you wish, you can <a t-att-href="'/survey/print/%s/%s' % (slug(survey), token)">review your answers</a>.</div>
                     </div>
@@ -70,7 +70,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>
         <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))">
                         <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>
                     <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)" />
                                             <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>