2016-08-04 12:08:33 +02:00
|
|
|
<div class="col-md-5 m-t-lg">
|
2019-12-20 15:47:42 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-7">
|
|
|
|
<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="{{ 'app.admin.members.search_for_an_user' | translate }}" ng-change="updateTextSearch()">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-5">
|
|
|
|
<div class="form-group">
|
|
|
|
<select ng-model="member.memberFilter" ng-change="updateMemberFilter()" class="form-control">
|
|
|
|
<option ng-repeat="filter in member.memberFilters" value="{{filter}}" translate>{{ 'app.admin.members.group_form.member_filter_'+filter }}</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
2016-08-04 12:08:33 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-12">
|
2019-12-16 16:54:40 +01:00
|
|
|
<button type="button" class="btn btn-warning m-t m-b" ui-sref="app.admin.members_new" translate>{{ 'app.admin.members.add_a_new_member' }}</button>
|
2016-08-04 12:08:33 +02:00
|
|
|
<div class="pull-right">
|
|
|
|
<a class="btn btn-default" ng-href="api/members/export_members.xlsx" target="export-frame" ng-click="alertExport('members')">
|
2019-12-16 16:54:40 +01:00
|
|
|
<i class="fa fa-file-excel-o"></i> {{ 'app.admin.members.members' | translate }}
|
2016-08-04 12:08:33 +02:00
|
|
|
</a>
|
|
|
|
<a class="btn btn-default" ng-href="api/members/export_subscriptions.xlsx" target="export-frame" ng-if="!fablabWithoutPlans" ng-click="alertExport('subscriptions')">
|
2019-12-16 16:54:40 +01:00
|
|
|
<i class="fa fa-file-excel-o"></i> {{ 'app.admin.members.subscriptions' | translate }}
|
2016-08-04 12:08:33 +02:00
|
|
|
</a>
|
|
|
|
<a class="btn btn-default" ng-href="api/members/export_reservations.xlsx" target="export-frame" ng-click="alertExport('reservations')">
|
2019-12-16 16:54:40 +01:00
|
|
|
<i class="fa fa-file-excel-o"></i> {{ 'app.admin.members.reservations' | translate }}
|
2016-08-04 12:08:33 +02:00
|
|
|
</a>
|
|
|
|
<iframe name="export-frame" height="0" width="0" class="none"></iframe>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2019-12-16 16:54:40 +01:00
|
|
|
<th style="width:15%"><a href="" ng-click="setOrderMember('last_name')">{{ 'app.admin.members.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')">{{ 'app.admin.members.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%" class="hidden-xs"><a href="" ng-click="setOrderMember('email')">{{ 'app.admin.members.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%" class="hidden-xs hidden-sm hidden-md"><a href="" ng-click="setOrderMember('phone')">{{ 'app.admin.members.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%" class="hidden-xs hidden-sm"><a href="" ng-click="setOrderMember('group')">{{ 'app.admin.members.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%" class="hidden-xs hidden-sm hidden-md"><a href="" ng-click="setOrderMember('plan')">{{ 'app.admin.members.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>
|
2016-08-04 12:08:33 +02:00
|
|
|
<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>
|
2016-09-27 09:55:24 +02:00
|
|
|
<td class="hidden-xs">{{ m.email }}</td>
|
|
|
|
<td class="hidden-xs hidden-sm hidden-md">{{ m.profile.phone }}</td>
|
|
|
|
<td class="text-u-c text-sm hidden-xs hidden-sm">{{ m.group.name }}</td>
|
|
|
|
<td class="hidden-xs hidden-sm hidden-md">{{ m.subscribed_plan | humanReadablePlanName }}</td>
|
2016-08-04 12:08:33 +02:00
|
|
|
<td>
|
|
|
|
<div class="buttons">
|
|
|
|
<button class="btn btn-default" ui-sref="app.admin.members_edit({id: m.id})">
|
2019-10-29 09:59:21 +01:00
|
|
|
<i class="fa fa-edit"></i>
|
|
|
|
</button>
|
|
|
|
<button class="btn btn-danger" ng-click="deleteMember(m.id)">
|
|
|
|
<i class="fa fa-trash"></i>
|
2016-08-04 12:08:33 +02:00
|
|
|
</button>
|
2019-12-16 16:54:40 +01:00
|
|
|
<span class="label label-danger text-white" ng-show="m.need_completion" translate>{{ 'app.admin.members.incomplete_profile' }}</span>
|
2016-08-04 12:08:33 +02:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<div class="text-center">
|
2019-12-16 16:54:40 +01:00
|
|
|
<button class="btn btn-warning" ng-click="showNextMembers()" ng-hide="member.noMore"><i class="fa fa-search-plus" aria-hidden="true"></i> {{ 'app.admin.members.display_more_users' | translate }}</button>
|
2016-08-04 12:08:33 +02:00
|
|
|
</div>
|
2019-12-16 16:54:40 +01:00
|
|
|
</div>
|