{% load assets wcs %} {% if not json_error %} {% with parametres=cards|objects:"pn-v2-parametres-generaux"|get_full|first|get:"fields" %} {% with cards|objects:"pn_preferencesusager"|filter_by_user:request.user|get_full|first as preference %} {% for fiche in json.data %} {# Global notifications #} {% if fiche.fields.priseencompte == "Non" %} {% include "combo/publik-notifications/pn-single-notification.html" with refimgc="refimgdefaut" %} {% endif %} {# Custom notifications #} {% if preference.user.email == request.user.email %} {# XXX: pourquoi ça ? #} {% with thememessage=fiche.fields.thematique preferencetheme=preference.fields.thematiques %} {# Metro notifications #} {% if thememessage in preferencetheme and fiche.fields.zone_diffusion_raw == "metro" and preference.fields.metro == True %} {% include "combo/publik-notifications/pn-single-notification.html" with refimgc="pn:thematique:"|add:fiche.fields.thematique_raw %} {% endif %} {% with villesmessage=fiche.fields.villes_raw preferenceville=preference.fields.villes_raw %} {% if thememessage in preferencetheme %} {% for ville in villesmessage %} {% if ville in preferenceville %} {% ifchanged %} {% include "combo/publik-notifications/pn-single-notification.html" with refimgc="pn:thematique:"|add:fiche.fields.thematique_raw %} {% endifchanged %} {% endif %} {% endfor %} {% endif %} {% endwith %} {% endwith %}{# Fin with thememessage and preferencethemel #} {% endif %} {# Fin vérif email usager #} {% endfor %} {# Fin de la boucle sur les fiches #} {% if parametres|get:"affiche_lien_inscription" == True %} {% endif %} {% endwith %} {# Fin with fiche préférence usager #} {% endwith %} {% endif %}