diff options
Diffstat (limited to 'addons/survey/static/src/xml')
| -rw-r--r-- | addons/survey/static/src/xml/survey_breadcrumb_templates.xml | 31 | ||||
| -rw-r--r-- | addons/survey/static/src/xml/survey_session_text_answer_template.xml | 11 |
2 files changed, 42 insertions, 0 deletions
diff --git a/addons/survey/static/src/xml/survey_breadcrumb_templates.xml b/addons/survey/static/src/xml/survey_breadcrumb_templates.xml new file mode 100644 index 00000000..1df7f54a --- /dev/null +++ b/addons/survey/static/src/xml/survey_breadcrumb_templates.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates id="template" xml:space="preserve"> + +<t t-name="survey.survey_breadcrumb_template"> + <ol class="breadcrumb justify-content-end bg-transparent"> + <t t-set="canGoBack" t-value="widget.canGoBack"/> + <t t-foreach="widget.pages" t-as="page"> + <t t-set="isActivePage" t-value="page.id === widget.currentPageId"/> + <li t-att-class="'breadcrumb-item' + (isActivePage ? ' active font-weight-bold' : '')" + t-att-data-page-id="page.id" + t-att-data-page-title="page.title"> + <t t-if="widget.currentPageId === page.id"> + <!-- Users can only go back and not forward --> + <!-- As soon as we reach the current page, set "can_go_back" to False --> + <t t-set="canGoBack" t-value="false" /> + </t> + <t t-if="canGoBack"> + <a class="text-primary" href="#"> + <span t-esc="page.title" /> + </a> + </t> + <t t-else=""> + <span t-att-class="(isActivePage ? 'text-black' : 'text-muted')" + t-esc="page.title" /> + </t> + </li> + </t> + </ol> +</t> + +</templates> diff --git a/addons/survey/static/src/xml/survey_session_text_answer_template.xml b/addons/survey/static/src/xml/survey_session_text_answer_template.xml new file mode 100644 index 00000000..d37e0864 --- /dev/null +++ b/addons/survey/static/src/xml/survey_session_text_answer_template.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates id="template" xml:space="preserve"> + +<div t-name="survey.survey_session_text_answer" class="o_survey_session_text_answer d-inline-block m-1"> + <div class="o_survey_session_text_answer_container d-inline-block p-2 font-weight-bold" + t-attf-style="border-color: #{borderColor}"> + <span class="d-inline-block" t-esc="value" /> + </div> +</div> + +</templates> |
