1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-15 00:24:09 +01:00
fab-manager/app/frontend/templates/events/show.html

225 lines
12 KiB
HTML
Raw Normal View History

2015-05-05 03:10:25 +02:00
<div>
<ui-view autoscroll='true'></ui-view>
<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">
<a ng-click="backPrevLocation($event)"><i class="fas fa-long-arrow-alt-left "></i></a>
2015-05-05 03:10:25 +02:00
</section>
</div>
<div class="col-xs-10 col-sm-10 col-md-8 b-l b-r-md">
<section class="heading-title">
<h1>{{ event.title }} <span class="v-middle badge text-xs bg-event">{{event.category.name}}</span></h1>
2015-05-05 03:10:25 +02:00
</section>
</div>
2020-04-28 12:48:03 +02:00
<div class="col-xs-12 col-sm-12 col-md-3 b-t hide-b-md" ng-if="isAuthorized(['admin', 'manager'])">
2015-05-05 03:10:25 +02:00
<section class="heading-actions wrapper">
2020-04-28 12:48:03 +02:00
<a ui-sref="app.admin.events_edit({id: event.id})" class="btn btn-lg btn-warning bg-white b-2x rounded m-t-xs text-u-c text-sm"><i class="fa fa-edit"></i> {{ 'app.shared.buttons.edit' | translate }}</a>
<a ng-click="deleteEvent(event)" class="btn btn-lg btn-danger b-2x rounded no-b m-t-xs"><i class="fa fa-trash-o"></i></a>
2015-05-05 03:10:25 +02:00
</section>
</div>
</div>
</section>
<div class="row no-gutter">
<div class="col-sm-12 col-md-12 col-lg-8">
<div class="article wrapper-lg">
2022-11-08 17:41:18 +01:00
<div class="article-thumbnail" ng-if="event.event_image_attributes">
<img ng-src="{{event.event_image_attributes.attachment_url}}" alt="{{event.title}}" class="img-responsive">
2015-05-05 03:10:25 +02:00
</div>
2019-12-17 18:06:56 +01:00
<h3 translate>{{ 'app.public.events_show.event_description' }}</h3>
2016-10-26 16:33:21 +02:00
<p ng-bind-html="event.description | toTrusted"></p>
2015-05-05 03:10:25 +02:00
</div>
<div class="text-center" id="social-share">
2019-12-17 18:06:56 +01:00
<a ng-href="{{shareOnFacebook()}}" target="_blank" class="btn btn-facebook btn-lg m-t"><i class="fa fa-facebook m-r"></i> {{ 'app.public.events_show.share_on_facebook' | translate }}</a>
<a ng-href="{{shareOnTwitter()}}" target="_blank" class="btn btn-twitter btn-lg m-t"><i class="fa fa-twitter m-r"></i> {{ 'app.public.events_show.share_on_twitter' | translate }}</a>
</div>
2015-05-05 03:10:25 +02:00
</div>
2016-03-23 18:39:41 +01:00
2015-05-05 03:10:25 +02:00
<div class="col-sm-12 col-md-12 col-lg-4">
<section class="widget panel b-a m" ng-if="event.event_files_attributes">
<div class="panel-heading b-b">
<span class="badge bg-warning pull-right">{{event.event_files_attributes.length}}</span>
2019-12-17 18:06:56 +01:00
<h3 translate>{{ 'app.public.events_show.downloadable_documents' }}</h3>
2015-05-05 03:10:25 +02:00
</div>
2016-03-23 18:39:41 +01:00
2015-05-05 03:10:25 +02:00
<ul class="widget-content list-group list-group-lg no-bg auto">
<li ng-repeat="file in event.event_files_attributes" class="list-group-item no-b clearfix">
2022-11-08 17:41:18 +01:00
<a target="_blank" ng-href="{{file.attachment_url}}"><i class="fa fa-arrow-circle-o-down"> </i> {{file.attachment_name | humanize : 25}}</a>
2015-05-05 03:10:25 +02:00
</li>
</ul>
</section>
2020-04-28 12:48:03 +02:00
<div ng-if="isAuthorized(['admin', 'manager'])">
<select-member></select-member>
</div>
2016-03-23 18:39:41 +01:00
2015-05-05 03:10:25 +02:00
<section class="widget panel b-a m m-t-lg">
<div class="panel-heading b-b small">
2019-12-17 18:06:56 +01:00
<h3 translate>{{ 'app.public.events_show.information_and_booking' }}</h3>
2015-05-05 03:10:25 +02:00
</div>
2016-03-23 18:39:41 +01:00
2015-05-05 03:10:25 +02:00
<div class="panel-content wrapper">
<h5>{{event.category.name}}</h5>
2015-05-05 03:10:25 +02:00
<dl class="text-sm">
2021-05-12 15:00:19 +02:00
<dt ng-repeat="theme in event.event_themes">
<i class="fa fa-tags" aria-hidden="true"></i> {{theme.name}}
</dt>
2016-06-30 16:45:47 +02:00
<dt ng-if="event.age_range"><i class="fa fa-users" aria-hidden="true"></i> {{event.age_range.name}}</dt>
</dl>
<dl class="text-sm">
2019-12-17 18:06:56 +01:00
<dt><i class="fa fa-calendar" aria-hidden="true"></i> {{ 'app.public.events_show.dates' | translate }}</dt>
<dd>{{ 'app.public.events_show.beginning' | translate }} <span class="text-u-l">{{event.start_date | amDateFormat:'L'}}</span><br>{{ 'app.public.events_show.ending' | translate }} <span class="text-u-l">{{event.end_date | amDateFormat:'L'}}</span></dd>
<dt><i class="fas fa-clock"></i> {{ 'app.public.events_show.opening_hours' | translate }}</dt>
<dd ng-if="event.all_day"><span translate>{{ 'app.public.events_show.all_day' }}</span></dd>
2022-11-08 17:41:18 +01:00
<dd ng-if="!event.all_day">{{ 'app.public.events_show.from_time' | translate }} <span class="text-u-l">{{event.start_time}}</span> {{ 'app.public.events_show.to_time' | translate }} <span class="text-u-l">{{event.end_time}}</span></dd>
2015-05-05 03:10:25 +02:00
</dl>
<div class="text-sm" ng-if="event.amount">
2019-12-17 18:06:56 +01:00
<div>{{ 'app.public.events_show.full_price_' | translate }} <span>{{ event.amount | currency}}</span></div>
2022-11-08 17:41:18 +01:00
<div ng-repeat="price in event.event_price_categories_attributes" class="description-hover">
<span uib-popover="{{getPriceCategoryConditions(price.category.id)}}" popover-trigger="mouseenter">
2016-08-25 15:36:52 +02:00
{{price.category.name}} :
</span>
{{price.amount | currency}}
</div>
2015-05-05 03:10:25 +02:00
</div>
<div class="text-sm m-b" ng-if="event.nb_total_places">
2019-12-17 18:06:56 +01:00
<div ng-if="event.nb_free_places > 0">{{ 'app.public.events_show.tickets_still_availables' | translate }} <span class="font-sbold">{{event.nb_free_places}}</span></div>
<div ng-if="event.nb_total_places > 0 && event.nb_free_places <= 0"><span class="badge font-sbold" translate>{{ 'app.public.events_show.sold_out' }}</span></div>
<div ng-if="event.nb_total_places == -1"><span class="badge font-sbold" translate>{{ 'app.public.events_show.cancelled' }}</span></div>
2015-05-05 03:10:25 +02:00
</div>
<div class="text-sm m-b" ng-if="!event.nb_total_places">
<div><span class="badge font-sbold" translate>{{ 'app.public.events_show.without_reservation' }}</span></div>
2016-03-23 18:39:41 +01:00
</div>
<div class="m-b">
<div ng-show="reserve.toReserve">
<div class="panel panel-default bg-light m-n text-sm">
<div class="panel-body">
<div class="row">
2019-12-17 18:06:56 +01:00
<label class="col-sm-6 control-label">{{ 'app.public.events_show.full_price_' | translate }} <span class="text-blue">{{event.amount | currency}}</span></label>
2016-03-23 18:39:41 +01:00
<div class="col-sm-6">
<select ng-model="reserve.nbReservePlaces" ng-change="changeNbPlaces()" ng-options="i for i in reserve.nbPlaces.normal">
2019-12-17 18:06:56 +01:00
</select> {{ 'app.public.events_show.ticket' | translate:{NUMBER:reserve.nbReservePlaces} }}
2016-03-23 18:39:41 +01:00
</div>
</div>
2022-11-08 17:41:18 +01:00
<div class="row" ng-repeat="price in event.event_price_categories_attributes">
<label class="col-sm-6 control-label">{{price.category.name}} : <span class="text-blue">{{price.amount | currency}}</span></label>
2016-03-23 18:39:41 +01:00
<div class="col-sm-6">
<select ng-model="reserve.tickets[price.id]" ng-change="changeNbPlaces()" ng-options="i for i in reserve.nbPlaces[price.id]">
2019-12-17 18:06:56 +01:00
</select> {{ 'app.public.events_show.ticket' | translate:{NUMBER:reserve.tickets[price.id]} }}
2016-03-23 18:39:41 +01:00
</div>
</div>
<div ng-show="currentUser.role == 'admin'" class="m-t">
2019-12-17 18:06:56 +01:00
<label for="offerSlot" class="control-label m-r" translate>{{ 'app.public.events_show.make_a_gift_of_this_reservation' }}</label>
2016-03-23 18:39:41 +01:00
<input bs-switch
ng-model="event.offered"
id="offerSlot"
type="checkbox"
class="form-control"
2020-02-10 11:09:22 +01:00
switch-on-text="{{ 'app.shared.buttons.yes' | translate }}"
switch-off-text="{{ 'app.shared.buttons.no' | translate }}"
2016-03-23 18:39:41 +01:00
switch-animate="true"
switch-readonly="{{trainingIsValid}}"
ng-change="computeEventAmount()"/>
</div>
</div>
</div>
</div>
<div class="clear">
<a class="pull-right m-t-xs text-u-l ng-scope" ng-click="cancelReserve($event)" ng-show="reserve.toReserve" translate>{{ 'app.shared.buttons.cancel' }}</a>
2016-03-23 18:39:41 +01:00
</div>
2019-12-17 18:06:56 +01:00
<div ng-if="reserveSuccess" class="alert alert-success">{{ 'app.public.events_show.thank_you_your_payment_has_been_successfully_registered' | translate }}<br>
{{ 'app.public.events_show.you_can_find_your_reservation_s_details_on_your_' | translate }} <a ui-sref="app.logged.dashboard.invoices" translate>{{ 'app.public.events_show.dashboard' }}</a>
2016-03-23 18:39:41 +01:00
</div>
<div class="m-t-sm" ng-if="reservations && !reserve.toReserve" ng-repeat="reservation in reservations">
<div ng-hide="isCancelled(reservation)" class="well well-warning">
2019-12-17 18:06:56 +01:00
<div class="font-sbold text-u-c text-sm">{{ 'app.public.events_show.you_booked_DATE' | translate:{DATE:(reservation.created_at | amDateFormat:'L LT')} }}</div>
<div class="font-sbold text-sm" ng-if="reservation.nb_reserve_places > 0">{{ 'app.public.events_show.full_price_' | translate }} {{reservation.nb_reserve_places}} {{ 'app.public.events_show.ticket' | translate:{NUMBER:reservation.nb_reserve_places} }}</div>
<div class="font-sbold text-sm" ng-repeat="ticket in reservation.tickets">
2019-12-17 18:06:56 +01:00
{{ticket.event_price_category.price_category.name}} : {{ticket.booked}} {{ 'app.public.events_show.ticket' | translate:{NUMBER:ticket.booked} }}
</div>
<div class="clear" ng-if="event.recurrence_events.length > 0 && reservationCanModify(reservation)">
2019-12-17 18:06:56 +01:00
<a class="pull-right m-t-xs text-u-l pointer" ng-click="modifyReservation(reservation, $event)" translate>{{ 'app.shared.buttons.change' }}</a>
</div>
<div class="clear" ng-if="reservationCanCancel(reservation)">
2019-12-17 18:06:56 +01:00
<a class="pull-right m-t-xs text-u-l pointer" ng-click="cancelReservation(reservation, $event)" translate>{{ 'app.shared.buttons.cancel' }}</a>
</div>
2016-03-23 18:39:41 +01:00
</div>
<div ng-show="isCancelled(reservation)" class="well well-disabled">
2019-12-17 18:06:56 +01:00
<div class="text-italic text-sm">{{ 'app.public.events_show.canceled_reservation_SEATS' | translate:{SEATS:reservation.total_booked_seats} }}</div>
2016-03-23 18:39:41 +01:00
</div>
</div>
2023-01-09 11:37:58 +01:00
<div ng-show="now.isSameOrAfter(eventEndDateTime)" class="alert alert-info">
2019-12-17 18:06:56 +01:00
<span translate>{{ 'app.public.events_show.event_is_over' }}</span>
<span ng-show="reservations.length > 0" translate>{{ 'app.public.events_show.thanks_for_coming' }}</span>
<a ui-sref="app.public.events_list" translate>{{ 'app.public.events_show.view_event_list' }}</a>
2019-12-10 12:16:26 +01:00
</div>
<button class="btn btn-warning-full rounded btn-block text-sm" ng-click="reserveEvent()" ng-show="isShowReserveEventButton()">{{ 'app.public.events_show.book' | translate }}</button>
<uib-alert type="danger" ng-if="ctrl.member.id && !isUserValidatedByType()">
<p class="text-sm">
<i class="fa fa-warning"></i>
<span translate>{{ 'app.shared.cart.user_validation_required_alert' }}</span>
</p>
</uib-alert>
2016-03-23 18:39:41 +01:00
<coupon show="reserve.totalSeats > 0 && ctrl.member" coupon="coupon.applied" total="reserve.totalNoCoupon" user-id="{{ctrl.member.id}}"></coupon>
2015-05-05 03:10:25 +02:00
</div>
2016-03-23 18:39:41 +01:00
</div>
2015-05-05 03:10:25 +02:00
2016-03-23 18:39:41 +01:00
<div class="panel-footer no-padder ng-scope" ng-if="event.amount">
2019-12-17 18:06:56 +01:00
<button class="btn btn-valid btn-info btn-block p-l btn-lg text-u-c r-b text-base" ng-click="payEvent()" ng-if="reserve.totalSeats > 0">{{ 'app.public.events_show.confirm_and_pay' | translate }} {{reserve.amountTotal | currency}}</button>
2016-03-23 18:39:41 +01:00
</div>
<div class="panel-footer no-padder ng-scope" ng-if="event.amount == 0">
2019-12-17 18:06:56 +01:00
<button class="btn btn-valid btn-info btn-block p-l btn-lg text-u-c r-b text-base" ng-click="validReserveEvent()" ng-if="reserve.totalSeats > 0" ng-disabled="attempting">{{ 'app.shared.buttons.confirm' | translate }}</button>
2015-05-05 03:10:25 +02:00
</div>
</section>
2016-03-23 18:39:41 +01:00
<uib-alert type="warning m" ng-if="eventExplicationsAlert.length > 0">
<p class="text-sm pull-left">
<i class="fa fa-warning"></i>
<div class="m-l-lg" ng-bind-html="eventExplicationsAlert"></div>
</p>
</uib-alert>
2015-05-05 03:10:25 +02:00
</div>
</div>
<div ng-if="onlinePayment.showModal">
<card-payment-modal is-open="onlinePayment.showModal"
toggle-modal="toggleOnlinePaymentModal"
after-success="afterOnlinePaymentSuccess"
on-error="onOnlinePaymentError"
cart="onlinePayment.cartItems"
current-user="currentUser"
customer="ctrl.member"/>
</div>
2015-05-05 03:10:25 +02:00
</div>