mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
event monitor improvement
Many imrovement for the event monitoring admin module.
This commit is contained in:
parent
73c9e301fb
commit
e13817176f
@ -170,21 +170,27 @@ Application.Filters.filter "trainingReservationsFilter", [ ->
|
||||
Application.Filters.filter "eventsReservationsFilter", [ ->
|
||||
(elements, selectedScope) ->
|
||||
if !angular.isUndefined(elements) and !angular.isUndefined(selectedScope) and elements? and selectedScope? and selectedScope != ""
|
||||
switch selectedScope
|
||||
when "all"
|
||||
filteredElements = elements
|
||||
when "passed"
|
||||
filteredElements = []
|
||||
angular.forEach elements, (element)->
|
||||
element.start_at = element.availability.start_at if angular.isUndefined(element.start_at)
|
||||
if new Date(element.start_at) < new Date
|
||||
filteredElements.push(element)
|
||||
filteredElements.reverse()
|
||||
else
|
||||
return []
|
||||
filteredElements
|
||||
|
||||
else
|
||||
filteredElements = []
|
||||
angular.forEach elements, (element)->
|
||||
element.start_at = element.availability.start_at if angular.isUndefined(element.start_at)
|
||||
switch selectedScope
|
||||
when "future"
|
||||
if new Date(element.start_at) > new Date
|
||||
filteredElements.push(element)
|
||||
when "passed"
|
||||
if new Date(element.start_at) <= new Date
|
||||
filteredElements.push(element)
|
||||
else
|
||||
return []
|
||||
filteredElements
|
||||
else
|
||||
elements
|
||||
if new Date(element.start_at) >= new Date
|
||||
filteredElements.push(element)
|
||||
filteredElements.reverse()
|
||||
]
|
||||
|
||||
Application.Filters.filter "groupFilter", [ ->
|
||||
|
@ -1,8 +1,8 @@
|
||||
<div class="col-md-6 m-b m-t">
|
||||
<select ng-model="selectedTimezone" class="form-control">
|
||||
<option value="" translate>{{ 'all_events' }}</option>
|
||||
<option value="" translate>{{ 'events_to_come' }}</option>
|
||||
<option value="passed" translate>{{ 'passed_events' }}</option>
|
||||
<option value="future" translate>{{ 'events_to_come' }}</option>
|
||||
<option value="all" translate>{{ 'all_events' }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@ -11,25 +11,49 @@
|
||||
<tr>
|
||||
<th style="width:30%" translate>{{ 'title' }}</th>
|
||||
<th style="width:30%" translate>{{ 'dates' }}</th>
|
||||
<th style="width:40%"></th>
|
||||
<th style="width:10%" translate>{{ 'booking' }}</th>
|
||||
<th style="width:30%"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="event in filtered = (events | eventsReservationsFilter:selectedTimezone)">
|
||||
<td>
|
||||
<tr height="80px" ng-repeat="event in filtered = (events | eventsReservationsFilter:selectedTimezone)">
|
||||
|
||||
<td style="vertical-align:middle">
|
||||
<a ui-sref="app.public.events_show({id: event.id})">{{ event.title }} </a>
|
||||
</td>
|
||||
<td>
|
||||
<span> {{ 'from_DATE' | translate:{DATE:(event.start_date | amDateFormat:'LL')} }} <span class="text-sm font-thin" translate>{{ 'to_date' }}</span> {{event.end_date | amDateFormat:'LL'}}</span>
|
||||
<br/>
|
||||
<span ng-if="event.all_day == 'true'" translate>{{ 'all_day' }}</span>
|
||||
<span ng-if="event.all_day == 'false'">
|
||||
{{ 'from_TIME' | translate:{TIME:(event.start_date | amDateFormat:'LT')} }}
|
||||
<span class="text-sm font-thin" translate>{{ 'to_time' }}</span>
|
||||
{{event.end_date | amDateFormat:'LT'}}
|
||||
</span>
|
||||
|
||||
<td style="vertical-align:middle">
|
||||
|
||||
<!--One day event-->
|
||||
<span ng-if="(event.start_date | amDateFormat:'LL')==(event.end_date | amDateFormat:'LL')">
|
||||
{{ 'on_DATE' | translate:{DATE:(event.start_date | amDateFormat:'LL')} }}
|
||||
<span ng-if="event.all_day == 'false'">
|
||||
{{ 'from_TIME' | translate:{TIME:(event.start_date | amDateFormat:'LT')} }}
|
||||
<span class="text-sm font-thin" translate>{{ 'to_time' }}</span>
|
||||
{{event.end_date | amDateFormat:'LT'}}
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<!--Multiple days envent-->
|
||||
<span ng-if="(event.start_date | amDateFormat:'LL')!=(event.end_date | amDateFormat:'LL')">
|
||||
{{'from_DATE' | translate:{DATE:(event.start_date | amDateFormat:'LL')} }}
|
||||
{{'to_date' | translate}} {{event.end_date | amDateFormat:'LL'}}
|
||||
<br ng-if="event.all_day == 'false'"/>
|
||||
<span ng-if="event.all_day == 'false'">
|
||||
{{ 'from_TIME' | translate:{TIME:(event.start_date | amDateFormat:'LT')} }}
|
||||
<span class="text-sm font-thin" translate>{{ 'to_time' }}</span>
|
||||
{{event.end_date | amDateFormat:'LT'}}
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<td style="vertical-align:middle">
|
||||
<span class="ng-binding" ng-if="event.nb_total_places > 0">{{ event.nb_total_places - event.nb_free_places }} / {{ event.nb_total_places }}</span>
|
||||
<span class="badge font-sbold cancelled" ng-if="event.nb_total_places < 0" translate>{{ 'cancelled' }}</span>
|
||||
<span class="badge font-sbold" ng-if="!event.nb_total_places" translate>{{ 'free_entry' }}</span>
|
||||
</td>
|
||||
|
||||
<td style="vertical-align:middle">
|
||||
<div class="buttons">
|
||||
<button class="btn btn-default" ui-sref="app.admin.event_reservations({id: event.id})">
|
||||
<i class="fa fa-bookmark"></i> {{ 'view_reservations' | translate }}
|
||||
|
@ -78,7 +78,10 @@
|
||||
|
||||
</div> <!-- ./panel-body -->
|
||||
<div class="panel-footer no-padder">
|
||||
<input type="submit" ng-value="submitName" class="r-b btn-valid btn btn-warning btn-block p-lg btn-lg text-u-c" ng-disabled="eventForm.$invalid || event.category_id === null"/>
|
||||
<input type="submit"
|
||||
ng-value="submitName"
|
||||
class="r-b btn-valid btn btn-warning btn-block p-lg btn-lg text-u-c"
|
||||
ng-disabled="eventForm.$invalid || event.category_id === null"/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@ -194,14 +197,14 @@
|
||||
<label translate>{{ 'start_time' }}</label>
|
||||
<div>
|
||||
<input type="hidden" name="event[start_time]" ng-value="event.start_time">
|
||||
<uib-timepicker ng-model="event.start_time" hour-step="1" minute-step="1" show-meridian="ismeridian"></uib-timepicker>
|
||||
<uib-timepicker ng-model="event.start_time" mousewheel="false" hour-step="1" minute-step="1" show-meridian="ismeridian"></uib-timepicker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<label translate>{{ 'end_time' }}</label>
|
||||
<div>
|
||||
<input type="hidden" name="event[end_time]" ng-value="event.end_time">
|
||||
<uib-timepicker ng-model="event.end_time" hour-step="1" minute-step="1" show-meridian="ismeridian"></uib-timepicker>
|
||||
<uib-timepicker ng-model="event.end_time" mousewheel="false" hour-step="1" minute-step="1" show-meridian="ismeridian"></uib-timepicker>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -90,8 +90,15 @@ fr:
|
||||
all_events: "Tous les évènements"
|
||||
passed_events: "Les évènements déjà passés"
|
||||
events_to_come: "Les évènements à venir"
|
||||
from_DATE: "Du {{DATE}}" # angular interpolation
|
||||
from_TIME: "De {{TIME}}" # angular interpolation
|
||||
prices: "Tarifs"
|
||||
on_DATE: "le {{DATE}}" # angular interpolation
|
||||
from_DATE: "du {{DATE}}" # angular interpolation
|
||||
from_TIME: "de {{TIME}}" # angular interpolation
|
||||
booking: "Réservations"
|
||||
sold_out: "Complet"
|
||||
cancelled: "Annulé"
|
||||
free_entry: "Entrée libre"
|
||||
free_admission: "Entrée gratuite"
|
||||
view_reservations: "Consulter les réservations"
|
||||
categories: "Catégories"
|
||||
add_a_category: "Ajouter une catégorie"
|
||||
|
@ -55,7 +55,7 @@ fr:
|
||||
add_an_event: "Ajouter un évènement"
|
||||
load_the_next_events: "Charger les évènements suivants ..."
|
||||
no_passed_events: "Aucun évènement passé"
|
||||
dates: "Dates :"
|
||||
dates: "Dates"
|
||||
thank_you_your_payment_has_been_successfully_registered: "Merci. Votre paiement a bien été pris en compte !"
|
||||
surname: "Nom"
|
||||
first_name: "Prénom"
|
||||
|
Loading…
Reference in New Issue
Block a user