Commit 43c1e272 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'upload_license' into 'master'

Add link to Upload License page in broadcast alert message.

That way admins can have a quick link at hand to upload the license.

See merge request !418
parents 895e163c 6fefd02e
......@@ -22,14 +22,14 @@ module LicenseHelper
message <<
if is_admin
"Upload a license in the admin area"
"#{link_to('Upload a license', new_admin_license_path)} in the admin area"
else
"Ask an admin to upload a license"
end
message << "to activate this functionality."
message.join(" ")
content_tag(:p, message.join(" ").html_safe)
end
def yes_license_message(signed_in, is_admin)
......
......@@ -8,13 +8,14 @@ describe LicenseHelper do
end
it 'admin user' do
admin_msg = 'No GitLab Enterprise Edition license has been provided yet. Pushing code and creation of issues and merge requests has been disabled. Upload a license in the admin area to activate this functionality.'
admin_msg = '<p>No GitLab Enterprise Edition license has been provided yet. Pushing code and creation of issues and merge requests has been disabled. <a href="/admin/license/new">Upload a license</a> in the admin area to activate this functionality.</p>'
expect(license_message(signed_in: true, is_admin: true)).to eq(admin_msg)
end
it 'normal user' do
user_msg = 'No GitLab Enterprise Edition license has been provided yet. Pushing code and creation of issues and merge requests has been disabled. Ask an admin to upload a license to activate this functionality.'
user_msg = '<p>No GitLab Enterprise Edition license has been provided yet. Pushing code and creation of issues and merge requests has been disabled. Ask an admin to upload a license to activate this functionality.</p>'
expect(license_message(signed_in: true, is_admin: false)).to eq(user_msg)
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