[SKEL] +surcharge des notifications du plugin reservation. Possibilité
[lhc/web/www.git] / www / plugins / skel_lhc / inclure / reservation.html
1 [(#REM) On peut donner soit un id_reservation, soit un tableau contenant la reservation]
2 <BOUCLE_reservation (RESERVATIONS){id_reservation=#ID_RESERVATION}{tout}>
3 [(#REM) Si on trouve une reservation on prend ça comme base ]
4 #SET{details, #ARRAY} #SET{total,0}
5 <BOUCLE_reservation_details(RESERVATIONS_DETAILS){id_reservation}{id_reservations_detail ?}{tout}>
6 <BOUCLE_eve(EVENEMENTS){id_evenement==#ID_EVENEMENT}{0,1}>
7 #SET{urlvisio,#URLVISIO}
8 </BOUCLE_eve>
9 #SET{details, #GET{details}|push{
10 #ARRAY{
11 descriptif,#QUANTITE|>{1}|?{#QUANTITE&times;}|concat{#DESCRIPTIF*|extraire_multi|supprimer_numero},
12 quantite, #QUANTITE,
13 prix_ht, #PRIX_HT,
14 statut,#STATUT,
15 urlvisio,#GET{urlvisio}
16 }
17 }
18 }
19
20 [(#SET{total_ht,[(#GET{total_ht}|plus{#PRIX_HT*})]})]
21 [(#SET{total,[(#GET{total}|plus{#PRIX*})]})]
22 </BOUCLE_reservation_details>
23 #SET{reservation,#ARRAY{
24 details, #GET**{details}
25 }
26 }
27 </BOUCLE_reservation>
28 #SET{reservation,#ENV{reservation}}
29 <//B_reservation>
30
31 [ (#REM) Affichage du detail dans une table si format html demande ]
32 <BOUCLE_test(CONDITION){si #GET{reservation}|et{#GET{reservation}|is_array|oui}}>
33 [(#REM) Version texte ]
34 <BOUCLE_test_format_texte(CONDITION){si #ENV{format_envoi}|=={plain}|oui}>
35 [<BOUCLE_details_texte(POUR){tableau #GET{reservation}|table_valeur{details}}>[
36 - (#VALEUR|table_valeur{descriptif}|trim|supprimer_tags)] :
37 [(#VALEUR|table_valeur{prix}|appliquer_filtre{prix_formater,[(#VALEUR|table_valeur{prix})]})]
38 </BOUCLE_details_texte>
39
40 [<:prix:label_total_ttc:> : #GET{total}|appliquer_filtre{prix_formater})]
41 </BOUCLE_test_format_texte>
42 <table class="reservation" cellspacing="0">
43 <thead>
44 <tr>
45 <th class="description"><:reservation:designation:></th>
46 [(#GET{total}|floatval|>{0.00}|oui)
47 <th class="montant"><:reservation:montant:></th>]
48 <th class="statut"><:reservation:label_statut:></th>
49 </tr>
50 </thead>
51 <tbody>
52 <BOUCLE_details(POUR){tableau #GET{reservation}|table_valeur{details}}>
53 <tr class="detail [(#VALEUR|table_valeur{quantite}|>{0}|?{avec_quantite,sans_quantite})]">
54 <td class="description">[(#VALEUR{descriptif})]</td>
55 [(#GET{total}|floatval|>{0.00}|oui)
56 <td class="montant">#VALEUR{prix_ht}</td>
57 ]
58 <td class="statut">
59 [(#VAL{reservation}|re_statut_titre{#VALEUR{statut}})]
60 </td>
61 </tr>
62 <tr class="detail">
63 <td class="description">
64 <BOUCLE_lienvisio(CONDITION){si #ENV{statut}|=={accepte}}>
65 [<a href="(#VALEUR{urlvisio}|supprimer_tags)"><:skel_lhc:lien_visioconf:></a>]
66 </BOUCLE_lienvisio>
67 </td>
68 </tr>
69 </BOUCLE_details>
70 </tbody>
71 [(#GET{total}|floatval|>{0.00}|oui)
72 <tfoot>
73 [(#GET{total}|!={#GET{total_ht}}|oui)
74 <tr class="total_ht">
75 <td class="descriptif">[(#PLUGIN{prix}|?{<:prix:label_total_ht:>,<:reservation:total: <:reservations_detail:label_prix_ht:>})]</td>
76 <td class="montant">[(#GET{total_ht}|appliquer_filtre{prix_formater,#GET{total_ht}})]</td>
77 <td></td>
78 </tr>
79 <tr class="taxes">
80 #SET{taxe, #GET{total}|moins{#GET{total_ht}}}
81 <td class="descriptif"><:reservations_detail:label_taxes:></td>
82 <td class="montant">[(#GET{taxe}|appliquer_filtre{prix_formater,#GET{taxe}})]</td>
83 <td></td>
84 </tr>]
85 <tr class="total_ttc">
86 <td class="descriptif">[(#PLUGIN{prix}|?{<:prix:label_total_ttc:>,<:reservation:total:>})]</td>
87 <td class="montant">[(#GET{total}|appliquer_filtre{prix_formater,#GET{total}})]</td>
88 <td></td>
89 </tr>
90 </tfoot>
91 ]
92 </table>
93 <//B_test_format_texte>
94 </BOUCLE_test>