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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/vendor-menu.inc (-17 / +15 lines)
Lines 1-17 Link Here
1
[% IF ( booksellerid ) %]
1
[% USE Koha %]
2
    <div id="vendor-menu" class="sidebar_menu">
2
[% USE Asset %]
3
        <ul>
3
[% USE raw %]
4
            [% IF ( CAN_user_acquisition_order_manage ) %]<li><a href="/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid | uri %]">Baskets</a></li>[% END %]
4
[% USE To %]
5
            [% IF ( CAN_user_acquisition_group_manage ) %]<li><a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid | uri %]">Basket groups</a></li>[% END %]
5
6
            [% IF ( CAN_user_acquisition_contracts_manage ) %]<li><a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a></li>[% END %]
6
<vendor-menu
7
            [% IF ( CAN_user_acquisition_issue_manage ) %]<li><a href="/cgi-bin/koha/acqui/vendor_issues.pl?booksellerid=[% booksellerid | uri %]">Vendor issues</a></li>[% END %]
7
    vendorid="[% booksellerid | uri %]"
8
            <li><a href="/cgi-bin/koha/acqui/invoices.pl?supplierid=[% booksellerid | uri %]&amp;op=do_search">Invoices</a></li>
8
    basketno="[% basketno | html %]"
9
            [% IF ( CAN_user_acquisition_order_manage ) %][% IF ( basketno ) %]
9
    ordermanage="[% CAN_user_acquisition_order_manage | html %]"
10
                <li><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;owner=1">Uncertain prices</a></li>
10
    groupmanage="[% CAN_user_acquisition_group_manage | html %]"
11
            [% ELSE %]
11
    contractsmanage="[% CAN_user_acquisition_contracts_manage | html %]"
12
                <li><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid | uri %]&amp;owner=1">Uncertain prices</a></li>
12
    issuemanage="[% CAN_user_acquisition_issue_manage | html %]"
13
            [% END %][% END %]
13
></vendor-menu>
14
        </ul>
14
15
    </div>
15
[% Asset.js("js/vue/dist/islands.js", "init" => "1") | $raw %]
16
    <!-- /.sidebar_menu -->
17
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/VendorMenu.vue (+16 lines)
Lines 8-13 Link Here
8
                "
8
                "
9
            >
9
            >
10
                <a
10
                <a
11
                    ref="booksellers"
11
                    :href="`/cgi-bin/koha/acqui/booksellers.pl?booksellerid=${vendorId}`"
12
                    :href="`/cgi-bin/koha/acqui/booksellers.pl?booksellerid=${vendorId}`"
12
                    >{{ $__("Baskets") }}</a
13
                    >{{ $__("Baskets") }}</a
13
                >
14
                >
Lines 19-24 Link Here
19
                "
20
                "
20
            >
21
            >
21
                <a
22
                <a
23
                    ref="basketgroup"
22
                    :href="`/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=${vendorId}`"
24
                    :href="`/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=${vendorId}`"
23
                    >{{ $__("Basket groups") }}</a
25
                    >{{ $__("Basket groups") }}</a
24
                >
26
                >
Lines 30-35 Link Here
30
                "
32
                "
31
            >
33
            >
32
                <a
34
                <a
35
                    ref="aqcontract"
33
                    :href="`/cgi-bin/koha/admin/aqcontract.pl?booksellerid=${vendorId}`"
36
                    :href="`/cgi-bin/koha/admin/aqcontract.pl?booksellerid=${vendorId}`"
34
                    >{{ $__("Contracts") }}</a
37
                    >{{ $__("Contracts") }}</a
35
                >
38
                >
Lines 41-52 Link Here
41
                "
44
                "
42
            >
45
            >
43
                <a
46
                <a
47
                    ref="vendor_issues"
44
                    :href="`/cgi-bin/koha/acqui/vendor_issues.pl?booksellerid=${vendorId}`"
48
                    :href="`/cgi-bin/koha/acqui/vendor_issues.pl?booksellerid=${vendorId}`"
45
                    >{{ $__("Vendor issues") }}</a
49
                    >{{ $__("Vendor issues") }}</a
46
                >
50
                >
47
            </li>
51
            </li>
48
            <li>
52
            <li>
49
                <a
53
                <a
54
                    ref="invoices"
50
                    :href="`/cgi-bin/koha/acqui/invoices.pl?supplierid=${vendorId}&amp;op=do_search`"
55
                    :href="`/cgi-bin/koha/acqui/invoices.pl?supplierid=${vendorId}&amp;op=do_search`"
51
                    >{{ $__("Invoices") }}</a
56
                    >{{ $__("Invoices") }}</a
52
                >
57
                >
Lines 59-69 Link Here
59
            >
64
            >
60
                <a
65
                <a
61
                    v-if="basketno"
66
                    v-if="basketno"
67
                    ref="uncertainprice"
62
                    :href="`/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=${vendorId}&amp;basketno=${basketno}&amp;owner=1`"
68
                    :href="`/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=${vendorId}&amp;basketno=${basketno}&amp;owner=1`"
63
                    >{{ $__("Uncertain prices") }}</a
69
                    >{{ $__("Uncertain prices") }}</a
64
                >
70
                >
65
                <a
71
                <a
66
                    v-else
72
                    v-else
73
                    ref="uncertainprice"
67
                    :href="`/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=${vendorId}&amp;owner=1`"
74
                    :href="`/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=${vendorId}&amp;owner=1`"
68
                    >{{ $__("Uncertain prices") }}</a
75
                    >{{ $__("Uncertain prices") }}</a
69
                >
76
                >
Lines 114-119 export default { Link Here
114
            vendorId,
121
            vendorId,
115
        };
122
        };
116
    },
123
    },
124
    mounted() {
125
        const path = location.pathname.substring(1);
126
127
        Object.keys(this.$refs).forEach(ref => {
128
            if (this.$refs[ref].href.includes(path)) {
129
                this.$refs[ref].classList.add("current");
130
            }
131
        });
132
    },
117
};
133
};
118
</script>
134
</script>
119
135
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/modules/islands.ts (-1 / +15 lines)
Lines 62-67 export const componentRegistry: Map<string, WebComponentDynamicImport> = Link Here
62
                },
62
                },
63
            },
63
            },
64
        ],
64
        ],
65
        [
66
            "vendor-menu",
67
            {
68
                importFn: async () => {
69
                    const module = await import(
70
                        /* webpackChunkName: "vendor-menu" */
71
                        "../components/Islands/VendorMenu.vue"
72
                    );
73
                    return module.default;
74
                },
75
                config: {
76
                    stores: ["navigationStore", "permissionsStore"],
77
                },
78
            },
79
        ],
65
    ]);
80
    ]);
66
81
67
/**
82
/**
68
- 

Return to bug 38010