Commit 283ace44 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'mr-widget-author-component-backport' into 'master'

Backport of mr_widget_author.vue EE changes

See merge request gitlab-org/gitlab-ce!16884
parents 8e97e1fc 9b797137
<script>
import tooltip from '../../vue_shared/directives/tooltip';
export default {
name: 'MRWidgetAuthor',
directives: {
tooltip,
},
props: {
author: {
type: Object,
required: true,
},
showAuthorName: {
type: Boolean,
required: false,
default: true,
},
showAuthorTooltip: {
type: Boolean,
required: false,
default: false,
},
},
computed: {
authorUrl() {
......@@ -21,12 +36,17 @@
<a
:href="authorUrl"
class="author-link inline"
:v-tooltip="showAuthorTooltip"
:title="author.name"
>
<img
:src="avatarUrl"
class="avatar avatar-inline s16"
/>
<span class="author">
<span
class="author"
v-if="showAuthorName"
>
{{ author.name }}
</span>
</a>
......
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