Commit 8c6047a4 authored by Tim Zallmann's avatar Tim Zallmann

Rest of Changes, Updated SPecs

parent 92d6cad9
......@@ -86,5 +86,9 @@ module LicenseHelper
end
end
def show_project_feature_promotion?(project_feature, callout_id)
!@project.feature_available?(project_feature) && show_promotions? && show_callout?(callout_id)
end
extend self
end
......@@ -8,5 +8,5 @@
%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
......@@ -163,7 +163,7 @@
%p
Customize your merge request restrictions.
.settings-content.no-animate{ class: ('expanded' if expanded) }
- if !@project.feature_available?(:fast_forward_merge) && show_promotions? && show_callout?('promote_mr_approval_dismissed')
- if show_project_feature_promotion?(:fast_forward_merge, 'promote_mr_approval_dismissed')
= render 'shared/promotions/promote_mr_approval'
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "merge-request-settings-form" }, authenticity_token: true do |f|
= render 'merge_request_settings', form: f
......
.user-callout.promotion-callout.append-bottom-20.js-mr-approval-callout{ id: 'promote_mr_approval', data: { uid: 'promote_mr_approval_dismissed' } }
.user-callout.promotion-callout.append-bottom-20.js-mr-approval-callout#promote_mr_approval{ data: { uid: 'promote_mr_approval_dismissed' } }
.bordered-box.content-block
%button.btn.btn-default.close.js-close-callout{ type: 'button', 'aria-label' => 'Dismiss Merge Request promotion' }
= icon('times', class: 'dismiss-icon', 'aria-hidden' => 'true')
......
......@@ -7,21 +7,24 @@
.user-callout-copy
%h4
- if current_application_settings.should_check_namespace_plan?
Upgrade your plan improve repositories.
Upgrade your plan to improve repositories.
- else
Improve repositories with GitLab Enterprise Edition.
%ul
%li
= link_to 'Push Rules', help_page_path('push_rules/push_rules.md#push-rules'), target: '_blank'
%p
Push Rules are defined per project so you can have different rules applied to different projects depends on your needs.
%li
= link_to 'Repository Mirroring', help_page_path('workflow/repository_mirroring.html'), target: '_blank'
%p
Repository Mirroring is a way to mirror repositories from external sources. It can be used to mirror all branches, tags, and commits that you have in your repository.
%li
= link_to 'Protected Branches', help_page_path('user/project/protected_branches.html'), target: '_blank'
%p
With GitLab Enterprise Edition you can restrict access to protected branches by choosing a role (Masters, Developers) as well as certain users.
- unless @project.feature_available?(:push_rules)
%li
= link_to 'Push Rules', help_page_path('push_rules/push_rules.md#push-rules'), target: '_blank'
%p
Push Rules are defined per project so you can have different rules applied to different projects depends on your needs.
- unless @project.feature_available?(:repository_mirrors)
%li
= link_to 'Repository Mirroring', help_page_path('workflow/repository_mirroring.html'), target: '_blank'
%p
Repository Mirroring is a way to mirror repositories from external sources. It can be used to mirror all branches, tags, and commits that you have in your repository.
- unless @project.feature_available?(:protected_refs_for_users)
%li
= link_to 'Better Protected Branches', help_page_path('user/project/protected_branches.html'), target: '_blank'
%p
You can restrict access to protected branches by choosing a role (Masters, Developers) as well as certain users.
= render 'shared/promotions/promotion_link_project'
.user-callout.promotion-callout.js-service-desk-callout{ id: 'promote_service_desk', data: { uid: 'promote_service_desk_dismissed' } }
.user-callout.promotion-callout.js-service-desk-callout#promote_service_desk{ data: { uid: 'promote_service_desk_dismissed' } }
.bordered-box.content-block
%button.btn.btn-default.close.js-close-callout{ type: 'button', 'aria-label' => 'Dismiss Service Desk promotion' }
= icon('times', class: 'dismiss-icon', 'aria-hidden' => 'true')
......
.user-callout.promotion-callout.prepend-top-10{ id: 'promote_squash_commits', data: { uid: 'promote_squash_commits_dismissed' } }
.user-callout.promotion-callout.prepend-top-10#promote_squash_commits{ data: { uid: 'promote_squash_commits_dismissed' } }
.bordered-box.content-block
%button.btn.btn-default.close.js-close-callout{ type: 'button', 'aria-label' => 'Dismiss merge request promotion' }
= icon('times', class: 'dismiss-icon', 'aria-hidden' => 'true')
.user-callout-copy
%h4
- if current_application_settings.should_check_namespace_plan?
Upgrade your plan to improve Merge Requests with squash commit.
Upgrade your plan to improve Merge Requests with Squash Commit.
- else
Improve Merge Requests with squash commit and GitLab Enterprise Edition.
Improve Merge Requests with Squash Commit and GitLab Enterprise Edition.
%p
Squashing lets you tidy up the commit history of a branch when accepting a merge request. It applies all of the changes in the merge request as a single commit, and then merges that commit using the merge method set for the project.
= link_to 'Read more', help_page_path('user/project/merge_requests/squash_and_merge.html'), target: '_blank'
......
......@@ -105,7 +105,7 @@ describe 'Promotions', js: true do
it 'should appear in project edit page' do
visit edit_project_path(project)
expect(find('#promote_mr_approval')).to have_content 'Improve Merge Request and customer support'
expect(find('#promote_mr_approval')).to have_content 'Improve Merge Requests and customer support'
expect(find('#promote_mr_approval')).to have_content 'Merge request approvals allow you to set the number of necessary approvals and predefine a list of approvers that will need to approve every merge request in a project.'
end
......@@ -231,7 +231,7 @@ describe 'Promotions', js: true do
it 'should appear on the page' do
visit project_audit_events_path(project)
expect(find('.user-callout-copy')).to have_content 'Track your project with Audit Events'
expect(find('.user-callout-copy')).to have_content '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.'
expect(find('.user-callout-copy')).to have_content 'Audit Events is a way to keep track of important events that happened in GitLab.'
end
end
......@@ -245,7 +245,7 @@ describe 'Promotions', js: true do
it 'should appear on the page' do
visit group_analytics_path(group)
expect(find('.user-callout-copy')).to have_content 'Track activity with Contribution analytics and GitLab Enterprise Edition.'
expect(find('.user-callout-copy')).to have_content 'Track activity with Contribution Analytics.'
expect(find('.user-callout-copy')).to have_content 'With contribution analytics you can have an overview for the activity of issues, merge requests and push events of your organization and its members.'
end
end
......
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