Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
850f19c0
Commit
850f19c0
authored
Mar 07, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added filtered search bar to issue boards
Closes #28312
parent
bd1d7781
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
37 additions
and
21 deletions
+37
-21
app/assets/javascripts/boards/boards_bundle.js
app/assets/javascripts/boards/boards_bundle.js
+3
-0
app/assets/javascripts/boards/filtered_search_boards.js
app/assets/javascripts/boards/filtered_search_boards.js
+5
-0
app/assets/javascripts/boards/stores/boards_store.js
app/assets/javascripts/boards/stores/boards_store.js
+2
-2
app/assets/stylesheets/framework/filters.scss
app/assets/stylesheets/framework/filters.scss
+5
-0
app/views/projects/boards/_show.html.haml
app/views/projects/boards/_show.html.haml
+2
-1
app/views/shared/issuable/_filter.html.haml
app/views/shared/issuable/_filter.html.haml
+2
-16
app/views/shared/issuable/_search_bar.html.haml
app/views/shared/issuable/_search_bar.html.haml
+14
-2
changelogs/unreleased/issue-boards-new-search-bar.yml
changelogs/unreleased/issue-boards-new-search-bar.yml
+4
-0
No files found.
app/assets/javascripts/boards/boards_bundle.js
View file @
850f19c0
...
...
@@ -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
)
{
...
...
app/assets/javascripts/boards/filtered_search_boards.js
0 → 100644
View file @
850f19c0
export
default
class
FilteredSearchBoards
extends
gl
.
FilteredSearchManager
{
constructor
()
{
super
(
'
boards
'
);
}
}
app/assets/javascripts/boards/stores/boards_store.js
View file @
850f19c0
...
...
@@ -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
:
''
...
...
app/assets/stylesheets/framework/filters.scss
View file @
850f19c0
...
...
@@ -219,6 +219,11 @@
}
}
.filter-dropdown-container
{
display
:
-
webkit-flex
;
display
:
flex
;
}
.dropdown-menu
.filter-dropdown-item
{
padding
:
0
;
}
...
...
app/views/projects/boards/_show.html.haml
View file @
850f19c0
...
...
@@ -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/
filte
r'
,
type: :boards
=
render
'shared/issuable/
search_ba
r'
,
type: :boards
#board-app
.boards-app
{
"v-cloak"
=>
true
,
data:
board_data
}
.boards-list
{
":class"
=>
"{ 'is-compact': detailIssueVisible }"
}
...
...
app/views/shared/issuable/_filter.html.haml
View file @
850f19c0
-
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
...
...
app/views/shared/issuable/_search_bar.html.haml
View file @
850f19c0
...
...
@@ -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
...
...
changelogs/unreleased/issue-boards-new-search-bar.yml
0 → 100644
View file @
850f19c0
---
title
:
Added new filtered search bar to issue boards
merge_request
:
author
:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment