2018-11-20 20:47:30 +05:30
|
|
|
<script>
|
2019-02-15 15:39:39 +05:30
|
|
|
import { GlLink } from '@gitlab/ui';
|
2018-12-13 13:39:08 +05:30
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
GlLink,
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
illustrationPath: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
illustrationSizeClass: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
title: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
content: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
action: {
|
|
|
|
type: Object,
|
|
|
|
required: false,
|
|
|
|
default: null,
|
|
|
|
validator(value) {
|
|
|
|
return (
|
|
|
|
value === null ||
|
|
|
|
(Object.prototype.hasOwnProperty.call(value, 'path') &&
|
|
|
|
Object.prototype.hasOwnProperty.call(value, 'method') &&
|
|
|
|
Object.prototype.hasOwnProperty.call(value, 'button_title'))
|
|
|
|
);
|
2018-11-20 20:47:30 +05:30
|
|
|
},
|
|
|
|
},
|
2018-12-13 13:39:08 +05:30
|
|
|
},
|
|
|
|
};
|
2018-11-20 20:47:30 +05:30
|
|
|
</script>
|
|
|
|
<template>
|
|
|
|
<div class="row empty-state">
|
|
|
|
<div class="col-12">
|
2019-02-15 15:39:39 +05:30
|
|
|
<div :class="illustrationSizeClass" class="svg-content"><img :src="illustrationPath" /></div>
|
2018-11-20 20:47:30 +05:30
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="text-content">
|
2019-02-15 15:39:39 +05:30
|
|
|
<h4 class="js-job-empty-state-title text-center">{{ title }}</h4>
|
2018-11-20 20:47:30 +05:30
|
|
|
|
2019-02-15 15:39:39 +05:30
|
|
|
<p v-if="content" class="js-job-empty-state-content">{{ content }}</p>
|
2018-11-20 20:47:30 +05:30
|
|
|
|
2019-02-15 15:39:39 +05:30
|
|
|
<div v-if="action" class="text-center">
|
2018-12-13 13:39:08 +05:30
|
|
|
<gl-link
|
2018-12-05 23:21:45 +05:30
|
|
|
:href="action.path"
|
2018-11-20 20:47:30 +05:30
|
|
|
:data-method="action.method"
|
|
|
|
class="js-job-empty-state-action btn btn-primary"
|
|
|
|
>
|
2018-12-05 23:21:45 +05:30
|
|
|
{{ action.button_title }}
|
2018-12-13 13:39:08 +05:30
|
|
|
</gl-link>
|
2018-11-20 20:47:30 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|