ajout de la conf des pdfs pour chaque message
This commit is contained in:
parent
5ec8ad9ca6
commit
615c67ce77
4 changed files with 77 additions and 7 deletions
27
action/gamuform_add_pdf.php
Normal file
27
action/gamuform_add_pdf.php
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
if (!defined('_ECRIRE_INC_VERSION')) return;
|
||||||
|
|
||||||
|
function action_gamuform_add_pdf_dist(){
|
||||||
|
|
||||||
|
include_spip('inc/autoriser');
|
||||||
|
if (! autoriser("etre","connecte")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$securiser_action = charger_fonction('securiser_action', 'inc');
|
||||||
|
$arg = $securiser_action();
|
||||||
|
$id_gamumail = $arg;
|
||||||
|
include_spip('inc/autoriser');
|
||||||
|
if (! autoriser("webmestre")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (intval($id_gamumail)) {
|
||||||
|
sql_insertq('spip_gamumail_pdfs',['id_gamumail' => intval($id_gamumail)]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cache
|
||||||
|
include_spip('inc/invalideur');
|
||||||
|
suivre_invalideur("id='id_gamumail/$id_gamumail'");
|
||||||
|
|
||||||
|
}
|
|
@ -26,6 +26,7 @@ if (!defined('_ECRIRE_INC_VERSION')) {
|
||||||
function gamumail_declarer_tables_interfaces($interfaces) {
|
function gamumail_declarer_tables_interfaces($interfaces) {
|
||||||
|
|
||||||
$interfaces['table_des_tables']['gamumails'] = 'gamumails';
|
$interfaces['table_des_tables']['gamumails'] = 'gamumails';
|
||||||
|
$interfaces['table_des_tables']['gamumail_pdfs'] = 'gamumail_pdfs';
|
||||||
|
|
||||||
return $interfaces;
|
return $interfaces;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<styoe type="text/css" media="screen">
|
<style type="text/css" media="screen">
|
||||||
.configuration_mails .objet--mail span {
|
.configuration_mails .objet--mail span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -12,6 +12,15 @@
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.un-pdf {
|
||||||
|
border: 1px solid black;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
span.label {
|
||||||
|
display: inline-block;
|
||||||
|
width: 180px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="inner configuration_mails">
|
<div class="inner configuration_mails">
|
||||||
<h1 class="txtcenter">Configuration des mails</h1>
|
<h1 class="txtcenter">Configuration des mails</h1>
|
||||||
|
@ -49,6 +58,12 @@
|
||||||
</div>
|
</div>
|
||||||
<strong>Message : </strong>
|
<strong>Message : </strong>
|
||||||
<div class="texte #EDIT{texte}">[(#TEXTE|sinon{cliquez})]</div>
|
<div class="texte #EDIT{texte}">[(#TEXTE|sinon{cliquez})]</div>
|
||||||
|
<div class="pdfs">
|
||||||
|
<INCLURE{fond=inclure/gamumail_pdfs,env,id_gamumail, ajax}>
|
||||||
|
</div>
|
||||||
|
<div class="ajax">
|
||||||
|
#FORMULAIRE_BIGFORM{gamumail, #ID_GAMUMAIL}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
27
inclure/gamumail_pdfs.html
Normal file
27
inclure/gamumail_pdfs.html
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<div class="pdfs">
|
||||||
|
[(#AUTORISER{webmestre}|oui)
|
||||||
|
<a class="btn ajax nohistory nocache" href="[(#URL_ACTION_AUTEUR{gamuform_add_pdf,#ENV{id_gamumail},#SELF})]">
|
||||||
|
+ pdf
|
||||||
|
</a>
|
||||||
|
]
|
||||||
|
|
||||||
|
<BOUCLE_pdfs(GAMUMAIL_PDFS){id_gamumail}>
|
||||||
|
<div class="un-pdf">
|
||||||
|
<div class="nom_pdf">
|
||||||
|
<h4><span class="label">Nom du fichier pdf</span>
|
||||||
|
<span class="#EDIT{pdf} inbl w600p">[(#PDF|sinon{cliquer})]</span>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="args-pdf">
|
||||||
|
<h4><span class="label">Nom des args</span>
|
||||||
|
<span class="#EDIT{args} inbl w600p">[(#ARGS|sinon{cliquer})]</span>
|
||||||
|
</h4>
|
||||||
|
<p class="explication">Si plusieurs arguments, les séparer par une virgule</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</BOUCLE_pdfs>
|
||||||
|
|
||||||
|
</div>
|
Loading…
Add table
Reference in a new issue