Commit 483503fe authored by Chenu Denis's avatar Chenu Denis

[fix] Minimal fix for print view

parent 4f0cf831
......@@ -15,6 +15,9 @@
#}
{% extends 'layout_global.twig' %}
{% block head %}
{% if (aSurveyInfo.printPdf) %}
{{ include('./subviews/printanswers/printanswers_style.twig') }}
{% endif %}
{{ parent() }}
{% endblock %}
......
......@@ -16,10 +16,6 @@
It is used for the rendering of the responses at the end of the survey.
#}
{% if (aSurveyInfo.printPdf) %}
{{ include('./subviews/printanswers/printanswers_style.twig') }}
{% endif %}
<div class="container-fluid">
{% if (not aSurveyInfo.printPdf) %}
<div class="row hidden-print">
......
<tr class="question-container-printanswers">
{% block question_name %}
<th style="width:40%" class="text-right">
{{question.question}} ({{question.qid}})
</th>
{% endblock %}
<td style="width:60%">
{% block question_answer %}
{{ include('./subviews/printanswers/question_types/template_generic_question.twig') }}
{% endblock %}
</td>
</tr>
<style>
html{font-size: 16pt}
body {
width: auto; margin: auto;
font-size: 16pt;line-height:1.4;
background-color: white;
color: black;
font-family:Serif;
}
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}
audio,canvas,video{display:inline-block}
audio:not([controls]){display:none;height:0}[hidden],
template{display:none}
a{background:transparent}
h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:black}code,kbd,pre,samp{font-family:monospace, serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:\201C \201D \2018 \2019}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}button,input,select,textarea{font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],/* 1 */ input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}body,figure{margin:0}legend,button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
ol,ul{list-style:none}
blockquote,q{quotes:none}
blockquote:before,blockquote:after,q:before,q:after{content:none}
table{border-collapse:collapse;border-spacing:0}
body{-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;}
/*Basic Styles*/
h1, h2, h3, h4, h5, h6 {color: #181818;}
h1,h2,h3,h4,h5,h6{font-weight:400;}
h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{font-weight:400;}
h1{font-size:1.8em;line-height:1.3;margin-bottom:0.4em;}
h2{font-size:1.5em;line-height:1.4;margin-bottom:0.3em;}
h3{font-size:1.3em;line-height:1.5;margin-bottom:0.2em;}
h4{font-size:1.2em;line-height:1.5;margin-bottom:0.1em;}
h5{font-size:1.1em;line-height:1.5;}
h6{font-size:1em;line-height:1.5;}
p,dl{margin:.75em 0}
p img{margin:0;}
em,q,cite{font-style:italic;}
abbr[title]{cursor:help;}
strong{font-weight:700;}
small{font-size:0.8em;}
blockquote, blockquote p { color: #777; font-style: italic; }
blockquote { margin: 0 0 1em; padding: 0.5em 1em 0 1em; border-left: 1px solid #ededed; }
blockquote cite { display: block; font-size: 1em; color: #555; }
blockquote cite:before { content: "\2014 \0020"; }
blockquote cite a, blockquote cite a:visited, blockquote cite a:visited { color: #555; }
hr { border: solid #ededed; border-width: 1px 0 0; clear: both; margin: 0.6em 0 2em; height: 0; }
a, a:visited { color: #1eaedb; text-decoration: underline; outline: 0; cursor:pointer;}
a:hover, a:focus { color: #0fa0ce; }
p a, p a:visited { line-height: 1.4; }
ul, ol { margin-bottom: 1em; }
ul { list-style: none outside; }
ol { list-style: decimal; }
ol, ul{ margin-left: 30px; }
ul { list-style: square outside; }
ul ul { list-style: circle outside; }
ul ul ul { list-style: disc outside; }
ul ul, ul ol,
ol ol, ol ul { margin: 4px 0 5px 30px; font-size: 95%;}
img,video,svg,iframe{max-width: 100%;height: auto;}
h1{text-align:center;width:100%;}
ul{margin-top:0}
dl{margin: 0;padding: 0;}
dt{margin: 0;padding: 0;font-weight: bold;color:#222}
dd{margin: 0 0 1em 0;padding: 0;color:#444;}
h2{}
h1{width:200mm}
/* extra */
#dynamicReloadContainer{margin:5mm}
.question-container-printanswers{page-break-inside: avoid;}
a,a:visited { text-decoration: underline; }
a[href]:after { content: " (" attr(href) ")"; }
abbr[title]:after { content: " (" attr(title) ")"; }
a[href^="#"]:after, a[href^="javascript:"]:after { content: ""; }
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
thead { display: table-header-group; }
tr, img { page-break-inside: avoid; }
img { max-width: 100% !important; }
p, h2, h3, blockquote {
orphans: 3;
widows: 3;
}
h2, h3,p,blockquote, ul, ol { page-break-after: avoid; }
.label { border: 1px solid black; }
.table { border-collapse: collapse; }
.table-bordered th,.table-bordered td {border: 1px solid #ddd; }
/** NONE of this work on tcpdf : must rewrite ALL print view … **/
.col-xs-1,.col-sm-1,.col-md-1,
.col-xs-2,.col-sm-2,.col-md-2,
.col-xs-3,.col-sm-3,.col-md-3,
.col-xs-4,.col-sm-4,.col-md-4,
.col-xs-5,.col-sm-5,.col-md-5,
.col-xs-6,.col-sm-6,.col-md-6,
.col-xs-7,.col-sm-7,.col-md-7,
.col-xs-8,.col-sm-8,.col-md-8,
.col-xs-9,.col-sm-9,.col-md-9,
.col-xs-10,.col-sm-10,.col-md-10,
.col-xs-11,.col-sm-11,.col-md-11,
.col-xs-12,.col-sm-12,.col-md-12 {
position: relative;
min-height: 1px;
padding: 0;
display:table-cell;
border:2px solid red;
background:green;
}
.col-xs-12,.col-sm-12,.col-md-12 { width: 100%; }
.col-xs-11,.col-sm-11,.col-md-11 { width: 91.66666667%; }
.col-xs-10,.col-sm-10,.col-md-10 { width: 83.33333333%; }
.col-xs-9,.col-sm-9,.col-md-9 { width: 75%; }
.col-xs-8,.col-sm-8,.col-md-8 { width: 66.66666667%; }
.col-xs-7,.col-sm-7,.col-md-7 { width: 58.33333333%; }
.col-xs-6,.col-sm-6,.col-md-6 { width: 50%; }
.col-xs-5,.col-sm-5,.col-md-5 { width: 41.66666667%; }
.col-xs-4,.col-sm-4,.col-md-4 { width: 33.33333333%; }
.col-xs-3,.col-sm-3,.col-md-3 { width: 25%; }
.col-xs-2,.col-sm-2,.col-md-2 { width: 16.66666667%; }
.col-xs-1,.col-sm-1,.col-md-1 { width: 8.33333333%; }
/** End of broken part **/
td > .col-md-8 {margin:0;padding:0;float:none;width:100%}
</style>
{% if (not aSurveyInfo.printPdf) %}
<h2>{{ gT("Survey name (ID):") }} {{aSurveyInfo.surveyls_title}} ({{aSurveyInfo.sid}})</h2>
{% endif %}
{% set groupcount = 0 %}
<table class="table table-bordered">
{% for groupid,group in aSurveyInfo.groupArray %}
<tbody class="groupSection {% if groupcount %}page-break-before{% endif %}">
<tr class="groupheader"><th colspan="2"><strong class="h4">{{group.group_name}} ({{group.gid}})</strong></th></tr>
{% for questionId,question in group.answerArray %}
{% set questionTemplate = './subviews/printanswers/question_types/template_' ~ question.questionclass ~ '.twig' %}
{{ include(questionTemplate) }}
{% endfor %}
</tbody>
{% set groupcount = groupcount+1 %}
{% endfor %}
</table>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment