membres.html 2.25 KB
<div class="container">
    <div class="jumbotron text-center">
        <h1>Il y a
            <span id="membre-qt" class="label label-info">{{ membres.length }}</span> personne{{membres.length >= 2 ? 's' : ''}} au Club Info !</h1>
        <p>Mais avec toi, ça serait encore plus sympa !</p>
    </div>
    <table class="table table-striped table-hover">
        <thead>
            <tr>
                <th>Nom</th>
                <th>Section</th>
                <th>Rôle</th>
                <th ng-show="session.canAddMembre || session.canDelMembre">Action</th>
            </tr>
        </thead>
        <tbody as-sortable="dragControlListeners" ng-model="membres">
            <tr ng-repeat="membre in membres" as-sortable-item ng-class="{bureau: membre.bureau}">
                <td>{{ membre.nom }}</td>
                <td>{{ membre.section }}</td>
                <td>{{ membre.role }}</td>
                <td ng-show="session.canDelMembre">
                    <button type="button" class="btn btn-default" aria-label="Déplacer" data-as-sortable-item-handle>
                        <span class="glyphicon glyphicon-resize-vertical" aria-hidden="true"></span>
                    </button>
                    <button type="button" class="btn btn-danger" aria-label="Expulser" ng-click="deleteMembre($index)">
                        <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
                    </button>
                </td>
            </tr>
        </tbody>
        <tfoot id="membre-form" ng-show="session.canAddMembre">
            <tr class="form-group">
                <td>
                    <input type="text" class="form-control input-lg" placeholder="Login Polytech" ng-model="formData.login">
                </td>
                <td>
                </td>
                <td>
                    <input type="text" class="form-control input-lg" placeholder="Rôle" ng-model="formData.role">
                </td>
                <td>
                    <button type="submit" class="btn btn-primary" aria-label="Ajouter" ng-click="createMembre()">
                        <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                    </button>
                </td>
            </tr>
        </tfoot>
    </table>
</div>