View | Details | Raw Unified | Return to bug 37301
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue (-1 / +1 lines)
Lines 3-9 Link Here
3
    <div v-else id="agreements_list">
3
    <div v-else id="agreements_list">
4
        <Toolbar v-if="!embedded">
4
        <Toolbar v-if="!embedded">
5
            <ToolbarButton
5
            <ToolbarButton
6
                type="add"
6
                action="add"
7
                @addResource="add_agreement"
7
                @addResource="add_agreement"
8
                :title="$__('New agreement')"
8
                :title="$__('New agreement')"
9
            />
9
            />
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue (-2 / +2 lines)
Lines 2-9 Link Here
2
    <div v-if="!initialized">{{ $__("Loading") }}</div>
2
    <div v-if="!initialized">{{ $__("Loading") }}</div>
3
    <div v-else id="agreements_show">
3
    <div v-else id="agreements_show">
4
        <Toolbar>
4
        <Toolbar>
5
            <ToolbarButton type="edit" @editResource="edit_agreement" />
5
            <ToolbarButton action="edit" @editResource="edit_agreement" />
6
            <ToolbarButton type="delete" @deleteResource="delete_agreement" />
6
            <ToolbarButton action="delete" @deleteResource="delete_agreement" />
7
        </Toolbar>
7
        </Toolbar>
8
8
9
        <h2>
9
        <h2>
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ToolbarButton.vue (-5 / +11 lines)
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
- 

Return to bug 37301