{% load wcs %} {% if not json_error %} {% with parametres=cards|objects:"pn_parametres_cellules"|get_full|first|get:"fields" %} {% if parametres|get:"affiche_titre" is True %}

{{ parametres|get:"titre" }}

{% endif %} {% for fiche in json.data %} {# Notifications personnalisées #} {% if request.user|has_role:"Publik Notification - Usager" %}{# Début vérification role #} {# Notifications personnalisées "Adresses" #} {% if fiche.fields.zone_diffusion_raw == "zone" %} {% with pref_adresses=cards|objects:"pn_preferences_usagers_adresses"|get_full|filter_by_user:request.user|filter_by:"type"|filter_value:"Adresse"|filter_by:"thqs_quartier"|filter_value:fiche.fields.thematique_raw|set_geo_center_lat:fiche.geolocations.base.lat|set_geo_center_lon:fiche.geolocations.base.lon|filter_by_distance:fiche.fields.rayon %} {% if pref_adresses|count > 0 %} {% for unit in pref_adresses %} {% ifchanged %} {% include "combo/publik-notifications/single-alerte.html" %} {% endifchanged %} {% endfor %} {% endif %} {% endwith %} {% endif %} {# Fin des notifications personnalisées "Adresses" #} {# Notifications personnalisées "communes" #} {% if fiche.fields.zone_diffusion_raw == "commune" %} {% with pref_adresses=cards|objects:"pn_preferences_usagers_adresses"|get_full|filter_by_user:request.user|filter_by:"commune"|filter_value:fiche.fields.commune_raw %} {% if pref_adresses|count > 0 %} {% for unit in pref_adresses %} {% with adresse_thqs_quartier=unit|get:"fields"|get:"thqs_quartier_raw" message_thq=fiche.fields.thematique_raw %} {% if message_thq in adresse_thqs_quartier %} {% ifchanged %} {% include "combo/publik-notifications/single-alerte.html" %} {% endifchanged %} {% endif %} {% endwith %} {% endfor %} {% endif %} {% endwith %} {% endif %} {# Fin des notifications personnalisées "communes" #} {# Début des notifications personnalisées "Tout le territoire" #} {% with cards|objects:"pn_preferencesusager"|filter_by_user:request.user|get_full|first as preference %} {# Debut with fiche préférence usager #} {% with thememessage=fiche.fields.thematique preferencetheme=preference.fields.thematiques %}{# Début with thememessage & preferencetheme #} {% if thememessage in preferencetheme and fiche.fields.zone_diffusion_raw == "metro" and preference.fields.metro == True %} {% include "combo/publik-notifications/single-alerte.html" %} {% endif %} {% endwith %} {% endwith %} {# Fin des notifications personnalisées "Tout le territoire" #} {% endif %} {# Fin verif rôle usager #} {# Début des notifications non personnalisées #} {% if fiche.fields.priseencompte == "Non" %} {% include "combo/publik-notifications/single-alerte.html" %} {% endif %} {# Fin des notifications non personnalisées #} {% endfor %} {# Fin de la bouche sur les fiches #} {% if parametres|get:"affiche_lien_inscription" is True %}
{% if request.user|has_role:"Publik Notification - Usager" %} {{ parametres|get:"libelle_bouton_tb_usager" }} {% elif parametres|get:"affiche_elements_non_abonnes" is True %} {% if parametres|get:"incitation_non_abonne" %}

{{ parametres|get:"incitation_non_abonne"|linebreaksbr }}

{% endif %} {{ parametres|get:"libelle_bouton_form_inscription" }} {% endif %}
{% endif %} {% endwith %} {# Fin with pour les paramètres #} {% endif %} {# Fin test json.error #} {#
{{json|pprint}}
#}