Commit 850f19c0 authored by Phil Hughes's avatar Phil Hughes

Added filtered search bar to issue boards

Closes #28312
parent bd1d7781
......@@ -4,6 +4,7 @@
window.Vue = require('vue');
window.Vue.use(require('vue-resource'));
import FilteredSearchBoards from './filtered_search_boards';
require('./models/issue');
require('./models/label');
require('./models/list');
......@@ -26,6 +27,8 @@ $(() => {
const Store = gl.issueBoards.BoardsStore;
const ModalStore = gl.issueBoards.ModalStore;
new FilteredSearchBoards();
window.gl = window.gl || {};
if (gl.IssueBoardsApp) {
......
export default class FilteredSearchBoards extends gl.FilteredSearchManager {
constructor() {
super('boards');
}
}
......@@ -19,8 +19,8 @@
create () {
this.state.lists = [];
this.state.filters = {
author_id: gl.utils.getParameterValues('author_id')[0],
assignee_id: gl.utils.getParameterValues('assignee_id')[0],
author_username: gl.utils.getParameterValues('author_username')[0],
assignee_username: gl.utils.getParameterValues('assignee_username')[0],
milestone_title: gl.utils.getParameterValues('milestone_title')[0],
label_name: gl.utils.getParameterValues('label_name[]'),
search: ''
......
......@@ -219,6 +219,11 @@
}
}
.filter-dropdown-container {
display: -webkit-flex;
display: flex;
}
.dropdown-menu .filter-dropdown-item {
padding: 0;
}
......
......@@ -4,6 +4,7 @@
- content_for :page_specific_javascripts do
= page_specific_javascript_bundle_tag('common_vue')
= page_specific_javascript_bundle_tag('filtered_search')
= page_specific_javascript_bundle_tag('boards')
= page_specific_javascript_bundle_tag('simulate_drag') if Rails.env.test?
......@@ -12,7 +13,7 @@
= render "projects/issues/head"
= render 'shared/issuable/filter', type: :boards
= render 'shared/issuable/search_bar', type: :boards
#board-app.boards-app{ "v-cloak" => true, data: board_data }
.boards-list{ ":class" => "{ 'is-compact': detailIssueVisible }" }
......
- finder = controller.controller_name == 'issues' || controller.controller_name == 'boards' ? issues_finder : merge_requests_finder
- finder = controller.controller_name == 'issues' ? issues_finder : merge_requests_finder
- boards_page = controller.controller_name == 'boards'
.issues-filters
......@@ -34,21 +34,7 @@
%a{ href: page_filter_path(without: issuable_filter_params) } Reset filters
.pull-right
- if boards_page
#js-boards-search.issue-boards-search
%input.pull-left.form-control{ type: "search", placeholder: "Filter by name...", "v-model" => "filters.search", "debounce" => "250" }
- if can?(current_user, :admin_list, @project)
#js-add-issues-btn.pull-right.prepend-left-10
.dropdown.pull-right
%button.btn.btn-create.btn-inverted.js-new-board-list{ type: "button", data: { toggle: "dropdown", labels: labels_filter_path, namespace_path: @project.try(:namespace).try(:path), project_path: @project.try(:path) } }
Add list
.dropdown-menu.dropdown-menu-paging.dropdown-menu-align-right.dropdown-menu-issues-board-new.dropdown-menu-selectable
= render partial: "shared/issuable/label_page_default", locals: { show_footer: true, show_create: true, show_boards_content: true, title: "Add list" }
- if can?(current_user, :admin_label, @project)
= render partial: "shared/issuable/label_page_create"
= dropdown_loading
- else
= render 'shared/sort_dropdown'
= render 'shared/sort_dropdown'
- if @bulk_edit
.issues_bulk_update.hide
......
......@@ -85,8 +85,20 @@
%span.dropdown-label-box{ style: 'background: {{color}}' }
%span.label-title.js-data-value
{{title}}
.pull-right.filter-dropdown-container
= render 'shared/sort_dropdown'
.filter-dropdown-container
- if type == :boards
- if can?(current_user, :admin_list, @project)
.dropdown.prepend-left-10
%button.btn.btn-create.btn-inverted.js-new-board-list{ type: "button", data: { toggle: "dropdown", labels: labels_filter_path, namespace_path: @project.try(:namespace).try(:path), project_path: @project.try(:path) } }
Add list
.dropdown-menu.dropdown-menu-paging.dropdown-menu-align-right.dropdown-menu-issues-board-new.dropdown-menu-selectable
= render partial: "shared/issuable/label_page_default", locals: { show_footer: true, show_create: true, show_boards_content: true, title: "Add list" }
- if can?(current_user, :admin_label, @project)
= render partial: "shared/issuable/label_page_create"
= dropdown_loading
#js-add-issues-btn.prepend-left-10
- else
= render 'shared/sort_dropdown'
- if @bulk_edit
.issues_bulk_update.hide
......
---
title: Added new filtered search bar to issue boards
merge_request:
author:
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment