mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
(front) add is-empty class to the calendar-admin-info side panel if no events are selected
This commit is contained in:
parent
78be7bb276
commit
c77e6c8a65
@ -494,6 +494,9 @@ Application.Controllers.controller('AdminCalendarController', ['$scope', '$state
|
|||||||
$scope.availability = event;
|
$scope.availability = event;
|
||||||
$scope.availability.plans = availabilityPlans();
|
$scope.availability.plans = availabilityPlans();
|
||||||
|
|
||||||
|
// mark the side panel as available to be opened
|
||||||
|
$('label.calendar-admin-info').removeClass('is-empty');
|
||||||
|
|
||||||
if ($scope.availabilityDom) {
|
if ($scope.availabilityDom) {
|
||||||
$scope.availabilityDom.classList.remove('fc-selected');
|
$scope.availabilityDom.classList.remove('fc-selected');
|
||||||
}
|
}
|
||||||
@ -546,6 +549,9 @@ Application.Controllers.controller('AdminCalendarController', ['$scope', '$state
|
|||||||
// we unselect the current event to keep consistency
|
// we unselect the current event to keep consistency
|
||||||
$scope.availability = null;
|
$scope.availability = null;
|
||||||
$scope.availabilityDom = null;
|
$scope.availabilityDom = null;
|
||||||
|
|
||||||
|
// mark the side panel as available to hide because no event is selected anymore
|
||||||
|
$('label.calendar-admin-info').addClass('is-empty');
|
||||||
};
|
};
|
||||||
|
|
||||||
// !!! MUST BE CALLED AT THE END of the controller
|
// !!! MUST BE CALLED AT THE END of the controller
|
||||||
|
@ -58,10 +58,10 @@
|
|||||||
<div ui-calendar="calendarConfig" ng-model="eventSources" calendar="calendar" class="wrapper-lg"></div>
|
<div ui-calendar="calendarConfig" ng-model="eventSources" calendar="calendar" class="wrapper-lg"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label class="calendar-admin-info">
|
<label class="calendar-admin-info is-empty">
|
||||||
<input type="checkbox">
|
<input type="checkbox">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p class="placeholder">Veuillez sélectionner un créneau</p>
|
<p class="placeholder" translate>{{ 'app.admin.calendar.select_a_slot' }}</p>
|
||||||
<div class="widget panel b-a" ng-if="availability" ng-show="(availability.slot_duration || availability.tags.length > 0) && availability.available_type !== 'event'">
|
<div class="widget panel b-a" ng-if="availability" ng-show="(availability.slot_duration || availability.tags.length > 0) && availability.available_type !== 'event'">
|
||||||
<div class="panel-heading b-b small">
|
<div class="panel-heading b-b small">
|
||||||
<h3><i class="fa fa-info-circle m-r" aria-hidden="true"></i><span translate>{{ 'app.admin.calendar.info' }}</span></h3>
|
<h3><i class="fa fa-info-circle m-r" aria-hidden="true"></i><span translate>{{ 'app.admin.calendar.info' }}</span></h3>
|
||||||
@ -76,7 +76,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="widget panel b-a m-t-lg" ng-if="availability" ng-hide="availability.available_type == 'event'">
|
<div class="widget panel b-a m-t-lg" ng-if="availability" ng-hide="availability.available_type == 'event'">
|
||||||
<div class="panel-heading b-b small">
|
<div class="panel-heading b-b small">
|
||||||
<h3 translate>{{ 'app.admin.calendar.ongoing_reservations' }}</h3>
|
<h3 translate>{{ 'app.admin.calendar.ongoing_reservations' }}</h3>
|
||||||
@ -94,7 +94,7 @@
|
|||||||
<div class="m-t" ng-show="availability.lock"><i class="fa fa-ban"></i> <span class="m-l-xs" translate>{{ 'app.admin.calendar.reservations_locked' }}</span></div>
|
<div class="m-t" ng-show="availability.lock"><i class="fa fa-ban"></i> <span class="m-l-xs" translate>{{ 'app.admin.calendar.reservations_locked' }}</span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="widget panel b-a m-t-lg" ng-if="availability.machine_ids.length > 0">
|
<div class="widget panel b-a m-t-lg" ng-if="availability.machine_ids.length > 0">
|
||||||
<div class="panel-heading b-b small">
|
<div class="panel-heading b-b small">
|
||||||
<h3 translate>{{ 'app.admin.calendar.machines' }}</h3>
|
<h3 translate>{{ 'app.admin.calendar.machines' }}</h3>
|
||||||
@ -108,7 +108,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="widget panel b-a m-t-lg" ng-if="availability.plan_ids.length > 0">
|
<div class="widget panel b-a m-t-lg" ng-if="availability.plan_ids.length > 0">
|
||||||
<div class="panel-heading b-b small">
|
<div class="panel-heading b-b small">
|
||||||
<h3 translate>{{ 'app.admin.calendar.plans' }}</h3>
|
<h3 translate>{{ 'app.admin.calendar.plans' }}</h3>
|
||||||
@ -127,7 +127,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="widget panel b-a m-t-lg" ng-if="availability" >
|
<div class="widget panel b-a m-t-lg" ng-if="availability" >
|
||||||
<div class="panel-heading b-b small">
|
<div class="panel-heading b-b small">
|
||||||
<h3 translate>{{ 'app.admin.calendar.actions' }}</h3>
|
<h3 translate>{{ 'app.admin.calendar.actions' }}</h3>
|
||||||
|
@ -18,6 +18,7 @@ en:
|
|||||||
events: "Events"
|
events: "Events"
|
||||||
availabilities: "Availabilities"
|
availabilities: "Availabilities"
|
||||||
availabilities_notice: "Export to an Excel workbook every slots available for reservation, and their occupancy rate."
|
availabilities_notice: "Export to an Excel workbook every slots available for reservation, and their occupancy rate."
|
||||||
|
select_a_slot: "Please select a slot"
|
||||||
info: "Info"
|
info: "Info"
|
||||||
tags: "Tags"
|
tags: "Tags"
|
||||||
slot_duration: "Slot duration: {DURATION} minutes"
|
slot_duration: "Slot duration: {DURATION} minutes"
|
||||||
|
Loading…
Reference in New Issue
Block a user