From 03243c129333501fb783b655096b6579a05ff29e Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Sat, 24 Oct 2020 14:56:13 +1300 Subject: [PATCH] Bug 23111: (follow-up) Add a column to show default framework Signed-off-by: David Nind --- admin/biblio_framework.pl | 18 ++++++++++++++---- .../prog/en/modules/admin/biblio_framework.tt | 4 ++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/admin/biblio_framework.pl b/admin/biblio_framework.pl index 212eb3da5e4..78da7e934bc 100755 --- a/admin/biblio_framework.pl +++ b/admin/biblio_framework.pl @@ -118,13 +118,23 @@ if ( $op eq 'add_form' ) { } if ( $op eq 'list' ) { - my $frameworks = Koha::BiblioFrameworks->search( {}, { order_by => ['frameworktext'], } ); - $template->param( frameworks => $frameworks, ); + my $frameworks = Koha::BiblioFrameworks->search( {}, { order_by => ['frameworktext'], } ); + my $default_framework = Koha::BiblioFrameworks->get_default; + $template->param( + frameworks => $frameworks, + default_framework => ( $default_framework && $default_framework->frameworkcode ne '' ) + ? $default_framework->frameworkcode + : '', + ); } +my $default_framework = Koha::BiblioFrameworks->get_default; $template->param( - messages => \@messages, - op => $op, + messages => \@messages, + op => $op, + default_framework => ( $default_framework && $default_framework->frameworkcode ne '' ) + ? $default_framework->frameworkcode + : '', ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt index b2b13a9e32f..52ad7b35097 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt @@ -142,6 +142,7 @@ [% ELSE %] [% END %] + Unset to revert default framework to Default @@ -182,6 +183,7 @@ Code Description + Is default?   @@ -189,6 +191,7 @@   Default framework + [% IF default_framework == '' %]Yes[% ELSE %]No[% END %]