From 53c0494e27a071021e0ef68bf52c28014c2bd4bf Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Thu, 17 Jan 2013 17:49:08 +0100 Subject: [PATCH] Bug 9403: Material type icons not showing for XSLT default view in intranet Implements the material type icons shown in the MARC21 XSLT result list of the OPAC for the intrant result list. Also adds the system preference DisplayIconsXSLT as an intranet analogue for the OPAC system preference DisplayOPACiconsXSLT and corrects the descriptions of both preferences in the syspref editor. To test: 0) Run database update to add new system preference 1) Activate default XSLTResultsDisplay 2) Check the new system preference DisplayIconsXSLT shows up correctly and is activated by default. Compare descriptions between DisplayIconsXSLT and DisplayOPACiconsXSLT. 3) Check the intranet result list for icons showing up after 'Type:' and before the corresponding description. Detail pages should be showing the 'Type:' as before. 4) Turn off DisplayIconsXSLT. 5) Check the line containing 'Type:', format and audience information is now hidden from the result list. 6) Check that the 'Type:'line is also hidden from the detail page. --- C4/XSLT.pm | 2 +- installer/data/mysql/sysprefs.sql | 3 +- installer/data/mysql/updatedatabase.pl | 10 ++++++ .../prog/en/modules/admin/preferences/opac.pref | 7 ++-- .../en/modules/admin/preferences/staff_client.pref | 6 ++++ .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 6 ++- .../prog/en/xslt/MARC21slim2intranetResults.xsl | 30 +++++++++++-------- .../intranet-tmpl/prog/img/famfamfam/silk/book.png | Bin 0 -> 593 bytes .../prog/img/famfamfam/silk/book_link.png | Bin 0 -> 789 bytes .../prog/img/famfamfam/silk/book_open.png | Bin 0 -> 622 bytes .../prog/img/famfamfam/silk/computer_link.png | Bin 0 -> 792 bytes .../intranet-tmpl/prog/img/famfamfam/silk/film.png | Bin 0 -> 653 bytes .../intranet-tmpl/prog/img/famfamfam/silk/map.png | Bin 0 -> 804 bytes .../prog/img/famfamfam/silk/music.png | Bin 0 -> 385 bytes .../prog/img/famfamfam/silk/newspaper.png | Bin 0 -> 658 bytes .../prog/img/famfamfam/silk/report_disk.png | Bin 0 -> 760 bytes .../prog/img/famfamfam/silk/sound.png | Bin 0 -> 610 bytes 17 files changed, 43 insertions(+), 21 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/book.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/book_link.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/book_open.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/computer_link.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/film.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/map.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/music.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/newspaper.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/report_disk.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/sound.png diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 19ec162..6d81a89 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -188,7 +188,7 @@ sub XSLTParse4Display { UseAuthoritiesForTracings TraceSubjectSubdivisions Display856uAsImage OPACDisplay856uAsImage UseControlNumber IntranetBiblioDefaultView BiblioDefaultView - singleBranchMode + singleBranchMode DisplayIconsXSLT AlternateHoldingsField AlternateHoldingsSeparator / ) { my $sp = C4::Context->preference( $syspref ); diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index d5d15d7..e9fe8c8 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -276,7 +276,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACMySummaryHTML','','Enter the HTML that will appear in a column on the \'my summary\' and \'my reading history\' tabs when a user is logged in to the OPAC. Enter {BIBLIONUMBER}, {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the HTML. Leave blank to disable.','70|10','Textarea'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACPatronDetails','1','If OFF the patron details tab in the OPAC is disabled.','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACFinesTab','1','If OFF the patron fines tab in the OPAC is disabled.','','YesNo'); -INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('DisplayOPACiconsXSLT', '1', '', 'If ON, displays the format, audience, type icons in XSLT MARC21 results and display pages.', 'YesNo'); +INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('DisplayOPACiconsXSLT', '1', '', 'If ON, displays the format, audience, and material type icons in XSLT MARC21 results and detail pages in the OPAC.', 'YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowAllMessageDeletion','0','Allow any Library to delete any message','','YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('ShowPatronImageInWebBasedSelfCheck', '0', 'If ON, displays patron image when a patron uses web-based self-checkout', '', 'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('EnableOpacSearchHistory', '1', 'Enable or disable opac search history', 'YesNo',''); @@ -406,3 +406,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('NotesBlacklist','','List of notes fields that should not appear in the title notes/description separator of details',NULL,'free'); INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SCOUserCSS', '', NULL, 'Add CSS to be included in the SCO module in an embedded