Backport of mr_widget_author.vue EE changes
This commit is contained in:
parent
54a575f1bb
commit
9b7971379e
|
@ -1,11 +1,26 @@
|
||||||
<script>
|
<script>
|
||||||
|
import tooltip from '../../vue_shared/directives/tooltip';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MRWidgetAuthor',
|
name: 'MRWidgetAuthor',
|
||||||
|
directives: {
|
||||||
|
tooltip,
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
author: {
|
author: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
showAuthorName: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
showAuthorTooltip: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
authorUrl() {
|
authorUrl() {
|
||||||
|
@ -21,12 +36,17 @@
|
||||||
<a
|
<a
|
||||||
:href="authorUrl"
|
:href="authorUrl"
|
||||||
class="author-link inline"
|
class="author-link inline"
|
||||||
|
:v-tooltip="showAuthorTooltip"
|
||||||
|
:title="author.name"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
:src="avatarUrl"
|
:src="avatarUrl"
|
||||||
class="avatar avatar-inline s16"
|
class="avatar avatar-inline s16"
|
||||||
/>
|
/>
|
||||||
<span class="author">
|
<span
|
||||||
|
class="author"
|
||||||
|
v-if="showAuthorName"
|
||||||
|
>
|
||||||
{{ author.name }}
|
{{ author.name }}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in New Issue