From 63b2c2c6b15916f659cd71ba07790209988225fe Mon Sep 17 00:00:00 2001 From: Joshua Dwire Date: Sat, 16 Apr 2016 22:28:11 -0400 Subject: [PATCH] More intuitive account management page --- resources/lang/en/texts.php | 9 ++++- resources/views/accounts/management.blade.php | 38 +++++++++++++++---- 2 files changed, 37 insertions(+), 10 deletions(-) diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index f08be8ace67c..7a6323ad7e38 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -1133,10 +1133,15 @@ $LANG = array( 'plan_upgrade' => 'Upgrade', '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', 'expires' => 'Expires', - 'expired' => 'Expired', + 'renews' => 'Renews', + 'plan_expired' => ':plan Plan Expired', + 'trial_expired' => ':plan Plan Trial Ended', 'never' => 'never', 'plan_free' => 'Free', 'plan_pro' => 'Pro', diff --git a/resources/views/accounts/management.blade.php b/resources/views/accounts/management.blade.php index 395610b07f28..ccaad182615a 100644 --- a/resources/views/accounts/management.blade.php +++ b/resources/views/accounts/management.blade.php @@ -34,10 +34,10 @@ @if ($planDetails && $planDetails['active'])
@@ -56,18 +56,40 @@

@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 - {{ trans('texts.plan_'.$account->company->pending_plan) }} - ({{ trans('texts.plan_term_'.$account->company->pending_term.'ly') }}) - @endif - {{ trans('texts.cancel') }} + {{ trans('texts.plan_term_changes_to', [ + 'plan'=>trans('texts.plan_'.$account->company->pending_plan), + 'term'=>trans('texts.plan_term_'.$account->company->pending_term.'ly'), + 'date'=>Utils::dateToString($planDetails['expires']) + ]) }} + @endif
+ {{ trans('texts.cancel_plan_change') }}

@endif {!! Former::actions( Button::info(trans('texts.plan_change'))->large()->withAttributes(['onclick' => 'showChangePlan()'])->appendIcon(Icon::create('edit'))) !!} @else + @if ($planDetails) +
+ +
+

+ {{ Utils::dateToString($planDetails['expires']) }} +

+
+
+ @endif {!! Former::actions( Button::success(trans('texts.plan_upgrade'))->large()->withAttributes(['onclick' => 'showChangePlan()'])->appendIcon(Icon::create('plus-sign'))) !!} @endif