1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-04 15:24:23 +01:00
fab-manager/app/assets/templates/plans/index.html.erb

179 lines
8.1 KiB
Plaintext
Raw Normal View History

2016-03-23 18:39:41 +01:00
<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 href="#" ng-click="backPrevLocation($event)"><i class="fa fa-long-arrow-left "></i></a>
</section>
</div>
<div class="col-xs-10 col-sm-10 col-md-8 b-l ">
<section class="heading-title">
2020-02-11 11:46:40 +01:00
<h1 translate>{{ 'app.public.plans.subscriptions' }}</h1>
2016-03-23 18:39:41 +01:00
</section>
</div>
</div>
</section>
<div class="row no-gutter">
<div class="col-sm-12 col-md-9 b-r">
<div class="row m-t m-b padder" ng-repeat="plansGroup in plansClassifiedByGroup | groupFilter:ctrl.member">
<div class="col-md-12 text-center">
<h2 class="text-u-c">{{plansGroup.name}}</h2>
</div>
<div class="row row-centered padder">
<div class="col-xs-12 col-md-12 col-lg-10 col-centered no-gutter">
<!-- ng-class directive center the last item if the list length is odd -->
<div class="pricing-panel col-xs-12 col-md-6 col-lg-6 text-center"
2017-10-04 18:56:39 +02:00
ng-class="{'col-md-12 col-lg-12 b-r':(plansGroup.plans.filter(filterDisabledPlans).length % 2 == 1 && key == plansGroup.plans.filter(filterDisabledPlans).length-1)}"
ng-repeat="(key, plan) in plansGroup.plans.filter(filterDisabledPlans) | orderBy: '-ui_weight'">
2016-03-23 18:39:41 +01:00
<h3 class="title">{{ plan.base_name }}</h3>
<div class="content">
<div class="wrap">
<div class="price">
2016-03-24 16:23:10 +01:00
<div class="amount" data-fittext>{{plan.amount | currency}}</div>
2016-03-23 18:39:41 +01:00
<span class="period">{{ plan.interval | planIntervalFilter: plan.interval_count }}</span>
</div>
</div>
</div>
<div class="cta-button" ng-if="!currentUser || currentUser.role == 'member'">
<button class="btn btn-default rounded" ng-click="selectPlan(plan)" ng-if="currentUser.subscribed_plan.id != plan.id" ng-disabled="currentUser.subscribed_plan" ng-class="{ 'bg-yellow': selectedPlan==plan }">
2019-12-16 16:54:40 +01:00
<span ng-if="currentUser" translate>{{ 'app.public.plans.i_choose_that_plan' }}</span>
2016-03-23 18:39:41 +01:00
2019-12-16 16:54:40 +01:00
<span ng-if="!currentUser" translate>{{ 'app.public.plans.i_subscribe_online' }}</span>
2016-03-23 18:39:41 +01:00
</button>
2019-12-16 16:54:40 +01:00
<button class="btn btn-warning bg-yellow rounded" ng-if="currentUser.subscribed_plan.id == plan.id" ng-disabled="currentUser.subscribed_plan.id == plan.id" translate>{{ 'app.public.plans.i_already_subscribed' }}</button>
2016-03-23 18:39:41 +01:00
</div>
<div class="cta-button" ng-if="currentUser.role == 'admin'">
<button class="btn btn-default rounded" ng-click="selectPlan(plan)" ng-class="{ 'bg-yellow': selectedPlan==plan }" ng-disabled="!ctrl.member">
2019-12-16 16:54:40 +01:00
<span translate>{{ 'app.public.plans.i_choose_that_plan' }}</span>
2016-03-23 18:39:41 +01:00
</button>
</div>
<br ng-show="!plan.plan_file_url"> <!-- TODO Refacto with CSS -->
2019-12-16 16:54:40 +01:00
<a ng-href="{{ plan.plan_file_url }}" ng-show="plan.plan_file_url" target="_blank" translate>{{ 'app.public.plans.more_information' }}</a>
2016-03-23 18:39:41 +01:00
</div>
</div>
<div class="col-xs-12 col-md-12 col-lg-10 col-centered no-gutter" ng-if="currentUser.subscription && isInPast(currentUser.subscription.expired_at)">
<uib-alert type="info">
2019-12-16 16:54:40 +01:00
{{ 'app.public.plans.your_subscription_expires_on_the_DATE' | translate:{DATE:(currentUser.subscription.expired_at | amDateFormat:'L' )} }}
2016-03-23 18:39:41 +01:00
</uib-alert>
</div>
</div>
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-3">
<div ng-if="currentUser.role === 'admin'">
<select-member subscription="false"></select-member>
2016-03-23 18:39:41 +01:00
</div>
<section class="widget panel b-a m m-t-lg" ng-show="ctrl.member">
<div class="panel-heading b-b">
2019-12-16 16:54:40 +01:00
<h3 ng-show="currentUser.role != 'admin'" translate>{{ 'app.public.plans.my_group' }}</h3>
<h3 ng-show="currentUser.role === 'admin'" translate translate-values="{GENDER:getGender(currentUser)}">{{ 'app.public.plans.his_group' }}</h3>
2016-03-23 18:39:41 +01:00
</div>
<div class="widget-content no-bg auto wrapper">
<div ng-show="!group.change">
2016-03-23 18:39:41 +01:00
<div class="well well-warning">
<strong>{{getUserGroup().name}}</strong>
</div>
2018-10-15 16:51:44 +02:00
<button class="btn btn-default btn-no-overflow m-t"
ng-click="group.change = !group.change"
ng-show="(!selectedPlan && ctrl.member && !ctrl.member.subscribed_plan && ctrl.member.subscription) || (!paid.plan)"
translate
2019-12-16 16:54:40 +01:00
translate-values="{ROLE:currentUser.role}">{{ 'app.public.plans.he_wants_to_change_group' }}</button>
2016-03-23 18:39:41 +01:00
</div>
<div ng-show="group.change">
<select class="form-control" ng-options="g.id as g.name for g in groups" ng-model="group.id"></select>
<button class="btn btn-success m-t"
ng-click="selectGroup()"
translate
2019-12-16 16:54:40 +01:00
translate-values="{ROLE:currentUser.role, GENDER:getGender(currentUser)}">{{ 'app.public.plans.change_my_group' }}</button>
2016-03-23 18:39:41 +01:00
</div>
</div>
</section>
<section class="widget panel b-a m m-t-lg" ng-if="!selectedPlan && ctrl.member && !ctrl.member.subscribed_plan && ctrl.member.subscription">
<div class="panel-heading b-b">
2019-12-16 16:54:40 +01:00
<h3 translate>{{ 'app.public.plans.summary' }}</h3>
2016-03-23 18:39:41 +01:00
</div>
<div class="widget-content no-bg auto wrapper">
2019-12-16 16:54:40 +01:00
<strong>{{ 'app.public.plans.your_subscription_has_expired_on_the_DATE' | translate:{DATE:(ctrl.member.subscription.expired_at | amDateFormat:'LL')} }}</strong>
2016-03-23 18:39:41 +01:00
<div class="well well-warning m-t-sm">
<i class="font-sbold">{{ctrl.member.subscription.plan | humanReadablePlanName }}</i>
2019-12-16 16:54:40 +01:00
<div class="font-sbold">{{ 'app.public.plans.subscription_price' | translate }} {{ctrl.member.subscription.plan.amount | currency}}</div>
2016-03-23 18:39:41 +01:00
</div>
</div>
</section>
<section class="widget panel b-a m m-t-lg" ng-if="selectedPlan && ctrl.member">
<div class="panel-heading b-b">
2019-12-16 16:54:40 +01:00
<h3 translate>{{ 'app.public.plans.summary' }}</h3>
2016-03-23 18:39:41 +01:00
</div>
<div class="widget-content no-bg auto wrapper">
2019-12-16 16:54:40 +01:00
<span translate>{{ 'app.public.plans.you_ve_just_selected_a_subscription_html' }}</span>
2016-03-23 18:39:41 +01:00
<div class="well well-warning m-t-sm">
<i class="font-sbold">{{ selectedPlan | humanReadablePlanName }}</i>
2019-12-16 16:54:40 +01:00
<div class="font-sbold">{{ 'app.public.plans.subscription_price' | translate }} {{selectedPlan.amount | currency}}</div>
2016-03-23 18:39:41 +01:00
</div>
2016-08-11 18:17:28 +02:00
<coupon show="!ctrl.member.subscribed_plan" coupon="coupon.applied" total="selectedPlan.amount" user-id="{{ctrl.member.id}}"></coupon>
2016-03-23 18:39:41 +01:00
</div>
<div class="widget-footer">
2019-12-16 16:54:40 +01:00
<button class="btn btn-valid btn-info btn-block p-l text-u-c r-b" ng-click="openSubscribePlanModal()" ng-if="!ctrl.member.subscribed_plan">{{ 'app.public.plans.confirm_and_pay' | translate }} {{cart.total | currency}}</button>
2016-03-23 18:39:41 +01:00
</div>
</section>
<section class="widget panel b-a m m-t-lg" ng-if="paid.plan">
2016-03-23 18:39:41 +01:00
<div class="panel-heading b-b">
2019-12-16 16:54:40 +01:00
<h3 translate>{{ 'app.public.plans.summary' }}</h3>
2016-03-23 18:39:41 +01:00
</div>
<div class="widget-content no-bg auto wrapper">
2019-12-16 16:54:40 +01:00
<span translate>{{ 'app.public.plans.you_ve_just_payed_the_subscription_html' }}</span>
2016-03-23 18:39:41 +01:00
<div class="well well-warning m-t-sm">
<i class="font-sbold">{{ paid.plan | humanReadablePlanName }}</i>
2019-12-16 16:54:40 +01:00
<div class="font-sbold">{{ 'app.public.plans.subscription_price' | translate }} {{paid.plan.amount | currency}}</div>
2016-03-23 18:39:41 +01:00
</div>
2019-12-16 16:54:40 +01:00
<div class="alert alert-success">{{ 'app.public.plans.thank_you_your_subscription_is_successful' | translate }}<br>
<a ui-sref="app.logged.dashboard.invoices" translate>{{ 'app.public.plans.your_invoice_will_be_available_soon_from_your_dashboard' }}</a></div>
2016-03-23 18:39:41 +01:00
</div>
</section>
<uib-alert type="warning m">
<p class="text-sm">
<span ng-bind-html="subscriptionExplicationsAlert"></span>
</p>
</uib-alert>
</div>
</div>