diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-09-29 07:03:28 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-19 19:58:25 +0300 |
commit | 0bfa39d5bdb9f53bfc319b9351230b3eb405b619 (patch) | |
tree | d89e21ee24d1d421ce86c5bfdbbf43d699ace479 /app/views | |
parent | 07709c5576a06179c5365b0d7fe154c5f67ca7e5 (diff) |
Remove scopes/types for labels
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/groups/labels/edit.html.haml | 3 | ||||
-rw-r--r-- | app/views/groups/labels/index.html.haml | 8 | ||||
-rw-r--r-- | app/views/groups/labels/new.html.haml | 5 | ||||
-rw-r--r-- | app/views/projects/labels/edit.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/labels/index.html.haml | 52 | ||||
-rw-r--r-- | app/views/projects/labels/new.html.haml | 3 | ||||
-rw-r--r-- | app/views/shared/_label_row.html.haml | 2 |
7 files changed, 28 insertions, 48 deletions
diff --git a/app/views/groups/labels/edit.html.haml b/app/views/groups/labels/edit.html.haml index e247393abd5..28471f407ad 100644 --- a/app/views/groups/labels/edit.html.haml +++ b/app/views/groups/labels/edit.html.haml @@ -1,8 +1,7 @@ - page_title 'Edit', @label.name, 'Labels' %h3.page-title - = icon('folder-open') - Edit Group Label + Edit Label %hr = render 'form', url: group_label_path(@group, @label) diff --git a/app/views/groups/labels/index.html.haml b/app/views/groups/labels/index.html.haml index 8e93ea4f625..6c69e3465f4 100644 --- a/app/views/groups/labels/index.html.haml +++ b/app/views/groups/labels/index.html.haml @@ -10,13 +10,9 @@ New label .labels - - hide = @group.labels.empty? || (params[:page].present? && params[:page] != '1') - .group-labels - %h5{ class: ('hide' if hide) } - = icon('folder-open') - Group Labels + .other-labels - if @labels.present? - %ul.content-list.manage-labels-list.js-group-labels + %ul.content-list.manage-labels-list.js-other-labels = render partial: 'shared/label', collection: @labels, as: :label = paginate @labels, theme: 'gitlab' - else diff --git a/app/views/groups/labels/new.html.haml b/app/views/groups/labels/new.html.haml index 01a50607db4..257ae97de03 100644 --- a/app/views/groups/labels/new.html.haml +++ b/app/views/groups/labels/new.html.haml @@ -1,9 +1,8 @@ -- page_title 'New Group Label' +- page_title 'New Label' - header_title group_title(@group, 'Labels', group_labels_path(@group)) %h3.page-title - = icon('folder-open') - New Group Label + New Label %hr = render 'form', url: group_labels_path 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) diff --git a/app/views/shared/_label_row.html.haml b/app/views/shared/_label_row.html.haml index a623bbc6b11..813ce4f1405 100644 --- a/app/views/shared/_label_row.html.haml +++ b/app/views/shared/_label_row.html.haml @@ -10,8 +10,6 @@ = icon('star') %span.label-name = link_to_label(label, subject: @project, tooltip: false) - - if can?(current_user, :admin_label, @project) - = label_type_icon(label, hidden: label.priority.blank?) - if label.description %span.label-description = markdown_field(label, :description) |