summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-02-02 14:33:02 +0000
committerPhil Hughes <me@iamphill.com>2018-02-02 14:33:42 +0000
commit9b7971379e48c3c2034e53594be3c96af2a1007d (patch)
tree99a3646f37eb9ee90024e78e6cee1c8d5e8a414f
parent54a575f1bbba44573ab92dc58a4242f1ee734c5d (diff)
downloadgitlab-ce-9b7971379e48c3c2034e53594be3c96af2a1007d.tar.gz
Backport of mr_widget_author.vue EE changes
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author.vue22
1 files changed, 21 insertions, 1 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author.vue
index 7ac9eadcde0..cb6e9858736 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author.vue
@@ -1,11 +1,26 @@
<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>