diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-05-25 19:44:06 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2016-05-25 19:44:06 +0000 |
commit | 0cc060bc5fe3ba354979fa0be9e4cc2a2887d5f4 (patch) | |
tree | 5b5a75effa67e233496bd02551705ccd86936d64 /app/views | |
parent | 3c2d0cf24c02e02295fd0b6b978b3f191ab4f847 (diff) | |
parent | 5cca2d3bb171c260ad4b07f2a69962d3856c4d99 (diff) | |
download | gitlab-ce-0cc060bc5fe3ba354979fa0be9e4cc2a2887d5f4.tar.gz |
Merge branch 'issue-filter-name-options' into 'master'
Issuable filtering improvements
This improves the filtering of issues and merge requests by creating a single file that encapsulates all the filtering. Previously this was done with a file for issues and a file for merge requests.
Created the ability for the text search to be done alongside other filterables. Previously because this was outside the filterable form, this wasn't possible and would instead do either filter dropdown or text filter - not both. Fixes #4252
Fixed issue with not being able to filter and sort issues without refreshing the page. Fixes #15269
See merge request !3699
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/shared/_sort_dropdown.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/issuable/_filter.html.haml | 4 | ||||
-rw-r--r-- | app/views/shared/issuable/_search_form.html.haml | 6 |
3 files changed, 4 insertions, 8 deletions
diff --git a/app/views/shared/_sort_dropdown.html.haml b/app/views/shared/_sort_dropdown.html.haml index d327bd0a96f..1e0f075b303 100644 --- a/app/views/shared/_sort_dropdown.html.haml +++ b/app/views/shared/_sort_dropdown.html.haml @@ -6,7 +6,7 @@ - else = sort_title_recently_created %b.caret - %ul.dropdown-menu.dropdown-menu-align-right + %ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-sort %li = link_to page_filter_path(sort: sort_value_recently_created) do = sort_title_recently_created diff --git a/app/views/shared/issuable/_filter.html.haml b/app/views/shared/issuable/_filter.html.haml index 9474462cbd1..323d563cd4a 100644 --- a/app/views/shared/issuable/_filter.html.haml +++ b/app/views/shared/issuable/_filter.html.haml @@ -1,6 +1,8 @@ .issues-filters .issues-details-filters.row-content-block.second-block - = form_tag page_filter_path(without: [:assignee_id, :author_id, :milestone_title, :label_name]), method: :get, class: 'filter-form' do + = form_tag page_filter_path(without: [:assignee_id, :author_id, :milestone_title, :label_name, :issue_search]), method: :get, class: 'filter-form js-filter-form' do + - if params[:issue_search].present? + = hidden_field_tag :issue_search, params[:issue_search] - if controller.controller_name == 'issues' && can?(current_user, :admin_issue, @project) .check-all-holder = check_box_tag "check_all_issues", nil, false, diff --git a/app/views/shared/issuable/_search_form.html.haml b/app/views/shared/issuable/_search_form.html.haml index afad48499b7..186963b32b8 100644 --- a/app/views/shared/issuable/_search_form.html.haml +++ b/app/views/shared/issuable/_search_form.html.haml @@ -1,8 +1,2 @@ = form_tag(path, method: :get, id: "issue_search_form", class: 'issue-search-form') do = search_field_tag :issue_search, params[:issue_search], { placeholder: 'Filter by name ...', class: 'form-control issue_search search-text-input input-short', spellcheck: false } - = hidden_field_tag :state, params['state'] - = hidden_field_tag :scope, params['scope'] - = hidden_field_tag :assignee_id, params['assignee_id'] - = hidden_field_tag :author_id, params['author_id'] - = hidden_field_tag :milestone_id, params['milestone_id'] - = hidden_field_tag :label_id, params['label_id'] |