Often the icon that is generated in XSLT using the MARC control fields is inaccurate or inadequate. This systempreference would allow libraries to use the itemtype icon they have chosen for the biblio level itemtype (942 in MARC21) This is sponsored by 6 New Zealand Libraries
How to test: * Switch DisplayOPACiconsXSLT to show * Switch the XSLT templates for the OPAC to default * Test you see the icons generated from the MARC controlfields * Switch OpacResultsItemtypeImage to Information from the Koha biblio level itemtype * You should now see the biblio level itemtype image showing instead
Created attachment 12029 [details] [review] Bug 8732 : Allowing biblio level itemtypes to display instead of MARC ones If you switch OpacResultsItemtypeImage to Koha, you will see the Koha itemtypes, if it is Control you will get the ones generated from the MARC control fields.
Created attachment 12047 [details] [review] Bug 8732 : Allowing biblio level itemtypes to display instead of MARC ones If you switch OpacResultsItemtypeImage to Koha, you will see the Koha itemtypes, if it is Control you will get the ones generated from the MARC control fields. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Followed the test plan. Everything works as advertised.
Reworking, changing the name of the syspref and extending to do the intranet as well as the OPAC
Created attachment 12614 [details] [review] Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones If you switch BiblioItemtypeImage to Koha, you will see the Koha itemtypes, if it is Control you will get the ones generated from the MARC control fields. Squashed commit of the following: commit a36d5fdbfc484639ae7939f14e0363fda79b9323 Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Mon Oct 1 10:56:47 2012 +1300 WR96747, Bug 8732 Finishing staff side commit feff903c77ffc0fcec9459ecffab6c2ee5b1349d Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Mon Oct 1 09:47:07 2012 +1300 Bug 8732 : Now working for staff side too commit 641be286401cf1be54fddb3cc58a53566d80dcca Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Mon Oct 1 09:10:27 2012 +1300 Bug 8732 - generalising syspref Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> commit c4ce95c12a773d84e6f8d0b05664649e170799d8 Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Wed Sep 12 09:19:31 2012 +1200 Bug 8732 : Showing the images on the OPAC detail page commit 105acad0f76628536840577fa96fb0839f9f3e2f Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Thu Sep 6 14:19:37 2012 +1200 Bug 8732 : Allowing biblio level itemtypes to display instead of MARC ones If you switch OpacResultsItemtypeImage to Koha, you will see the Koha itemtypes, if it is Control you will get the ones generated from the MARC control fields.
Created attachment 12722 [details] Screenshot OPAC detail Either there is a problem on my side or something went wrong with the patch(es). I had to manually merge the usual sql files but that should not break anything. Turning on the new feature, I get OPAC detail: "old" info and icon still there, that does not look right. "Itemtype: Books" is added under most of the biblio description. Could have <span class="label"> for 'Itemtype'. No icon for 942 itemtype in the biblio part. (see attached screenshot) OPAC results: Logo for 942 itemtype is shown, placement is different than for the old icon. No itemtype text visible. Staff detail: No icon is shown in the biblio part. 942 itemtype is added at the end of the biblio part, also <no span class="label"> here. Staff results: "old" information is shown, no 942 itemtype. no logo of either one of them.
Created attachment 12870 [details] [review] Bug 8732 Style fixes
(In reply to comment #7) > Created attachment 12722 [details] > Screenshot OPAC detail > > Either there is a problem on my side or something went wrong with the > patch(es). I had to manually merge the usual sql files but that should not > break anything. > > Turning on the new feature, I get > > OPAC detail: "old" info and icon still there, that does not look right. > "Itemtype: Books" is added under most of the biblio description. Could have > <span class="label"> for 'Itemtype'. No icon for 942 itemtype in the biblio > part. (see attached screenshot) Yep, icon wont show on the detail page, just the name, But the old info and icon should not be showing. > > OPAC results: Logo for 942 itemtype is shown, placement is different than > for the old icon. No itemtype text visible. > Yep, > Staff detail: No icon is shown in the biblio part. 942 itemtype is added at > the end of the biblio part, also <no span class="label"> here. > > Staff results: "old" information is shown, no 942 itemtype. no logo of > either one of them. Hmm, this seems to work for me. The new icon wont show, but the old ones should not be showing. You are using the default XSLT ? Do you have the icons turned on?
Sorry, seems like I was not in the CC list of this bug. I tried again and it looks better: Looks OK: OPAC results: "new" logo OPAC details: "new" text Staff details: "new" text Looks not OK: Staff results: "old" text in my example: Type: Visual Material; Type of visual material: instead of Itemtype: Maps I could not find any occurrences of old and new together. If that is what is supposed to look like at this point I would be willing to signoff, just wondering about the staff results page.
I wanted to be a on the CC list for this bug, but had to set a patch complexity to do so - update if I was wrong in my assumptions. Nicole
Something went wrong ! Applying: Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging C4/XSLT.pm CONFLICT (content): Merge conflict in C4/XSLT.pm Auto-merging catalogue/detail.pl CONFLICT (content): Merge conflict in catalogue/detail.pl Auto-merging installer/data/mysql/sysprefs.sql CONFLICT (content): Merge conflict in installer/data/mysql/sysprefs.sql Auto-merging installer/data/mysql/updatedatabase.pl CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl Auto-merging koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt Auto-merging koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt Auto-merging koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl Auto-merging koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl Auto-merging opac/opac-detail.pl Auto-merging opac/opac-search.pl CONFLICT (content): Merge conflict in opac/opac-search.pl Failed to merge in the changes. Patch failed at 0001 Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". Bug 8732 - Add a systempreference to allow users to choose to display an icon based on the marc control fields, or based on the koha biblio level itemtype Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones Apply? [yn] Patch left in /tmp/Bug-8732-Allowing-biblio-level-itemtypes-to-displa-sGzn56.patch
Created attachment 16453 [details] [review] Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones If you switch BiblioItemtypeImage to Koha, you will see the Koha itemtypes, if it is Control you will get the ones generated from the MARC control fields. Squashed commit of the following: commit a36d5fdbfc484639ae7939f14e0363fda79b9323 Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Mon Oct 1 10:56:47 2012 +1300 WR96747, Bug 8732 Finishing staff side commit feff903c77ffc0fcec9459ecffab6c2ee5b1349d Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Mon Oct 1 09:47:07 2012 +1300 Bug 8732 : Now working for staff side too commit 641be286401cf1be54fddb3cc58a53566d80dcca Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Mon Oct 1 09:10:27 2012 +1300 Bug 8732 - generalising syspref Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> commit c4ce95c12a773d84e6f8d0b05664649e170799d8 Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Wed Sep 12 09:19:31 2012 +1200 Bug 8732 : Showing the images on the OPAC detail page commit 105acad0f76628536840577fa96fb0839f9f3e2f Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Thu Sep 6 14:19:37 2012 +1200 Bug 8732 : Allowing biblio level itemtypes to display instead of MARC ones If you switch OpacResultsItemtypeImage to Koha, you will see the Koha itemtypes, if it is Control you will get the ones generated from the MARC control fields.
Created attachment 16454 [details] [review] Bug 8732 Style fixes
ok the patch applies, ready to be tested
the sandbox patch does not apply Something went wrong ! Applying: Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging catalogue/detail.pl Auto-merging installer/data/mysql/sysprefs.sql CONFLICT (content): Merge conflict in installer/data/mysql/sysprefs.sql Auto-merging installer/data/mysql/updatedatabase.pl CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl Auto-merging opac/opac-detail.pl Failed to merge in the changes. Patch failed at 0001 Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". Bug 8732 - Add a systempreference to allow users to choose to display an icon based on the marc control fields, or based on the koha biblio level itemtype Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones Apply? [yn] Patch left in /tmp/Bug-8732-Allowing-biblio-level-itemtypes-to-displa-2Lh8EY.patch
Created attachment 21820 [details] [review] Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones If you switch BiblioItemtypeImage to Koha, you will see the Koha itemtypes, if it is Control you will get the ones generated from the MARC control fields. Squashed commit of the following: commit a36d5fdbfc484639ae7939f14e0363fda79b9323 Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Mon Oct 1 10:56:47 2012 +1300 WR96747, Bug 8732 Finishing staff side commit feff903c77ffc0fcec9459ecffab6c2ee5b1349d Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Mon Oct 1 09:47:07 2012 +1300 Bug 8732 : Now working for staff side too commit 641be286401cf1be54fddb3cc58a53566d80dcca Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Mon Oct 1 09:10:27 2012 +1300 Bug 8732 - generalising syspref Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> commit c4ce95c12a773d84e6f8d0b05664649e170799d8 Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Wed Sep 12 09:19:31 2012 +1200 Bug 8732 : Showing the images on the OPAC detail page commit 105acad0f76628536840577fa96fb0839f9f3e2f Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Thu Sep 6 14:19:37 2012 +1200 Bug 8732 : Allowing biblio level itemtypes to display instead of MARC ones If you switch OpacResultsItemtypeImage to Koha, you will see the Koha itemtypes, if it is Control you will get the ones generated from the MARC control fields.
Created attachment 21821 [details] [review] Bug 8732 Style fixes
Applying: Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones Using index info to reconstruct a base tree... M installer/data/mysql/sysprefs.sql M installer/data/mysql/updatedatabase.pl M opac/opac-detail.pl Falling back to patching base and 3-way merge... Auto-merging opac/opac-detail.pl Auto-merging installer/data/mysql/updatedatabase.pl CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl Auto-merging installer/data/mysql/sysprefs.sql Patch failed at 0001 Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones The copy of the patch that failed is found in: /home/christopher/git/koha/.git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
Created attachment 53470 [details] [review] Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones If you switch BiblioItemtypeImage to Koha, you will see the Koha itemtypes, if it is Control you will get the ones generated from the MARC control fields. Squashed commit of the following: commit a36d5fdbfc484639ae7939f14e0363fda79b9323 Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Mon Oct 1 10:56:47 2012 +1300 WR96747, Bug 8732 Finishing staff side commit feff903c77ffc0fcec9459ecffab6c2ee5b1349d Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Mon Oct 1 09:47:07 2012 +1300 Bug 8732 : Now working for staff side too commit 641be286401cf1be54fddb3cc58a53566d80dcca Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Mon Oct 1 09:10:27 2012 +1300 Bug 8732 - generalising syspref Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> commit c4ce95c12a773d84e6f8d0b05664649e170799d8 Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Wed Sep 12 09:19:31 2012 +1200 Bug 8732 : Showing the images on the OPAC detail page commit 105acad0f76628536840577fa96fb0839f9f3e2f Author: Chris Cormack <chrisc@catalyst.net.nz> Date: Thu Sep 6 14:19:37 2012 +1200 Bug 8732 : Allowing biblio level itemtypes to display instead of MARC ones If you switch OpacResultsItemtypeImage to Koha, you will see the Koha itemtypes, if it is Control you will get the ones generated from the MARC control fields.
Created attachment 53471 [details] [review] Bug 8732 Style fixes
Applying: Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones /home/vagrant/kohaclone/.git/rebase-apply/patch:25: trailing whitespace. TrackClicks opacthemes IdRef OpacSuppression /home/vagrant/kohaclone/.git/rebase-apply/patch:115: trailing whitespace. /home/vagrant/kohaclone/.git/rebase-apply/patch:191: trailing whitespace. fatal: sha1 information is lacking or useless (C4/XSLT.pm). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones The copy of the patch that failed is found in: /home/vagrant/kohaclone/.git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-8732-Allowing-biblio-level-itemtypes-to-displa-atzCe7.patch
I would like to try to revive this. The merge issues don't seem very complicated. However, I'm not sure what I should be seeing if the patch is working. Could you attach some screenshots?
*** Bug 22708 has been marked as a duplicate of this bug. ***
Created attachment 91885 [details] [review] Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones This patchset adds a new syspref: BiblioItemtypeImages If you set BiblioItemtypeImage to Koha, you will see the Koha itemtypes, if it is Control you will get the ones generated from the MARC control fields. The control field images are formed in XSLT and use label 'Material type' When switching to 'Koha' the images are added in the tmeplate and labeled 'Item type' if labelled TODO: Image size cleanup - adjust UNIMARC xslt To test: 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 and material types dissappear 6 - Click in to a record details 7 - Note you see itemtype and icon 8 - Switch the pref 9 - Note you now see material type and icon 10 - Repeat in staff interface
This patch sounds wonderful and would specifically be helpful as we try to make large print titles more distinguishable in our OPAC for our seniors and other patrons who enjoy the large print collection. Thank you to everyone who is contributing to this patch!
Created attachment 92383 [details] [review] Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones This patchset adds a new syspref: BiblioItemtypeImages If you set BiblioItemtypeImage to Koha, you will see the Koha itemtypes, if it is Control you will get the ones generated from the MARC control fields. The control field images are formed in XSLT and use label 'Material type' When switching to 'Koha' the images are added in the tmeplate and labeled 'Item type' if labelled TODO: Image size cleanup - adjust UNIMARC xslt To test: 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 and material types dissappear 6 - Click in to a record details 7 - Note you see itemtype and icon 8 - Switch the pref 9 - Note you now see material type and icon 10 - Repeat in staff interface Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed off on behalf of Karen Raborn, kraborn@nrhtx.com
1) QA tools fail: FAIL koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt FAIL filters missing_filter at line 111 ( [% description %]) missing_filter at line 113 ( [% itemtype %]) 2) It looks like this is only implemented for MARC21 (XSLT) - can we please add a note to the system preference description to document that? 3) While you are editing that file... could we shorten the options in the pull down a bit by putting the shared part into the text? Then the pull down would only be: 'Koha biblio level itemtype' and 'MARC control fields'. 4) When there is no itemtype image set, there is nothing displayed. Might be intended behaviour - so just noting. (no blocker)
Created attachment 103488 [details] [review] Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones This patchset adds a new syspref: BiblioItemtypeImages If you set BiblioItemtypeImage to Koha, you will see the Koha itemtypes, if it is Control you will get the ones generated from the MARC control fields. The control field images are formed in XSLT and use label 'Material type' When switching to 'Koha' the images are added in the tmeplate and labeled 'Item type' if labelled TODO: Image size cleanup - adjust UNIMARC xslt To test: 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 and material types dissappear 6 - Click in to a record details 7 - Note you see itemtype and icon 8 - Switch the pref 9 - Note you now see material type and icon 10 - Repeat in staff interface
Created attachment 103548 [details] [review] Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones This patchset adds a new syspref: BiblioItemtypeImages If you set BiblioItemtypeImage to Koha, you will see the Koha itemtypes, if it is Control you will get the ones generated from the MARC control fields. The control field images are formed in XSLT and use label 'Material type' When switching to 'Koha' the images are added in the tmeplate and labeled 'Item type' if labelled TODO: Image size cleanup - adjust UNIMARC xslt To test: 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 and material types dissappear 6 - Click in to a record details 7 - Note you see itemtype and icon 8 - Switch the pref 9 - Note you now see material type and icon 10 - Repeat in staff interface Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment on attachment 103548 [details] [review] Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones Review of attachment 103548 [details] [review]: ----------------------------------------------------------------- This patch shows it's age a little, but let's work it out! ::: catalogue/detail.pl @@ +588,4 @@ > > $template->param (basketsorders => \@baskets_orders); > $template->param (basketsdeletedorders => \@baskets_deletedorders); > +$template->{VARS}->{'BiblioItemtypeImage'} = C4::Context->preference('BiblioItemtypeImage'); 1) This can be removed in favor us using the TT plugin in the template instead. ::: installer/data/mysql/atomicupdate/bug_8732_add_BiblioItemtypeImage_system_preference.perl @@ +1,3 @@ > +$DBversion = 'XXX'; # will be replaced by the RM > +if( CheckVersion( $DBversion ) ) { > + $dbh->do( "INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('BiblioItemtypeImage', 'Control','Control what biblio level itemtype image displays','Control|Koha','Choice')" ); 2) Please switch to INSERT IGNORE INTO... ::: koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref @@ +275,5 @@ > + - pref: BiblioItemtypeImage > + choices: > + Control: "MARC control fields" > + Koha: "Koha biblio level itemtype" > + - "This preference only affects MARC21 XSLT views. 3) (pref description in yml file): Currently reads: Display itemtype information from the [MARC control fields|Koha biblio level itemtype] This preference only affects MARC21 XSLT views. I wonder if we could improve the description a little. a) In current version the icon this changes is labelled 'material type', so it might not be so easy to locate where and what happens here. b) We've been trying to remove biblio in favor of bibliographic c) missing punctuation :) Suggestion: Display [material type icon derived from MARC control fields|Koha record level item type icon] on detail and results pages in the OPAC. Only works for MARC21. (We are in the process of removing non-XSLT this release) But actually, I'd much prefer a more radical approach in merging this new pref with the existing DisplayIconsXSLT and DisplayOpacIconsXSLT prefs: [Show|Don't show] the format, audience, and material type icons and descriptions in XSLT MARC21 results and detail pages in the OPAC. Show [ no format, audience and material type information| the record level item type icon| format, audience and material type information derived from MARC control fields ] in XSLT MARC21 results and detail pages in the OPAC. This way, we'd not need a new pref and we could avoid the conflict of different settings (turn off display and turn on itemtype icon display = still nothing shows) And we'd have this controlled separately for OPAC and staff interface. But then we also got OpacNoItemTypeImages... just wondering how to get these all to play together in a way that is most clear to end users about the effects! ::: koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ +171,5 @@ > <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/> > </xsl:call-template> > > + <xsl:if test="$BiblioItemtypeImage='Control'"> > + <xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''"> 4) Full quote: <xsl:if test="$BiblioItemtypeImage='Control'"> <xsl:if <test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''"> I think this highlights a conceptual issue as we already have a pref dealing with the display of this information (DisplayIconsXSLT and DisplayOpacIconsXSLT - trying to explain in 3) Also there appears to be no code for the actual icon display? @@ +181,2 @@ > > <xsl:call-template name="show-lang-041"/> 5) I believe there is a merge/rebase error here - the xsl:if should be before the 041 display. ::: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -134,5 @@ > - [% ELSE %] > - [% itemtype | html %] > - [% END %] > - ] [% END %] > - [% IF ( unititle ) %], [% unititle | html %][% END %] 6) Is this removed intentionally? @@ -246,4 @@ > <span class="results_summary year"><span class="label">Year: </span>[% copyrightdate | html %]</span> > [% END %] > > - [% UNLESS ( item_level_itypes ) %] Similar here (see above). ::: opac/opac-detail.pl @@ +1189,4 @@ > @serialcollections > 0 > ? 'serialcollection' : 'subscriptions'; > $template->param('defaulttab' => $defaulttab); > +$template->{VARS}->{'BiblioItemtypeImage'} = C4::Context->preference('BiblioItemtypeImage'); See above! ::: opac/opac-search.pl @@ +1024,4 @@ > $template->{VARS}->{DidYouMean} = > ( defined C4::Context->preference('OPACdidyoumean') > && C4::Context->preference('OPACdidyoumean') =~ m/enable/ ); > +$template->{VARS}->{'BiblioItemtypeImage'} = C4::Context->preference('BiblioItemtypeImage'); See above!
Created attachment 106831 [details] [review] Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones This patchset adds a new syspref: BiblioItemtypeInfo If you set BiblioItemtypeInfo to Koha, you will see the Koha record level itemtype info. This info is also shown if item-level_itypes is set to biblio Display of icons are controlled by noItemTypeImages/OpacnoItemTypeImages Material type display is controlled by DisplayIconsXSLT/DisplayOPACIconsXSLT To test: 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 10 - Repeat in staff interface
This is rebuilt after Katrin's comment It no longer touches XSLT, only the templates. XSLT display is controlled by existing prefs, the new pref only controls whether record level info is shown
Created attachment 106836 [details] [review] Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones This patchset adds a new syspref: BiblioItemtypeInfo If you set BiblioItemtypeInfo to Koha, you will see the Koha record level itemtype info. This info is also shown if item-level_itypes is set to biblio Display of icons are controlled by noItemTypeImages/OpacnoItemTypeImages Material type display is controlled by DisplayIconsXSLT/DisplayOPACIconsXSLT To test: 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 10 - Repeat in staff interface
Created attachment 106848 [details] [review] Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones This patchset adds a new syspref: BiblioItemtypeInfo If you set BiblioItemtypeInfo to Koha, you will see the Koha record level itemtype info. This info is also shown if item-level_itypes is set to biblio Display of icons are controlled by noItemTypeImages/OpacnoItemTypeImages Material type display is controlled by DisplayIconsXSLT/DisplayOPACIconsXSLT To test: 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 10 - Repeat in staff interface Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Created attachment 106948 [details] [review] Bug 8732: Update statement
Hi Nick, 2 issues: 1) There are still some XSLT changes in the patch set that look like remnants from the rewrite and unintentional - can you please check? 2) Patch doesn't apply...
Created attachment 107705 [details] [review] Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones This patchset adds a new syspref: BiblioItemtypeInfo If you set BiblioItemtypeInfo to Koha, you will see the Koha record level itemtype info. This info is also shown if item-level_itypes is set to biblio Display of icons are controlled by noItemTypeImages/OpacnoItemTypeImages Material type display is controlled by DisplayIconsXSLT/DisplayOPACIconsXSLT To test: 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 10 - Repeat in staff interface Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Created attachment 107706 [details] [review] Bug 8732: Update statement
Created attachment 107707 [details] [review] Bug 8732: undo XSLT changes
Created attachment 107709 [details] [review] Bug 8732: undo XSLT changes
Created attachment 108322 [details] [review] Bug 8732: (QA follow-up) Fix capitalization and terminology on BiblioItemtypeInfo description - opac = OPAC - add "system preference" to make context easier to understand
I really like the simplification here compared to the initial patches. I see that the opac-detail page is changed (code removed), but the icon display doesn't work there. Can you please check?
Created attachment 108441 [details] [review] Bug 8732: (follow-up) Make icon show on opac details and correct pref
Created attachment 108764 [details] [review] Bug 8732: (QA follow-up) Terminology - staff client to staff interface
Created attachment 108765 [details] [review] Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones This patchset adds a new syspref: BiblioItemtypeInfo If you set BiblioItemtypeInfo to Koha, you will see the Koha record level itemtype info. This info is also shown if item-level_itypes is set to biblio Display of icons are controlled by noItemTypeImages/OpacnoItemTypeImages Material type display is controlled by DisplayIconsXSLT/DisplayOPACIconsXSLT To test: 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 10 - Repeat in staff interface Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 108766 [details] [review] Bug 8732: Update statement Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 108767 [details] [review] Bug 8732: undo XSLT changes Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 108768 [details] [review] Bug 8732: (QA follow-up) Fix capitalization and terminology on BiblioItemtypeInfo description - opac = OPAC - add "system preference" to make context easier to understand Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 108769 [details] [review] Bug 8732: (follow-up) Make icon show on opac details and correct pref Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 108770 [details] [review] Bug 8732: (QA follow-up) Terminology - staff client to staff interface Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
I am passing this, but we do have a CSS issue in the OPAC result list with and without these patches. I've filed bug 26263.
Pushed to master for 20.11, thanks to everybody involved!
enhancement will not be backported to 20.05.x
Preference 'BiblioItemtypeInfo' should say it depends on preference 'OpacNoItemTypeImages' right ?
(In reply to Fridolin Somers from comment #56) > Preference 'BiblioItemtypeInfo' should say it depends on preference > 'OpacNoItemTypeImages' right ? I don't think so. This controls whether we display information about the record itemtype (description or code) the other controls if the images are displayed or not.
(In reply to Nick Clemens from comment #57) > (In reply to Fridolin Somers from comment #56) > > Preference 'BiblioItemtypeInfo' should say it depends on preference > > 'OpacNoItemTypeImages' right ? > > I don't think so. This controls whether we display information about the > record itemtype (description or code) the other controls if the images are > displayed or not. Ah ok thanks :D