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

(-)a/Koha/REST/V1/Acquisitions/Vendors.pm (-7 / +7 lines)
Lines 85-97 Controller function that handles adding a new Koha::Acquisition::Bookseller obje Link Here
85
sub add {
85
sub add {
86
    my $c = shift->openapi->valid_input or return;
86
    my $c = shift->openapi->valid_input or return;
87
87
88
    my $vendor        = $c->req->json;
88
    my $vendor     = $c->req->json;
89
    my $contacts      = delete $vendor->{contacts};
89
    my $contacts   = delete $vendor->{contacts};
90
    my $interfaces    = delete $vendor->{interfaces};
90
    my $interfaces = delete $vendor->{interfaces};
91
    my $aliases       = delete $vendor->{aliases};
91
    my $aliases    = delete $vendor->{aliases};
92
    my $subscriptions = delete $vendor->{subscriptions};
92
    delete $vendor->{subscriptions};
93
    my $baskets       = delete $vendor->{baskets};
93
    delete $vendor->{baskets};
94
    my $contracts     = delete $vendor->{contracts};
94
    delete $vendor->{contracts};
95
95
96
    my $vendor_to_store = Koha::Acquisition::Bookseller->new_from_api( $c->req->json );
96
    my $vendor_to_store = Koha::Acquisition::Bookseller->new_from_api( $c->req->json );
97
97
(-)a/acqui/booksellers.pl (-1 / +1 lines)
Lines 114-120 if ($booksellerid) { Link Here
114
114
115
$template->param(
115
$template->param(
116
    loop_suppliers => $loop_suppliers,
116
    loop_suppliers => $loop_suppliers,
117
    supplier       => $booksellerid,
117
    booksellerid   => $booksellerid,
118
    count          => $vendor ? 1 : 0,
118
    count          => $vendor ? 1 : 0,
119
);
119
);
120
$template->{VARS}->{'allbaskets'} = $allbaskets;
120
$template->{VARS}->{'allbaskets'} = $allbaskets;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt (-2 / +2 lines)
Lines 9-15 Link Here
9
[% INCLUDE 'doc-head-open.inc' %]
9
[% INCLUDE 'doc-head-open.inc' %]
10
<title
10
<title
11
    >[% FILTER collapse %]
11
    >[% FILTER collapse %]
12
        [% tx("Search for vendor {vendor}", { vendor = supplier }) | html %]
12
        [% tx("Search for vendor {vendor}", { vendor = booksellerid }) | html %]
13
        &rsaquo; [% t("Koha") | html %]
13
        &rsaquo; [% t("Koha") | html %]
14
    [% END %]</title
14
    [% END %]</title
15
>
15
>
Lines 32-38 Link Here
32
            <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
32
            <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
33
        [% END %]
33
        [% END %]
34
        [% WRAPPER breadcrumb_item bc_active= 1 %]
34
        [% WRAPPER breadcrumb_item bc_active= 1 %]
35
            <span>Search for vendor [% supplier | html | $HtmlTags tag='em' %]</span>
35
            <span>Search for vendor [% booksellerid | html | $HtmlTags tag='em' %]</span>
36
        [% END %]
36
        [% END %]
37
    [% END #/ WRAPPER breadcrumbs %]
37
    [% END #/ WRAPPER breadcrumbs %]
38
[% END #/ WRAPPER sub-header.inc %]
38
[% END #/ WRAPPER sub-header.inc %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/vendors.tt (-4 / +1 lines)
Lines 21-27 Link Here
21
    [% INCLUDE 'acquisitions-search.inc' %]
21
    [% INCLUDE 'acquisitions-search.inc' %]
22
[% END %]
22
[% END %]
23
23
24
<div id="__vendors">
24
<div id="vendors">
25
    <!-- this is closed in intranet-bottom.inc -->
25
    <!-- this is closed in intranet-bottom.inc -->
26
26
27
    [% MACRO jsinclude BLOCK %]
27
    [% MACRO jsinclude BLOCK %]
Lines 40-48 Link Here
40
        </script>
40
        </script>
41
        [% Asset.js("js/vue/dist/acquisitions.js") | $raw %]
41
        [% Asset.js("js/vue/dist/acquisitions.js") | $raw %]
42
        [% INCLUDE 'select2.inc' %]
42
        [% INCLUDE 'select2.inc' %]
43
        [% SET columns = ['cardnumber','name','category','branch','action'] %]
44
        [% PROCESS patron_search_modal columns => columns, modal_title => t("Select user") %]
45
        [% PROCESS patron_search_js columns => columns, filter => erm_users, actions => ["select"], preview_on_name_click => 1 %]
46
    [% END %]
43
    [% END %]
47
    [% INCLUDE 'intranet-bottom.inc' %]</div
44
    [% INCLUDE 'intranet-bottom.inc' %]</div
48
>
45
>
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorContracts.vue (-1 / +1 lines)
Lines 44-50 export default { Link Here
44
                    data: contracts,
44
                    data: contracts,
45
                    embed: [],
45
                    embed: [],
46
                    ordering: false,
46
                    ordering: false,
47
                    dom: '<"top pager"<"table_entries"ilp>>tr<"bottom pager"ip>',
47
                    dom: '<<"table_entries">>',
48
                    aLengthMenu: [
48
                    aLengthMenu: [
49
                        [10, 20, 50, 100],
49
                        [10, 20, 50, 100],
50
                        [10, 20, 50, 100],
50
                        [10, 20, 50, 100],
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorList.vue (-3 / +7 lines)
Lines 246-252 export default { Link Here
246
                                  row.id +
246
                                  row.id +
247
                                  '" class="show">' +
247
                                  '" class="show">' +
248
                                  escape_str(
248
                                  escape_str(
249
                                      `${row.baskets.length} basket(s)`
249
                                      __("%s basket(s)").format(
250
                                          row.baskets.length
251
                                      )
250
                                  ) +
252
                                  ) +
251
                                  "</a>"
253
                                  "</a>"
252
                            : escape_str(__("No baskets"));
254
                            : escape_str(__("No baskets"));
Lines 260-270 export default { Link Here
260
                    render(data, type, row, meta) {
262
                    render(data, type, row, meta) {
261
                        return row.subscriptions_count
263
                        return row.subscriptions_count
262
                            ? '<a href="/cgi-bin/koha/serials/serials-search.pl?bookseller_filter=' +
264
                            ? '<a href="/cgi-bin/koha/serials/serials-search.pl?bookseller_filter=' +
263
                                  row.name +
265
                                  escape_str(row.name) +
264
                                  "&searched=1" +
266
                                  "&searched=1" +
265
                                  '" class="show">' +
267
                                  '" class="show">' +
266
                                  escape_str(
268
                                  escape_str(
267
                                      `${row.subscriptions_count} subscription(s)`
269
                                      __("%s subscription(s)").format(
270
                                          row.subscriptions_count
271
                                      )
268
                                  ) +
272
                                  ) +
269
                                  "</a>"
273
                                  "</a>"
270
                            : escape_str(__("No subscriptions"));
274
                            : escape_str(__("No subscriptions"));
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/modules/acquisitions.ts (-2 / +1 lines)
Lines 55-61 app.provide("mainStore", mainStore); Link Here
55
app.provide("navigationStore", navigationStore);
55
app.provide("navigationStore", navigationStore);
56
app.provide("permissionsStore", permissionsStore);
56
app.provide("permissionsStore", permissionsStore);
57
57
58
app.mount("#__vendors");
58
app.mount("#vendors");
59
59
60
const { removeMessages } = mainStore;
60
const { removeMessages } = mainStore;
61
router.beforeEach((to, from) => {
61
router.beforeEach((to, from) => {
62
- 

Return to bug 38010