Commit 4cdb14d2 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'add-editable-assign-yourself' into 'multiple_assignees_review'

Show assign yourself when assignees is editable

See merge request !1763
parents be307d54 8a75635d
...@@ -16,6 +16,10 @@ export default { ...@@ -16,6 +16,10 @@ export default {
type: Array, type: Array,
required: true, required: true,
}, },
editable: {
type: Boolean,
required: true,
},
}, },
computed: { computed: {
firstUser() { firstUser() {
...@@ -142,14 +146,17 @@ export default { ...@@ -142,14 +146,17 @@ export default {
<div class="value hide-collapsed"> <div class="value hide-collapsed">
<template v-if="hasNoUsers"> <template v-if="hasNoUsers">
<span class="assign-yourself no-value"> <span class="assign-yourself no-value">
No assignee - No assignee
<button <template v-if="editable">
type="button" -
class="btn-link" <button
@click="assignSelf" type="button"
> class="btn-link"
assign yourself @click="assignSelf"
</button> >
assign yourself
</button>
</template>
</span> </span>
</template> </template>
<template v-else-if="hasOneUser"> <template v-else-if="hasOneUser">
......
...@@ -76,6 +76,7 @@ export default { ...@@ -76,6 +76,7 @@ export default {
class="value" class="value"
:root-path="store.rootPath" :root-path="store.rootPath"
:users="store.assignees" :users="store.assignees"
:editable="store.editable"
@assign-self="assignSelf" @assign-self="assignSelf"
/> />
</div> </div>
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
":editable" => can?(current_user, :admin_issue, @project) } ":editable" => can?(current_user, :admin_issue, @project) }
%assignees.value{ "root-path" => "#{root_url}", %assignees.value{ "root-path" => "#{root_url}",
":users" => "issue.assignees", ":users" => "issue.assignees",
":editable" => can?(current_user, :admin_issue, @project),
"@assign-self" => "assignSelf" } "@assign-self" => "assignSelf" }
- if can?(current_user, :admin_issue, @project) - 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