1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-10 21:24:20 +01:00
fab-manager/app/assets/templates/admin/calendar/eventModal.html.erb
2019-11-12 14:25:28 +01:00

171 lines
7.5 KiB
Plaintext

<div class="modal-header">
<h3 class="text-center red">
{{ 'admin_calendar.DATE_slot' | translate:{DATE:(start | amDateFormat: 'LL')} }} {{start | amDateFormat:'LT'}} - {{end | amDateFormat:'LT'}}
</h3>
</div>
<div class="modal-body" ng-show="step === 1">
<label class="m-t-sm" translate>{{ 'admin_calendar.what_kind_of_slot_do_you_want_to_create' }}</label>
<div class="form-group">
<div class="radio">
<label>
<input type="radio" id="training" name="available_type" value="training" ng-model="availability.available_type">
<span translate>{{ 'admin_calendar.training' }}</span>
</label>
</div>
<div class="radio">
<label>
<input type="radio" id="machine" name="available_type" value="machines" ng-model="availability.available_type">
<span translate>{{ 'admin_calendar.machine' }}</span>
</label>
</div>
<div class="radio" ng-hide="fablabWithoutSpaces">
<label>
<input type="radio" id="space" name="available_type" value="space" ng-model="availability.available_type" ng-disabled="spaces.length === 0">
<span translate>{{ 'admin_calendar.space' }}</span>
</label>
</div>
</div>
</div>
<div class="modal-body" ng-show="step === 2">
<div ng-show="availability.available_type == 'machines'">
<p class="text-center font-sbold m-t-sm">{{ 'admin_calendar.select_some_machines' | translate }}</p>
<div class="form-group m-l-xl">
<label class="checkbox" ng-repeat="machine in machines">
<input type="checkbox" ng-click="toggleSelection(machine)"> {{machine.name}} <span class="text-xs">(id {{machine.id}})</span>
</label>
</div>
</div>
<div ng-show="availability.available_type == 'training'">
<select ng-model="selectedTraining" class="form-control m-t-sm" ng-options="t.name for t in trainings" ng-change="setNbTotalPlaces()">
</select>
<div class="row m-t">
<div class="form-group">
<label class="col-sm-6 control-label" for="nb_places_training" translate>{{ 'admin_calendar.number_of_tickets' }}</label>
<div class="col-sm-6">
<input type="number" id="nb_places_training" class="form-control" ng-model="availability.nb_total_places">
</div>
</div>
</div>
</div>
<div ng-show="availability.available_type == 'space'">
<select ng-model="selectedSpace" class="form-control m-t-sm" ng-options="t.name for t in spaces" ng-change="setNbTotalPlaces()">
</select>
<div class="row m-t">
<div class="form-group">
<label class="col-sm-6 control-label" for="nb_places_space" translate>{{ 'admin_calendar.number_of_tickets' }}</label>
<div class="col-sm-6">
<input type="number" id="nb_places_space" class="form-control" ng-model="availability.nb_total_places">
</div>
</div>
</div>
</div>
</div>
<div class="modal-body" ng-show="step === 3">
<div id="timeAdjust" class="m-t-sm">
<p class="text-center font-sbold" translate>{{ 'admin_calendar.adjust_the_opening_hours' }}</p>
<div class="row">
<div class="col-md-3 col-md-offset-2">
<uib-timepicker ng-model="start" hour-step="timepickers.start.hstep" readonly-input="true" minute-step="timepickers.start.mstep" show-meridian="false"></uib-timepicker>
</div>
<span class="col-md-1 m-t-xl m-l" translate>{{ 'admin_calendar.to_time' }}</span>
<fieldset ng-disabled="endDateReadOnly" class="col-md-5">
<uib-timepicker ng-model="end" hour-step="timepickers.end.hstep" readonly-input="true" minute-step="timepickers.end.mstep" show-meridian="false"></uib-timepicker>
</fieldset>
</div>
</div>
<div id="tagAssociate" class="m-t-lg">
<p class="text-center font-sbold" translate>{{ 'admin_calendar.restrict_this_slot_with_labels_optional' }}</p>
<div class="row">
<div class="col-sm-12">
<ui-select multiple ng-model="availability.tag_ids" class="form-control">
<ui-select-match>
<span ng-bind="$item.name"></span>
</ui-select-match>
<ui-select-choices repeat="t.id as t in (tags | filter: $select.search)">
<span ng-bind-html="t.name | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
</div>
</div>
</div>
</div>
<div class="modal-body m-h" ng-show="step === 4">
<div class="m-t-sm">
<p class="text-center font-sbold" translate>{{ 'admin_calendar.recurrence' }}</p>
<div class="row">
<div class="form-group">
<label for="is_recurrent" translate>{{ 'admin_calendar.enabled' }}</label>
<input bs-switch
ng-model="availability.is_recurrent"
id="is_recurrent"
type="checkbox"
class="form-control"
switch-on-text="{{ 'yes' | translate }}"
switch-off-text="{{ 'no' | translate }}"
switch-animate="true"/>
<input type="hidden" name="availability[is_recurrent]" value="{{availability.is_recurrent}}"/>
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<label for="period">{{ 'admin_calendar.period' | translate }}</label>
<select id="period"
name="period"
class="form-control"
ng-model="availability.period"
ng-required="availability.is_recurrent"
ng-disabled="!availability.is_recurrent">
<option value="week" ng-selected="availability.period == 'week'" translate>{{ 'admin_calendar.week' }}</option>
<option value="month" ng-selected="availability.period == 'month'" translate>{{ 'admin_calendar.month' }}</option>
</select>
</div>
</div>
<div class="row">
<div class="form-group">
<label for="nb_periods">{{ 'admin_calendar.number_of_periods' | translate }}</label>
<input id="nb_periods"
name="nb_periods"
class="form-control"
ng-model="availability.nb_periods"
type="number"
ng-required="availability.is_recurrent"
ng-disabled="!availability.is_recurrent" />
</div>
</div>
<div class="row">
<div class="form-group">
<label for="end_date">{{ 'admin_calendar.end_date' | translate }}</label>
<input id="end_date"
name="end_date"
class="form-control"
ng-model="availability.end_date"
type="date"
ng-required="availability.is_recurrent"
ng-disabled="!availability.is_recurrent" />
</div>
</div>
</div>
<div class="modal-body m-h" ng-show="step === 5">
<div class="m-t-sm">
<p class="text-center font-sbold" translate>{{ 'admin_calendar.summary' }}</p>
<div class="row">
lorem ipsum
</div>
</div>
</div>
<div class="modal-footer" ng-show="step < 5">
<button class="btn btn-info" ng-click="previous()" ng-disabled="step === 1" translate>{{ 'admin_calendar.previous' }}</button>
<button class="btn btn-info" ng-click="next()" translate>{{ 'admin_calendar.next' }}</button>
<button class="btn btn-default" ng-click="cancel()" translate>{{ 'cancel' }}</button>
</div>
<div class="modal-footer" ng-show="step === 5">
<button class="btn btn-info" ng-click="previous()" translate>{{ 'admin_calendar.previous' }}</button>
<button class="btn btn-warning" ng-click="ok()" translate>{{ 'confirm' }}</button>
<button class="btn btn-default" ng-click="cancel()" translate>{{ 'cancel' }}</button>
</div>