ninegate/src/ninegate-1.0/src/Cadoles/EdispatcherBundle/Resources/views/api/messages.json.twig

46 lines
1.2 KiB
Twig
Executable File

{% import "@CadolesPortal/Pagewidget/constants.twig" as constants %}
{% set colormain = constants.mycolormain() %}
{#
{% set stylewidget = constants.mystylewidget(entity) %}
{% set stylewidgetmenu = constants.mystylewidgetmenu(entity) %}
{% set stylewidgetheader = constants.mystylewidgetheader(entity) %}
{% set stylewidgetbody = constants.mystylewidgetbody(entity) %}
<p>TEST ALERT</p>
#}
{
"messages": [
{% for alert in alerts %}
{
"id": "{{ alert.id }}",
"message": "{{ alert.content | e("js") }}",
"filtre": "aucun",
"valeur": "[]",
"flag": "",
"closeable": "{{ alert.fghideable }}",
"requestable": "false",
"display_mode": "postit",
"responses": "[]",
"url": "",
"start": "2020-09-02 00:00:00",
"stop": "2020-10-01 23:59:59",
"updated": "2020-09-03 10:45:21",
"user_responses": []
},
{% endfor %}
],
"admin": true
},
{#
id = {{ alert.id }}
background = {{ alert.alertcategory.color ? '#'~alert.alertcategory.color : '#'~colormain }};
{% if alert.alertcategory.icon %}
icon ="/{{ alias }}/{{ alert.alertcategory.icon.label }}"
{% else %}
icon = "/{{ alias }}/uploads/icon/icon_megaphone.png"
{% endif %}
title = {{ alert.title }}
hideable = {{ alert.fghideable }}
contenu = {{ alert.content }}
#}