mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-02 13:24:20 +01:00
146 lines
9.4 KiB
Plaintext
146 lines
9.4 KiB
Plaintext
<section class="heading b-b">
|
|
<div class="row no-gutter">
|
|
<div class="col-xs-2 col-sm-2 col-md-1">
|
|
<section class="heading-btn">
|
|
<a href="#" ng-click="backPrevLocation($event)"><i class="fa fa-long-arrow-left "></i></a>
|
|
</section>
|
|
</div>
|
|
<div class="col-xs-10 col-sm-10 col-md-8 b-l">
|
|
<section class="heading-title">
|
|
<h1 translate>{{ 'users_management' }}</h1>
|
|
</section>
|
|
</div>
|
|
|
|
</div>
|
|
</section>
|
|
|
|
<section class="m-lg">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<uib-tabset justified="true">
|
|
|
|
<uib-tab heading="{{ 'members' | translate }}">
|
|
<div class="col-md-5 m-t-lg">
|
|
<div class="form-group">
|
|
<div class="input-group">
|
|
<span class="input-group-addon"><i class="fa fa-filter"></i></span>
|
|
<input type="text" ng-model="member.searchText" class="form-control" placeholder="{{ 'search_for_an_user' | translate }}" ng-change="updateTextSearch()">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<button type="button" class="btn btn-warning m-t m-b" ui-sref="app.admin.members_new" translate>{{ 'add_a_new_member' }}</button>
|
|
<div class="pull-right">
|
|
<a class="btn btn-default" ng-href="api/members/export_members.xls" target="_blank">
|
|
<i class="fa fa-file-excel-o"></i> {{ 'members' | translate }}
|
|
</a>
|
|
<a class="btn btn-default" ng-href="api/members/export_subscriptions.xls" target="_blank" ng-if="!fablabWithoutPlans">
|
|
<i class="fa fa-file-excel-o"></i> {{ 'subscriptions' | translate }}
|
|
</a>
|
|
<a class="btn btn-default" ng-href="api/members/export_reservations.xls" target="_blank">
|
|
<i class="fa fa-file-excel-o"></i> {{ 'reservations' | translate }}
|
|
</a>
|
|
</div>
|
|
|
|
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th style="width:15%"><a href="" ng-click="setOrderMember('last_name')">{{ 'surname' | translate }} <i class="fa fa-arrows-v" ng-class="{'fa fa-sort-alpha-asc': member.order=='last_name', 'fa fa-sort-alpha-desc': member.order=='-last_name', 'fa fa-arrows-v': member.order }"></i></a></th>
|
|
|
|
<th style="width:15%"><a href="" ng-click="setOrderMember('first_name')">{{ 'first_name' | translate }} <i class="fa fa-arrows-v" ng-class="{'fa fa-sort-alpha-asc': member.order=='first_name', 'fa fa-sort-alpha-desc': member.order=='-first_name', 'fa fa-arrows-v': member.order }"></i></a></th>
|
|
|
|
<th style="width:15%"><a href="" ng-click="setOrderMember('email')">{{ 'email' | translate }} <i class="fa fa-arrows-v" ng-class="{'fa fa-sort-alpha-asc': member.order=='email', 'fa fa-sort-alpha-desc': member.order=='-email', 'fa fa-arrows-v': member.order }"></i></a></th>
|
|
|
|
<th style="width:10%"><a href="" ng-click="setOrderMember('phone')">{{ 'phone' | translate }} <i class="fa fa-arrows-v" ng-class="{'fa fa-sort-numeric-asc': member.order=='phone', 'fa fa-sort-numeric-desc': member.order=='-phone', 'fa fa-arrows-v': member.order }"></i></a></th>
|
|
|
|
<th style="width:20%"><a href="" ng-click="setOrderMember('group')">{{ 'user_type' | translate }} <i class="fa fa-arrows-v" ng-class="{'fa fa-sort-alpha-asc': member.order=='group', 'fa fa-sort-alpha-desc': member.order=='-group', 'fa fa-arrows-v': member.order }"></i></a></th>
|
|
|
|
<th style="width:15%"><a href="" ng-click="setOrderMember('plan')">{{ 'subscription' | translate }} <i class="fa fa-arrows-v" ng-class="{'fa fa-sort-alpha-asc': member.order=='plan', 'fa fa-sort-alpha-desc': member.order=='-plan', 'fa fa-arrows-v': member.order }"></i></a></th>
|
|
|
|
<th style="width:10%"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr ng-repeat="m in members">
|
|
<td class="text-c">{{ m.profile.last_name }}</td>
|
|
<td class="text-c">{{ m.profile.first_name }}</td>
|
|
<td>{{ m.email }}</td>
|
|
<td>{{ m.profile.phone }}</td>
|
|
<td class="text-u-c text-sm">{{ m.group.name }}</td>
|
|
<td>{{ m.subscribed_plan | humanReadablePlanName }}</td>
|
|
<td>
|
|
<div class="buttons">
|
|
<button class="btn btn-default" ui-sref="app.admin.members_edit({id: m.id})">
|
|
<i class="fa fa-edit"></i> {{ 'edit' | translate }}
|
|
</button>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="text-center">
|
|
<button class="btn btn-warning" ng-click="showNextMembers()" ng-hide="member.noMore"><i class="fa fa-search-plus" aria-hidden="true"></i> {{ 'display_more_users' | translate }}</button>
|
|
</div>
|
|
</div>
|
|
</uib-tab>
|
|
|
|
<uib-tab heading="{{ 'administrators' | translate }}">
|
|
<div class="col-md-5 m-t-lg">
|
|
<div class="form-group">
|
|
<div class="input-group">
|
|
<span class="input-group-addon"><i class="fa fa-filter"></i></span>
|
|
<input type="text" ng-model="searchFilter" class="form-control" placeholder="{{ 'search_for_an_administrator' | translate }}">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12">
|
|
<button type="button" class="btn btn-warning m-t m-b" ui-sref="app.admin.admins_new" translate>{{ 'add_a_new_administrator' }}</button>
|
|
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th style="width:15%"><a href="" ng-click="setOrderAdmin('profile_attributes.last_name')">{{ 'surname' | translate }} <i class="fa fa-arrows-v" ng-class="{'fa fa-sort-alpha-asc': orderAdmin =='profile_attributes.last_name', 'fa fa-sort-alpha-desc': orderAdmin =='-profile_attributes.last_name', 'fa fa-arrows-v': orderAdmin }"></i></a></th>
|
|
|
|
<th style="width:15%"><a href="" ng-click="setOrderAdmin('profile_attributes.first_name')">{{ 'first_name' | translate }} <i class="fa fa-arrows-v" ng-class="{'fa fa-sort-alpha-asc': orderAdmin =='profile_attributes.first_name', 'fa fa-sort-alpha-desc': orderAdmin =='-profile_attributes.first_name', 'fa fa-arrows-v': orderAdmin }"></i></a></th>
|
|
|
|
<th style="width:15%"><a href="" ng-click="setOrderAdmin('email')">{{ 'email' | translate }} <i class="fa fa-arrows-v" ng-class="{'fa fa-sort-alpha-asc': orderAdmin =='email', 'fa fa-sort-alpha-desc': orderAdmin =='-email', 'fa fa-arrows-v': orderAdmin }"></i></a></th>
|
|
|
|
<th style="width:10%"><a href="" ng-click="setOrderAdmin('profile_attributes.phone')">{{ 'phone' | translate }} <i class="fa fa-arrows-v" ng-class="{'fa fa-sort-numeric-asc': orderAdmin =='profile_attributes.phone', 'fa fa-sort-numeric-desc': orderAdmin =='-profile_attributes.phone', 'fa fa-arrows-v': orderAdmin }"></i></a></th>
|
|
<th style="width:10%"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr ng-repeat="admin in admins | filter:searchFilter | orderBy: orderAdmin">
|
|
<td class="text-c">{{ admin.profile_attributes.last_name }}</td>
|
|
<td class="text-c">{{ admin.profile_attributes.first_name }}</td>
|
|
<td>{{ admin.email }}</td>
|
|
<td>{{ admin.profile_attributes.phone }}</td>
|
|
<td>
|
|
<button class="btn btn-danger" ng-if="admin.id != currentUser.id" ng-click="destroyAdmin(admins, admin)">
|
|
<i class="fa fa-trash-o"></i>
|
|
</button>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</uib-tab>
|
|
|
|
<uib-tab heading="{{ 'groups' | translate }}">
|
|
<div ui-view="groups"></div>
|
|
</uib-tab>
|
|
|
|
<uib-tab heading="{{ 'tags' | translate }}">
|
|
<div ui-view="tags"></div>
|
|
</uib-tab>
|
|
|
|
<uib-tab heading="{{ 'authentication' | translate }}">
|
|
|
|
<div ui-view="authentification"></div>
|
|
</uib-tab>
|
|
</uib-tabset>
|
|
</div>
|
|
</div>
|
|
</section>
|