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
9ad83f65
Commit
9ad83f65
authored
Mar 27, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[skip ci] add rootPath
parent
b2714763
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
6 deletions
+14
-6
app/assets/javascripts/vue_sidebar_assignees/components/expanded/multiple_assignees.js
...debar_assignees/components/expanded/multiple_assignees.js
+5
-2
app/assets/javascripts/vue_sidebar_assignees/components/expanded/single_assignee.js
..._sidebar_assignees/components/expanded/single_assignee.js
+4
-1
app/assets/javascripts/vue_sidebar_assignees/index.js
app/assets/javascripts/vue_sidebar_assignees/index.js
+2
-1
app/assets/javascripts/vue_sidebar_assignees/stores/sidebar_assignees_store.js
...s/vue_sidebar_assignees/stores/sidebar_assignees_store.js
+2
-1
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+1
-1
No files found.
app/assets/javascripts/vue_sidebar_assignees/components/expanded/multiple_assignees.js
View file @
9ad83f65
...
...
@@ -11,6 +11,9 @@ export default {
assignees
:
{
type
:
Object
,
required
:
true
},
},
computed
:
{
rootPath
()
{
return
this
.
assignees
.
rootPath
;
},
shouldShowMoreAssignees
()
{
return
this
.
assignees
.
users
.
length
>
5
;
},
...
...
@@ -34,11 +37,11 @@ export default {
v-if="showMore || (index < 5 && !showMore)" >
<a class="user-link has-tooltip"
data-placement="bottom"
:href="
'/'
+ user.username"
:href="
rootPath
+ user.username"
:data-title="user.name" >
<img width="32"
class="avatar avatar-inline s32"
alt="PLACEHOLDER
"
:alt="user.name + '\\'s avatar'
"
:src="user.avatarUrl" >
</a>
</div>
...
...
app/assets/javascripts/vue_sidebar_assignees/components/expanded/single_assignee.js
View file @
9ad83f65
...
...
@@ -4,6 +4,9 @@ export default {
assignees
:
{
type
:
Object
,
required
:
true
},
},
computed
:
{
rootPath
()
{
return
this
.
assignees
.
rootPath
;
},
user
()
{
return
this
.
assignees
.
users
[
0
];
},
...
...
@@ -13,7 +16,7 @@ export default {
},
template
:
`
<div class="hide-collapsed">
<a class="author_link bold" :href="
'/'
+ user.username">
<a class="author_link bold" :href="
rootPath
+ user.username">
<img width="32"
class="avatar avatar-inline s32"
:alt="avatarAlt"
...
...
app/assets/javascripts/vue_sidebar_assignees/index.js
View file @
9ad83f65
...
...
@@ -19,13 +19,14 @@ const sidebarAssigneesOptions = () => ({
data
()
{
const
selector
=
this
.
$options
.
el
;
const
element
=
document
.
querySelector
(
selector
);
const
rootPath
=
element
.
dataset
.
rootPath
;
const
path
=
element
.
dataset
.
path
;
const
field
=
element
.
dataset
.
field
;
const
editable
=
element
.
hasAttribute
(
'
data-editable
'
);
const
currentUserId
=
parseInt
(
element
.
dataset
.
userId
,
10
);
const
service
=
new
SidebarAssigneesService
(
path
,
field
);
const
assignees
=
new
SidebarAssigneesStore
(
currentUserId
,
service
,
editable
);
const
assignees
=
new
SidebarAssigneesStore
(
currentUserId
,
service
,
rootPath
,
editable
);
return
{
assignees
,
...
...
app/assets/javascripts/vue_sidebar_assignees/stores/sidebar_assignees_store.js
View file @
9ad83f65
export
default
class
SidebarAssigneesStore
{
constructor
(
currentUserId
,
service
,
editable
)
{
constructor
(
currentUserId
,
service
,
rootPath
,
editable
)
{
this
.
currentUserId
=
currentUserId
;
this
.
service
=
service
;
this
.
rootPath
=
rootPath
;
this
.
users
=
[];
this
.
saved
=
true
;
this
.
loading
=
false
;
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
9ad83f65
...
...
@@ -24,7 +24,7 @@
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
issuable
],
remote:
true
,
format: :json
,
html:
{
class:
'issuable-context-form inline-update js-issuable-update'
}
do
|
f
|
.block.assignee
-
if
issuable
.
instance_of?
(
Issue
)
#js-vue-sidebar-assignees
{
data:
{
path:
issuable_json_path
(
issuable
),
field:
"#{issuable.to_ability_name}[assignee_id]"
,
'editable'
=>
can_edit_issuable
?
true
:
false
,
user:
{
id:
current_user
.
id
}
}
}
#js-vue-sidebar-assignees
{
data:
{
path:
issuable_json_path
(
issuable
),
field:
"#{issuable.to_ability_name}[assignee_id]"
,
'editable'
=>
can_edit_issuable
?
true
:
false
,
user:
{
id:
current_user
.
id
}
,
root:
{
path:
root_path
}
}
}
.title.hide-collapsed
Assignee
=
icon
(
'spinner spin'
,
class:
'block-loading'
,
'aria-hidden'
:
'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