Lines 1-19
Link Here
|
1 |
<template> |
1 |
<template> |
2 |
<a v-if="type === 'add'" @click="$emit('addResource')" :class="class" |
2 |
<a v-if="action === 'add'" @click="$emit('addResource')" :class="class" |
3 |
><font-awesome-icon icon="plus" /> {{ title }}</a |
3 |
><font-awesome-icon icon="plus" /> {{ title }}</a |
4 |
> |
4 |
> |
5 |
<a v-if="type === 'delete'" @click="$emit('deleteResource')" :class="class" |
5 |
<a |
|
|
6 |
v-else-if="action === 'delete'" |
7 |
@click="$emit('deleteResource')" |
8 |
:class="class" |
6 |
><font-awesome-icon icon="trash" /> {{ $__("Delete") }}</a |
9 |
><font-awesome-icon icon="trash" /> {{ $__("Delete") }}</a |
7 |
> |
10 |
> |
8 |
<a v-if="type === 'edit'" @click="$emit('editResource')" :class="class" |
11 |
<a |
|
|
12 |
v-else-if="action === 'edit'" |
13 |
@click="$emit('editResource')" |
14 |
:class="class" |
9 |
><font-awesome-icon icon="pencil" /> {{ $__("Edit") }}</a |
15 |
><font-awesome-icon icon="pencil" /> {{ $__("Edit") }}</a |
10 |
> |
16 |
> |
|
|
17 |
<span v-else>{{ $__("Unknown action %s").format(action) }}</span> |
11 |
</template> |
18 |
</template> |
12 |
|
19 |
|
13 |
<script> |
20 |
<script> |
14 |
export default { |
21 |
export default { |
15 |
props: { |
22 |
props: { |
16 |
type: { |
23 |
action: { |
17 |
type: String, |
24 |
type: String, |
18 |
required: true, |
25 |
required: true, |
19 |
}, |
26 |
}, |
20 |
- |
|
|