ajouter des wrappers avec des classes qui permettent de styler la souscription
[spip_souscriptions.git] / modeles / avancement-campagne.html
index 9651f72..c339c35 100644 (file)
@@ -1,9 +1,10 @@
-<BOUCLE_avancement_campagne(SOUSCRIPTION_CAMPAGNES souscriptions transactions){id_souscription_campagne=1}{transactions.reglee=oui}{somme montant}{objectif>0}>
-[(#SET{montant,#SOMME{montant}|plus{#OBJECTIF_INITIAL}})]
-[(#SET{pourcentage_objectif,#GET{montant}|div{#OBJECTIF}|mult{100}})]
-
-Avancement de la campagne : #GET{montant} € sur #OBJECTIF € !
-<div class="progress progress-striped active">
-  <div class="bar" style="width: #GET{pourcentage_objectif}%;">#GET{pourcentage_objectif} %</div>
-</div>
-</BOUCLE_avancement_campagne>
+<BOUCLE_campagne(SOUSCRIPTION_CAMPAGNES){id_souscription_campagne=#ENV{campagne}}{objectif>0}>
+  [(#SET{pourcentage_objectif,#AVANCEMENT_CAMPAGNE|div{#OBJECTIF}|mult{100}|round{2}})]
+  <p class="avancement_texte">
+    [(#TYPE_OBJECTIF|=={don}|oui) <:souscription:label_avancement_campagne_dons{montant=#AVANCEMENT_CAMPAGNE,objectif=#OBJECTIF}:>]
+    [(#TYPE_OBJECTIF|=={adhesion}|oui) <:souscription:label_avancement_campagne_adhesions{nombre=#AVANCEMENT_CAMPAGNE,objectif=#OBJECTIF}:>]
+  </p>
+  <div class="avancement_progress progress progress-striped active">
+    <div class="bar" style="width: #GET{pourcentage_objectif}%;">#GET{pourcentage_objectif} %</div>
+  </div>
+</BOUCLE_campagne>