Commit 8a75635d authored by Clement Ho's avatar Clement Ho

[skip ci] Show assign yourself when assignees is editable

parent 862e0eb5
......@@ -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">
......
......@@ -76,6 +76,7 @@ export default {
class="value"
:root-path="store.rootPath"
:users="store.assignees"
:editable="store.editable"
@assign-self="assignSelf"
/>
</div>
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment