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:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-07-20 17:28:45 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-07-31 12:46:36 +0300
commit692d4795d173319a18184e80113256696ad3d6f8 (patch)
tree0433475074d5ef16be86761ee726b6edc728e45a /app/views/projects/labels
parentf42fe0b6370692afd8fe1a123dd136e2dd45d5dc (diff)
Add search form to project labels page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/projects/labels')
-rw-r--r--app/views/projects/labels/index.html.haml7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/views/projects/labels/index.html.haml b/app/views/projects/labels/index.html.haml
index fb5b0fc15c9..6dca035ca28 100644
--- a/app/views/projects/labels/index.html.haml
+++ b/app/views/projects/labels/index.html.haml
@@ -8,7 +8,7 @@
.nav-controls
= link_to _('New label'), new_project_label_path(@project), class: "btn btn-new"
-- if @labels.exists? || @prioritized_labels.exists?
+- if @labels.exists? || @prioritized_labels.exists? || params[:search].present?
#promote-label-modal
%div{ class: container_class }
.top-area.adjust
@@ -17,7 +17,10 @@
- if can_admin_label
= _('Star a label to make it a priority label. Order the prioritized labels to change their relative priority, by dragging.')
- .labels-container.prepend-top-5
+ = form_tag project_labels_path(@project), method: :get do
+ = search_field_tag :search, params[:search], { placeholder: _('Filter labels by name or description'), class: 'form-control', spellcheck: false }
+
+ .labels-container.prepend-top-10
- if can_admin_label
-# Only show it in the first page
- hide = @available_labels.empty? || (params[:page].present? && params[:page] != '1')