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
Léo-Paul Géneau
gitlab-ce
Commits
91d88d10
Commit
91d88d10
authored
Nov 01, 2018
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up page_filter_path
parent
f2371988
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
39 deletions
+17
-39
app/assets/javascripts/pages/dashboard/merge_requests/index.js
...ssets/javascripts/pages/dashboard/merge_requests/index.js
+3
-1
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+2
-3
app/helpers/search_helper.rb
app/helpers/search_helper.rb
+10
-0
app/views/shared/issuable/_filter.html.haml
app/views/shared/issuable/_filter.html.haml
+0
-32
app/views/shared/issuable/_search_bar.html.haml
app/views/shared/issuable/_search_bar.html.haml
+2
-3
No files found.
app/assets/javascripts/pages/dashboard/merge_requests/index.js
View file @
91d88d10
...
...
@@ -4,8 +4,10 @@ import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered
import
{
FILTERED_SEARCH
}
from
'
~/pages/constants
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
IssuableFilteredSearchTokenKeys
.
addExtraTokensForMergeRequests
();
initFilteredSearch
({
page
:
FILTERED_SEARCH
.
ISSUE
S
,
page
:
FILTERED_SEARCH
.
MERGE_REQUEST
S
,
filteredSearchTokenKeys
:
IssuableFilteredSearchTokenKeys
,
});
...
...
app/helpers/application_helper.rb
View file @
91d88d10
...
...
@@ -177,12 +177,11 @@ module ApplicationHelper
state:
params
[
:state
],
scope:
params
[
:scope
],
milestone_title:
params
[
:milestone_title
],
assignee_id:
params
[
:assignee_id
],
assignee_username:
params
[
:assignee_username
],
author_id:
params
[
:author_id
],
author_username:
params
[
:author_username
],
search:
params
[
:search
],
label_name:
params
[
:label_name
]
label_name:
params
[
:label_name
],
my_reaction_emoji:
params
[
:my_reaction_emoji
]
}
options
=
exist_opts
.
merge
(
options
)
...
...
app/helpers/search_helper.rb
View file @
91d88d10
...
...
@@ -173,6 +173,16 @@ module SearchHelper
opts
end
def
search_history_storage_prefix
if
@project
.
present?
@project
.
full_path
elsif
@group
.
present?
@group
.
full_path
else
root_dashboard_path
end
end
# Sanitize a HTML field for search display. Most tags are stripped out and the
# maximum length is set to 200 characters.
def
search_md_sanitize
(
object
,
field
)
...
...
app/views/shared/issuable/_filter.html.haml
deleted
100644 → 0
View file @
f2371988
.issues-filters
.issues-details-filters.row-content-block.second-block
=
form_tag
page_filter_path
(
without:
[
:assignee_id
,
:author_id
,
:milestone_title
,
:label_name
,
:search
]),
method: :get
,
class:
'filter-form js-filter-form'
do
-
if
params
[
:search
].
present?
=
hidden_field_tag
:search
,
params
[
:search
]
.issues-other-filters
.filter-item.inline
-
if
params
[
:author_id
].
present?
=
hidden_field_tag
(
:author_id
,
params
[
:author_id
])
=
dropdown_tag
(
user_dropdown_label
(
params
[
:author_id
],
"Author"
),
options:
{
toggle_class:
"js-user-search js-filter-submit js-author-search"
,
title:
"Filter by author"
,
filter:
true
,
dropdown_class:
"dropdown-menu-user dropdown-menu-selectable dropdown-menu-author js-filter-submit"
,
placeholder:
"Search authors"
,
data:
{
any_user:
"Any Author"
,
first_user:
current_user
&
.
username
,
current_user:
true
,
project_id:
@project
&
.
id
,
group_id:
@group
&
.
id
,
selected:
params
[
:author_id
],
field_name:
"author_id"
,
default_label:
"Author"
}
})
.filter-item.inline
-
if
params
[
:assignee_id
].
present?
=
hidden_field_tag
(
:assignee_id
,
params
[
:assignee_id
])
=
dropdown_tag
(
user_dropdown_label
(
params
[
:assignee_id
],
"Assignee"
),
options:
{
toggle_class:
"js-user-search js-filter-submit js-assignee-search"
,
title:
"Filter by assignee"
,
filter:
true
,
dropdown_class:
"dropdown-menu-user dropdown-menu-selectable dropdown-menu-assignee js-filter-submit"
,
placeholder:
"Search assignee"
,
data:
{
any_user:
"Any Assignee"
,
first_user:
current_user
&
.
username
,
null_user:
true
,
current_user:
true
,
project_id:
@project
&
.
id
,
group_id:
@group
&
.
id
,
selected:
params
[
:assignee_id
],
field_name:
"assignee_id"
,
default_label:
"Assignee"
}
})
.filter-item.inline.milestone-filter
=
render
"shared/issuable/milestone_dropdown"
,
selected:
finder
.
milestones
.
try
(
:first
),
name: :milestone_title
,
show_any:
true
,
show_upcoming:
true
,
show_started:
true
.filter-item.inline.labels-filter
=
render
"shared/issuable/label_dropdown"
,
selected:
selected_labels
,
use_id:
false
,
selected_toggle:
params
[
:label_name
],
data_options:
{
field_name:
"label_name[]"
}
-
unless
@no_filters_set
.float-right
=
render
'shared/sort_dropdown'
-
has_labels
=
@labels
&&
@labels
.
any?
.row-content-block.second-block.filtered-labels
{
class:
(
"hidden"
unless
has_labels
)
}
-
if
has_labels
=
render
'shared/labels_row'
,
labels:
@labels
app/views/shared/issuable/_search_bar.html.haml
View file @
91d88d10
-
type
=
local_assigns
.
fetch
(
:type
)
-
board
=
local_assigns
.
fetch
(
:board
,
nil
)
-
block_css_class
=
type
!=
:boards_modal
?
'row-content-block second-block'
:
''
-
full_path
=
if
@project
.
present?
then
@project
.
full_path
elsif
@group
.
present?
then
@group
.
full_path
else
request
.
path
end
-
user_can_admin_list
=
board
&&
can?
(
current_user
,
:admin_list
,
board
.
parent
)
-
show_sorting_dropdown
=
local_assigns
.
fetch
(
:show_sorting_dropdown
,
true
)
...
...
@@ -10,7 +9,7 @@
-
if
type
==
:boards
#js-multiple-boards-switcher
.inline.boards-switcher
{
"v-cloak"
=>
true
}
=
render_if_exists
"shared/boards/switcher"
,
board:
board
=
form_tag
page_filter_path
(
without:
[
:assignee_id
,
:author_id
,
:milestone_title
,
:label_name
,
:search
])
,
method: :get
,
class:
'filter-form js-filter-form'
do
=
form_tag
page_filter_path
,
method: :get
,
class:
'filter-form js-filter-form'
do
-
if
params
[
:search
].
present?
=
hidden_field_tag
:search
,
params
[
:search
]
-
if
@can_bulk_update
...
...
@@ -25,7 +24,7 @@
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
}
}
.js-filtered-search-history-dropdown
{
data:
{
full_path:
search_history_storage_prefix
}
}
.filtered-search-box-input-container.droplab-dropdown
.scroll-container
%ul
.tokens-container.list-unstyled
...
...
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