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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-2 / +16 lines)
Lines 2493-2498 Link Here
2493
        const av_damaged = new Map([% To.json(AuthorisedValues.GetDescriptionsByKohaField({ kohafield => 'items.damaged' })) | $raw %].map( av => [av.authorised_value, av.lib]));
2493
        const av_damaged = new Map([% To.json(AuthorisedValues.GetDescriptionsByKohaField({ kohafield => 'items.damaged' })) | $raw %].map( av => [av.authorised_value, av.lib]));
2494
        const av_not_for_loan= new Map([% To.json(AuthorisedValues.GetDescriptionsByKohaField({ kohafield => 'items.notforloan' })) | $raw %].map( av => [av.authorised_value, av.lib]));
2494
        const av_not_for_loan= new Map([% To.json(AuthorisedValues.GetDescriptionsByKohaField({ kohafield => 'items.notforloan' })) | $raw %].map( av => [av.authorised_value, av.lib]));
2495
        const av_restricted = new Map([% To.json(AuthorisedValues.GetDescriptionsByKohaField({ kohafield => 'items.restricted' })) | $raw %].map( av => [av.authorised_value, av.lib]));
2495
        const av_restricted = new Map([% To.json(AuthorisedValues.GetDescriptionsByKohaField({ kohafield => 'items.restricted' })) | $raw %].map( av => [av.authorised_value, av.lib]));
2496
        [% IF Koha.Preference('URLLinkText') %]
2497
            const url_link_text = "[% Koha.Preference('URLLinkText') | html %]";
2498
        [% ELSE %]
2499
            const url_link_text = _("Link to resource");
2500
        [% END %]
2496
        let table_url = "/api/v1/biblios/[% biblio.biblionumber | uri %]/items?";
2501
        let table_url = "/api/v1/biblios/[% biblio.biblionumber | uri %]/items?";
2497
        let embed = ["+strings,checkout,checkout.patron,transfer,first_hold,first_hold.patron,item_type"];
2502
        let embed = ["+strings,checkout,checkout.patron,transfer,first_hold,first_hold.patron,item_type"];
2498
        [% IF Koha.Preference('LocalCoverImages') %]
2503
        [% IF Koha.Preference('LocalCoverImages') %]
Lines 2824-2830 Link Here
2824
                searchable: true,
2829
                searchable: true,
2825
                orderable: true,
2830
                orderable: true,
2826
                render: function (data, type, row, meta) {
2831
                render: function (data, type, row, meta) {
2827
                    return row.uri; // FIXME Display link
2832
                    if ( !row.uri ) return "";
2833
2834
                    let nodes = '';
2835
                    if ( row.uri.split(' \| ').length > 1 ) {
2836
                        row.uri.split(' \| ').forEach((uri, i) => {
2837
                            nodes += '<a href="%s">%s</a><br/>'.format(uri, uri);
2838
                        });
2839
                    } else {
2840
                        nodes += '<a href="%s">%s</a><br/>'.format(row.uri, url_link_text);
2841
                    }
2842
                    return nodes;
2828
                }
2843
                }
2829
            },
2844
            },
2830
            {
2845
            {
2831
- 

Return to bug 33568