Commit bcd814ac authored by Ruben Davila's avatar Ruben Davila

Show the trial banner only if license expires within 1 week

parent a487c951
...@@ -18,6 +18,7 @@ module LicenseHelper ...@@ -18,6 +18,7 @@ module LicenseHelper
def trial_license_message def trial_license_message
return unless signed_in? && current_license&.trial? return unless signed_in? && current_license&.trial?
return unless 7.days.since(Date.today) >= current_license.expires_at
buy_now_link = link_to('Buy now!', "#{Gitlab::SUBSCRIPTIONS_URL}/plans", target: '_blank') buy_now_link = link_to('Buy now!', "#{Gitlab::SUBSCRIPTIONS_URL}/plans", target: '_blank')
message = message =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment