1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-30 11:24:21 +01:00
fab-manager/app/frontend/templates/admin/trainings/index.html

132 lines
6.3 KiB
HTML
Raw Normal View History

2016-03-23 18:39:41 +01:00
<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">
2020-09-29 14:35:42 +02:00
<a href="#" ng-click="backPrevLocation($event)"><i class="fas fa-long-arrow-alt-left "></i></a>
2016-03-23 18:39:41 +01:00
</section>
</div>
2020-02-26 17:30:27 +01:00
<div class="col-xs-10 col-sm-10 col-md-8 b-l b-r">
2016-03-23 18:39:41 +01:00
<section class="heading-title">
2019-12-16 16:54:40 +01:00
<h1 translate>{{ 'app.admin.trainings.trainings_monitoring' }}</h1>
2016-03-23 18:39:41 +01:00
</section>
</div>
2020-02-26 17:30:27 +01:00
<div class="col-md-3">
<section class="heading-actions wrapper">
<a role="button" ui-sref="app.admin.calendar" class="btn btn-lg btn-default rounded m-t-sm text-sm">
<i class="fa fa-calendar-check-o m-r" aria-hidden="true"></i><span translate>{{ 'app.admin.trainings.plan_session' }}</span>
</a>
</section>
</div>
2016-03-23 18:39:41 +01:00
</div>
</section>
2020-02-19 10:22:32 +01:00
<section class="m-lg trainings-monitoring"
2020-02-18 17:53:53 +01:00
ui-tour="trainings"
ui-tour-backdrop="true"
2020-10-05 15:34:41 +02:00
ui-tour-template-url="'/shared/tour-step-template.html'"
2020-02-19 10:22:32 +01:00
ui-tour-use-hotkeys="true"
2020-02-25 10:11:18 +01:00
ui-tour-scroll-parent-id="content-main"
2020-02-19 10:22:32 +01:00
post-render="setupTrainingsTour">
2016-03-23 18:39:41 +01:00
<div class="row">
<div class="col-md-12">
2020-02-19 12:21:24 +01:00
<uib-tabset justified="true" active="tabs.active">
<uib-tab heading="{{ 'app.admin.trainings.trainings' | translate }}" index="0" class="manage-trainings">
2017-10-10 17:38:01 +02:00
<div class="m-t m-b">
2020-04-27 17:28:11 +02:00
<button type="button" class="btn btn-warning" ui-sref="app.admin.trainings_new" ng-show="isAuthorized('admin')">
2017-10-10 17:38:01 +02:00
<i class="fa fa-plus m-r"></i>
2019-12-16 16:54:40 +01:00
<span translate>{{ 'app.admin.trainings.add_a_new_training' }}</span>
2017-10-10 17:38:01 +02:00
</button>
2020-02-19 10:22:32 +01:00
<div class="form-group pull-right filter-trainings">
2017-10-10 17:38:01 +02:00
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-filter"></i></span>
<select ng-model="trainingFiltering" class="form-control">
2019-12-16 16:54:40 +01:00
<option ng-repeat="status in filterDisabled" value="{{status}}" translate>{{ 'app.admin.trainings.status_'+status }}</option>
2017-10-10 17:38:01 +02:00
</select>
</div>
</div>
</div>
2016-03-23 18:39:41 +01:00
2020-02-19 10:22:32 +01:00
<table class="table trainings-list">
2016-03-23 18:39:41 +01:00
<thead>
2019-12-16 16:54:40 +01:00
<tr>
<th style="width:20%" translate>{{ 'app.admin.trainings.name' }}</th>
<th style="width:40%" translate>{{ 'app.admin.trainings.associated_machines' }}</th>
<th style="width:20%" translate>{{ 'app.admin.trainings.number_of_tickets' }}</th>
<th style="width:20%"></th>
</tr>
2016-03-23 18:39:41 +01:00
</thead>
<tbody>
2019-12-16 16:54:40 +01:00
<tr ng-repeat="training in trainings | filterDisabled:trainingFiltering" ng-class="{'disabled-line' : training.disabled && trainingFiltering === 'all'}">
<td>{{ training.name }}</td>
<td>{{ showMachines(training) }}</td>
<td>{{ training.nb_total_places }}</td>
<td>
2020-04-27 17:28:11 +02:00
<div class="buttons" ng-show="isAuthorized('admin')">
2019-12-16 16:54:40 +01:00
<button class="btn btn-default" ui-sref="app.admin.trainings_edit({id:training.id})">
<i class="fa fa-edit"></i> {{ 'app.shared.buttons.edit' | translate }}
</button>
<button class="btn btn-danger" ng-click="removeTraining($index, training)">
<i class="fa fa-trash-o"></i>
</button>
</div>
</td>
</tr>
2016-03-23 18:39:41 +01:00
</tbody>
</table>
</uib-tab>
2020-02-19 12:21:24 +01:00
<uib-tab heading="{{ 'app.admin.trainings.trainings_monitoring' | translate }}" class="post-tracking" index="1">
<div class="m-lg">
2019-12-16 16:54:40 +01:00
<label for="training_select" translate>{{ 'app.admin.trainings.select_a_training' }}</label>
<select ng-options="training as training.name for training in trainings" ng-model="monitoring.training" class="form-control" ng-change="selectTrainingToMonitor()" name="training_select">
</select>
</div>
2016-03-23 18:39:41 +01:00
<table class="table">
<thead>
2019-12-16 16:54:40 +01:00
<tr>
<th style="width:35%" translate>{{ 'app.admin.trainings.training' }}</th>
<th style="width:65%" translate>{{ 'app.admin.trainings.date' }}</th>
</tr>
2016-03-23 18:39:41 +01:00
</thead>
<tbody>
2019-12-16 16:54:40 +01:00
<tr ng-repeat="(training_name, years) in groupedAvailabilities">
<td>{{training_name}}</td>
<td>
<uib-accordion close-others="true">
<uib-accordion-group ng-repeat="months in years | toArray | orderBy:'$key':true" heading="{{ 'app.admin.trainings.year_NUMBER' | translate:{NUMBER:months.$key} }}" is-open="accordions[training_name][months.$key].isOpenFirst" ng-if="!months.name" class="light-accordion">
2016-03-23 18:39:41 +01:00
2019-12-16 16:54:40 +01:00
<uib-accordion close-others="true">
<uib-accordion-group ng-repeat="days in months | toArray | orderBy:'$key':true" heading="{{ 'app.admin.trainings.month_of_NAME' | translate:{NAME:formatMonth(days.$key)} }}" is-open="accordions[training_name][months.$key][days.$key].isOpenFirst" ng-if="days.$key" class="light-accordion">
2016-03-23 18:39:41 +01:00
2019-12-16 16:54:40 +01:00
<uib-accordion close-others="true">
<uib-accordion-group ng-repeat="(day, availabilities) in days" heading="{{formatDay(day, days.$key, months.$key)}}" is-open="accordions[training_name][months.$key][days.$key][day].isOpenFirst" class="light-accordion">
<ul class="list-unstyled">
<li ng-repeat="a in availabilities">
<a ng-click="showReservations(years.training, a)" class="btn btn-default">{{ a.start_at | amDateFormat:'LLL'
}} - {{ a.end_at | amDateFormat:'LT' }}</a>
<span class="label label-success" translate translate-values="{NUMBER:a.reservation_users.length}"> {{ 'app.admin.trainings.NUMBER_reservation' }}</span>
</li>
</ul>
</uib-accordion-group>
</uib-accordion>
2016-03-23 18:39:41 +01:00
2019-12-16 16:54:40 +01:00
</uib-accordion-group>
</uib-accordion>
2016-03-23 18:39:41 +01:00
2019-12-16 16:54:40 +01:00
</uib-accordion-group>
</uib-accordion>
</td>
</tr>
2016-03-23 18:39:41 +01:00
</tbody>
</table>
</uib-tab>
</uib-tabset>
</div>
</div>
</section>