2018-05-09 12:01:36 +05:30
|
|
|
<script>
|
2019-09-30 21:07:59 +05:30
|
|
|
import { n__ } from '~/locale';
|
|
|
|
|
2018-05-09 12:01:36 +05:30
|
|
|
export default {
|
|
|
|
name: 'AssigneeTitle',
|
|
|
|
props: {
|
|
|
|
loading: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
numberOfAssignees: {
|
|
|
|
type: Number,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
editable: {
|
|
|
|
type: Boolean,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
showToggle: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
assigneeTitle() {
|
|
|
|
const assignees = this.numberOfAssignees;
|
2019-09-30 21:07:59 +05:30
|
|
|
return n__('Assignee', `%d Assignees`, assignees);
|
2018-05-09 12:01:36 +05:30
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<template>
|
2020-01-01 13:55:28 +05:30
|
|
|
<div class="title hide-collapsed">
|
2018-05-09 12:01:36 +05:30
|
|
|
{{ assigneeTitle }}
|
2019-09-30 21:07:59 +05:30
|
|
|
<i v-if="loading" aria-hidden="true" class="fa fa-spinner fa-spin block-loading"></i>
|
2019-12-04 20:38:33 +05:30
|
|
|
<a
|
|
|
|
v-if="editable"
|
|
|
|
class="js-sidebar-dropdown-toggle edit-link float-right"
|
|
|
|
href="#"
|
2019-12-21 20:55:43 +05:30
|
|
|
data-track-event="click_edit_button"
|
|
|
|
data-track-label="right_sidebar"
|
|
|
|
data-track-property="assignee"
|
2019-12-04 20:38:33 +05:30
|
|
|
>
|
2018-05-09 12:01:36 +05:30
|
|
|
{{ __('Edit') }}
|
|
|
|
</a>
|
|
|
|
<a
|
|
|
|
v-if="showToggle"
|
2019-09-30 21:07:59 +05:30
|
|
|
:aria-label="__('Toggle sidebar')"
|
2018-11-08 19:23:39 +05:30
|
|
|
class="gutter-toggle float-right js-sidebar-toggle"
|
2018-05-09 12:01:36 +05:30
|
|
|
href="#"
|
|
|
|
role="button"
|
|
|
|
>
|
2019-09-30 21:07:59 +05:30
|
|
|
<i aria-hidden="true" data-hidden="true" class="fa fa-angle-double-right"></i>
|
2018-05-09 12:01:36 +05:30
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</template>
|