debian-mirror-gitlab/app/assets/javascripts/issue_show/components/edited.vue

57 lines
983 B
Vue
Raw Normal View History

2017-08-17 22:00:37 +05:30
<script>
2018-03-17 18:26:18 +05:30
import timeAgoTooltip from '../../vue_shared/components/time_ago_tooltip.vue';
2017-08-17 22:00:37 +05:30
2018-03-17 18:26:18 +05:30
export default {
components: {
timeAgoTooltip,
2017-08-17 22:00:37 +05:30
},
2018-03-17 18:26:18 +05:30
props: {
updatedAt: {
type: String,
required: false,
default: '',
},
updatedByName: {
type: String,
required: false,
default: '',
},
updatedByPath: {
type: String,
required: false,
default: '',
},
2017-08-17 22:00:37 +05:30
},
2018-03-17 18:26:18 +05:30
computed: {
hasUpdatedBy() {
return this.updatedByName && this.updatedByPath;
},
2017-08-17 22:00:37 +05:30
},
2018-03-17 18:26:18 +05:30
};
2017-08-17 22:00:37 +05:30
</script>
<template>
<small
class="edited-text"
>
Edited
<time-ago-tooltip
v-if="updatedAt"
2018-03-17 18:26:18 +05:30
tooltip-placement="bottom"
2017-08-17 22:00:37 +05:30
:time="updatedAt"
/>
<span
v-if="hasUpdatedBy"
>
by
<a
class="author_link"
:href="updatedByPath"
>
2018-03-17 18:26:18 +05:30
<span>{{ updatedByName }}</span>
2017-08-17 22:00:37 +05:30
</a>
</span>
</small>
</template>
2017-09-10 17:25:29 +05:30