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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (-42 / +67 lines)
Lines 1-3 Link Here
1
[% USE Koha %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Cataloging &rsaquo; [% IF ( biblionumber ) %]Editing [% title |html %] (Record number [% biblionumber %])[% ELSE %]Add MARC record[% END %]</title>
3
<title>Koha &rsaquo; Cataloging &rsaquo; [% IF ( biblionumber ) %]Editing [% title |html %] (Record number [% biblionumber %])[% ELSE %]Add MARC record[% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
Lines 42-47 Link Here
42
                hideMARCdocLinks();
43
                hideMARCdocLinks();
43
            }
44
            }
44
        });
45
        });
46
47
        /* check cookie to hide/show marc tags*/
48
        var marctags_cookie = $.cookie("marctags_[% borrowernumber %]");
49
        if( marctags_cookie == 'false'){
50
            hideMARCTagLinks();
51
            $("#marcTagsSelect").removeAttr('checked');
52
        } else if( marctags_cookie == 'true'){
53
            showMARCTagLinks();
54
            $("#marcTagsSelect").attr('checked', 'checked');
55
        } else {
56
            [% UNLESS Koha.Preference("hide_marc") %]
57
                showMARCTagLinks();
58
                $("#marcTagsSelect").attr('checked', 'checked');
59
            [% ELSE %]
60
                hideMARCTagLinks();
61
                $("#marcTagsSelect").removeAttr('checked');
62
            [% END %]
63
        }
64
        $("#marcTagsSelect").click(function(){
65
            if($(this).attr("checked")){
66
                showMARCTagLinks();
67
            } else {
68
                hideMARCTagLinks();
69
            }
70
        });
71
45
        $("#z3950search").click(function(){
72
        $("#z3950search").click(function(){
46
            if (confirm(_("Please note that this Z39.50 search could replace the current record."))){
73
            if (confirm(_("Please note that this Z39.50 search could replace the current record."))){
47
                PopupZ3950();
74
                PopupZ3950();
Lines 73-80 Link Here
73
            redirect("just_save", tab);
100
            redirect("just_save", tab);
74
            return false;
101
            return false;
75
        });
102
        });
76
103
    });
77
	});
78
104
79
function redirect(dest){
105
function redirect(dest){
80
    $("#redirect").attr("value",dest);
106
    $("#redirect").attr("value",dest);
Lines 147-153 function _UNIMARCFieldDoc(field) { Link Here
147
}
173
}
148
174
149
/*
175
/*
150
 * Functions to hide/show marc docs links
176
 * Functions to hide/show marc docs and tags links
151
 */
177
 */
152
function hideMARCdocLinks() {
178
function hideMARCdocLinks() {
153
	$(".marcdocs").hide();
179
	$(".marcdocs").hide();
Lines 159-164 function showMARCdocLinks() { Link Here
159
	$.cookie("marcdocs_[% borrowernumber %]",'true', { path: "/", expires: 365 });
185
	$.cookie("marcdocs_[% borrowernumber %]",'true', { path: "/", expires: 365 });
160
}
186
}
161
187
188
function hideMARCTagLinks() {
189
    $(".tagnum").hide();
190
    $(".subfieldcode").hide();
191
    $.cookie("marctags_[% borrowernumber %]",'false', { path: "/", expires: 365 });
192
}
193
function showMARCTagLinks() {
194
    $(".tagnum").show();
195
    $(".subfieldcode").show();
196
    $.cookie("marctags_[% borrowernumber %]",'true', { path: "/", expires: 365 });
197
}
198
        [% IF hide_marc %]
199
            var hide = false;
200
        [% ELSE %]
201
            var hide = true;
202
        [% END %]
203
        $("#show_tags").change( function(){
204
            if ( $(this).is(':checked') ) {
205
                $(".tagnum").show();
206
                $(".subfieldcode").show();
207
            } else {
208
            }
209
        } );
210
        $("#show_tags").attr("checked", !hide)
211
        $("#show_tags").change();
212
213
162
/**
214
/**
163
 * check if mandatory subfields are written
215
 * check if mandatory subfields are written
164
 */
216
 */
Lines 339-346 function Changefwk(FwkList) { Link Here
339
[% END %]
391
[% END %]
340
</h1>
392
</h1>
341
393
342
[% IF marcflavour != 'NORMARC' %]
394
[% IF marcflavour != 'NORMARC' AND NOT advancedMARCEditor %]
343
<div><input type="checkbox" name="marcDocsSelect" id="marcDocsSelect" checked="true" /> Show MARC tag documentation links<br/></div>
395
<div>
396
  <label><input type="checkbox" name="marcDocsSelect" id="marcDocsSelect" checked="true" /> Show MARC tag documentation links</label>
397
  <label><input type="checkbox" name="marcTagsSelect" id="marcTagsSelect" style="margin-left: 5px;" /> Show tags</label>
398
</div>
344
[% END %]
399
[% END %]
345
400
346
[% UNLESS ( number ) %]
401
[% UNLESS ( number ) %]
Lines 437-444 function Changefwk(FwkList) { Link Here
437
                       [% frameworkcodeloo.frameworktext %]
492
                       [% frameworkcodeloo.frameworktext %]
438
                       </option>
493
                       </option>
439
                [% END %]
494
                [% END %]
440
        </select>
495
            </select>
441
</div>
496
        </div>
442
</div>
497
</div>
443
498
444
[% IF ( popup ) %]
499
[% IF ( popup ) %]
Lines 464-476 function Changefwk(FwkList) { Link Here
464
    [% IF ( innerloo.tag ) %]
519
    [% IF ( innerloo.tag ) %]
465
    <div class="tag" id="tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]">
520
    <div class="tag" id="tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]">
466
        <div class="tag_title" id="div_indicator_tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]">
521
        <div class="tag_title" id="div_indicator_tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]">
467
        [% UNLESS hide_marc %]
468
            [% IF advancedMARCEditor %]
522
            [% IF advancedMARCEditor %]
469
                <a href="#" tabindex="1" class="tagnum" title="[% innerloo.tag_lib %] - Click to Expand this Tag" onclick="ExpandField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;">[% innerloo.tag %]</a>
523
                <a href="#" tabindex="1" class="tagnum" title="[% innerloo.tag_lib %] - Click to Expand this Tag" onclick="ExpandField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;">[% innerloo.tag %]</a>
470
            [% ELSE %]
524
            [% ELSE %]
471
                <span class="tagnum" title="[% innerloo.tag_lib %]">[% innerloo.tag %]
525
                <span class="tagnum" title="[% innerloo.tag_lib %]">[% innerloo.tag %]</span>
472
                [% IF marcflavour != 'NORMARC' %]<a href="#" class="marcdocs" onclick="PopupMARCFieldDoc('[% innerloo.tag %]'); return false;">&nbsp;?</a>[% END %]
526
                [% IF marcflavour != 'NORMARC' %]<a href="#" class="marcdocs" onclick="PopupMARCFieldDoc('[% innerloo.tag %]'); return false;">&nbsp;?</a>[% END %]
473
                </span>
474
            [% END %]
527
            [% END %]
475
                [% IF ( innerloo.fixedfield ) %]
528
                [% IF ( innerloo.fixedfield ) %]
476
                    <input type="text"
529
                    <input type="text"
Lines 505-538 function Changefwk(FwkList) { Link Here
505
                        maxlength="1"
558
                        maxlength="1"
506
                        value="[% innerloo.indicator2 %]" />
559
                        value="[% innerloo.indicator2 %]" />
507
                [% END %] -
560
                [% END %] -
508
        [% ELSE %]
509
                [% IF ( innerloo.fixedfield ) %]
510
                    <input type="hidden"
511
                        tabindex="1"
512
                        name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]"
513
                        value="[% innerloo.indicator1 %]" />
514
                    <input type="hidden"
515
                        tabindex="1"
516
                        name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]"
517
                        value="[% innerloo.indicator2 %]" />
518
                [% ELSE %]
519
                    <input type="hidden"
520
                        tabindex="1"
521
                        name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]"
522
                        value="[% innerloo.indicator1 %]" />
523
                    <input type="hidden"
524
                        tabindex="1"
525
                        name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]"
526
                        value="[% innerloo.indicator2 %]" />
527
                [% END %]
528
        [% END %]
529
561
530
            [% UNLESS advancedMARCEditor %]
562
            [% UNLESS advancedMARCEditor %]
531
                <a href="#" tabindex="1" class="expandfield" onclick="ExpandField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;" title="Click to Expand this Tag">[% innerloo.tag_lib %]</a>
563
                <a href="#" tabindex="1" class="expandfield" onclick="ExpandField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;" title="Click to Expand this Tag">[% innerloo.tag_lib %]</a>
532
            [% END %]
564
            [% END %]
533
                <span class="field_controls">
565
                <span class="field_controls">
534
                [% IF ( innerloo.repeatable ) %]
566
                [% IF ( innerloo.repeatable ) %]
535
                    <a href="#" tabindex="1" class="buttonPlus" onclick="CloneField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]','[% hide_marc %]','[% advancedMARCEditor %]'); return false;" title="Repeat this Tag">
567
                    <a href="#" tabindex="1" class="buttonPlus" onclick="CloneField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]','0','[% advancedMARCEditor %]'); return false;" title="Repeat this Tag">
536
                        <img src="[% interface %]/[% theme %]/img/repeat-tag.png" alt="Repeat this Tag" />
568
                        <img src="[% interface %]/[% theme %]/img/repeat-tag.png" alt="Repeat this Tag" />
537
                    </a>
569
                    </a>
538
                [% END %]
570
                [% END %]
Lines 546-559 function Changefwk(FwkList) { Link Here
546
        [% FOREACH subfield_loo IN innerloo.subfield_loop %]
578
        [% FOREACH subfield_loo IN innerloo.subfield_loop %]
547
            <!--  One line on the marc editor -->
579
            <!--  One line on the marc editor -->
548
            <div class="subfield_line" style="[% subfield_loo.visibility %]" id="subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]">
580
            <div class="subfield_line" style="[% subfield_loo.visibility %]" id="subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]">
549
            
581
550
                [% UNLESS advancedMARCEditor %]
582
                [% UNLESS advancedMARCEditor %]
551
                    [% IF ( subfield_loo.fixedfield ) %]<label for="tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" style="display:none;" class="labelsubfield">
583
                    [% IF ( subfield_loo.fixedfield ) %]<label for="tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" style="display:none;" class="labelsubfield">
552
                    [% ELSE %]<label for="tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" class="labelsubfield">
584
                    [% ELSE %]<label for="tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" class="labelsubfield">
553
                    [% END %]
585
                    [% END %]
554
                [% END %]
586
                [% END %]
555
                
587
556
                [% UNLESS hide_marc %]
557
                <span class="subfieldcode">
588
                <span class="subfieldcode">
558
                    [% IF ( subfield_loo.fixedfield ) %]
589
                    [% IF ( subfield_loo.fixedfield ) %]
559
                        <img class="buttonUp" style="display:none;" src="[% interface %]/[% theme %]/img/up.png" onclick="upSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]')" alt="Move Up" title="Move Up" />
590
                        <img class="buttonUp" style="display:none;" src="[% interface %]/[% theme %]/img/up.png" onclick="upSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]')" alt="Move Up" title="Move Up" />
Lines 570-581 function Changefwk(FwkList) { Link Here
570
                            class="flat"
601
                            class="flat"
571
                            tabindex="0" />
602
                            tabindex="0" />
572
                </span>
603
                </span>
573
                [% ELSE %]
604
574
                    <input type="hidden"
575
                        name="tag_[% subfield_loo.tag %]_code_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]"
576
                        value="[% subfield_loo.subfield %]" />
577
                [% END %]
578
            
579
                [% UNLESS advancedMARCEditor %]
605
                [% UNLESS advancedMARCEditor %]
580
                    [% IF ( subfield_loo.mandatory ) %]<span class="subfield subfield_mandatory">[% ELSE %]<span class="subfield">[% END %]
606
                    [% IF ( subfield_loo.mandatory ) %]<span class="subfield subfield_mandatory">[% ELSE %]<span class="subfield">[% END %]
581
                        [% subfield_loo.marc_lib_plain %]
607
                        [% subfield_loo.marc_lib_plain %]
582
- 

Return to bug 9366