Commit db78e9a6 authored by Tim Zallmann's avatar Tim Zallmann

Link Logic is now in own template + updated

parent 5c554f39
......@@ -81,7 +81,12 @@ module LicenseHelper
end
def show_promotions?
!License.current || (License.current&.trial? && license.expired?)
if current_application_settings.should_check_namespace_plan?
true
else
license = License.current
license.nil? || license.expired?
end
end
extend self
......
......@@ -6,21 +6,12 @@
= custom_icon('icon_service_desk')
.user-callout-copy
%h4
- if Gitlab.com?
- if current_application_settings.should_check_namespace_plan?
Upgrade your plan to activate Service Desk.
- else
Improve customer support with GitLab Service Desk.
%p
GitLab Service Desk is a simple way to allow people to create issues in your GitLab instance without needing their own user account. It provides a unique email address for end users to create issues in a project, and replies can be sent either through the GitLab interface or by email. End users will only see the thread through email.
%a{ href: '/help/user/project/service_desk.html', target: '_blank' } Read more
- if current_user.admin?
- if Gitlab.com?
= link_to 'Upgrade your plan', upgrade_plan_url, class: 'btn btn-primary'
- else
= link_to License.current&.trial? && license.expired? ? 'Buy GitLab Enterprise Edition' : 'Start GitLab Enterprise Edition trial', new_trial_url, class: 'btn btn-primary'
- else
%p
- if Gitlab.com?
Contact your Administrator to upgrade your plan.
- else
Contact your Administrator to upgrade your license.
= render 'shared/promotions/promotion_link_project'
- if current_application_settings.should_check_namespace_plan?
- if (@project.owner.present? && @project.owner == @current_user) || @project.group&.has_owner?(@current_user)
= link_to 'Upgrade your plan', upgrade_plan_url, class: 'btn btn-primary'
- elsif @project.group
%p Contact an owner of group #{ @project.group.name } to upgrade the license.
- else
- owner = @project.namespace.owner
%p Contact owner #{ link_to(simple_sanitize(owner.name), user_path(owner)) } to upgrade the license.
- elsif current_user.admin?
= link_to License.current&.expired? ? 'Buy GitLab Enterprise Edition' : 'Start GitLab Enterprise Edition trial', new_trial_url, class: 'btn btn-primary'
- else
%p
Contact your Administrator to upgrade your license.
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