Commit 8b4e1d0c authored by Luke Bennett's avatar Luke Bennett

Add/use Label#priority? and remove weird padding

parent c9f23ffe
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
display: block; display: block;
.description-text { .description-text {
margin: 0 $gl-padding 10px 0; margin: 0 0 10px 0;
} }
a { a {
...@@ -309,7 +309,7 @@ ...@@ -309,7 +309,7 @@
.label-links { .label-links {
list-style: none; list-style: none;
padding: 0 $gl-padding 0 0; padding: 0;
white-space: nowrap; white-space: nowrap;
} }
......
...@@ -137,6 +137,10 @@ class Label < ActiveRecord::Base ...@@ -137,6 +137,10 @@ class Label < ActiveRecord::Base
priority.try(:priority) priority.try(:priority)
end end
def priority?
priorities.present?
end
def template? def template?
template template
end end
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
- show_label_merge_requests_link = show_label_issuables_link?(label, :merge_requests, project: @project) - show_label_merge_requests_link = show_label_issuables_link?(label, :merge_requests, project: @project)
- show_label_issues_link = show_label_issuables_link?(label, :issues, project: @project) - show_label_issues_link = show_label_issuables_link?(label, :issues, project: @project)
%li.label-list-item{ class: label.priorities.present? ? '' : 'no-hand', id: label_css_id, data: { id: label.id } } %li.label-list-item{ class: label.priority? ? '' : 'no-hand', id: label_css_id, data: { id: label.id } }
= render "shared/label_row", label: label = render "shared/label_row", label: label
%ul.label-actions-list %ul.label-actions-list
%li.inline %li.inline
......
...@@ -17,6 +17,6 @@ ...@@ -17,6 +17,6 @@
&middot; &middot;
%li.label-link-item.inline %li.label-link-item.inline
= link_to_label(label, subject: subject, type: :merge_request) { 'Merge requests' } = link_to_label(label, subject: subject, type: :merge_request) { 'Merge requests' }
- if label.priorities.present? - if label.priority?
%li.label-link-item.inline.prepend-left-10 %li.label-link-item.inline.prepend-left-10
.label-badge.label-badge-blue Prioritized label .label-badge.label-badge-blue Prioritized label
\ No newline at end of file
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