From bf6fd23aea94c8923862574a8809ae1c186ffa2f Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 31 Oct 2016 12:59:48 +0200 Subject: [PATCH] Show 'Pro' label when on trial --- app/Libraries/Utils.php | 7 ++++++- resources/views/accounts/nav.blade.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Libraries/Utils.php b/app/Libraries/Utils.php index 0d001697d67e..c7e722a0cd20 100644 --- a/app/Libraries/Utils.php +++ b/app/Libraries/Utils.php @@ -163,6 +163,11 @@ class Utils return Auth::check() && Auth::user()->isTrial(); } + public static function isPaidPro() + { + return static::isPro() && ! static::isTrial(); + } + public static function isEnglish() { return App::getLocale() == 'en'; @@ -652,7 +657,7 @@ class Utils return Utils::getYear($offset); } } - + public static function getMonthOptions() { $months = []; diff --git a/resources/views/accounts/nav.blade.php b/resources/views/accounts/nav.blade.php index bf9019313874..338a7b462a05 100644 --- a/resources/views/accounts/nav.blade.php +++ b/resources/views/accounts/nav.blade.php @@ -16,7 +16,7 @@
{{ trans("texts.{$type}") }} - @if ($type === ADVANCED_SETTINGS && !Utils::isPro()) + @if ($type === ADVANCED_SETTINGS && ! Utils::isPaidPro()) {{ strtoupper(trans('texts.pro')) }} @endif