mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Add promotion message in footer
This commit is contained in:
parent
e70f1fea5d
commit
f263239cdb
@ -1118,6 +1118,14 @@ class Account extends Eloquent
|
|||||||
return ! empty($plan_details);
|
return ! empty($plan_details);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function hasActivePromo()
|
||||||
|
{
|
||||||
|
return $this->company->hasActivePromo();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param null $plan_details
|
* @param null $plan_details
|
||||||
*
|
*
|
||||||
|
@ -194,6 +194,10 @@ class Company extends Eloquent
|
|||||||
|
|
||||||
public function applyFreeYear()
|
public function applyFreeYear()
|
||||||
{
|
{
|
||||||
|
if ($this->plan_started && $this->plan_started != '0000-00-00') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->plan = PLAN_PRO;
|
$this->plan = PLAN_PRO;
|
||||||
$this->plan_term = PLAN_TERM_YEARLY;
|
$this->plan_term = PLAN_TERM_YEARLY;
|
||||||
$this->plan_price = PLAN_PRICE_PRO_MONTHLY;
|
$this->plan_price = PLAN_PRICE_PRO_MONTHLY;
|
||||||
|
@ -134,6 +134,14 @@ class User extends Authenticatable
|
|||||||
return $this->account->isPro();
|
return $this->account->isPro();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function hasActivePromo()
|
||||||
|
{
|
||||||
|
return $this->account->hasActivePromo();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $feature
|
* @param $feature
|
||||||
*
|
*
|
||||||
|
@ -2597,6 +2597,7 @@ $LANG = array(
|
|||||||
'send_client_reminders' => 'Send email reminders',
|
'send_client_reminders' => 'Send email reminders',
|
||||||
'can_view_tasks' => 'Tasks are visible in the portal',
|
'can_view_tasks' => 'Tasks are visible in the portal',
|
||||||
'is_not_sent_reminders' => 'Reminders are not sent',
|
'is_not_sent_reminders' => 'Reminders are not sent',
|
||||||
|
'promotion_footer' => 'Your promotion will expire soon, :link to upgrade now.',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -472,7 +472,11 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
@if (Utils::isNinjaProd())
|
@if (Utils::isNinjaProd())
|
||||||
@if (Auth::check() && Auth::user()->isTrial())
|
@if (Auth::check() && Auth::user()->hasActivePromo())
|
||||||
|
{!! trans('texts.promotion_footer', [
|
||||||
|
'link' => '<a href="javascript:showUpgradeModal()">' . trans('texts.click_here') . '</a>'
|
||||||
|
]) !!}
|
||||||
|
@elseif (Auth::check() && Auth::user()->isTrial())
|
||||||
{!! trans(Auth::user()->account->getCountTrialDaysLeft() == 0 ? 'texts.trial_footer_last_day' : 'texts.trial_footer', [
|
{!! trans(Auth::user()->account->getCountTrialDaysLeft() == 0 ? 'texts.trial_footer_last_day' : 'texts.trial_footer', [
|
||||||
'count' => Auth::user()->account->getCountTrialDaysLeft(),
|
'count' => Auth::user()->account->getCountTrialDaysLeft(),
|
||||||
'link' => '<a href="javascript:showUpgradeModal()">' . trans('texts.click_here') . '</a>'
|
'link' => '<a href="javascript:showUpgradeModal()">' . trans('texts.click_here') . '</a>'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user