Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-05-03 02:19:46 +0300
committerAlfredo Sumaran <alfredo@gitlab.com>2016-06-06 19:59:49 +0300
commit0e2f26dd2a10ed876f96b0496dff2de6780eeaea (patch)
tree3043365d524fb15dbf09c23b41394094dcb6c178 /app/views/projects/labels
parent4d4a9b7c8a62b720e573a2bec67407acc455531a (diff)
Prioritize labels functionality
Diffstat (limited to 'app/views/projects/labels')
-rw-r--r--app/views/projects/labels/_label.html.haml12
-rw-r--r--app/views/projects/labels/index.html.haml27
2 files changed, 28 insertions, 11 deletions
diff --git a/app/views/projects/labels/_label.html.haml b/app/views/projects/labels/_label.html.haml
index 294fec422c5..eda75b64e79 100644
--- a/app/views/projects/labels/_label.html.haml
+++ b/app/views/projects/labels/_label.html.haml
@@ -1,4 +1,12 @@
-%li{ id: dom_id(label), data: { id: label.id } }
+- label_css_id = dom_id(label)
+%li{id: label_css_id, :"data-id" => label.id}
+ %a.js-toggle-priority{:href => "#",
+ :"data-url" => toggle_priority_namespace_project_label_path(@project.namespace, @project, label),
+ :"data-dom-id" => "#{label_css_id}" }
+ %span.add-priority
+ (+)
+ %span.remove-priority
+ (-)
= render "shared/label_row", label: label
.pull-info-right
%span.append-right-20
@@ -24,4 +32,4 @@
- if current_user
:javascript
- new Subscription('##{dom_id(label)} .label-subscription');
+ new Subscription('##{label_css_id} .label-subscription');
diff --git a/app/views/projects/labels/index.html.haml b/app/views/projects/labels/index.html.haml
index 2557d1a4d5b..d71db7545ef 100644
--- a/app/views/projects/labels/index.html.haml
+++ b/app/views/projects/labels/index.html.haml
@@ -10,13 +10,22 @@
New label
.labels
- - if @labels.present?
- %ul.content-list.manage-labels-list
- = render @labels
- = paginate @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}.
+ .prioritized-labels
+ %h5 Prioritized Label
+ %ul.content-list.manage-labels-list.js-prioritized-labels{ "data-url" => set_sorting_namespace_project_labels_path(@project.namespace, @project) }
+ - if @prioritized.present?
+ = render @prioritized
- else
- No labels created
+ %p.empty-message No prioritized labels yet
+ .other-labels
+ %h5 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
+ 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