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 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 (-4 / +11 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:
Lines 401-404 Cataloging: Link Here
401
            - "<br/>"
408
            - "<br/>"
402
            - "All values of repeating tags and subfields will be printed with the given RIS tag."
409
            - "All values of repeating tags and subfields will be printed with the given RIS tag."
403
            - "<br/>"
410
            - "<br/>"
404
            - "Use of TY ( record type ) as a key will <em>replace</em> the default TY with the field value of your choosing."
411
            - "Use of TY ( record type ) as a key will <em>replace</em> the default TY with the field value of your choosing."
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (-28 / +14 lines)
Lines 425-432 Link Here
425
425
426
    function PopupMARCFieldDoc() {
426
    function PopupMARCFieldDoc() {
427
        let field = this.dataset.tag;
427
        let field = this.dataset.tag;
428
        [% IF Koha.Preference('marcfielddocurl') %]
428
        [% IF Koha.Preference('MarcFieldDocURL') %]
429
            var docurl = "[% Koha.Preference('marcfielddocurl').replace('"','&quot;') | html %]";
429
            var docurl = "[% Koha.Preference('MarcFieldDocURL').replace('"','&quot;') | html %]";
430
            docurl = docurl.replace("{MARC}", "[% marcflavour | html %]");
430
            docurl = docurl.replace("{MARC}", "[% marcflavour | html %]");
431
            docurl = docurl.replace("{FIELD}", ""+field);
431
            docurl = docurl.replace("{FIELD}", ""+field);
432
            docurl = docurl.replace("{LANG}", "[% lang | html %]");
432
            docurl = docurl.replace("{LANG}", "[% lang | html %]");
Lines 466-503 Link Here
466
466
467
        function _MARC21FieldDoc(field) {
467
        function _MARC21FieldDoc(field) {
468
            if(field == 0) {
468
            if(field == 0) {
469
                window.open("http://www.loc.gov/marc/bibliographic/bdleader.html");
469
                window.open("https://www.loc.gov/marc/bibliographic/bdleader.html");
470
            } else if (field >= 90 && field <= 99 ){
470
            } else if (field >= 90 && field <= 99 ){
471
                window.open("http://www.loc.gov/marc/bibliographic/bd09x.html");
471
                window.open("https://www.loc.gov/marc/bibliographic/bd09x.html");
472
            } else if (field >= 590 && field <= 599 ){
472
            } else if (field >= 590 && field <= 599 ){
473
                window.open("http://www.loc.gov/marc/bibliographic/bd59x.html");
473
                window.open("https://www.loc.gov/marc/bibliographic/bd59x.html");
474
            } else if (field >= 690 && field <= 699 ){
474
            } else if (field >= 690 && field <= 699 ){
475
                window.open("http://www.loc.gov/marc/bibliographic/bd69x.html");
475
                window.open("https://www.loc.gov/marc/bibliographic/bd69x.html");
476
            } else if (field < 900) {
476
            } else if (field < 900) {
477
                window.open("http://www.loc.gov/marc/bibliographic/bd" + ("000"+field).slice(-3) + ".html");
477
                window.open("https://www.loc.gov/marc/bibliographic/bd" + ("000"+field).slice(-3) + ".html");
478
            } else {
478
            } else {
479
                window.open("http://www.loc.gov/marc/bibliographic/bd9xx.html");
479
                window.open("https://www.loc.gov/marc/bibliographic/bd9xx.html");
480
            }
480
            }
481
        }
481
        }
482
482
483
        function _UNIMARCFieldDoc(field) {
483
        function _UNIMARCFieldDoc(field) {
484
            /* http://archive.ifla.org/VI/3/p1996-1/ is an outdated version of UNIMARC, but
484
            /* IFLA no longer provides field-level pages for the UNIMARC format
485
               seems to be the only version available that can be linked to per tag.  More recent
485
               (as at December 2024).
486
               versions of the UNIMARC standard are available on the IFLA website only as
487
               PDFs!
488
            */
486
            */
489
            var url;
487
            window.open("https://www.ifla.org/g/unimarc-rg/unimarc-updates/");
490
            if (field == 0) {
491
                url = "http://archive.ifla.org/VI/3/p1996-1/uni.htm";
492
            } else {
493
                var first = field.substring(0,1);
494
                url = "http://archive.ifla.org/VI/3/p1996-1/uni" + first + ".htm#";
495
                if (first == 0) url = url + "b";
496
                url = first == 9
497
                      ? "http://archive.ifla.org/VI/3/p1996-1/uni9.htm"
498
                      : url + field;
499
            }
500
            window.open(url);
501
        }
488
        }
502
489
503
        /*
490
        /*
Lines 1068-1074 Link Here
1068
                                                    <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>
1055
                                                    <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
                                                [% ELSE %]
1056
                                                [% ELSE %]
1070
                                                    <span class="tagnum" title="[% innerloo.tag_lib | html %]">[% innerloo.tag | html %]</span>
1057
                                                    <span class="tagnum" title="[% innerloo.tag_lib | html %]">[% innerloo.tag | html %]</span>
1071
                                                    <a href="#" class="marcdocs" data-tag="[% innerloo.tag | html %]">&nbsp;?</a>
1058
                                                    &nbsp;<a href="#" class="marcdocs" data-tag="[% innerloo.tag | html %]" title="Show help for this tag">[?]</a> &nbsp;
1072
                                                [% END %]
1059
                                                [% END %]
1073
1060
1074
                                                [% IF ( innerloo.fixedfield ) %]
1061
                                                [% IF ( innerloo.fixedfield ) %]
Lines 1103-1112 Link Here
1103
                                                        size="1"
1090
                                                        size="1"
1104
                                                        maxlength="1"
1091
                                                        maxlength="1"
1105
                                                        value="[% innerloo.indicator2 | html %]" />
1092
                                                        value="[% innerloo.indicator2 | html %]" />
1106
                                                [% END # /IF innerloo.fixedfield %] -
1093
                                                [% END # /IF innerloo.fixedfield %]
1107
1094
1108
                                                [% UNLESS advancedMARCEditor %]
1095
                                                [% UNLESS advancedMARCEditor %]
1109
                                                    <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>
1096
                                                    &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>
1110
                                                [% END %]
1097
                                                [% END %]
1111
1098
1112
                                                <span class="field_controls">
1099
                                                <span class="field_controls">
1113
- 

Return to bug 31019