diff options
author | Luke Bennett <lukeeeebennettplus@gmail.com> | 2018-05-29 10:25:45 +0100 |
---|---|---|
committer | Luke Bennett <lukeeeebennettplus@gmail.com> | 2018-05-29 10:25:45 +0100 |
commit | 5e5828a41a95e06e7aa66368efbd296846aa1e8b (patch) | |
tree | 6616e77deb6881d3572161d80369938321794d8e /app/helpers/labels_helper.rb | |
parent | c9e4c1760dae5e1916bb5ad22f260b7fd0b58475 (diff) | |
download | gitlab-ce-5e5828a41a95e06e7aa66368efbd296846aa1e8b.tar.gz |
Tidy tooltip_title and fix for signed out user
Diffstat (limited to 'app/helpers/labels_helper.rb')
-rw-r--r-- | app/helpers/labels_helper.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/helpers/labels_helper.rb b/app/helpers/labels_helper.rb index e1b0e7a4a3e..7fddf74c654 100644 --- a/app/helpers/labels_helper.rb +++ b/app/helpers/labels_helper.rb @@ -211,6 +211,16 @@ module LabelsHelper end end + def label_status_tooltip(status) + return '' unless status + + if status.unsubscribed? + "Subscribe at #{label.is_a?(ProjectLabel) ? 'project' : 'group'} level" + else + "Unsubscribe at #{status.sub('-', ' ')}" + end + end + # Required for Banzai::Filter::LabelReferenceFilter module_function :render_colored_label, :text_color_for_bg, :escape_once end |