{% set fluxs = getAllFlux(app.user, app.request) %}
{% if fluxs.getTotalItemCount > 0 %}
	{% set idcard = 'transactions' %}
	{% extends 'block/block_collapse.html.twig' %}

	{% block blocktitle %}
		<i class="fa fa-list-alt mr-4"></i> {{ 'Opérations'|trans }}
	{% endblock blocktitle %}
	{% block blocksubtitle %}
	{% endblock blocksubtitle %}
	{% block blockcontent %}
		<table class="table">
          <thead>
            <tr>
              <th scope="col">Date</th>
              <th scope="col">Type</th>
              <th scope="col">Expediteur</th>
              <th scope="col">Destinataire</th>
              <th scope="col">Montant</th>
            </tr>
          </thead>
          <tbody>
			{% for flux in fluxs %}
				{{flux.toHtmlArray()|raw}}
			{% endfor %}
		  </tbody>
		</table>
		<br/>
		<div class="btn-group">
            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                <i class="fa fa-share-square-o" aria-hidden="true"></i>
                Export
                <span class="caret"></span>
            </button>
            <ul class="dropdown-menu">
				<li>
                    <a href="{{ path('exportPrestaFlux', {'format' : 'json'}) }}">
                        <i class="fa fa-arrow-circle-o-down" aria-hidden="true"></i>
                        JSON
                    </a>
                </li>
				<li>
                    <a href="{{ path('exportPrestaFlux', {'format' : 'xml'}) }}">
                        <i class="fa fa-arrow-circle-o-down" aria-hidden="true"></i>
                        XML
                    </a>
                </li>
                <li>
                    <a href="{{ path('exportPrestaFlux', {'format' : 'csv'}) }}">
                        <i class="fa fa-arrow-circle-o-down" aria-hidden="true"></i>
                        CSV
                    </a>
                </li>
                <li>
                    <a href="{{ path('exportPrestaFlux', {'format' : 'xls'}) }}">
                        <i class="fa fa-arrow-circle-o-down" aria-hidden="true"></i>
                        XLS
                    </a>
                </li>
			</ul>
        </div>
	{% endblock blockcontent %}
{% endif %}