Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 1659 → Rev 1660

/trunk/widget/modules/export/squelettes/export.tpl.html
84,11 → 84,21
</div>
</div>
<div class="row-fluid conteneur_selection_format">
<label class="titre_format_export">Format d'export</label>
<input type="radio" class="selection_format" name="format" value="xls" id="format_xls" checked="checked" />
<label class="label_selection_format" for="format_xls">excel (.xls)</label>
<input type="radio" class="selection_format" name="format" value="csv" id="format_csv"/>
<label class="label_selection_format" for="format_csv">csv (.csv)</label>
<label class="titre_format_export">Format d'export</label>
<ul>
<li>
<input type="radio" class="selection_format" name="format" value="xls" id="format_xls" checked="checked" />
<label class="label_selection_format" for="format_xls">excel (.xls)</label>
</li>
<li>
<input type="radio" class="selection_format" name="format" value="csv" id="format_csv"/>
<label class="label_selection_format" for="format_csv">csv (.csv)</label>
</li>
<li>
<input type="radio" class="selection_format" name="format" value="pdf" id="format_pdf"/>
<label class="label_selection_format" for="format_csv">Étiquettes PDF (.pdf)</label>
</li>
</ul>
</div>
<div>
<input class="btn" value="Télécharger les données" type="submit" />
116,4 → 126,4
//]]>
</script>
</body>
</html>
</html>
/trunk/jrest/services/CelWidgetExport.php
133,6 → 133,9
case 'xls':
$limite = 8000;
break;
case 'pdf':
$limite = 300;
break;
}
return $limite;
}
166,15 → 169,23
// TODO: tous les champs étendus et les paramètres supplémentaires devraient être passés en un seul
// tableau (et chaque formateur csv, xls etc... pourrait également être dans une classe à part)
switch($this->format) {
case 'csv':
$csv = $this->convertirEnCsv($observations, $colonnes, $colonnes_champs_supp_par_obs, $champs_supp_par_obs);
$this->envoyerCsv($csv);
break;
case 'xls':
$xls = $this->convertirEnXls($observations, $colonnes, $colonnes_champs_supp_par_obs, $champs_supp_par_obs);
$this->envoyerXls($xls);
break;
default:
case 'csv':
$csv = $this->convertirEnCsv($observations, $colonnes, $colonnes_champs_supp_par_obs, $champs_supp_par_obs);
$this->envoyerCsv($csv);
break;
case 'xls':
$xls = $this->convertirEnXls($observations, $colonnes, $colonnes_champs_supp_par_obs, $champs_supp_par_obs);
$this->envoyerXls($xls);
break;
case 'pdf':
if(count($observations) > 300) die('trop de données');
require_once('GenerateurPDF.php');
$pdf = new GenerateurPDF();
$pdf->export($observations);
$pdf->pdf->Output('etiquettes.pdf', 'I');
die;
break;
default:
}
}
/trunk/jrest/services/ExportXLS.php
145,7 → 145,7
}
 
if($parametres_format['format'] == 'pdf') {
if(count($observations) > 15) die('too much');
if(count($observations) > 300) die('too much');
require_once('GenerateurPDF.php');
 
$pdf = new GenerateurPDF();
/trunk/jrest/services/GenerateurPDF.php
5,7 → 5,6
require_once('tcpdf_config.php');
require_once('tcpdf/tcpdf.php');
 
set_time_limit(6);
Class GenerateurPDF {
 
public $pdf;