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
d9d138da
Commit
d9d138da
authored
Sep 01, 2017
by
Bryce Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixup nav and load support bot info from data attr.
parent
ba89aff8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
5 deletions
+12
-5
app/assets/javascripts/filtered_search/filtered_search_manager.js
...ts/javascripts/filtered_search/filtered_search_manager.js
+0
-1
app/assets/javascripts/service_desk_issues/filtered_search.js
...assets/javascripts/service_desk_issues/filtered_search.js
+2
-1
app/assets/javascripts/service_desk_issues/index.js
app/assets/javascripts/service_desk_issues/index.js
+4
-2
app/views/layouts/nav/sidebar/_project.html.haml
app/views/layouts/nav/sidebar/_project.html.haml
+1
-1
app/views/projects/issues/_head.html.haml
app/views/projects/issues/_head.html.haml
+5
-0
No files found.
app/assets/javascripts/filtered_search/filtered_search_manager.js
View file @
d9d138da
...
...
@@ -578,7 +578,6 @@ class FilteredSearchManager {
getUsernameParams
()
{
const
usernamesById
=
{};
try
{
const
attribute
=
this
.
filteredSearchInput
.
getAttribute
(
'
data-username-params
'
);
JSON
.
parse
(
attribute
).
forEach
((
user
)
=>
{
...
...
app/assets/javascripts/service_desk_issues/filtered_search.js
View file @
d9d138da
...
...
@@ -3,6 +3,7 @@
export
default
class
FilteredSearchServiceDesk
extends
gl
.
FilteredSearchManager
{
constructor
()
{
super
(
'
service_desk
'
);
this
.
supportBotAttrs
=
JSON
.
parse
(
document
.
querySelector
(
'
.service-desk-issues
'
).
dataset
.
supportBot
);
}
customRemovalValidator
(
token
)
{
...
...
@@ -16,7 +17,7 @@ export default class FilteredSearchServiceDesk extends gl.FilteredSearchManager
modifyUrlParams
(
paramsArray
)
{
const
authorParamKey
=
'
author_username
'
;
// FIXME: Need to grab the value from a data attribute
const
supportBotParamPair
=
`
${
authorParamKey
}
=
support-bot
`
;
const
supportBotParamPair
=
`
${
authorParamKey
}
=
${
this
.
supportBotAttrs
.
username
}
`
;
const
onlyValidParams
=
paramsArray
.
filter
(
param
=>
param
.
indexOf
(
authorParamKey
)
===
-
1
);
...
...
app/assets/javascripts/service_desk_issues/index.js
View file @
d9d138da
import
FilteredSearchServiceDesk
from
'
./filtered_search
'
;
this
.
filteredSearchManager
=
new
FilteredSearchServiceDesk
();
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
this
.
filteredSearchManager
=
new
FilteredSearchServiceDesk
();
this
.
filteredSearchManager
.
setup
();
this
.
filteredSearchManager
.
setup
();
});
app/views/layouts/nav/sidebar/_project.html.haml
View file @
d9d138da
...
...
@@ -134,7 +134,7 @@
Labels
-
if
EE
::
Gitlab
::
ServiceDesk
.
enabled?
(
project:
@project
)
=
nav_link
(
controller:
[
:issues
,
:service_desk
]
)
do
=
nav_link
(
controller:
:issues
,
action: :service_desk
)
do
=
link_to
service_desk_project_issues_url
(
@project
),
title:
'Service Desk'
do
%span
Service Desk
...
...
app/views/projects/issues/_head.html.haml
View file @
d9d138da
...
...
@@ -27,6 +27,11 @@
%span
Labels
-
if
EE
::
Gitlab
::
ServiceDesk
.
enabled?
(
project:
@project
)
=
nav_link
(
controller: :issues
,
action: :service_desk
)
do
=
link_to
service_desk_project_issues_url
(
@project
),
title:
'Service Desk'
do
%span
Service Desk
-
if
project_nav_tab?
:milestones
=
nav_link
(
controller: :milestones
)
do
=
link_to
project_milestones_path
(
@project
),
title:
'Milestones'
do
...
...
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