summaryrefslogtreecommitdiff
path: root/app/views/projects/labels
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-09-29 01:03:28 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 14:58:25 -0200
commit0bfa39d5bdb9f53bfc319b9351230b3eb405b619 (patch)
treed89e21ee24d1d421ce86c5bfdbbf43d699ace479 /app/views/projects/labels
parent07709c5576a06179c5365b0d7fe154c5f67ca7e5 (diff)
downloadgitlab-ce-0bfa39d5bdb9f53bfc319b9351230b3eb405b619.tar.gz
Remove scopes/types for labels
Diffstat (limited to 'app/views/projects/labels')
-rw-r--r--app/views/projects/labels/edit.html.haml3
-rw-r--r--app/views/projects/labels/index.html.haml52
-rw-r--r--app/views/projects/labels/new.html.haml3
3 files changed, 23 insertions, 35 deletions
diff --git a/app/views/projects/labels/edit.html.haml b/app/views/projects/labels/edit.html.haml
index 372abcb8773..49adb593559 100644
--- a/app/views/projects/labels/edit.html.haml
+++ b/app/views/projects/labels/edit.html.haml
@@ -4,7 +4,6 @@
%div{ class: container_class }
%h3.page-title
- = icon('bookmark')
- Edit Project Label
+ Edit Label
%hr
= render 'form', url: namespace_project_label_path(@project.namespace.becomes(Namespace), @project, @label)
diff --git a/app/views/projects/labels/index.html.haml b/app/views/projects/labels/index.html.haml
index 99f8e8095ad..c1ec9cabc40 100644
--- a/app/views/projects/labels/index.html.haml
+++ b/app/views/projects/labels/index.html.haml
@@ -14,36 +14,26 @@
New label
.labels
- - unless @labels.empty?
+ - if can?(current_user, :admin_label, @project)
-# Only show it in the first page
- - hide = params[:page].present? && params[:page] != '1'
- - if can?(current_user, :admin_label, @project)
- .prioritized-labels{ class: ('hidden' 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) }
- %p.empty-message{ class: ('hidden' unless @prioritized_labels.empty?) } No prioritized labels yet
- - if @prioritized_labels.present?
- = render partial: 'shared/label', collection: @prioritized_labels, as: :label
-
- .group-labels{ class: ('hidden' if hide || @project.group.blank? || @group_labels.empty?) }
- %h5
- = icon('folder-open')
- Group Labels
- %ul.content-list.manage-labels-list.js-group-labels
- - if @group_labels.present?
- = render partial: 'shared/label', collection: @group_labels, as: :label
+ - 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) }
+ %p.empty-message{ class: ('hidden' unless @prioritized_labels.empty?) } No prioritized labels yet
+ - if @prioritized_labels.present?
+ = render partial: 'shared/label', collection: @prioritized_labels, as: :label
- .project-labels{ class: ('hidden' if @project_labels.empty?) }
- %h5{ class: ('hidden' if hide) }
- = icon('bookmark')
- Project Labels
- %ul.content-list.manage-labels-list.js-project-labels
- - if @project_labels.present?
- = render partial: 'shared/label', collection: @project_labels, as: :label
- = paginate @project_labels, theme: 'gitlab'
- - else
- .nothing-here-block
- - 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 yet.
+ .other-labels
+ - if can?(current_user, :admin_label, @project)
+ %h5{ class: ('hide' if hide) } Other Labels
+ %ul.content-list.manage-labels-list.js-other-labels
+ - if @labels.present?
+ = render partial: 'shared/label', collection: @labels, as: :label
+ = paginate @labels, theme: 'gitlab'
+ - if @labels.blank?
+ .nothing-here-block
+ - 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
diff --git a/app/views/projects/labels/new.html.haml b/app/views/projects/labels/new.html.haml
index f170c41bfc4..0c177feb43c 100644
--- a/app/views/projects/labels/new.html.haml
+++ b/app/views/projects/labels/new.html.haml
@@ -4,7 +4,6 @@
%div{ class: container_class }
%h3.page-title
- = icon('bookmark')
- New Project Label
+ New Label
%hr
= render 'form', url: namespace_project_labels_path(@project.namespace.becomes(Namespace), @project)