Commit 29b4fcb8 authored by Chenu Denis's avatar Chenu Denis

[fix&feature] Some minor update

parent d30b110c
......@@ -7,7 +7,7 @@
* @copyright 2014-2018 Denis Chenu <http://sondages.pro>
* @copyright 2014-2018 Belgian Health Care Knowledge Centre (KCE) <http://kce.fgov.be>
* @license AGPL v3
* @version 1.0.0
* @version 1.0.1
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
......@@ -93,7 +93,7 @@ class exportInitiativeWriter extends Writer {
$aDbColumns = array_flip(\getQuestionInformation\helpers\surveyCodeHelper::getAllQuestions($oSurvey->id));
$aDbColumns = array_intersect_key($aDbColumns,$this->neededColumns);
$this->neededColumns = array_merge($this->neededColumns,$aDbColumns);
$oOptions->selectedColumns = array_merge(array('id'),array_values($this->neededColumns));
$oOptions->selectedColumns = array_merge(array('id','submitdate'),array_values($this->neededColumns));
parent::init($oSurvey, $sLanguageCode, $oOptions);
$pdforientation=Yii::app()->getConfig('pdforientation');
if ($oOptions->output=='file') {
......@@ -136,7 +136,7 @@ class exportInitiativeWriter extends Writer {
'policyInstruments' => $this->_getPolicyInstruments($explicitValues['id'],$explicitValues['hasPolicyInstrument']),
),
1);
$this->pdf->SetHeaderData('', '', "Stip initiative survey", $explicitValues['englishName']);
$this->pdf->SetHeaderData('', '', "STIP Database export", $explicitValues['englishName']);
if($this->rowCounter == 1) {
$aPdfLanguageSettings=pdfHelper::getPdfLanguageSettings($language);
$this->pdf->SetAuthor(Yii::app()->getConfig('sitename'));
......@@ -175,7 +175,7 @@ class exportInitiativeWriter extends Writer {
$filename = $this->filename;
} else {
//Presuming this else branch is a send to client via HTTP.
$filename = "Stip_initiatives-".date('Y-m-d').".pdf";
$filename = "Stip_database_export-".date('Y-m-d').".pdf";
}
$this->pdf->Output($filename, $this->pdfDestination);
}
......
......@@ -4,7 +4,7 @@ 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:#000}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-family:inherit;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}
body{line-height:1.4;font-size:12pt}
body{line-height:1.4;font-size:10pt}
ol,ul{list-style:none}
blockquote,q{quotes:none}
blockquote:before,blockquote:after,q:before,q:after{content:none}
......@@ -25,7 +25,7 @@ p img{margin:0;}
em,q,cite{font-style:italic;}
abbr[title]{cursor:help;}
strong{font-weight:700;}
small{font-size:0.8em;}
small{font-size:10pt;}
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; }
......@@ -60,6 +60,7 @@ table {border:1pt solid #ccc}
table tr {page-break-inside:avoid}
table th {border:1pt solid #ccc;font-weight:bold}
table td {border:1pt solid #ccc;height:18pt;padding:3pt 3pt 30pt}
table.principal{font-size:10pt}
table.principal tr {page-break-inside:avoid}
table.principal th {width:30%;border:1pt solid #ccc;font-weight:bold;page-break-inside:avoid}
table.principal td {width:70%;border:1pt solid #ccc;page-break-inside:avoid}
......
......@@ -12,6 +12,10 @@
?>
<table class="principal">
<tbody>
<tr class="completed">
<th>Completed</th>
<td><?php echo (empty($values['submitdate']) ? "No" : "Yes"); ?><br></td>
</tr>
<tr class="acronym">
<th>Acronym</th>
<td><?php echo (empty($values['acronym']) ? "<br>" : nl2br($values['acronym'])); ?><br></td>
......@@ -21,7 +25,7 @@
<td><?php echo (empty($values['originalName']) ? "<br>" : nl2br($values['originalName'])); ?><br></td>
</tr>
<tr class="description">
<th>Description</th>
<th>Description *</th>
<td><?php echo (empty($values['description']) ? "<br>" : nl2br($values['description'])); ?><br><br></td>
</tr>
<tr class="date">
......@@ -33,7 +37,7 @@
?><br></td>
</tr>
<tr class="objectives">
<th>Objective(s)</th>
<th>Objective(s) *</th>
<td><?php
if(empty($values['objective_1']) && empty($values['objective_1']) && empty($values['objective_1']) && empty($values['objective_1']) && empty($values['objective_1']) && empty($values['objective_1']) ) { echo "<li></li>"; }
if(!empty($values['objective_1'])) { echo "1 - ".nl2br($values['objective_1'])."<br>"; }
......@@ -49,17 +53,21 @@
<td><?php echo (empty($values['background']) ? "<br>" : nl2br($values['background'])); ?><br><br></td>
</tr>
<tr class="hasPolicyInstrument">
<th>Type(s) of policy instrument(s) </th>
<th>Type(s) of policy instrument(s) *</th>
<td><small><?php foreach($policyInstruments as $policyInstrument) {
echo $policyInstrument['base']."<br>";
echo "&nbsp;-&nbsp;<strong>".nl2br($policyInstrument['name'])."</strong><br>";
echo "&nbsp;-&nbsp;<span style='font-size:95%'><em>".nl2br($policyInstrument['description'])."</em></span><br>";
if(!empty($policyInstrument['name'])) {
echo "&nbsp;-&nbsp;<strong>".nl2br($policyInstrument['name'])."</strong><br>";
}
if(!empty($policyInstrument['description'])) {
echo "&nbsp;-&nbsp;<span style='font-size:95%'><em>".nl2br($policyInstrument['description'])."</em></span><br>";
}
echo "<br>";
} ?>
<br><br></small></td>
</tr>
<tr class="hasTargetGroup">
<th> Direct beneficiaries : </th>
<th> Direct beneficiaries * </th>
<td><?php
$groups = $answers['targetGroup'];
$aTargetGroups = explode(",",$values['hasTargetGroup']);
......@@ -72,7 +80,9 @@
$category = $groups[$targetGroup]['category'];
echo "<strong>".$category."</strong><br>";
}
echo " &nbsp;-&nbsp; ".$groups[$targetGroup]['group']."<br>";
if(!empty($groups[$targetGroup]['group'])) {
echo " &nbsp;-&nbsp; ".$groups[$targetGroup]['group']."<br>";
}
}
}
......@@ -80,7 +90,7 @@
<br><br></td>
</tr>
<tr class="responsibleOrganisat">
<th>Name of responsible organisation(s) </th>
<th>Name of responsible organisation(s) * </th>
<td><?php
$value = str_replace(array("\r\n","\n", "\r"), array("\n","\n","\n"), $values['responsibleOrganisat']);
$arrayValues=explode("\n",$value);
......@@ -133,7 +143,7 @@
?><br><br></td>
</tr>
<tr class="yearlyBudgetRange">
<th>Estimated budget</th>
<th>Estimated budget * </th>
<td><?php
if(empty($values['yearlyBudgetRange']) && !$values['budgetAmount'] !=='') {
echo $values['budgetAmount']." (in national currency)<br>";
......@@ -174,7 +184,7 @@
?><br><br></td>
</tr>
<tr class="isEvaluated">
<th>Evaluated</th>
<th>Evaluated * </th>
<td><?php echo ((empty($values['isEvaluated']) || $values['isEvaluated'] =="0") ? "No" : "Yes"); ?><br></td>
</tr>
<tr class="evaluationURL">
......@@ -221,6 +231,7 @@
</tr>
</tbody>
</table>
<p><em>Question with * are mandatory.</em></p>
<?php
/**
Array
......
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