summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/notes/components/note_attachment.vue
diff options
context:
space:
mode:
authorSimon Knox <simon@gitlab.com>2017-12-04 16:19:07 +0000
committerFatih Acet <acetfatih@gmail.com>2017-12-04 16:19:07 +0000
commitbf85a90037714c3ba290c9966f435adbfa90b074 (patch)
tree3fcd899154c11f3e179303cdd341c19cdcdeaaae /app/assets/javascripts/notes/components/note_attachment.vue
parenta1cd9be42910c89192e82659c09bf0242c8e5dae (diff)
downloadgitlab-ce-bf85a90037714c3ba290c9966f435adbfa90b074.tar.gz
issue note component rename
Diffstat (limited to 'app/assets/javascripts/notes/components/note_attachment.vue')
-rw-r--r--app/assets/javascripts/notes/components/note_attachment.vue37
1 files changed, 37 insertions, 0 deletions
diff --git a/app/assets/javascripts/notes/components/note_attachment.vue b/app/assets/javascripts/notes/components/note_attachment.vue
new file mode 100644
index 00000000000..cd9571a4002
--- /dev/null
+++ b/app/assets/javascripts/notes/components/note_attachment.vue
@@ -0,0 +1,37 @@
+<script>
+ export default {
+ name: 'noteAttachment',
+ props: {
+ attachment: {
+ type: Object,
+ required: true,
+ },
+ },
+ };
+</script>
+
+<template>
+ <div class="note-attachment">
+ <a
+ v-if="attachment.image"
+ :href="attachment.url"
+ target="_blank"
+ rel="noopener noreferrer">
+ <img
+ :src="attachment.url"
+ class="note-image-attach" />
+ </a>
+ <div class="attachment">
+ <a
+ v-if="attachment.url"
+ :href="attachment.url"
+ target="_blank"
+ rel="noopener noreferrer">
+ <i
+ class="fa fa-paperclip"
+ aria-hidden="true"></i>
+ {{attachment.filename}}
+ </a>
+ </div>
+ </div>
+</template>