Commit 92d6cad9 authored by Tim Zallmann's avatar Tim Zallmann

Updates based on MR discussions for links + text + logic

parent fce8afbd
......@@ -76,11 +76,13 @@ module LicenseHelper
end
def show_promotions?
if current_application_settings.should_check_namespace_plan?
true
else
license = License.current
license.nil? || license.expired?
if current_user
if current_application_settings.should_check_namespace_plan?
true
else
license = License.current
license.nil? || license.expired?
end
end
end
......
......@@ -130,5 +130,5 @@
- data[scope] = {}
- data[scope][:data] = @stats[scope]
= data.to_json.html_safe
- else
- elsif show_promotions?
= render 'shared/promotions/promote_contribution_analytics'
......@@ -24,10 +24,11 @@
= link_to group_group_members_path(@group), title: 'Members' do
%span
Members
= nav_link(path: 'analytics#show') do
= link_to group_analytics_path(@group), title: 'Contribution Analytics', data: {placement: 'right'} do
%span
Contribution Analytics
- if @group.feature_available?(:contribution_analytics) || show_promotions?
= nav_link(path: 'analytics#show') do
= link_to group_analytics_path(@group), title: 'Contribution Analytics', data: {placement: 'right'} do
%span
Contribution Analytics
- if current_user && can?(current_user, :admin_group, @group)
= nav_link(path: %w[groups#projects groups#edit ldap_group_links#index hooks#index audit_events#index pipeline_quota#index]) do
= link_to edit_group_path(@group), title: 'Settings' do
......
......@@ -2,11 +2,11 @@
= render "projects/settings/head"
- if !@project.feature_available?(:audit_events)
- unless @project.feature_available?(:audit_events) && show_promotions?
= render 'shared/promotions/promote_audit_events'
%h3.page-title Project Audit Events
%p.light Events in #{@project.full_path}
- if @project.feature_available?(:audit_events)
- if @project.feature_available?(:audit_events)
= render 'shared/audit_events/event_table', events: @events
%button.csv_download_link.btn.append-right-10.has-tooltip{ title: 'Export as CSV' }
= icon('download')
- if (current_user && @project.feature_available?(:export_issues)) || show_promotions?
%button.csv_download_link.btn.append-right-10.has-tooltip{ title: 'Export as CSV' }
= icon('download')
......@@ -8,7 +8,7 @@
- else
Track your project with Audit Events.
%p
Audit Events is a tool for GitLab Enterprise Edition administrators to be able to track important events such as user access level, target user, and user addition or removal.
Audit Events is a way to keep track of important events that happened in GitLab.
= link_to 'Read more', help_page_path('administration/audit_events.html'), target: '_blank'
= render 'shared/promotions/promotion_link_project'
......@@ -7,7 +7,13 @@
.user-callout-copy
%h4
- if current_application_settings.should_check_namespace_plan?
Upgrade your plan to improve milestone with Burndown Charts.
- if @project.group ? can?(current_user, :admin_group, @project.group) : @project.owner == current_user
Upgrade your plan to improve milestone with Burndown Charts.
- elsif @project.group
Upgrade { @project.group.name }'s plan to improve milestone with Burndown Charts.
- else
- owner = @project.namespace.owner
Upgrade { @project.group.name }'s plan to improve milestone with Burndown Charts.
- else
Improve milestone with Burndown Charts.
%p
......
......@@ -6,7 +6,7 @@
- if current_application_settings.should_check_namespace_plan?
Upgrade your plan to activate Contribution Analytics.
- else
Track activity with Contribution Analytics and GitLab Enterprise Edition.
Track activity with Contribution Analytics.
%p
With contribution analytics you can have an overview for the activity of issues, merge requests and push events of your organization and its members.
= link_to 'Read more', help_page_path('user/analytics/contribution_analytics.html'), target: '_blank'
......
......@@ -7,7 +7,7 @@
- if current_application_settings.should_check_namespace_plan?
Upgrade your plan to improve Merge Requests and customer support.
- else
Improve Merge Request and customer support with GitLab Enterprise Edition.
Improve Merge Requests and customer support with GitLab Enterprise Edition.
%ul
%li
= link_to 'Merge Request Approvals', help_page_path('user/project/merge_requests/merge_request_approvals.html'), target: '_blank'
......
- if current_application_settings.should_check_namespace_plan?
- if (@project.owner.present? && @project.owner == @current_user) || @project.group&.has_owner?(@current_user)
- if @project.group ? can?(current_user, :admin_group, @project.group) : @project.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 plan.
......
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