debian-mirror-gitlab/app/assets/javascripts/pipelines/components/pipelines_artifacts.vue
2018-12-13 13:39:08 +05:30

54 lines
1 KiB
Vue

<script>
import tooltip from '../../vue_shared/directives/tooltip';
import Icon from '../../vue_shared/components/icon.vue';
export default {
directives: {
tooltip,
},
components: {
Icon,
},
props: {
artifacts: {
type: Array,
required: true,
},
},
};
</script>
<template>
<div
class="btn-group"
role="group"
>
<button
v-tooltip
class="dropdown-toggle btn btn-default build-artifacts js-pipeline-dropdown-download"
title="Artifacts"
data-placement="top"
data-toggle="dropdown"
aria-label="Artifacts"
>
<icon name="download" />
<i
class="fa fa-caret-down"
aria-hidden="true"
>
</i>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li
v-for="(artifact, i) in artifacts"
:key="i">
<a
:href="artifact.path"
rel="nofollow"
download
>
Download {{ artifact.name }} artifacts
</a>
</li>
</ul>
</div>
</template>