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

(-)a/cataloguing/addbiblio.pl (-1 / +13 lines)
Lines 742-753 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
742
    }
742
    }
743
);
743
);
744
744
745
my $block_mod = 0;
745
if ($biblionumber){
746
if ($biblionumber){
746
    my $does_bib_exist = Koha::Biblios->find($biblionumber);
747
    my $does_bib_exist = Koha::Biblios->find($biblionumber);
747
    if (!defined $does_bib_exist){
748
    if (!defined $does_bib_exist){
748
        $biblionumber = undef;
749
        $biblionumber = undef;
749
        $template->param( bib_doesnt_exist => 1 );
750
        $template->param( bib_doesnt_exist => 1 );
750
    }
751
    }
752
    else {
753
        if ( C4::Context->only_my_library() ) {
754
            my $items_rs = $does_bib_exist->items->search({ "homebranch" => { '!=' => C4::Context->userenv->{branch} } });
755
            if ( $items_rs->count ) {
756
                $block_mod = 1;
757
            }
758
        }
759
    }
751
}
760
}
752
761
753
if ($frameworkcode eq 'FA'){
762
if ($frameworkcode eq 'FA'){
Lines 838-843 if ($biblionumber) { Link Here
838
    my $sth =  $dbh->prepare("select biblioitemnumber from biblioitems where biblionumber=?");
847
    my $sth =  $dbh->prepare("select biblioitemnumber from biblioitems where biblionumber=?");
839
    $sth->execute($biblionumber);
848
    $sth->execute($biblionumber);
840
    ($biblioitemnumber) = $sth->fetchrow;
849
    ($biblioitemnumber) = $sth->fetchrow;
850
851
    # notify the template if we are blocking modifs
852
    $template->param( block_mod => $block_mod );
841
}
853
}
842
854
843
#-------------------------------------------------------------------------------------
855
#-------------------------------------------------------------------------------------
Lines 859-865 if ( $op eq "addbiblio" ) { Link Here
859
    if ( !$duplicatebiblionumber or $confirm_not_duplicate ) {
871
    if ( !$duplicatebiblionumber or $confirm_not_duplicate ) {
860
        my $oldbibitemnum;
872
        my $oldbibitemnum;
861
        if ( $is_a_modif ) {
873
        if ( $is_a_modif ) {
862
            ModBiblio( $record, $biblionumber, $frameworkcode );
874
            ModBiblio( $record, $biblionumber, $frameworkcode ) unless ($block_mod);
863
        }
875
        }
864
        else {
876
        else {
865
            ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode );
877
            ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (-1 / +14 lines)
Lines 769-774 function PopupMARCFieldDoc(field) { Link Here
769
                            </form>
769
                            </form>
770
                        </div> <!-- /.dialog.alert -->
770
                        </div> <!-- /.dialog.alert -->
771
                    [% END # /IF duplicatebiblionumber %]
771
                    [% END # /IF duplicatebiblionumber %]
772
773
                    [% IF ( block_mod ) %]
774
                        <div class="dialog alert">
775
                            <h3>Shared record</h3>
776
                            <p>This record is shared with other libraries.  You will not be able to save any changes to this record.</p>
777
                            <form action="/cgi-bin/koha/catalogue/detail.pl" method="get">
778
                                <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
779
                                <input type="submit" value="Back to record details" />
780
                            </form>
781
                        </div> <!-- /.dialog.alert -->
782
                    [% END # /IF block_mod %]
783
772
                [% END # /UNLESS number %]
784
                [% END # /UNLESS number %]
773
785
774
                [% IF ( done ) %]
786
                [% IF ( done ) %]
Lines 810-816 function PopupMARCFieldDoc(field) { Link Here
810
822
811
                    [% UNLESS (circborrowernumber) %][%# Hide in fast cataloging %]
823
                    [% UNLESS (circborrowernumber) %][%# Hide in fast cataloging %]
812
                        [% IF biblionumber %]
824
                        [% IF biblionumber %]
825
                            [% UNLESS block_mod %]
813
                            <div class="btn-group"><a class="btn btn-default" href="#" id="z3950search"><i class="fa fa-search"></i> Replace record via Z39.50/SRU search</a></div>
826
                            <div class="btn-group"><a class="btn btn-default" href="#" id="z3950search"><i class="fa fa-search"></i> Replace record via Z39.50/SRU search</a></div>
827
                            [% END %]
814
                        [% ELSE %]
828
                        [% ELSE %]
815
                            <div class="btn-group"><a class="btn btn-default" href="#" id="z3950search"><i class="fa fa-search"></i> Z39.50/SRU search</a></div>
829
                            <div class="btn-group"><a class="btn btn-default" href="#" id="z3950search"><i class="fa fa-search"></i> Z39.50/SRU search</a></div>
816
                        [% END %]
830
                        [% END %]
817
- 

Return to bug 28743