export pdf : Il faut pouvoir passer des arg au chargement du gamutable, cf doc
This commit is contained in:
parent
c0234b53dd
commit
8df4aaf7cf
5 changed files with 18 additions and 5 deletions
|
@ -24,6 +24,7 @@ Choisir entre la version minifiée de vuejs (sans le debug) ou la version de dev
|
|||
apiuri="spip.php?page=json_souscripteurs.json",
|
||||
namepdf="resultats_epreuve_type-1",
|
||||
fichierpdf="resultats_epreuve_type-1", // obligatoire si on veut pouvoir afficher
|
||||
argpdf="#ENV{argpdf}"
|
||||
tparpage=[15,25,50,'Tous'],
|
||||
champcsv="search",
|
||||
delimitercsv=";",
|
||||
|
|
|
@ -14,6 +14,7 @@ function action_pdf_gamutable_dist() {
|
|||
$namepdf = _request('namepdf') ?? $fichierpdf;
|
||||
$header = _request('header') ?? [];
|
||||
$Tdata = _request('data') ?? [];
|
||||
$arg = _request('arg') ?? '';
|
||||
|
||||
if (empty($header) or empty($fichierpdf)) {
|
||||
exit;
|
||||
|
@ -28,11 +29,12 @@ function action_pdf_gamutable_dist() {
|
|||
|
||||
|
||||
if (find_in_path('gamutable_pdf/' . $fichierpdf . '.html')) {
|
||||
if (empty($Tcles)) {
|
||||
$fond = recuperer_fond('gamutable_pdf/' . $fichierpdf);
|
||||
} else {
|
||||
$fond = recuperer_fond('gamutable_pdf/' . $fichierpdf,['ids' => implode(',', $Tcles)]);
|
||||
$set = ['arg' => $arg];
|
||||
if (!empty($Tcles)) {
|
||||
$set = array_merge($set, ['ids' => implode(',', $Tcles)]);
|
||||
}
|
||||
$fond = recuperer_fond('gamutable_pdf/' . $fichierpdf, $set);
|
||||
|
||||
} else {
|
||||
// TODO : gamutable pourrait venir avec un fichier de generation generique
|
||||
// d'un pdf
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
delimitercsv="#ENV{delimitercsv,','}"
|
||||
namecsv="#ENV{namecsv}"
|
||||
namepdf="#ENV{namepdf}"
|
||||
argpdf="#ENV{argpdf}"
|
||||
fichierpdf="#ENV{fichierpdf}"
|
||||
urlvuebloc="[(#ENV{urlvuebloc})]"
|
||||
url_sort_asc="#ENV{sort_asc,#GET{sort_asc}}"
|
||||
|
@ -48,6 +49,7 @@
|
|||
delimitercsv="[(#ENV{delimitercsv_deux, #ENV{delimitercsv,','}})]"
|
||||
namecsv="[(#ENV{namecsv_deux, #ENV{namecsv}})]"
|
||||
namepdf="#ENV{namepdf_deux}"
|
||||
argpdf="#ENV{argpdf_deux}"
|
||||
fichierpdf="[(#ENV{fichierpdf_deux, #ENV{fichierpdf}})]"
|
||||
urlvuebloc="[(#ENV{urlvuebloc_deux})]"
|
||||
url_sort_asc="[(#ENV{sort_asc_deux, #ENV{sort_asc,#GET{sort_asc}}})]"
|
||||
|
|
|
@ -185,6 +185,9 @@ let monTableau = {
|
|||
fichierpdf: {
|
||||
type: String,
|
||||
},
|
||||
argpdf: {
|
||||
type: String,
|
||||
},
|
||||
champcsv: {
|
||||
type: String,
|
||||
},
|
||||
|
@ -712,6 +715,7 @@ let monTableau = {
|
|||
namepdf: this.namepdf,
|
||||
header: this.header,
|
||||
data: this[quoi],
|
||||
arg: this.argpdf,
|
||||
};
|
||||
let req = $.ajax({
|
||||
url: this.pdfuri,
|
||||
|
|
|
@ -241,6 +241,9 @@ var monTableau = {
|
|||
fichierpdf: {
|
||||
type: String
|
||||
},
|
||||
argpdf: {
|
||||
type: String
|
||||
},
|
||||
champcsv: {
|
||||
type: String
|
||||
},
|
||||
|
@ -809,7 +812,8 @@ var monTableau = {
|
|||
fichierpdf: this.fichierpdf,
|
||||
namepdf: this.namepdf,
|
||||
header: this.header,
|
||||
data: this[quoi]
|
||||
data: this[quoi],
|
||||
arg: this.argpdf
|
||||
};
|
||||
var req = $.ajax({
|
||||
url: this.pdfuri,
|
||||
|
|
Loading…
Add table
Reference in a new issue