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

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/TrainsList.vue (-3 / +10 lines)
Lines 1-7 Link Here
1
<template>
1
<template>
2
    <div v-if="!initialized">{{ $__("Loading") }}</div>
2
    <div v-if="!initialized">{{ $__("Loading") }}</div>
3
    <div v-else id="trains_list">
3
    <div v-else id="trains_list">
4
        <Toolbar />
4
        <Toolbar>
5
            <ToolbarButton
6
                to="/cgi-bin/koha/preservation/trains/add"
7
                icon="plus"
8
                :title="$__('New train')"
9
            />
10
        </Toolbar>
5
        <fieldset v-if="count_trains > 0" class="filters">
11
        <fieldset v-if="count_trains > 0" class="filters">
6
            <label>{{ $__("Filter by") }}:</label>
12
            <label>{{ $__("Filter by") }}:</label>
7
            <input
13
            <input
Lines 54-60 Link Here
54
60
55
<script>
61
<script>
56
import flatPickr from "vue-flatpickr-component"
62
import flatPickr from "vue-flatpickr-component"
57
import Toolbar from "./TrainsToolbar.vue"
63
import Toolbar from "../Toolbar.vue"
64
import ToolbarButton from "../ToolbarButton.vue"
58
import { inject, ref, reactive } from "vue"
65
import { inject, ref, reactive } from "vue"
59
import { APIClient } from "../../fetch/api-client"
66
import { APIClient } from "../../fetch/api-client"
60
import { build_url } from "../../composables/datatables"
67
import { build_url } from "../../composables/datatables"
Lines 265-271 export default { Link Here
265
            ]
272
            ]
266
        },
273
        },
267
    },
274
    },
268
    components: { flatPickr, Toolbar, KohaTable },
275
    components: { flatPickr, Toolbar, ToolbarButton, KohaTable },
269
    name: "trainsList",
276
    name: "trainsList",
270
    emits: ["select-train", "close"],
277
    emits: ["select-train", "close"],
271
}
278
}
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/TrainsShow.vue (-10 / +13 lines)
Lines 47-60 Link Here
47
    </transition>
47
    </transition>
48
    <div v-if="!initialized">{{ $__("Loading") }}</div>
48
    <div v-if="!initialized">{{ $__("Loading") }}</div>
49
    <div v-else id="trains_show">
49
    <div v-else id="trains_show">
50
        <div id="toolbar" class="btn-toolbar">
50
        <Toolbar>
51
            <router-link
51
            <ToolbarButton
52
                v-if="train.closed_on == null"
52
                v-if="train.closed_on == null"
53
                :to="`/cgi-bin/koha/preservation/trains/${train.train_id}/items/add`"
53
                :to="`/cgi-bin/koha/preservation/trains/${train.train_id}/items/add`"
54
                class="btn btn-default"
54
                class="btn btn-default"
55
                ><font-awesome-icon icon="plus" />
55
                icon="plus"
56
                {{ $__("Add items") }}</router-link
56
                :title="$__('Add items')"
57
            >
57
            />
58
            <span
58
            <span
59
                v-else
59
                v-else
60
                class="btn btn-default"
60
                class="btn btn-default"
Lines 63-74 Link Here
63
            >
63
            >
64
                <font-awesome-icon icon="plus" /> {{ $__("Add items") }}
64
                <font-awesome-icon icon="plus" /> {{ $__("Add items") }}
65
            </span>
65
            </span>
66
            <router-link
66
            <ToolbarButton
67
                :to="`/cgi-bin/koha/preservation/trains/edit/${train.train_id}`"
67
                :to="`/cgi-bin/koha/preservation/trains/edit/${train.train_id}`"
68
                class="btn btn-default"
68
                class="btn btn-default"
69
                ><font-awesome-icon icon="pencil" />
69
                icon="pencil"
70
                {{ $__("Edit") }}</router-link
70
                :title="$__('Edit')"
71
            >
71
            />
72
            <a @click="deleteTrain(train)" class="btn btn-default"
72
            <a @click="deleteTrain(train)" class="btn btn-default"
73
                ><font-awesome-icon icon="trash" /> {{ $__("Delete") }}</a
73
                ><font-awesome-icon icon="trash" /> {{ $__("Delete") }}</a
74
            >
74
            >
Lines 90-96 Link Here
90
                @click="receiveTrain"
90
                @click="receiveTrain"
91
                ><font-awesome-icon icon="inbox" /> {{ $__("Receive") }}</a
91
                ><font-awesome-icon icon="inbox" /> {{ $__("Receive") }}</a
92
            >
92
            >
93
        </div>
93
        </Toolbar>
94
        <h2>
94
        <h2>
95
            {{ $__("Train #%s").format(train.train_id) }}
95
            {{ $__("Train #%s").format(train.train_id) }}
96
        </h2>
96
        </h2>
Lines 213-218 Link Here
213
import { inject, createVNode, render } from "vue"
213
import { inject, createVNode, render } from "vue"
214
import { APIClient } from "../../fetch/api-client"
214
import { APIClient } from "../../fetch/api-client"
215
import { useDataTable } from "../../composables/datatables"
215
import { useDataTable } from "../../composables/datatables"
216
import Toolbar from "../Toolbar.vue"
217
import ToolbarButton from "../ToolbarButton.vue"
216
218
217
export default {
219
export default {
218
    setup() {
220
    setup() {
Lines 547-552 export default { Link Here
547
            })
549
            })
548
        },
550
        },
549
    },
551
    },
552
    components: { Toolbar, ToolbarButton },
550
    name: "TrainsShow",
553
    name: "TrainsShow",
551
}
554
}
552
</script>
555
</script>
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/TrainsToolbar.vue (-16 lines)
Lines 1-16 Link Here
1
<template>
2
    <div id="toolbar" class="btn-toolbar">
3
        <router-link
4
            to="/cgi-bin/koha/preservation/trains/add"
5
            class="btn btn-default"
6
            ><font-awesome-icon icon="plus" />
7
            {{ $__("New train") }}</router-link
8
        >
9
    </div>
10
</template>
11
12
<script>
13
export default {
14
    name: "TrainsToolbar",
15
}
16
</script>
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/WaitingList.vue (-4 / +4 lines)
Lines 85-91 Link Here
85
        {{ $__("You need to configure this module first.") }}
85
        {{ $__("You need to configure this module first.") }}
86
    </div>
86
    </div>
87
    <div v-else id="waiting-list">
87
    <div v-else id="waiting-list">
88
        <div id="toolbar" class="btn-toolbar">
88
        <Toolbar>
89
            <a
89
            <a
90
                class="btn btn-default"
90
                class="btn btn-default"
91
                @click="show_modal_add_to_waiting_list = true"
91
                @click="show_modal_add_to_waiting_list = true"
Lines 103-109 Link Here
103
                    )
103
                    )
104
                }}</a
104
                }}</a
105
            >
105
            >
106
        </div>
106
        </Toolbar>
107
        <div v-if="count_waiting_list_items > 0" class="page-section">
107
        <div v-if="count_waiting_list_items > 0" class="page-section">
108
            <KohaTable
108
            <KohaTable
109
                ref="table"
109
                ref="table"
Lines 119-124 Link Here
119
119
120
<script>
120
<script>
121
import flatPickr from "vue-flatpickr-component"
121
import flatPickr from "vue-flatpickr-component"
122
import Toolbar from "../Toolbar.vue"
122
import { inject, ref } from "vue"
123
import { inject, ref } from "vue"
123
import { storeToRefs } from "pinia"
124
import { storeToRefs } from "pinia"
124
import { APIClient } from "../../fetch/api-client"
125
import { APIClient } from "../../fetch/api-client"
Lines 294-300 export default { Link Here
294
            ]
295
            ]
295
        },
296
        },
296
    },
297
    },
297
    components: { flatPickr, KohaTable },
298
    components: { flatPickr, KohaTable, Toolbar },
298
    name: "WaitingList",
299
    name: "WaitingList",
299
}
300
}
300
</script>
301
</script>
301
- 

Return to bug 30708