@@ -, +, @@ default when adding New record --- Koha/Template/Plugin/Biblio.pm | 6 ++++++ cataloguing/addbiblio.pl | 7 ------- koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc | 7 ++++++- .../prog/en/modules/cataloguing/cataloging-home.tt | 8 ++++++-- 4 files changed, 18 insertions(+), 10 deletions(-) --- a/Koha/Template/Plugin/Biblio.pm +++ a/Koha/Template/Plugin/Biblio.pm @@ -65,4 +65,10 @@ sub RecallsCount { return $recalls->count; } +sub DefaultFramework { + my ($self) = @_; + + return Koha::BiblioFrameworks->get_default; +} + 1; --- a/cataloguing/addbiblio.pl +++ a/cataloguing/addbiblio.pl @@ -807,13 +807,6 @@ if ( $record ne '-1' ) { my $title = C4::Context->preference('marcflavour') eq "UNIMARC" ? $record->subfield('200', 'a') : $record->title; $template->param( title => $title ); } -my $default_framework = Koha::BiblioFrameworks->get_default; -if ( defined $default_framework - && defined $frameworkcode - && $frameworkcode eq '' ) -{ - $frameworkcode = $default_framework->frameworkcode; -} $template->param( popup => $mode, frameworkcode => $frameworkcode, --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -1,4 +1,5 @@ [% USE Context %] +[% USE Biblio %] [% INCLUDE 'blocking_errors.inc' %]
@@ -7,7 +8,11 @@
@@ -233,7 +237,7 @@ $(document).ready(function() { $("#newRecord").click(function(){ - var url = $("a#newRecordDefault").prop("href"); + var url = $("#default-framework") ? $("#default-framework").prop("href") : $("a#newRecordDefault").prop("href"); window.location.href = url; return false; }); --