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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc (-20 / +9 lines)
Lines 200-237 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
200
    }
200
    }
201
201
202
    function getFieldHelpURL( tag ) {
202
    function getFieldHelpURL( tag ) {
203
        [% IF Koha.Preference('marcfielddocurl') %]
203
        [% IF Koha.Preference('MarcFieldDocURL') %]
204
            var docurl = "[% Koha.Preference('marcfielddocurl').replace('"','"') | html %]";
204
            var docurl = "[% Koha.Preference('MarcFieldDocURL').replace('"','"') | html %]";
205
            docurl = docurl.replace("{MARC}", "[% marcflavour | html %]");
205
            docurl = docurl.replace("{MARC}", "[% marcflavour | html %]");
206
            docurl = docurl.replace("{FIELD}", ""+tag);
206
            docurl = docurl.replace("{FIELD}", ""+tag);
207
            docurl = docurl.replace("{LANG}", "[% lang | html %]");
207
            docurl = docurl.replace("{LANG}", "[% lang | html %]");
208
            return docurl;
208
            return docurl;
209
        [% ELSIF ( marcflavour == 'MARC21' ) %]
209
        [% ELSIF ( marcflavour == 'MARC21' ) %]
210
            if ( tag == '000' ) {
210
            if ( tag == '000' ) {
211
                return "http://www.loc.gov/marc/bibliographic/bdleader.html";
211
                return "https://www.loc.gov/marc/bibliographic/bdleader.html";
212
            } else if ( tag >= '090' && tag < '100' ) {
212
            } else if ( tag >= '090' && tag < '100' ) {
213
                return "http://www.loc.gov/marc/bibliographic/bd09x.html";
213
                return "https://www.loc.gov/marc/bibliographic/bd09x.html";
214
            } else if ( tag < '900' ) {
214
            } else if ( tag < '900' ) {
215
                return "http://www.loc.gov/marc/bibliographic/bd" + tag + ".html";
215
                return "https://www.loc.gov/marc/bibliographic/bd" + tag + ".html";
216
            } else {
216
            } else {
217
                return "http://www.loc.gov/marc/bibliographic/bd9xx.html";
217
                return "https://www.loc.gov/marc/bibliographic/bd9xx.html";
218
            }
218
            }
219
        [% ELSIF ( marcflavour == 'UNIMARC' ) %]
219
        [% ELSIF ( marcflavour == 'UNIMARC' ) %]
220
            /* http://archive.ifla.org/VI/3/p1996-1/ is an outdated version of UNIMARC, but
220
            /* IFLA no longer provides field-level pages for the UNIMARC format
221
               seems to be the only version available that can be linked to per tag.  More recent
221
               (as at December 2024).
222
               versions of the UNIMARC standard are available on the IFLA website only as
223
               PDFs!
224
            */
222
            */
225
            if ( tag == '000' ) {
223
            return "https://www.ifla.org/g/unimarc-rg/unimarc-updates/";
226
               return  "http://archive.ifla.org/VI/3/p1996-1/uni.htm";
227
            } else {
228
                var first = tag[0];
229
                var url = "http://archive.ifla.org/VI/3/p1996-1/uni" + first + ".htm#";
230
                if ( first == '0' ) url += "b";
231
                if ( first != '9' ) url += tag;
232
233
                return url;
234
            }
235
        [% END %]
224
        [% END %]
236
    }
225
    }
237
226
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (-3 / +10 lines)
Lines 238-246 Cataloging: Link Here
238
            - pref: MarcFieldDocURL
238
            - pref: MarcFieldDocURL
239
              class: url
239
              class: url
240
            - as the URL for MARC field documentation.
240
            - as the URL for MARC field documentation.
241
            - Possible substitutions are <tt>{MARC}</tt> (marc flavour, eg. "MARC21" or "UNIMARC"), <tt>{FIELD}</tt> (field number, eg. "000" or "048"), <tt>{LANG}</tt> (user language, eg. "en" or "fi-FI").
241
            - "<br><br>"
242
            - If left empty, the format documentation on http://loc.gov (MARC21) or http://archive.ifla.org (UNIMARC) is used.
242
            - "If left empty, the default URLs are:"
243
            - For example <tt>http://fielddoc.example.com/?marc={MARC}&field={FIELD}&language={LANG}</tt>
243
            - "<ul><li>MARC21: field-level pages at https://www.loc.gov/marc/bibliographic/</li>"
244
            - "<li>UNIMARC: https://www.ifla.org/g/unimarc-rg/unimarc-updates/</a></li></ul>"
245
            - "Placeholders available for use in the URL:"
246
            - "<ul><li><code>{MARC}</code>: MARC flavor, \"MARC21\" or \"UNIMARC\"</li>"
247
            - "<li><code>{FIELD}</code>: field number, for example, \"000\" or \"048\"</li>"
248
            - "<li><code>{LANG}</code>: language, for example, \"en\" or \"fi-FI\"</li></ul>"
249
            - "Examples:<ul><li>https://www.example.com/marcdocs?marc={MARC}&field={FIELD}&language={LANG}</li>"
250
            - "<li>https://www.marc21.ca/MaJ/BIB/B{FIELD}.pdf</li></ul>"
244
        -
251
        -
245
            - pref: hide_marc
252
            - pref: hide_marc
246
              choices:
253
              choices:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (-28 / +14 lines)
Lines 444-451 function AutomaticLinker() { Link Here
444
444
445
function PopupMARCFieldDoc() {
445
function PopupMARCFieldDoc() {
446
    let field = this.dataset.tag;
446
    let field = this.dataset.tag;
447
    [% IF Koha.Preference('marcfielddocurl') %]
447
    [% IF Koha.Preference('MarcFieldDocURL') %]
448
        var docurl = "[% Koha.Preference('marcfielddocurl').replace('"','&quot;') | html %]";
448
        var docurl = "[% Koha.Preference('MarcFieldDocURL').replace('"','&quot;') | html %]";
449
        docurl = docurl.replace("{MARC}", "[% marcflavour | html %]");
449
        docurl = docurl.replace("{MARC}", "[% marcflavour | html %]");
450
        docurl = docurl.replace("{FIELD}", ""+field);
450
        docurl = docurl.replace("{FIELD}", ""+field);
451
        docurl = docurl.replace("{LANG}", "[% lang | html %]");
451
        docurl = docurl.replace("{LANG}", "[% lang | html %]");
Lines 485-522 $(document).ready(function(){ Link Here
485
485
486
    function _MARC21FieldDoc(field) {
486
    function _MARC21FieldDoc(field) {
487
        if(field == 0) {
487
        if(field == 0) {
488
            window.open("http://www.loc.gov/marc/bibliographic/bdleader.html");
488
            window.open("https://www.loc.gov/marc/bibliographic/bdleader.html");
489
        } else if (field >= 90 && field <= 99 ){
489
        } else if (field >= 90 && field <= 99 ){
490
            window.open("http://www.loc.gov/marc/bibliographic/bd09x.html");
490
            window.open("https://www.loc.gov/marc/bibliographic/bd09x.html");
491
        } else if (field >= 590 && field <= 599 ){
491
        } else if (field >= 590 && field <= 599 ){
492
            window.open("http://www.loc.gov/marc/bibliographic/bd59x.html");
492
            window.open("https://www.loc.gov/marc/bibliographic/bd59x.html");
493
        } else if (field >= 690 && field <= 699 ){
493
        } else if (field >= 690 && field <= 699 ){
494
            window.open("http://www.loc.gov/marc/bibliographic/bd69x.html");
494
            window.open("https://www.loc.gov/marc/bibliographic/bd69x.html");
495
        } else if (field < 900) {
495
        } else if (field < 900) {
496
            window.open("http://www.loc.gov/marc/bibliographic/bd" + ("000"+field).slice(-3) + ".html");
496
            window.open("https://www.loc.gov/marc/bibliographic/bd" + ("000"+field).slice(-3) + ".html");
497
        } else {
497
        } else {
498
            window.open("http://www.loc.gov/marc/bibliographic/bd9xx.html");
498
            window.open("https://www.loc.gov/marc/bibliographic/bd9xx.html");
499
        }
499
        }
500
    }
500
    }
501
501
502
    function _UNIMARCFieldDoc(field) {
502
    function _UNIMARCFieldDoc(field) {
503
        /* http://archive.ifla.org/VI/3/p1996-1/ is an outdated version of UNIMARC, but
503
        /* IFLA no longer provides field-level pages for the UNIMARC format
504
           seems to be the only version available that can be linked to per tag.  More recent
504
           (as at December 2024).
505
           versions of the UNIMARC standard are available on the IFLA website only as
506
           PDFs!
507
        */
505
        */
508
        var url;
506
        window.open("https://www.ifla.org/g/unimarc-rg/unimarc-updates/");
509
        if (field == 0) {
510
            url = "http://archive.ifla.org/VI/3/p1996-1/uni.htm";
511
        } else {
512
            var first = field.substring(0,1);
513
            url = "http://archive.ifla.org/VI/3/p1996-1/uni" + first + ".htm#";
514
            if (first == 0) url = url + "b";
515
            url = first == 9
516
                  ? "http://archive.ifla.org/VI/3/p1996-1/uni9.htm"
517
                  : url + field;
518
        }
519
        window.open(url);
520
    }
507
    }
521
508
522
    /*
509
    /*
Lines 1082-1088 $(document).ready(function(){ Link Here
1082
                                                    <a href="#" tabindex="1" class="tagnum" title="[% innerloo.tag_lib | html %] - Click to expand this tag" data-field_id="tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]">[% innerloo.tag | html %]</a>
1069
                                                    <a href="#" tabindex="1" class="tagnum" title="[% innerloo.tag_lib | html %] - Click to expand this tag" data-field_id="tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]">[% innerloo.tag | html %]</a>
1083
                                                [% ELSE %]
1070
                                                [% ELSE %]
1084
                                                    <span class="tagnum" title="[% innerloo.tag_lib | html %]">[% innerloo.tag | html %]</span>
1071
                                                    <span class="tagnum" title="[% innerloo.tag_lib | html %]">[% innerloo.tag | html %]</span>
1085
                                                    <a href="#" class="marcdocs" data-tag="[% innerloo.tag | html %]">&nbsp;?</a>
1072
                                                    &nbsp;<a href="#" class="marcdocs" data-tag="[% innerloo.tag | html %]" title="Show help for this tag">[?]</a> &nbsp;
1086
                                                [% END %]
1073
                                                [% END %]
1087
1074
1088
                                                [% IF ( innerloo.fixedfield ) %]
1075
                                                [% IF ( innerloo.fixedfield ) %]
Lines 1117-1126 $(document).ready(function(){ Link Here
1117
                                                        size="1"
1104
                                                        size="1"
1118
                                                        maxlength="1"
1105
                                                        maxlength="1"
1119
                                                        value="[% innerloo.indicator2 | html %]" />
1106
                                                        value="[% innerloo.indicator2 | html %]" />
1120
                                                [% END # /IF innerloo.fixedfield %] -
1107
                                                [% END # /IF innerloo.fixedfield %]
1121
1108
1122
                                                [% UNLESS advancedMARCEditor %]
1109
                                                [% UNLESS advancedMARCEditor %]
1123
                                                    <a href="#" tabindex="1" class="expandfield" data-field_id="tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]" title="Click to expand this tag">[% innerloo.tag_lib | html %]</a>
1110
                                                    &nbsp; <a href="#" tabindex="1" class="expandfield" data-field_id="tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]" title="Click to expand this tag">[% innerloo.tag_lib | html %]</a>
1124
                                                [% END %]
1111
                                                [% END %]
1125
1112
1126
                                                <span class="field_controls">
1113
                                                <span class="field_controls">
1127
- 

Return to bug 31019