2 <div id="title_list_result">
4 <a href="#" @click.prevent="toggle_filters($event)"
5 ><i class="fa fa-search"></i>
7 display_filters ? $__("Hide filters") : $__("Show filters")
10 <fieldset v-if="display_filters">
13 <label>{{ $__("Title") }}:</label>
16 id="publication_title_filter"
17 v-model="filters.publication_title"
18 @keyup.enter="filter_table"
22 <label>{{ $__("Publication type") }}:</label>
24 id="publication_type_filter"
25 v-model="filters.publication_type"
27 <option value="">{{ $__("All") }}</option>
29 v-for="type in av_title_publication_types"
33 {{ type.description }}
38 <label>{{ $__("Selection status") }}:</label>
40 id="selection_type_filter"
41 v-model="filters.selection_type"
43 <option value="0">{{ $__("All") }}</option>
44 <option value="1">{{ $__("Selected") }}</option>
45 <option value="2">{{ $__("Not selected") }}</option>
54 :value="$__('Filter')"
58 <KohaTable ref="table" v-bind="tableOptions" @show="doShow"></KohaTable>
63 import { inject, ref, reactive } from "vue"
64 import { storeToRefs } from "pinia"
65 import KohaTable from "../KohaTable.vue"
69 const AVStore = inject("AVStore")
70 const { av_title_publication_types } = storeToRefs(AVStore)
71 const { get_lib_from_av, map_av_dt_filter } = AVStore
74 const filters = reactive({
75 publication_title: "",
81 av_title_publication_types,
90 publication_title: this.$route.query.publication_title || "",
91 publication_type: this.$route.query.publication_type || "",
92 selection_type: this.$route.query.selection_type || "",
94 let filters = this.filters
97 columns: this.getTableColumns(),
99 "/api/v1/erm/eholdings/ebsco/packages/" +
105 dom: '<"top pager"<"table_entries"ilp>>tr<"bottom pager"ip>',
113 this.map_av_dt_filter("av_title_publication_types"),
115 actions: { 0: ["show"] },
117 publication_title: function () {
118 return filters.publication_title || ""
120 publication_type: function () {
121 return filters.publication_type || ""
123 selection_type: function () {
124 return filters.selection_type || ""
128 display_filters: false,
132 doShow: function ({ resource_id }, dt, event) {
133 event.preventDefault()
135 name: "EHoldingsEBSCOResourcesShow",
136 params: { resource_id },
139 filter_table: function () {
140 this.$refs.table.redraw(
141 "/api/v1/erm/eholdings/ebsco/packages/" +
146 toggle_filters: function (e) {
147 this.display_filters = !this.display_filters
149 getTableColumns: function () {
150 let get_lib_from_av = this.get_lib_from_av
151 let map_av_dt_filter = this.map_av_dt_filter
156 data: "title.publication_title",
159 render: function (data, type, row, meta) {
161 '<a href="/cgi-bin/koha/erm/eholdings/ebsco/resources/' +
164 escape_str(`${row.title.publication_title}`) +
166 if (row.is_selected) {
169 '<i class="fa fa-check-square" style="color: green; float: right;" title="' +
177 title: __("Publication type"),
178 data: "title.publication_type",
181 render: function (data, type, row, meta) {
184 "av_title_publication_types",
185 row.title.publication_type
196 components: { KohaTable },
197 name: "EHoldingsEBSCOPackageTitlesList",