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
2da77592
Commit
2da77592
authored
Oct 28, 2018
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply new search bar on issues and merge request dashboards
parent
12397018
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
14 deletions
+28
-14
app/assets/javascripts/pages/dashboard/issues/index.js
app/assets/javascripts/pages/dashboard/issues/index.js
+8
-2
app/assets/javascripts/pages/dashboard/merge_requests/index.js
...ssets/javascripts/pages/dashboard/merge_requests/index.js
+8
-2
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+4
-3
app/helpers/dashboard_helper.rb
app/helpers/dashboard_helper.rb
+2
-2
app/helpers/search_helper.rb
app/helpers/search_helper.rb
+3
-2
app/views/dashboard/issues.html.haml
app/views/dashboard/issues.html.haml
+1
-1
app/views/dashboard/merge_requests.html.haml
app/views/dashboard/merge_requests.html.haml
+1
-1
app/views/shared/issuable/_search_bar.html.haml
app/views/shared/issuable/_search_bar.html.haml
+1
-1
No files found.
app/assets/javascripts/pages/dashboard/issues/index.js
View file @
2da77592
import
projectSelect
from
'
~/project_select
'
;
import
initLegacyFilters
from
'
~/init_legacy_filters
'
;
import
initFilteredSearch
from
'
~/pages/search/init_filtered_search
'
;
import
IssuableFilteredSearchTokenKeys
from
'
~/filtered_search/issuable_filtered_search_token_keys
'
;
import
{
FILTERED_SEARCH
}
from
'
~/pages/constants
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
initFilteredSearch
({
page
:
FILTERED_SEARCH
.
ISSUES
,
filteredSearchTokenKeys
:
IssuableFilteredSearchTokenKeys
,
});
projectSelect
();
initLegacyFilters
();
});
app/assets/javascripts/pages/dashboard/merge_requests/index.js
View file @
2da77592
import
projectSelect
from
'
~/project_select
'
;
import
initLegacyFilters
from
'
~/init_legacy_filters
'
;
import
initFilteredSearch
from
'
~/pages/search/init_filtered_search
'
;
import
IssuableFilteredSearchTokenKeys
from
'
~/filtered_search/issuable_filtered_search_token_keys
'
;
import
{
FILTERED_SEARCH
}
from
'
~/pages/constants
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
initFilteredSearch
({
page
:
FILTERED_SEARCH
.
ISSUES
,
filteredSearchTokenKeys
:
IssuableFilteredSearchTokenKeys
,
});
projectSelect
();
initLegacyFilters
();
});
app/controllers/dashboard_controller.rb
View file @
2da77592
...
...
@@ -5,10 +5,11 @@ class DashboardController < Dashboard::ApplicationController
include
MergeRequestsAction
FILTER_PARAMS
=
[
:author_
id
,
:assignee_
id
,
:author_
username
,
:assignee_
username
,
:milestone_title
,
:label_name
:label_name
,
:my_reaction_emoji
].
freeze
before_action
:event_filter
,
only: :activity
...
...
app/helpers/dashboard_helper.rb
View file @
2da77592
...
...
@@ -2,11 +2,11 @@
module
DashboardHelper
def
assigned_issues_dashboard_path
issues_dashboard_path
(
assignee_
id:
current_user
.
id
)
issues_dashboard_path
(
assignee_
username:
current_user
.
username
)
end
def
assigned_mrs_dashboard_path
merge_requests_dashboard_path
(
assignee_
id:
current_user
.
id
)
merge_requests_dashboard_path
(
assignee_
username:
current_user
.
username
)
end
def
dashboard_nav_links
...
...
app/helpers/search_helper.rb
View file @
2da77592
...
...
@@ -163,10 +163,11 @@ module SearchHelper
if
@project
.
present?
opts
[
:data
][
'project-id'
]
=
@project
.
id
opts
[
:data
][
'base-endpoint'
]
=
project_path
(
@project
)
else
# Group context
elsif
@group
.
present?
opts
[
:data
][
'group-id'
]
=
@group
.
id
opts
[
:data
][
'base-endpoint'
]
=
group_canonical_path
(
@group
)
else
opts
[
:data
][
'base-endpoint'
]
=
root_dashboard_path
end
opts
...
...
app/views/dashboard/issues.html.haml
View file @
2da77592
...
...
@@ -16,7 +16,7 @@
.nav-controls
=
render
'shared/issuable/feed_buttons'
=
render
'shared/issuable/
filte
r'
,
type: :issues
=
render
'shared/issuable/
search_ba
r'
,
type: :issues
-
if
current_user
&&
@no_filters_set
=
render
'shared/dashboard/no_filter_selected'
...
...
app/views/dashboard/merge_requests.html.haml
View file @
2da77592
...
...
@@ -12,7 +12,7 @@
.top-area
=
render
'shared/issuable/nav'
,
type: :merge_requests
,
display_count:
!
@no_filters_set
=
render
'shared/issuable/
filte
r'
,
type: :merge_requests
=
render
'shared/issuable/
search_ba
r'
,
type: :merge_requests
-
if
current_user
&&
@no_filters_set
=
render
'shared/dashboard/no_filter_selected'
...
...
app/views/shared/issuable/_search_bar.html.haml
View file @
2da77592
-
type
=
local_assigns
.
fetch
(
:type
)
-
board
=
local_assigns
.
fetch
(
:board
,
nil
)
-
block_css_class
=
type
!=
:boards_modal
?
'row-content-block second-block'
:
''
-
full_path
=
@project
.
present?
?
@project
.
full_path
:
@group
.
full_path
-
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
)
...
...
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