[SKEL] +surcharge des notifications du plugin reservation. Possibilité v3.3.0
authorLudovic CHEVALIER <ludovic@beurresarrasin.net>
Tue, 9 Feb 2021 14:41:06 +0000 (15:41 +0100)
committerLudovic CHEVALIER <ludovic@beurresarrasin.net>
Tue, 9 Feb 2021 14:41:06 +0000 (15:41 +0100)
d'ajouter un lien de visio-conférence quand on accepte une inscription

www/plugins/skel_lhc/inclure/reservation.html [new file with mode: 0644]
www/plugins/skel_lhc/lang/skel_lhc_fr.php
www/plugins/skel_lhc/paquet.xml

diff --git a/www/plugins/skel_lhc/inclure/reservation.html b/www/plugins/skel_lhc/inclure/reservation.html
new file mode 100644 (file)
index 0000000..ee6a642
--- /dev/null
@@ -0,0 +1,94 @@
+[(#REM) On peut donner soit un id_reservation, soit un tableau contenant la reservation]
+<BOUCLE_reservation (RESERVATIONS){id_reservation=#ID_RESERVATION}{tout}>
+       [(#REM) Si on trouve une reservation on prend ça comme base ]
+       #SET{details, #ARRAY} #SET{total,0}
+       <BOUCLE_reservation_details(RESERVATIONS_DETAILS){id_reservation}{id_reservations_detail ?}{tout}>
+               <BOUCLE_eve(EVENEMENTS){id_evenement==#ID_EVENEMENT}{0,1}>
+               #SET{urlvisio,#URLVISIO}
+               </BOUCLE_eve>
+               #SET{details, #GET{details}|push{
+                       #ARRAY{
+                               descriptif,#QUANTITE|>{1}|?{#QUANTITE&times;}|concat{#DESCRIPTIF*|extraire_multi|supprimer_numero},
+                               quantite, #QUANTITE,
+                               prix_ht, #PRIX_HT,
+                               statut,#STATUT,
+                               urlvisio,#GET{urlvisio}
+                               }
+                       }
+               }
+
+               [(#SET{total_ht,[(#GET{total_ht}|plus{#PRIX_HT*})]})]
+               [(#SET{total,[(#GET{total}|plus{#PRIX*})]})]
+       </BOUCLE_reservation_details>
+       #SET{reservation,#ARRAY{
+               details, #GET**{details}
+               }
+       }
+</BOUCLE_reservation>
+#SET{reservation,#ENV{reservation}}
+<//B_reservation>
+
+[ (#REM) Affichage du detail dans une table si format html demande ]
+<BOUCLE_test(CONDITION){si #GET{reservation}|et{#GET{reservation}|is_array|oui}}>
+       [(#REM) Version texte ]
+       <BOUCLE_test_format_texte(CONDITION){si #ENV{format_envoi}|=={plain}|oui}>
+       [<BOUCLE_details_texte(POUR){tableau #GET{reservation}|table_valeur{details}}>[
+       - (#VALEUR|table_valeur{descriptif}|trim|supprimer_tags)] :
+       [(#VALEUR|table_valeur{prix}|appliquer_filtre{prix_formater,[(#VALEUR|table_valeur{prix})]})]
+       </BOUCLE_details_texte>
+
+       [<:prix:label_total_ttc:> : #GET{total}|appliquer_filtre{prix_formater})]
+       </BOUCLE_test_format_texte>
+               <table class="reservation" cellspacing="0">
+                       <thead>
+                               <tr>
+                                       <th class="description"><:reservation:designation:></th>
+                                       [(#GET{total}|floatval|>{0.00}|oui)
+                                       <th class="montant"><:reservation:montant:></th>]
+                                       <th class="statut"><:reservation:label_statut:></th>
+                               </tr>
+                       </thead>
+                       <tbody>
+                               <BOUCLE_details(POUR){tableau #GET{reservation}|table_valeur{details}}>
+                               <tr class="detail [(#VALEUR|table_valeur{quantite}|>{0}|?{avec_quantite,sans_quantite})]">
+                                       <td class="description">[(#VALEUR{descriptif})]</td>
+                                       [(#GET{total}|floatval|>{0.00}|oui)
+                                       <td class="montant">#VALEUR{prix_ht}</td>
+                                       ]
+                                       <td class="statut">
+                                               [(#VAL{reservation}|re_statut_titre{#VALEUR{statut}})]
+                                       </td>
+                               </tr>
+                               <tr class="detail">
+                                       <td class="description">
+                                               <BOUCLE_lienvisio(CONDITION){si #ENV{statut}|=={accepte}}>
+                                               [<a href="(#VALEUR{urlvisio}|supprimer_tags)"><:skel_lhc:lien_visioconf:></a>]
+                                               </BOUCLE_lienvisio>
+                                       </td>
+                               </tr>
+                               </BOUCLE_details>
+                       </tbody>
+                       [(#GET{total}|floatval|>{0.00}|oui)
+                       <tfoot>
+                               [(#GET{total}|!={#GET{total_ht}}|oui)
+                               <tr class="total_ht">
+                                       <td class="descriptif">[(#PLUGIN{prix}|?{<:prix:label_total_ht:>,<:reservation:total: <:reservations_detail:label_prix_ht:>})]</td>
+                                       <td class="montant">[(#GET{total_ht}|appliquer_filtre{prix_formater,#GET{total_ht}})]</td>
+                                       <td></td>
+                               </tr>
+                               <tr class="taxes">
+                                       #SET{taxe, #GET{total}|moins{#GET{total_ht}}}
+                                       <td class="descriptif"><:reservations_detail:label_taxes:></td>
+                                       <td class="montant">[(#GET{taxe}|appliquer_filtre{prix_formater,#GET{taxe}})]</td>
+                                       <td></td>
+                               </tr>]
+                               <tr class="total_ttc">
+                                       <td class="descriptif">[(#PLUGIN{prix}|?{<:prix:label_total_ttc:>,<:reservation:total:>})]</td>
+                                       <td class="montant">[(#GET{total}|appliquer_filtre{prix_formater,#GET{total}})]</td>
+                                       <td></td>
+                               </tr>
+                       </tfoot>
+                       ]
+               </table>
+       <//B_test_format_texte>
+</BOUCLE_test>
index d0a086e..bd5e134 100644 (file)
@@ -6,6 +6,8 @@ $GLOBALS[$GLOBALS['idx_lang']] = array(
 
        // A
        'actualites_ateliers' => 'Actualités des ateliers',
+       // L
+       'lien_visioconf' => 'Lien de visioconférence',
 );
 
 ?>
index 3966ee8..d9586bf 100755 (executable)
@@ -1,7 +1,7 @@
 <paquet
     prefix="skel_lhc"
     categorie="squelette"
-    version="3.2.2"
+    version="3.3.0"
     etat="dev"
     compatibilite="[3.0.0;]"
     logo="skel_lhc.png"
@@ -13,6 +13,7 @@
     <copyright>2011-2021</copyright>
     <pipeline nom="insert_head" inclure="skel_lhc_pipelines.php" />
     <necessite nom="abomailmans" compatibilite= "[1.1.4;]" />
+    <necessite nom="cextras" compatibilite= "[3.13.0;]" />
     <necessite nom="compositions" compatibilite= "[3.3.2;]" />
     <necessite nom="crayons" compatibilite= "[1.16.1;]" />
     <necessite nom="squelette_einsteiniumist" compatibilite= "[1.0.4;]" />