{% extends "::layout.html.twig" %} {% block title %}{% trans %}Dashboard{% endtrans %} - {{ parent() }}{% endblock %} {% block content_main %} {% if is_granted('ROLE_AGENT') or is_granted('ROLE_ADMIN') or is_granted('ROLE_CLIENT') %}
{% if is_granted('ROLE_AGENT') %}

{% trans %}Affichages en cours{% endtrans %}

{% else %}

{% trans %}Mes affichages en cours{% endtrans %}

{% endif %}
{% set eventIndex = 1 %} {% for event in events %}

{% trans %}Du{% endtrans %} {{ event.startDate | date('d M Y') }} {% trans %}au{% endtrans %} {{ event.endDate | date('d M Y') }}

Mémoire : {{ event | calc_event_size }}


{% for network, config in event.socialSettings if config.status %} {% if network == 'photobooth' %} {% set networkName = 'Borne Photo' %} {% else %} {% set networkName = network | capitalize %} {% endif %} {% if network == 'photobooth' %} {% for source in config.ouibeatfeed %} {{ networkName }} : {{ source.gallery }} {% endfor %} {% endif %} {% for source in config.feed %} {% if network == 'photobooth' %} {{ networkName }} : {{ source.event }} {% else %} {{ networkName }} : {% if network in ['twitter', 'instagram'] %}#{% endif %}{{ source }} {% endif %} {% endfor %} {% if ( config.usernames is defined ) %} {% for source in config.usernames %} {{ networkName }} : @{{ source }} {% endfor %} {% endif %} {% endfor %} {% for sourceConfiguration in event.socialSettings.configurations %} {% if attribute(event.socialSettings, sourceConfiguration.type).status %} {% if sourceConfiguration.type == 'twitter' %} {% set sourceType = sourceConfiguration.type | capitalize %} {% set sourceName = '@' ~ sourceConfiguration.account %} {% elseif sourceConfiguration.type == 'instagram' %} {% set sourceType = sourceConfiguration.type | capitalize %} {% set sourceName = '@' ~ sourceConfiguration.account_username %} {% elseif sourceConfiguration.type == 'linkedin' %} {% set sourceType = 'LinkedIn' %} {% set sourceName = sourceConfiguration.page_name %} {% elseif sourceConfiguration.type == 'youtube' %} {% set sourceType = 'YouTube' %} {% set sourceName = sourceConfiguration.page_name %} {% elseif sourceConfiguration.type == 'photobooth' %} {% set sourceType = 'Borne Photo' %} {% set sourceName = sourceConfiguration.folder_id %} {% else %} {% set sourceType = sourceConfiguration.type | capitalize %} {% endif %} {{ sourceType }} : {{ sourceName }} {% endif %} {% endfor %}
{% trans %}Voir{% endtrans %} {% trans %}Editer{% endtrans %} {% if is_granted('ROLE_AGENT') or ( event.settings.setting('accessModeration') == true ) %} {% trans %}Modération{% endtrans %} {% endif %} {% trans %}Stats{% endtrans %}
{% if eventIndex is divisible by(3) %}
{% endif %} {% set eventIndex = eventIndex + 1 %} {% else %}
{% trans %}Pas d'affichages en cours{% endtrans %}
{% endfor %}
{% if is_granted('ROLE_CLIENT') and pastEvents != null %}

{% trans %}Mes affichages passés{% endtrans %}

{% for event in pastEvents %}

{% trans %}Du{% endtrans %} {{ event.startDate | date('d M Y') }} {% trans %}au{% endtrans %} {{ event.endDate | date('d M Y') }}

Mémoire : {{ event | calc_event_size }}

{% for hashtag in event.hashtags %} {{ hashtag }} {% endfor %}
{% trans %}Voir{% endtrans %} {% trans %}Editer{% endtrans %} {% if is_granted('ROLE_AGENT') or ( event.settings.setting('accessModeration') == true ) %} {% trans %}Modération{% endtrans %} {% endif %} {% trans %}Stats{% endtrans %}
{% endfor %}
{% endif %} {% if is_granted('ROLE_AGENT') %} {% if events != null %}

{% trans %}Clients avec des affichages en cours et à venir{% endtrans %}

{% for client in clients %} {% include "OuibeatAppBundle:Backend:User/list-user.html.twig" with {'user': client } %} {% endfor %}
{% endif %} {% endif %} {% endif %} {% endblock %}