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-10-03 13:36:35 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-10-04 11:24:50 +0300
commit9d476b11426ca757114e85343f548ab3ed15beeb (patch)
treebe1721ea84820546cef6f77836be93777b7ede5c /app/views/projects/labels/index.html.haml
parent600a10b9d14c0d581efd270a68944957af762a17 (diff)
Refactor labels_filter_path and labels nav
Refactor labels_filter_path method to be consistent with other similar methods like search_filter_path, milestones_filter_path etc. Also move repeating code in labels index page nav into shared partial Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/projects/labels/index.html.haml')
-rw-r--r--app/views/projects/labels/index.html.haml20
1 files changed, 1 insertions, 19 deletions
diff --git a/app/views/projects/labels/index.html.haml b/app/views/projects/labels/index.html.haml
index c6b98c03ce5..11a05eada30 100644
--- a/app/views/projects/labels/index.html.haml
+++ b/app/views/projects/labels/index.html.haml
@@ -13,25 +13,7 @@
- if labels_or_filters
#promote-label-modal
%div{ class: container_class }
- .top-area.adjust
- %ul.nav-links.nav.nav-tabs
- %li{ class: active_when(subscribed != 'true') }>
- = link_to project_labels_path(@project) do
- = _('All')
- - if current_user
- %li{ class: active_when(subscribed == 'true') }>
- = link_to project_labels_path(@project, subscribed: 'true') do
- = _('Subscribed')
-
- .nav-controls
- = form_tag project_labels_path(@project), method: :get do
- = hidden_field_tag :subscribed, params[:subscribed]
- .input-group
- = search_field_tag :search, params[:search], { placeholder: _('Filter'), id: 'label-search', class: 'form-control search-text-input input-short', spellcheck: false }
- %span.input-group-append
- %button.btn.btn-default{ type: "submit", "aria-label" => _('Submit search') }
- = icon("search")
- = render 'shared/labels/sort_dropdown'
+ = render 'shared/labels/nav'
.labels-container.prepend-top-10
- if can_admin_label