More intuitive account management page

This commit is contained in:
Joshua Dwire 2016-04-16 22:28:11 -04:00
parent 030d4ed4da
commit 63b2c2c6b1
2 changed files with 37 additions and 10 deletions

View File

@ -1133,10 +1133,15 @@ $LANG = array(
'plan_upgrade' => 'Upgrade', 'plan_upgrade' => 'Upgrade',
'plan_change' => 'Change Plan', 'plan_change' => 'Change Plan',
'pending_change_to' => 'Pending Change To', 'pending_change_to' => 'Changes To',
'plan_changes_to' => ':plan on :date',
'plan_term_changes_to' => ':plan (:term) on :date',
'cancel_plan_change' => 'Cancel Change',
'plan' => 'Plan', 'plan' => 'Plan',
'expires' => 'Expires', 'expires' => 'Expires',
'expired' => 'Expired', 'renews' => 'Renews',
'plan_expired' => ':plan Plan Expired',
'trial_expired' => ':plan Plan Trial Ended',
'never' => 'never', 'never' => 'never',
'plan_free' => 'Free', 'plan_free' => 'Free',
'plan_pro' => 'Pro', 'plan_pro' => 'Pro',

View File

@ -34,10 +34,10 @@
@if ($planDetails && $planDetails['active']) @if ($planDetails && $planDetails['active'])
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label"> <label class="col-sm-4 control-label">
@if($planDetails['active']) @if(!$account->company->pending_plan || $account->company->pending_plan == $planDetails['plan'])
{{ trans('texts.expires') }} {{ trans('texts.renews') }}
@else @else
{{ trans('texts.expired') }} {{ trans('texts.expires') }}
@endif @endif
</label> </label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -56,18 +56,40 @@
<div class="col-sm-8"> <div class="col-sm-8">
<p class="form-control-static"> <p class="form-control-static">
@if ($account->company->pending_plan == PLAN_FREE) @if ($account->company->pending_plan == PLAN_FREE)
{{ trans('texts.plan_free') }} {{ trans('texts.plan_changes_to', [
'plan'=>trans('texts.plan_free'),
'date'=>Utils::dateToString($planDetails['expires'])
]) }}
@else @else
{{ trans('texts.plan_'.$account->company->pending_plan) }} {{ trans('texts.plan_term_changes_to', [
({{ trans('texts.plan_term_'.$account->company->pending_term.'ly') }}) 'plan'=>trans('texts.plan_'.$account->company->pending_plan),
@endif 'term'=>trans('texts.plan_term_'.$account->company->pending_term.'ly'),
<a href="#" onclick="cancelPendingChange()">{{ trans('texts.cancel') }}</a> 'date'=>Utils::dateToString($planDetails['expires'])
]) }}
@endif<br>
<a href="#" onclick="cancelPendingChange()">{{ trans('texts.cancel_plan_change') }}</a>
</p> </p>
</div> </div>
</div> </div>
@endif @endif
{!! Former::actions( Button::info(trans('texts.plan_change'))->large()->withAttributes(['onclick' => 'showChangePlan()'])->appendIcon(Icon::create('edit'))) !!} {!! Former::actions( Button::info(trans('texts.plan_change'))->large()->withAttributes(['onclick' => 'showChangePlan()'])->appendIcon(Icon::create('edit'))) !!}
@else @else
@if ($planDetails)
<div class="form-group">
<label class="col-sm-4 control-label">
@if ($planDetails['trial'])
{{ trans('texts.trial_expired', ['plan'=>trans('texts.plan_'.$planDetails['plan'])]) }}
@else
{{ trans('texts.plan_expired', ['plan'=>trans('texts.plan_'.$planDetails['plan'])]) }}
@endif
</label>
<div class="col-sm-8">
<p class="form-control-static">
{{ Utils::dateToString($planDetails['expires']) }}
</p>
</div>
</div>
@endif
{!! Former::actions( Button::success(trans('texts.plan_upgrade'))->large()->withAttributes(['onclick' => 'showChangePlan()'])->appendIcon(Icon::create('plus-sign'))) !!} {!! Former::actions( Button::success(trans('texts.plan_upgrade'))->large()->withAttributes(['onclick' => 'showChangePlan()'])->appendIcon(Icon::create('plus-sign'))) !!}
@endif @endif
</div> </div>