From f3dfe5c02222b5482bdadcb10eef4efec82b3caa Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 3 May 2023 11:30:00 +0000 Subject: [PATCH] Bug 33607: (follow-up) Handle default framework --- Koha/Template/Plugin/Frameworks.pm | 2 +- .../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Koha/Template/Plugin/Frameworks.pm b/Koha/Template/Plugin/Frameworks.pm index e2d9572399..17ce9ec3c4 100644 --- a/Koha/Template/Plugin/Frameworks.pm +++ b/Koha/Template/Plugin/Frameworks.pm @@ -47,7 +47,7 @@ is not found sub GetName { my ( $self, $frameworkcode ) = @_; return q{} unless defined $frameworkcode; - return q{} if $frameworkcode eq q{}; + return q{} if $frameworkcode eq q{}; # Default framework must be handled in templates for translatability my $f = Koha::BiblioFrameworks->find($frameworkcode); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 0442d069c7..902a9d86b4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -138,7 +138,12 @@ MARC preview: Show MARC framework: - [% Frameworks.GetName(biblio.frameworkcode) | html %] + [% SET framework_name = Frameworks.GetName(biblio.frameworkcode) %] + [% IF (framework_name) %] + [% framework_name | html %] + [% ELSE %] + Default + [% END %] [% IF !item_level_itypes || Koha.Preference("BiblioItemtypeInfo") %] Itemtype: -- 2.30.2