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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
f741f620
Commit
f741f620
authored
Feb 06, 2018
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Filtered search support for Epics list page
parent
ccfb071a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
82 additions
and
1 deletion
+82
-1
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+5
-0
ee/app/assets/javascripts/pages/epics/index.js
ee/app/assets/javascripts/pages/epics/index.js
+13
-0
ee/app/views/shared/epic/_search_bar.html.haml
ee/app/views/shared/epic/_search_bar.html.haml
+53
-0
ee/app/views/shared/epic/_sort_dropdown.html.haml
ee/app/views/shared/epic/_sort_dropdown.html.haml
+10
-0
ee/app/views/shared/issuable/_epic_nav.html.haml
ee/app/views/shared/issuable/_epic_nav.html.haml
+1
-1
No files found.
app/assets/javascripts/dispatcher.js
View file @
f741f620
...
...
@@ -178,6 +178,11 @@ var Dispatcher;
case
'
groups:epics:show
'
:
new
ZenMode
();
break
;
case
'
groups:epics:index
'
:
import
(
/* webpackChunkName: "ee_epics_show" */
'
ee/pages/epics
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:compare:show
'
:
import
(
'
./pages/projects/compare/show
'
)
.
then
(
callDefault
)
...
...
ee/app/assets/javascripts/pages/epics/index.js
0 → 100644
View file @
f741f620
import
FilteredSearchTokenKeysEpics
from
'
ee/filtered_search/filtered_search_token_keys_epics
'
;
export
default
()
=>
{
const
filteredSearchEnabled
=
gl
.
FilteredSearchManager
&&
document
.
querySelector
(
'
.filtered-search
'
);
if
(
filteredSearchEnabled
)
{
const
filteredSearchManager
=
new
gl
.
FilteredSearchManager
({
page
:
'
epics
'
,
filteredSearchTokenKeys
:
FilteredSearchTokenKeysEpics
,
stateFiltersSelector
:
'
.epics-state-filters
'
,
});
filteredSearchManager
.
setup
();
}
};
ee/app/views/shared/epic/_search_bar.html.haml
0 → 100644
View file @
f741f620
-
type
=
local_assigns
.
fetch
(
:type
)
-
full_path
=
@project
.
present?
?
@project
.
full_path
:
@group
.
full_path
.epics-filters
.epics-details-filters.filtered-search-block.row-content-block.second-block
=
form_tag
page_filter_path
(
without:
[
:author_id
,
:search
]),
method: :get
,
class:
'filter-form js-filter-form'
do
-
if
params
[
:search
].
present?
=
hidden_field_tag
:search
,
params
[
:search
]
.epics-other-filters.filtered-search-wrapper
.filtered-search-box
=
dropdown_tag
(
custom_icon
(
'icon_history'
),
options:
{
wrapper_class:
"filtered-search-history-dropdown-wrapper"
,
toggle_class:
"filtered-search-history-dropdown-toggle-button"
,
dropdown_class:
"filtered-search-history-dropdown"
,
content_class:
"filtered-search-history-dropdown-content"
,
title:
"Recent searches"
})
do
.js-filtered-search-history-dropdown
{
data:
{
full_path:
full_path
}
}
.filtered-search-box-input-container.droplab-dropdown
.scroll-container
%ul
.tokens-container.list-unstyled
%li
.input-token
%input
.form-control.filtered-search
{
search_filter_input_options
(
type
)
}
#js-dropdown-hint
.filtered-search-input-dropdown-menu.dropdown-menu.hint-dropdown
%ul
{
data:
{
dropdown:
true
}
}
%li
.filter-dropdown-item
{
data:
{
action:
'submit'
}
}
%button
.btn.btn-link
{
type:
'button'
}
=
icon
(
'search'
)
%span
Press Enter or click to search
%ul
.filter-dropdown
{
data:
{
dynamic:
true
,
dropdown:
true
}
}
%li
.filter-dropdown-item
%button
.btn.btn-link
{
type:
'button'
}
-# Encapsulate static class name `{{icon}}` inside #{} to bypass
-# haml lint's ClassAttributeWithStaticValue
%i
.fa
{
class:
"#{'{{icon}}'}"
}
%span
.js-filter-hint
{{hint}}
%span
.js-filter-tag.dropdown-light-content
{{tag}}
#js-dropdown-author
.filtered-search-input-dropdown-menu.dropdown-menu
-
if
current_user
%ul
{
data:
{
dropdown:
true
}
}
=
render
'shared/issuable/user_dropdown_item'
,
user:
current_user
%ul
.filter-dropdown
{
data:
{
dynamic:
true
,
dropdown:
true
}
}
=
render
'shared/issuable/user_dropdown_item'
,
user:
User
.
new
(
username:
'{{username}}'
,
name:
'{{name}}'
),
avatar:
{
lazy:
true
,
url:
'{{avatar_url}}'
}
%button
.clear-search.hidden
{
type:
'button'
}
=
icon
(
'times'
)
.filter-dropdown-container
=
render
'shared/epic/sort_dropdown'
ee/app/views/shared/epic/_sort_dropdown.html.haml
0 → 100644
View file @
f741f620
-
sorted_by
=
sort_options_hash
[
@sort
]
.dropdown.inline.prepend-left-10
%button
.dropdown-toggle
{
type:
'button'
,
data:
{
toggle:
'dropdown'
}
}
=
sorted_by
=
icon
(
'chevron-down'
)
%ul
.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable.dropdown-menu-sort
%li
=
sortable_item
(
sort_title_created_date
,
page_filter_path
(
sort:
sort_value_created_date
,
label:
true
),
sorted_by
)
=
sortable_item
(
sort_title_recently_updated
,
page_filter_path
(
sort:
sort_value_recently_updated
,
label:
true
),
sorted_by
)
ee/app/views/shared/issuable/_epic_nav.html.haml
View file @
f741f620
-
type
=
local_assigns
.
fetch
(
:type
,
:epics
)
-
page_context_word
=
type
.
to_s
.
humanize
(
capitalize:
false
)
%ul
.nav-links.
issue
s-state-filters
%ul
.nav-links.
epic
s-state-filters
=
render
'shared/issuable/nav_links/all'
,
page_context_word:
page_context_word
,
counter:
issuables_state_counter_text
(
type
,
:all
)
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