# -*- coding: utf-8 -*- 
<%inherit file="jm2l:templates/layout.mako"/>
<%namespace name="helpers" file="jm2l:templates/helpers.mako"/>
<%namespace name="h" file="jm2l:templates/helpers.mako"/>
<%def name="jsAddOn()">
</%def>
<%def name="cssAddOn()">
  <link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload.css">
  <link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-ui.css">
  <link rel="stylesheet" href="/css/jm2l.css" />
  <link rel="stylesheet" href="/vendor/select2/css/select2.css" type="text/css" media="screen" />
  <!-- CSS adjustments for browsers with JavaScript disabled -->
  <noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-noscript.css"></noscript>
  <noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-ui-noscript.css"></noscript>  
</%def>

<div class="row-fluid">
  <div class="span10 offset1">

    <h3>Liste des justificatifs</h3>

        <table class="table table-striped table-bordered table-hover">
          <thead>
            <tr>
                <th colspan="3" style="text-align:center;">
                    Liste des Frais
                </th>
            </tr>
            <tr>
                <th style="text-align:center;">
                    Nom
                </th>
                <th style="text-align:center;">
                    Justificatif
                </th>
                <th style="text-align:center;">
                    RIB                    
                </th>
            </tr>
          </thead>
          <tbody>
            % if len(found)==0:
                <tr> 
                    <td colspan="3" style="text-align:center;">
                        <i>Aucun justificatif trouv&eacute;</i>
                    </td>
                </tr>
            % endif
            % for item, one_dic in found.items():
                <tr>                     
                    <td>
                        <a href="/user/${item}">
                            <span class="name">${one_dic["User"]["prenom"]} ${one_dic["User"]["nom"]}</span>
                        </a>
                    </td>
                 % if one_dic.has_key("Justif"):                    
                    <td style="text-align:center;">
                        ${h.uploader("Justif", one_dic["User"]["uid"], "Justif_"+one_dic["User"]["slug"], True)}
                    </td>
                 % else:
                    <td style="text-align:center;"><i>Rien</i></td>
                 % endif

                 % if one_dic.has_key("RIB"):
                    <td style="text-align:center;">
                        ${h.uploader("RIB", one_dic["User"]["uid"], "RIB_"+one_dic["User"]["slug"], True)}
                    </td>
                 % else:
                    <td style="text-align:center;"><i>Rien</i></td>
                 % endif
                </tr>
            % endfor
          </tbody>
        </table>

  </div>
</div>
