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
8a75635d
Commit
8a75635d
authored
May 01, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[skip ci] Show assign yourself when assignees is editable
parent
862e0eb5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
+17
-8
app/assets/javascripts/sidebar/components/assignees/assignees.js
...ets/javascripts/sidebar/components/assignees/assignees.js
+15
-8
app/assets/javascripts/sidebar/components/assignees/sidebar_assignees.js
...scripts/sidebar/components/assignees/sidebar_assignees.js
+1
-0
app/views/projects/boards/components/sidebar/_assignee.html.haml
...ws/projects/boards/components/sidebar/_assignee.html.haml
+1
-0
No files found.
app/assets/javascripts/sidebar/components/assignees/assignees.js
View file @
8a75635d
...
...
@@ -16,6 +16,10 @@ export default {
type
:
Array
,
required
:
true
,
},
editable
:
{
type
:
Boolean
,
required
:
true
,
},
},
computed
:
{
firstUser
()
{
...
...
@@ -142,14 +146,17 @@ export default {
<div class="value hide-collapsed">
<template v-if="hasNoUsers">
<span class="assign-yourself no-value">
No assignee -
<button
type="button"
class="btn-link"
@click="assignSelf"
>
assign yourself
</button>
No assignee
<template v-if="editable">
-
<button
type="button"
class="btn-link"
@click="assignSelf"
>
assign yourself
</button>
</template>
</span>
</template>
<template v-else-if="hasOneUser">
...
...
app/assets/javascripts/sidebar/components/assignees/sidebar_assignees.js
View file @
8a75635d
...
...
@@ -76,6 +76,7 @@ export default {
class="value"
:root-path="store.rootPath"
:users="store.assignees"
:editable="store.editable"
@assign-self="assignSelf"
/>
</div>
...
...
app/views/projects/boards/components/sidebar/_assignee.html.haml
View file @
8a75635d
...
...
@@ -5,6 +5,7 @@
":editable"
=>
can?
(
current_user
,
:admin_issue
,
@project
)
}
%assignees
{
class:
"value"
,
"root-path"
=>
"#{root_url}"
,
":users"
=>
"issue.assignees"
,
":editable"
=>
can?
(
current_user
,
:admin_issue
,
@project
),
"@assign-self"
=>
"assignSelf"
}
-
if
can?
(
current_user
,
:admin_issue
,
@project
)
...
...
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