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

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/RecordSources/RecordSourcesResource.vue (-6 / +1 lines)
Lines 45-56 export default { Link Here
45
                    name: "record_source_id",
45
                    name: "record_source_id",
46
                    required: true,
46
                    required: true,
47
                    type: "text",
47
                    type: "text",
48
                    label: $__("Id"),
48
                    label: $__("ID"),
49
                    tableColumnDefinition: {
50
                        title: $__("ID"),
51
                        data: "record_source_id",
52
                        searchable: true,
53
                    },
54
                    hideIn: ["Form"],
49
                    hideIn: ["Form"],
55
                },
50
                },
56
                {
51
                {
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ResourceList.vue (-20 / +16 lines)
Lines 22-28 Link Here
22
22
23
<script>
23
<script>
24
import Toolbar from "./Toolbar.vue";
24
import Toolbar from "./Toolbar.vue";
25
import { ref, inject, onBeforeMount, computed } from "vue";
25
import { ref, onBeforeMount, computed } from "vue";
26
import { APIClient } from "../fetch/api-client.js";
26
import { APIClient } from "../fetch/api-client.js";
27
import KohaTable from "./KohaTable.vue";
27
import KohaTable from "./KohaTable.vue";
28
import { $__ } from "@koha-vue/i18n";
28
import { $__ } from "@koha-vue/i18n";
Lines 89-95 export default { Link Here
89
                    });
89
                    });
90
                });
90
                });
91
        };
91
        };
92
        const handleShowField = (row, attr, thisResource) => {
93
            if (!props.instancedResource.components.show) {
94
                return row[attr.name];
95
            }
96
            return (
97
                '<a href="' +
98
                thisResource.getResourceShowURL(row[thisResource.idAttr]) +
99
                '" class="show">' +
100
                escape_str(row[attr.name]) +
101
                "</a>"
102
            );
103
        };
92
        const assignShowEvent = (columnActions, i) => {
104
        const assignShowEvent = (columnActions, i) => {
105
            if (!props.instancedResource.components.show) return;
93
            if (!columnActions[i]) {
106
            if (!columnActions[i]) {
94
                columnActions[i] = ["show"];
107
                columnActions[i] = ["show"];
95
            }
108
            }
Lines 123-137 export default { Link Here
123
                        searchable: true,
136
                        searchable: true,
124
                        orderable: true,
137
                        orderable: true,
125
                        render: function (data, type, row, meta) {
138
                        render: function (data, type, row, meta) {
126
                            return (
139
                            return handleShowField(row, attr, thisResource);
127
                                '<a href="' +
128
                                thisResource.getResourceShowURL(
129
                                    row[thisResource.idAttr]
130
                                ) +
131
                                '" class="show">' +
132
                                escape_str(row[thisResource.idAttr]) +
133
                                "</a>"
134
                            );
135
                        },
140
                        },
136
                    });
141
                    });
137
                    return acc;
142
                    return acc;
Lines 146-160 export default { Link Here
146
                        searchable: true,
151
                        searchable: true,
147
                        orderable: true,
152
                        orderable: true,
148
                        render: function (data, type, row, meta) {
153
                        render: function (data, type, row, meta) {
149
                            return (
154
                            return handleShowField(row, attr, thisResource);
150
                                '<a href="' +
151
                                thisResource.getResourceShowURL(
152
                                    row[thisResource.idAttr]
153
                                ) +
154
                                '" class="show">' +
155
                                escape_str(row[attr.name]) +
156
                                "</a>"
157
                            );
158
                        },
155
                        },
159
                    });
156
                    });
160
                    return acc;
157
                    return acc;
161
- 

Return to bug 41355