@@ -, +, @@ record which no longer exists --- cataloguing/addbiblio.pl | 10 +++++++++- .../intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt | 13 +++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) --- a/cataloguing/addbiblio.pl +++ a/cataloguing/addbiblio.pl @@ -730,6 +730,14 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); +if ($biblionumber){ + my $does_bib_exist = Koha::Biblios->find($biblionumber); + if (!defined $does_bib_exist){ + $biblionumber = undef; + $template->param( bib_doesnt_exist => 1 ); + } +} + if ($frameworkcode eq 'FA'){ # We need to grab and set some variables in the template for use on the additems screen $template->param( @@ -798,7 +806,7 @@ if ($parentbiblio) { } $is_a_modif = 0; - + if ($biblionumber) { $is_a_modif = 1; my $title = C4::Context->preference('marcflavour') eq "UNIMARC" ? $record->subfield('200', 'a') : $record->title; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -18,6 +18,12 @@ $("#loading").hide(); }); $(document).ready(function() { + + [% IF bib_doesnt_exist %] + $("#addbibliotabs").hide(); + $("#toolbar").hide(); + [% END %] + $('#addbibliotabs').tabs().bind('show.ui-tabs', function(e, ui) { $("#"+ui.panel.id+" input:eq(0)").focus(); }); @@ -540,6 +546,13 @@ function Changefwk() { [% END %] +[% IF bib_doesnt_exist %] +
+ The record you are trying to edit doesn't exist.
+ Add a new record or do a catalog search. +
+[% END %] + [% IF ( popup ) %] [% END %] --