caisse-bliss/app/Resources/views/festival/index.html.twig

102 lines
4.0 KiB
Twig
Raw Normal View History

2018-04-05 17:24:43 +02:00
{% extends 'base.html.twig' %}
{% block body %}
2018-04-18 15:42:30 +02:00
<div class="row">
<div class="col-xs-6">
<h1>Festivals</h1></div>
<div class="col-xs-6">
<a class="btn btn-primary" href="{{ path('festival_new') }}">Nouveau festival</a>
</div>
</div>
2018-04-05 17:24:43 +02:00
2018-04-17 14:52:31 +02:00
<table class="table-responsive table-striped table table-bordered table-light">
2018-04-05 17:24:43 +02:00
<thead>
2018-04-17 14:30:15 +02:00
<tr>
<th>Id</th>
<th>Name</th>
<th>Datecreation</th>
2018-04-20 12:15:53 +02:00
<th>Tous Frais</th>
2018-04-18 15:42:30 +02:00
<th>Clients</th>
<th>fond caisse avant</th>
<th>fond caisse apres</th>
<th>chiffre affaire</th>
2018-04-20 12:15:53 +02:00
<th>fond caisse + CA</th>
<th>diff</th>
<th>bénefices CA - frais</th>
2018-04-17 14:30:15 +02:00
<th>Actions</th>
</tr>
2018-04-05 17:24:43 +02:00
</thead>
<tbody>
2018-04-20 12:15:53 +02:00
2018-05-22 16:53:23 +02:00
2018-04-05 17:24:43 +02:00
{% for festival in festivals %}
2018-05-22 16:53:23 +02:00
<tr
{% if app.user.activeFestival and (app.user.activeFestival.id == festival.id) %}
class="bg-success"
{% endif %}
>
2018-04-17 14:30:15 +02:00
<td>
<a class="btn btn-primary"
href="{{ path('festival_show', { 'id': festival.id }) }}">{{ festival.id }}</a>
</td>
2018-04-05 17:24:43 +02:00
<td>{{ festival.name }}</td>
<td>{% if festival.dateCreation %}{{ festival.dateCreation|date('Y-m-d H:i:s') }}{% endif %}</td>
2018-04-20 12:15:53 +02:00
<td>{{ festival.fraisInscription + festival.fraisTransport + festival.fraisRepas + festival.fraisHebergement }}
 €
</td>
2018-04-18 15:42:30 +02:00
<td>{{ festival.sellRecords|length }}</td>
2018-04-20 12:15:53 +02:00
<td>{{ festival.fondDeCaisseAvant }}€</td>
<td>{{ festival.fondDeCaisseApres }}€</td>
<td>{{ festival.chiffreAffaire }}€</td>
<td>{{ festival.fondDeCaisseAvant + festival.chiffreAffaire }}€</td>
<td
class="{% if (festival.chiffreAffaire - festival.fondDeCaisseApres) != 0 %}
bg-warning
{% else %}
bg-success
{% endif %}"
>{{ festival.chiffreAffaire - festival.fondDeCaisseApres }}
</td>
<td>{{ festival.chiffreAffaire - (festival.fraisInscription + festival.fraisTransport + festival.fraisRepas + festival.fraisHebergement ) }}</td>
2018-04-05 17:24:43 +02:00
<td>
2018-05-22 16:53:23 +02:00
{% if app.user.activeFestival and (app.user.activeFestival.id == festival.id) %}
Actuel
{% else %}
<a class="btn btn-success" href="{{ path('set_active_festival', { 'id': festival.id }) }}">
choisir comme actuel
</a>
{% endif %}
2018-05-22 17:21:35 +02:00
{% if festival.user|length %}
{% for u in festival.user %}
<span class="badge badge-info">{{ u.username }}</span>
{% endfor %}
{% else %}
<div class="alert alert-info">
pas d'owner.
</div>
{% endif %}
2018-04-05 17:24:43 +02:00
<ul>
2018-05-22 16:53:23 +02:00
<li class="pull-left">
2018-04-17 14:30:15 +02:00
<a class="btn btn-primary" href="{{ path('festival_show', { 'id': festival.id }) }}">voir
</a>
2018-04-05 17:24:43 +02:00
</li>
2018-05-22 16:53:23 +02:00
<li class="pull-left">
2018-04-17 14:30:15 +02:00
<a class="btn btn-primary" href="{{ path('festival_edit', { 'id': festival.id }) }}">
<i class="fa fa-pencil"></i>
2018-04-18 15:42:30 +02:00
Modifier
2018-04-17 14:30:15 +02:00
</a>
2018-04-05 17:24:43 +02:00
</li>
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
2018-04-18 15:42:30 +02:00
<a class="btn btn-primary" href="{{ path('festival_new') }}">Nouveau festival</a>
2018-04-05 17:24:43 +02:00
{% endblock %}