48 lines
2.0 KiB
HTML
48 lines
2.0 KiB
HTML
{{if $est_admin}}
|
|
<div class="card card-perm">
|
|
<h2>Rendez-vous réguliers</h2>
|
|
{{:assign var="perm_trouve" value=false}}
|
|
<div class="scroll-cal">
|
|
<table class="permanences">
|
|
<thead><tr><th>Récurrence</th><th>Jour</th><th>Horaires</th><th>Détail</th><th>Lieu</th><th>Calendrier</th><th>Depuis / jusqu'à</th>{{if $est_admin}}<th></th>{{/if}}</tr></thead>
|
|
<tbody>
|
|
{{#load where="$$.type = 'permanence'" order="$$.jour ASC, $$.debut ASC"}}
|
|
{{:assign var="perm_trouve" value=true}}
|
|
{{:assign var="nom_jour" from="noms_jours.%s"|args:$jour}}
|
|
<tr>
|
|
<td>
|
|
{{if $type_recurrence == "mensuel"}}
|
|
{{if $semaine_du_mois == -1}}Dernier{{elseif $semaine_du_mois == 1}}1er{{else}}{{$semaine_du_mois}}e{{/if}} du mois
|
|
{{elseif $type_recurrence == "quinzaine"}}
|
|
Toutes les 2 semaines
|
|
{{else}}
|
|
Chaque semaine
|
|
{{/if}}
|
|
</td>
|
|
<td>{{$nom_jour}}</td>
|
|
<td>{{$debut}}{{if $fin}} — {{$fin}}{{/if}}</td>
|
|
<td>{{$label}}</td>
|
|
<td>{{if $lieu}}<a class="lieu-lien" href="https://www.openstreetmap.org/search?query={{$lieu|url_encode}}" target="_blank" rel="noopener">{{$lieu}}</a>{{/if}}</td>
|
|
<td>
|
|
{{:assign var="cal_eff_tab" value=$calendrier}}
|
|
{{if $cal_eff_tab == ""}}{{:assign var="cal_eff_tab" value="agenda"}}{{/if}}
|
|
{{:assign var="nom_cal_tab" from="calendriers_liste.%s.nom"|args:$cal_eff_tab}}
|
|
{{$nom_cal_tab}}
|
|
</td>
|
|
<td>{{if $date_debut}}à partir du {{$date_debut|date_short}}{{/if}}{{if $date_debut && $date_fin}}<br />{{/if}}{{if $date_fin}}jusqu'au {{$date_fin|date_short}}{{/if}}</td>
|
|
{{if $est_admin}}
|
|
<td>
|
|
<a class="mini" href="index.html?edit_perm={{$id}}#form-perm" title="Modifier">✎</a>
|
|
<form method="post" action="index.html" style="display:inline">
|
|
<button type="submit" name="suppr_perm" value="{{$id}}" class="mini" title="Supprimer">✕</button>
|
|
</form>
|
|
</td>
|
|
{{/if}}
|
|
</tr>
|
|
{{/load}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{if !$perm_trouve}}<p class="vide">Aucun rendez-vous régulier enregistré.</p>{{/if}}
|
|
</div>
|
|
{{/if}} |