Commit 60117f52 authored by kushalpandya's avatar kushalpandya

Show banner only to admin users, use JS bundle to handle dismiss

parent 9ade9c5f
- if license_message.present?
.alert.alert-dismissible.gitlab-ee-trial-banner.js-gitlab-ee-trial-banner{ role: 'alert' }
- if current_user.admin? && license_message.present?
.alert.alert-dismissible.gitlab-ee-trial-banner.hidden.js-gitlab-ee-trial-banner{ role: 'alert', 'data-license-expiry' => current_license.expires_at }
%button.close{ type: 'button', 'data-dismiss' => 'alert', 'aria-label' => 'Dismiss banner' }
= icon('times', 'aria-hidden' => 'true')
%p
= license_message
:javascript
$('.js-gitlab-ee-trial-banner').on('close.bs.alert', function() { $('.js-navbar-gitlab').removeClass('has-trial-banner'); });
%header.navbar.navbar-gitlab.js-navbar-gitlab{ class: "#{nav_header_class} #{ 'has-trial-banner' if trial_license_message.present?}" }
%header.navbar.navbar-gitlab.js-navbar-gitlab{ class: "#{nav_header_class}" }
.navbar-border
%a.sr-only.gl-accessibility{ href: "#content-body", tabindex: "1" } Skip to content
.container-fluid
......
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