@@ -, +, @@ of MARC ones 1 - Apply patch 2 - Update database 3 - Do an opac search and view results 4 - Switch pref to 'Koha' and refresh 5 - Note itemtypes appear 6 - Click in to a record details 7 - Note you see itemtype and icon 8 - Switch the pref 9 - Note you don't see record level itemtype and icon --- catalogue/detail.pl | 1 - installer/data/mysql/sysprefs.sql | 1 + .../en/modules/admin/preferences/searching.pref | 6 ++++++ .../prog/en/modules/catalogue/detail.tt | 14 +++++++++++++- .../prog/en/modules/catalogue/results.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 22 ++++++++-------------- .../opac-tmpl/bootstrap/en/modules/opac-results.tt | 3 +-- .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 1 + .../bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl | 1 - 9 files changed, 31 insertions(+), 20 deletions(-) --- a/catalogue/detail.pl +++ a/catalogue/detail.pl @@ -524,7 +524,6 @@ if ( (C4::Context->preference("HTML5MediaEnabled") eq 'both') or (C4::Context->p } # Displaying tags - my $tag_quantity; if (C4::Context->preference('TagsEnabled') and $tag_quantity = C4::Context->preference('TagsShowOnDetail')) { $template->param( --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -96,6 +96,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('BatchCheckoutsValidCategories','',NULL,'Patron categories allowed to checkout in a batch','Free'), ('BiblioAddsAuthorities','0',NULL,'If ON, adding a new biblio will check for an existing authority record and create one on the fly if one doesn\'t exist','YesNo'), ('BiblioDefaultView','normal','normal|marc|isbd','Choose the default detail view in the catalog; choose between normal, marc or isbd','Choice'), +('BiblioItemtypeInfo','0','0','Control which itemtype info displays for biblio level itemtypes','YesNo'), ('BibtexExportAdditionalFields', '', NULL , 'Define additional BibTex tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.', 'textarea'), ('BlockExpiredPatronOpacActions','1',NULL,'Set whether an expired patron can perform opac actions such as placing holds or renew books, can be overridden on a per patron-type basis','YesNo'), ('BlockReturnOfLostItems','0','0','If enabled, items that are marked as lost cannot be returned.','YesNo'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref @@ -270,3 +270,9 @@ Searching: - LIBRIS base URL - pref: LibrisURL - "Please only change this if you are sure it needs changing." + - + - pref: BiblioItemtypeInfo + choices: + yes: "Display" + no: "Don't display" + - " Koha record level itemtype info on detail and result pages in the opac. This info also displays if item-level_itypes is set to bibliographic record." --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -114,6 +114,18 @@ [% END %] MARC preview: Show + [% IF !item_level_itypes || Koha.Preference("BiblioItemtypeInfo") %] + Itemtype: + [% IF ( !noItemTypeImages && imageurl ) %] + + [% END %] + [% IF ( description ) %] + [% description | html %] + [% ELSE %] + [% itemtype | html %] + [% END %] + + [% END %] [% IF ( holdcount ) %] @@ -823,7 +835,7 @@ Note that permanent location is a code, and location may be an authval.

Editions

[% FOREACH XISBN IN XISBNS %][% IF ( AmazonCoverImages ) %][% END %] -[% UNLESS ( item_level_itypes ) %][% END %] +[% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) %][% END %] - - [% IF ( !item_level_itypes && !Koha.Preference('OpacNoItemTypeImages') ) %] + [% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) && !Koha.Preference('OpacNoItemTypeImages') %] [% # Cell 3: Show item type image %]
[% IF ( noItemTypeImages ) %][% XISBN.description | html %][% ELSE %][% XISBN.description | html %][% END %][% IF ( noItemTypeImages ) %][% XISBN.description | html %][% ELSE %][% XISBN.description | html %][% END %][% XISBN.title | html %] by [% XISBN.author | html %] ©[% XISBN.copyrightdate | html %] [% IF ( XISBN.publishercode ) %] [% XISBN.publishercode | html %] [% IF ( XISBN.place ) %]([% XISBN.place | html %])[% END %] [% IF ( XISBN.publicationyear ) %], [% XISBN.publicationyear | html %][% END %] [% IF ( XISBN.editionstatement ) %][% XISBN.editionstatement | html %][% END %] [% IF ( XISBN.editionresponsibility ) %][% XISBN.editionresponsibility | html %][% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -463,7 +463,7 @@ - [% UNLESS ( item_level_itypes ) %] + [% IF ( !item_level_itypes ) || Koha.Preference('BiblioItemtypeInfo') %]
[% IF !noItemTypeImages && SEARCH_RESULT.imageurl %] [%  SEARCH_RESULT.description | html %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -133,16 +133,10 @@

[% INCLUDE 'biblio-title.inc' %]

[% IF ( author ) %]by [% author | html %][% END %] - [% UNLESS ( item_level_itypes ) %] - [ - [% IF ( description ) %] - [% description | html %] - [% ELSE %] - [% itemtype | html %] - [% END %] - ] [% END %] - [% IF ( unititle ) %], [% unititle | html %][% END %] - + + [% IF ( unititle ) %], [% unititle | html %][% END %] + + [% IF ( MARCAUTHORS ) %]
@@ -252,11 +246,11 @@ Year: [% copyrightdate | html %] [% END %] - [% UNLESS ( item_level_itypes ) %] - [% IF ( imgeurl && !Koha.Preference('OpacNoItemTypeImages') ) %] - - [% END %] + [% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) %] Item type: + [% IF ( imageurl && !Koha.Preference('OpacNoItemTypeImages') ) %] + + [% END %] [% IF ( description ) %] [% description | html %] [% ELSE %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -266,8 +266,7 @@ [% SEARCH_RESULT.result_number | html %]. [% END %]
[% IF ( SEARCH_RESULT.imageurl ) %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl +++ a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl @@ -662,6 +662,7 @@ + Material type: --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl +++ a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl @@ -19,7 +19,6 @@ - --