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 4-10 Link Here
4
        <Toolbar v-if="!embedded">
4
        <Toolbar v-if="!embedded">
5
            <ToolbarButton
5
            <ToolbarButton
6
                type="add"
6
                type="add"
7
                @add-clicked="add_agreement"
7
                @addResource="add_agreement"
8
                :title="$__('New agreement')"
8
                :title="$__('New agreement')"
9
            />
9
            />
10
        </Toolbar>
10
        </Toolbar>
(-)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" @edit-clicked="edit_agreement" />
5
            <ToolbarButton type="edit" @editResource="edit_agreement" />
6
            <ToolbarButton type="delete" @delete-clicked="delete_agreement" />
6
            <ToolbarButton type="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 (-16 / +4 lines)
Lines 1-11 Link Here
1
<template>
1
<template>
2
    <a v-if="type === 'add'" @click="click_add" :class="class"
2
    <a v-if="type === '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="click_delete" :class="class"
5
    <a v-if="type === 'delete'" @click="$emit('deleteResource')" :class="class"
6
        ><font-awesome-icon icon="trash" /> {{ $__("Delete") }}</a
6
        ><font-awesome-icon icon="trash" /> {{ $__("Delete") }}</a
7
    >
7
    >
8
    <a v-if="type === 'edit'" @click="click_edit" :class="class"
8
    <a v-if="type === 'edit'" @click="$emit('editResource')" :class="class"
9
        ><font-awesome-icon icon="pencil" /> {{ $__("Edit") }}</a
9
        ><font-awesome-icon icon="pencil" /> {{ $__("Edit") }}</a
10
    >
10
    >
11
</template>
11
</template>
Lines 32-49 export default { Link Here
32
            type: String,
32
            type: String,
33
        },
33
        },
34
    },
34
    },
35
    methods: {
35
    emits: ["addResource", "deleteResource", "editResource"],
36
        click_add() {
37
            this.$emit("add-clicked")
38
        },
39
        click_delete() {
40
            this.$emit("delete-clicked")
41
        },
42
        click_edit() {
43
            this.$emit("edit-clicked")
44
        },
45
    },
46
    emits: ["add-clicked", "delete-clicked", "edit-clicked"],
47
    name: "Toolbar",
36
    name: "Toolbar",
48
}
37
}
49
</script>
38
</script>
50
- 

Return to bug 37301