mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-10 21:26:07 +10:00
Tidy up Ruby style in templates
This commit is contained in:
committed by
Alfredo Sumaran
parent
b0ec4b9cc3
commit
77f30af017
@@ -13,9 +13,8 @@
|
||||
.labels
|
||||
- if can?(current_user, :admin_label, @project)
|
||||
-# Only show it in the first page
|
||||
- if (params[:page].present? and params[:page] != '1') or @project.labels.blank? or (params[:page] == nil and @project.labels.blank?)
|
||||
- hide_class = 'hide'
|
||||
.prioritized-labels{ class: hide_class }
|
||||
- hide = @project.labels.empty? || (params[:page].present? && params[:page] != '1')
|
||||
.prioritized-labels{ class: ('hide' if hide) }
|
||||
%h5 Prioritized Labels
|
||||
%ul.content-list.manage-labels-list.js-prioritized-labels{ "data-url" => set_priorities_namespace_project_labels_path(@project.namespace, @project) }
|
||||
- if @prioritized_labels.present?
|
||||
@@ -24,14 +23,14 @@
|
||||
%p.empty-message No prioritized labels yet
|
||||
.other-labels
|
||||
- if can?(current_user, :admin_label, @project)
|
||||
%h5{ class: hide_class } Other Labels
|
||||
%h5{ class: ('hide' if hide } Other Labels
|
||||
- if @labels.present?
|
||||
%ul.content-list.manage-labels-list.js-other-labels
|
||||
= render @labels
|
||||
= paginate @labels, theme: 'gitlab'
|
||||
- else
|
||||
.nothing-here-block
|
||||
- if can? current_user, :admin_label, @project
|
||||
- if can?(current_user, :admin_label, @project)
|
||||
Create a label or #{link_to 'generate a default set of labels', generate_namespace_project_labels_path(@project.namespace, @project), method: :post}.
|
||||
- else
|
||||
No labels created
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
%span.label-row
|
||||
- if can? current_user, :admin_label, @project
|
||||
- if can?(current_user, :admin_label, @project)
|
||||
.js-toggle-priority.toggle-priority{ data: { url: remove_priority_namespace_project_label_path(@project.namespace, @project, label),
|
||||
dom_id: dom_id(label) } }
|
||||
%button.add-priority.btn.has-tooltip{ title: 'Prioritize', :'data-placement' => 'top' }
|
||||
|
||||
Reference in New Issue
Block a user