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

(-)a/cataloguing/addbiblio.pl (-2 / +1 lines)
Lines 933-940 if ( $op eq "addbiblio" ) { Link Here
933
        else {
933
        else {
934
            ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode );
934
            ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode );
935
        }
935
        }
936
936
        if ($mode ne "popup" && !$is_a_modif && $redirect eq "items"){
937
        if (($mode ne "popup" && !$is_a_modif) || $redirect eq "items"){
938
            print $input->redirect(
937
            print $input->redirect(
939
                "/cgi-bin/koha/cataloguing/additem.pl?biblionumber=$biblionumber&frameworkcode=$frameworkcode"
938
                "/cgi-bin/koha/cataloguing/additem.pl?biblionumber=$biblionumber&frameworkcode=$frameworkcode"
940
            );
939
            );
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (+4 lines)
Lines 1119-1124 div.first fieldset { Link Here
1119
	margin : .4em;
1119
	margin : .4em;
1120
	padding : .4em .4em .4em 25px;
1120
	padding : .4em .4em .4em 25px;
1121
 }
1121
 }
1122
1123
 .dialog input[type="submit"] {
1124
 	background : #FFF none;
1125
 }
1122
 
1126
 
1123
.dialog input.approve, td input.approve {
1127
.dialog input.approve, td input.approve {
1124
 	background : #FFF url(../../img/approve.gif) no-repeat 4px center;
1128
 	background : #FFF url(../../img/approve.gif) no-repeat 4px center;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl (-20 / +28 lines)
Lines 30-47 Link Here
30
	 
30
	 
31
	 $('#header_search > ul').tabs().bind('show.ui-tabs', function(e, ui) { $('#header_search > div:not(.ui-tabs-hide)').find('input').eq(0).focus(); });
31
	 $('#header_search > ul').tabs().bind('show.ui-tabs', function(e, ui) { $('#header_search > div:not(.ui-tabs-hide)').find('input').eq(0).focus(); });
32
32
33
function confirmnotdup(){
33
function confirmnotdup(redirect){
34
	$("#confirm_not_duplicate").attr("value","1");
34
	$("#confirm_not_duplicate").attr("value","1");
35
	// alert(_("Not a duplicate confirmed. Please click on Add biblio to save the record"));
35
    $("#redirect").attr("value",redirect);
36
	var checkform =	$("#f");
36
	Check();
37
	Check(checkform);
38
}
37
}
39
38
40
/**
39
/**
41
 * 
40
 * 
42
 * 
41
 * 
43
 */
42
 */
44
function Check(dest){
43
function Check(){
45
    var StrAlert = AreMandatoriesNotOk();
44
    var StrAlert = AreMandatoriesNotOk();
46
    if( ! StrAlert ){
45
    if( ! StrAlert ){
47
        document.f.submit();
46
        document.f.submit();
Lines 656-667 function unHideSubfield(index,labelindex) { // FIXME :: is it used ? Link Here
656
                    <div class="dialog alert">
655
                    <div class="dialog alert">
657
                        <h4>Duplicate Record suspected</h4>
656
                        <h4>Duplicate Record suspected</h4>
658
                        <p>Is this a duplicate of <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="duplicatebiblionumber" -->" onclick="openWindow('../MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="duplicatebiblionumber" -->&amp;popup=1', 'Duplicate biblio'; return false;)"><!-- TMPL_VAR name="duplicatetitle" --></a>?</p>
657
                        <p>Is this a duplicate of <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="duplicatebiblionumber" -->" onclick="openWindow('../MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="duplicatebiblionumber" -->&amp;popup=1', 'Duplicate biblio'; return false;)"><!-- TMPL_VAR name="duplicatetitle" --></a>?</p>
659
                        <form action="/cgi-bin/koha/cataloguing/additem.pl" method="get">
658
                        <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_items" --><form action="/cgi-bin/koha/cataloguing/additem.pl" method="get">
660
                            <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="duplicatebiblionumber" -->" />
659
                                                    <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="duplicatebiblionumber" -->" />
661
                            <input type="submit" class="edit" value="Yes: Edit existing items" />
660
                                                    <input type="submit" class="edit" value="Yes: Edit existing items" />
662
                        </form>
661
                                                </form><!-- TMPL_ELSE --><form action="/cgi-bin/koha/catalogue/detail.pl" method="get">
662
                                                    <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="duplicatebiblionumber" -->" />
663
                                                    <input type="submit" value="Yes: View existing items" />
664
                                                </form><!-- /TMPL_IF -->
663
                        <form action="/cgi-bin/koha/cataloguing/addbiblio.pl" method="get">
665
                        <form action="/cgi-bin/koha/cataloguing/addbiblio.pl" method="get">
664
                            <input type="submit" class="save" onclick="confirmnotdup(); return false;" value="No: Save as New Record" />
666
                        <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_items" --><input type="button" class="save" onclick="confirmnotdup('items'); return false;" value="No: Save as New Record" /><!-- TMPL_ELSE --><input type="button" class="save" onclick="confirmnotdup('view'); return false;" value="No: Save as New Record" /><!-- /TMPL_IF -->
665
                        </form>
667
                        </form>
666
                    </div>
668
                    </div>
667
        <!-- /TMPL_IF -->
669
        <!-- /TMPL_IF -->
Lines 675-681 function unHideSubfield(index,labelindex) { // FIXME :: is it used ? Link Here
675
    </script>
677
    </script>
676
<!--TMPL_ELSE-->
678
<!--TMPL_ELSE-->
677
    <form method="post" name="f" id="f" action="/cgi-bin/koha/cataloguing/addbiblio.pl" onsubmit="return Check();">
679
    <form method="post" name="f" id="f" action="/cgi-bin/koha/cataloguing/addbiblio.pl" onsubmit="return Check();">
678
    <input type="hidden" value="" id="redirect" name="redirect" />
680
    <input type="hidden" value="<!-- tmpl_if name="biblionumber" -->view<!-- tmpl_else -->items<!-- /tmpl_if -->" id="redirect" name="redirect" />
679
	<input type="hidden" value="0" id="confirm_not_duplicate" name="confirm_not_duplicate" />
681
	<input type="hidden" value="0" id="confirm_not_duplicate" name="confirm_not_duplicate" />
680
<!-- /TMPL_IF -->
682
<!-- /TMPL_IF -->
681
	
683
	
Lines 692-717 function unHideSubfield(index,labelindex) { // FIXME :: is it used ? Link Here
692
	    yuiToolbar();
694
	    yuiToolbar();
693
	 });
695
	 });
694
696
695
    var onOption = function () {
696
        return Check();
697
    }
698
699
    function redirect(dest){
697
    function redirect(dest){
700
        $("#redirect").attr("value",dest);
698
        $("#redirect").attr("value",dest);
701
        return Check();
699
        return Check();
702
    }
700
    }
701
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_items" -->
702
    var onOption = function () {
703
        return Check();
704
    }
703
705
704
    var savemenu = [
706
    var savemenu = [
705
        { text: _("Save and view record"), value: 1, onclick: {fn:function(){redirect("view");}} },
707
        { text: _("Save and view record"), value: 1, onclick: {fn:function(){redirect("view");}} },
706
        { text: _("Save and edit items"), value: 2, onclick: {fn:function(){redirect("items");}} }
708
        { text: _("Save and edit items"), value: 2, onclick: {fn:function(){redirect("items");}} }
707
    ];
709
    ];
708
710
<!-- /TMPL_IF -->
709
711
710
	// YUI Toolbar Functions
712
	// YUI Toolbar Functions
711
713
712
	function yuiToolbar() {
714
	function yuiToolbar() {
713
	    // new YAHOO.widget.Button("addbiblio");
715
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_items" -->
714
715
        var savesplitmenu = new YAHOO.widget.Button({
716
        var savesplitmenu = new YAHOO.widget.Button({
716
            type: "split",
717
            type: "split",
717
            label: _("Save"),
718
            label: _("Save"),
Lines 722-728 function unHideSubfield(index,labelindex) { // FIXME :: is it used ? Link Here
722
         });
723
         });
723
724
724
        savesplitmenu.on("click", onOption); 
725
        savesplitmenu.on("click", onOption); 
725
726
<!-- TMPL_ELSE -->
727
        new YAHOO.widget.Button({
728
            id: "addbiblio",
729
            type: "button",
730
            label: _("Save"),
731
            container: "savebutton",
732
            onclick: {fn:function(){redirect("view");}}
733
        });
734
<!-- /TMPL_IF -->
726
		new YAHOO.widget.Button({
735
		new YAHOO.widget.Button({
727
            id: "z3950search",
736
            id: "z3950search",
728
            type: "button",
737
            type: "button",
729
- 

Return to bug 2170