diff options
author | Phil Hughes <me@iamphill.com> | 2016-04-13 13:11:44 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-05-16 10:29:47 +0100 |
commit | 832d7fa3ce3e97113dd783600de57b8d2276d8a1 (patch) | |
tree | 71b64d97cf751739051a3bdc23a0fedb5dc5190e /app/views | |
parent | 78a67fc48dab434b43a080e5b15491963656661a (diff) | |
download | gitlab-ce-832d7fa3ce3e97113dd783600de57b8d2276d8a1.tar.gz |
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.
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/shared/issuable/_filter.html.haml | 6 | ||||
-rw-r--r-- | app/views/shared/issuable/_search_form.html.haml | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/app/views/shared/issuable/_filter.html.haml b/app/views/shared/issuable/_filter.html.haml index 9474462cbd1..c4aa57e0acf 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 + .issues-details-filters.gray-content-block.second-block + = 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'] |