mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-29 18:52:22 +01:00
filter trainings list by status
This commit is contained in:
parent
05d9e62dd2
commit
4090fe2119
@ -3,10 +3,10 @@ Application.Controllers.controller "GroupsController", ["$scope", 'groupsPromise
|
||||
## List of users groups
|
||||
$scope.groups = groupsPromise
|
||||
|
||||
## Default: we show only enabled plans
|
||||
## Default: we show only enabled groups
|
||||
$scope.groupFiltering = 'enabled'
|
||||
|
||||
## Available options for filtering plans by status
|
||||
## Available options for filtering groups by status
|
||||
$scope.filterDisabled = [
|
||||
'enabled',
|
||||
'disabled',
|
||||
|
@ -177,6 +177,16 @@ Application.Controllers.controller "TrainingsAdminController", ["$scope", "$stat
|
||||
## Binding for the parseInt function
|
||||
$scope.parseInt = parseInt
|
||||
|
||||
## Default: we show only enabled trainings
|
||||
$scope.trainingFiltering = 'enabled'
|
||||
|
||||
## Available options for filtering trainings by status
|
||||
$scope.filterDisabled = [
|
||||
'enabled',
|
||||
'disabled',
|
||||
'all',
|
||||
]
|
||||
|
||||
##
|
||||
# In the trainings listing tab, return the stringified list of machines associated with the provided training
|
||||
# @param training {Object} Training object, inherited from $resource
|
||||
|
@ -21,7 +21,20 @@
|
||||
<div class="col-md-12">
|
||||
<uib-tabset justified="true">
|
||||
<uib-tab heading="{{ 'trainings' | translate }}">
|
||||
<button type="button" class="btn btn-warning m-t m-b" ui-sref="app.admin.trainings_new" translate>{{ 'add_a_new_training' }}</button>
|
||||
<div class="m-t m-b">
|
||||
<button type="button" class="btn btn-warning" ui-sref="app.admin.trainings_new">
|
||||
<i class="fa fa-plus m-r"></i>
|
||||
<span translate>{{ 'add_a_new_training' }}</span>
|
||||
</button>
|
||||
<div class="form-group pull-right">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-filter"></i></span>
|
||||
<select ng-model="trainingFiltering" class="form-control">
|
||||
<option ng-repeat="status in filterDisabled" value="{{status}}" translate>{{ 'status_'+status }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
@ -33,7 +46,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="training in trainings">
|
||||
<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>
|
||||
|
@ -7,7 +7,7 @@
|
||||
</div>
|
||||
<div class="col-md-8 b-l b-r">
|
||||
<section class="heading-title">
|
||||
<h1 translate>{{ 'add_a_new_training' }}</h1>
|
||||
<h1 translate>{{ 'trainings_new.add_a_new_training' }}</h1>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
@ -22,8 +22,8 @@
|
||||
<div class="col-md-9 b-r nopadding">
|
||||
|
||||
<div class="alert alert-warning m-lg" role="alert">
|
||||
{{ 'beware_when_creating_a_training_its_reservation_prices_are_initialized_to_zero' | translate }}
|
||||
{{ 'dont_forget_to_change_them_before_creating_slots_for_this_training' | translate }}
|
||||
{{ 'trainings_new.beware_when_creating_a_training_its_reservation_prices_are_initialized_to_zero' | translate }}
|
||||
{{ 'trainings_new.dont_forget_to_change_them_before_creating_slots_for_this_training' | translate }}
|
||||
</div>
|
||||
|
||||
<ng-include src="'<%= asset_path 'admin/trainings/_form.html' %>'"></ng-include>
|
||||
|
@ -73,6 +73,9 @@ en:
|
||||
trainings:
|
||||
# track and monitor the trainings
|
||||
training: "Training"
|
||||
add_a_new_training: "Add a new training"
|
||||
associated_machines: "Associated machines"
|
||||
number_of_tickets: "Number of tickets"
|
||||
year_NUMBER: "Year {{NUMBER}}" # angular interpolation
|
||||
month_of_NAME: "Month of {{NAME}}" # angular interpolation
|
||||
NUMBER_reservation: "{NUMBER} {NUMBER, plural, one{reservation} other{reservations}}" # messageFormat interpolation
|
||||
@ -89,11 +92,16 @@ en:
|
||||
training_successfully_deleted: "Training successfully deleted."
|
||||
unable_to_delete_the_training_because_some_users_alredy_booked_it: "Unable to delete the training because some users already booked it."
|
||||
do_you_really_want_to_delete_this_training: "Do you really want to delete this training?"
|
||||
status_enabled: "Enabled"
|
||||
status_disabled: "Disabled"
|
||||
status_all: "All"
|
||||
|
||||
trainings_new:
|
||||
# create a new training
|
||||
beware_when_creating_a_training_its_reservation_prices_are_initialized_to_zero: "Beware, when creating a training, its reservation prices are initialized at zero."
|
||||
dont_forget_to_change_them_before_creating_slots_for_this_training: "Don't forget to change them before creating slots for this training."
|
||||
trainings_new:
|
||||
add_a_new_training: "Add a new training"
|
||||
beware_when_creating_a_training_its_reservation_prices_are_initialized_to_zero: "Beware, when creating a training, its reservation prices are initialized at zero."
|
||||
dont_forget_to_change_them_before_creating_slots_for_this_training: "Don't forget to change them before creating slots for this training."
|
||||
|
||||
events:
|
||||
# events tracking and management
|
||||
|
@ -73,6 +73,9 @@ fr:
|
||||
trainings:
|
||||
# suivre et surveiller les formations
|
||||
training: "Formation"
|
||||
add_a_new_training: "Ajouter une nouvelle formation"
|
||||
associated_machines: "Machines associées"
|
||||
number_of_tickets: "Nombre de places"
|
||||
year_NUMBER: "Année {{NUMBER}}" # angular interpolation
|
||||
month_of_NAME: "Mois de {{NAME}}" # angular interpolation
|
||||
NUMBER_reservation: "{NUMBER} {NUMBER, plural, =0{réservation} one{réservation} other{réservations}}" # messageFormat interpolation
|
||||
@ -89,11 +92,16 @@ fr:
|
||||
training_successfully_deleted: "La formation a bien été supprimée."
|
||||
unable_to_delete_the_training_because_some_users_alredy_booked_it: "La formation ne peut pas être supprimée car elle a déjà été réservée par des utilisateurs."
|
||||
do_you_really_want_to_delete_this_training: "Êtes-vous sur de vouloir supprimer cette formation ?"
|
||||
status_enabled: "Actifs"
|
||||
status_disabled: "Désactivés"
|
||||
status_all: "Tous"
|
||||
|
||||
trainings_new:
|
||||
# créer une nouvelle formation
|
||||
beware_when_creating_a_training_its_reservation_prices_are_initialized_to_zero: "Attention, lors de la création d'une formation, ses tarifs de réservation sont initialisés à zero."
|
||||
dont_forget_to_change_them_before_creating_slots_for_this_training: "Pensez à les modifier avant de créer des créneaux pour cette formation."
|
||||
trainings_new:
|
||||
add_a_new_training: "Ajouter une nouvelle formation"
|
||||
beware_when_creating_a_training_its_reservation_prices_are_initialized_to_zero: "Attention, lors de la création d'une formation, ses tarifs de réservation sont initialisés à zero."
|
||||
dont_forget_to_change_them_before_creating_slots_for_this_training: "Pensez à les modifier avant de créer des créneaux pour cette formation."
|
||||
|
||||
events:
|
||||
# gestion et suivi des évènements
|
||||
|
@ -73,6 +73,9 @@ pt:
|
||||
trainings:
|
||||
# track and monitor the trainings
|
||||
training: "Treinamento"
|
||||
add_a_new_training: "Adicionar um novo treinamento"
|
||||
associated_machines: "Máquinas associadas"
|
||||
number_of_tickets: "Número de vagas"
|
||||
year_NUMBER: "Ano {{NUMBER}}" # angular interpolation
|
||||
month_of_NAME: "Mês de {{NAME}}" # angular interpolation
|
||||
NUMBER_reservation: "{NUMBER} {NUMBER, plural, one{reserva} other{reservas}}" # messageFormat interpolation
|
||||
@ -89,11 +92,16 @@ pt:
|
||||
training_successfully_deleted: "O treinamento foi deletado com sucesso."
|
||||
unable_to_delete_the_training_because_some_users_alredy_booked_it: "Não é possível deletar o treinamento, pois alguns membros já o reservaram."
|
||||
do_you_really_want_to_delete_this_training: "Você realmente quer deletar este treinamento?"
|
||||
status_enabled: "Ativos"
|
||||
status_disabled: "Desabilitados"
|
||||
status_all: "Todos"
|
||||
|
||||
trainings_new:
|
||||
# create a new training
|
||||
beware_when_creating_a_training_its_reservation_prices_are_initialized_to_zero: "Cuidado, ao criar um treinamento, seu preço de reserva é inicializado em zero."
|
||||
dont_forget_to_change_them_before_creating_slots_for_this_training: "Não se esqueça de alterá-lo antes de criar slots para este treinamento."
|
||||
trainings_new:
|
||||
add_a_new_training: "Adicionar um novo treinamento"
|
||||
beware_when_creating_a_training_its_reservation_prices_are_initialized_to_zero: "Cuidado, ao criar um treinamento, seu preço de reserva é inicializado em zero."
|
||||
dont_forget_to_change_them_before_creating_slots_for_this_training: "Não se esqueça de alterá-lo antes de criar slots para este treinamento."
|
||||
|
||||
events:
|
||||
# events tracking and management
|
||||
|
Loading…
x
Reference in New Issue
Block a user