# -*- coding: utf-8 -*- 
<%inherit file="jm2l:templates/layout.mako"/>
<%namespace name="helpers" file="jm2l:templates/helpers.mako"/>
<%
from slugify import slugify
%>
<a style="float:right;" class="btn btn-mini btn-info" role="button" href="/Salles">
    <i class="icon-plus-sign icon-white"></i> Ajouter une Salle
</a>
<h3>Gestion des salles physique aux JM2L</h3>

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

<table class="table table-striped table-bordered table-hover">
  <thead>
    <tr>
        <th colspan="2" style="text-align:center;">
            Liste des salles physiques
        </th>
    </tr>
  </thead>
  <tbody>
    % if len(DicSallePhy)==0:
        <tr> 
            <td style="text-align:center;">
                <i>Il n'y a pas de salle d&eacute;finie pour le moment.</i>
            </td>
        </tr>
    % endif
    % for SallePhy in DicSallePhy:
        <tr>
            <td>
                <div class="media">
                    <div class="pull-left" style="min-width: 300px;">
                    ${helpers.show_salles_phy(SallePhy)}
                    </div>
                    <div class="pull-right">
                        <div class="pull-right">
                            <a href="/PhySalles/${SallePhy.uid}">Modifier</a>
                        </div>
                        <br />
                        % if SallePhy.uid:
                        [ ${SallePhy.nb_places} places ]
                        % else:
                        [ <a href="/PhySalles">Cr&eacute;er</a> ]
                        % endif
                    </div>

                    <div class="media-body">
                        <h4 class="media-heading">${SallePhy.name | n}</h4>
                        % if SallePhy.description:
                            ${SallePhy.description | n}
                        % endif
                    </div>
                </div>
            </td>
        </tr>
    % endfor
  </tbody>
</table>

  </div>
</div>
<%def name="jsAddOn()">

</%def>
