From 9725348bd917f21b814a7626429c55a5abb35710 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Thu, 17 Jan 2013 17:49:08 +0100 Subject: [PATCH] [SIGNED-OFF] Bug 9403: Material type icons not showing for XSLT default view in intranet Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Owen Leonard --- C4/XSLT.pm | 2 +- installer/data/mysql/sysprefs.sql | 3 +- installer/data/mysql/updatedatabase.pl | 6 ++++ .../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, 39 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 9032bfa..6509a9c 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',''); @@ -411,3 +411,4 @@ INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReviews','0','Display book review snippets from IDreamBooks.com','','YesNo'); INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReadometer','0','Display Readometer from IDreamBooks.com','','YesNo'); INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksResults','0','Display IDreamBooks.com rating in search results','','YesNo'); +INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('DisplayIconsXSLT', '1', '', 'If ON, displays the format, audience, and material type icons in XSLT MARC21 results and detail pages.', 'YesNo'); \ No newline at end of file diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index ed922b8..7541804 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6399,6 +6399,12 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.11.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('DisplayIconsXSLT', '1', '', 'If ON, displays the format, audience, and material type icons in XSLT MARC21 results and detail pages.', 'YesNo');"); + print "Upgrade to $DBversion done (Bug 9403: Add DisplayIconsXSLT)\n"; + SetVersion ($DBversion); +} =head1 FUNCTIONS diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index 300c6e1..89dfcba 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -66,12 +66,11 @@ OPAC: class: file - '
Options:{langcode} will be replaced with current interface language' - - - On pages displayed with XSLT stylesheets on the OPAC, - pref: DisplayOPACiconsXSLT choices: - yes: show - no: "don't show" - - icons for itemtype and authorized values. + yes: Show + no: "Don't show" + - the format, audience, and material type icons in XSLT MARC21 results and detail pages in the OPAC. - - pref: COinSinOPACResults choices: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref index d9fc21a..9754a47 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref @@ -66,6 +66,12 @@ Staff Client: class: file - '
Options:{langcode} will be replaced with current interface language' - + - pref: DisplayIconsXSLT + choices: + yes: Show + no: "Don't show" + - the format, audience, and material type icons in XSLT MARC21 results and detail pages in the staff client. + - - Use the Yahoo UI libraries - pref: yuipath choices: diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl index 24349e1..d2f05d2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -25,6 +25,7 @@ + { @@ -142,13 +143,14 @@ - + Type: /intranet-tmpl/prog/img/famfamfam/.png - + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl index ca517cd..eb24665 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl @@ -26,6 +26,7 @@ + @@ -447,29 +448,31 @@ + Type: - Set + book Set - Book - Continuing Resource - Article + book Book + serial Continuing Resource + article Article - Book - Kit - Mixed Materials - Computer File - Map - Visual Material - Score - Sound - Music + book Book + kit Kit + mixed materialsMixed Materials + computer file Computer File + map Map + visual material Visual Material + score Score + sound Sound + music Music + ; Format: @@ -768,6 +771,7 @@ + diff --git a/koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/book.png b/koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/book.png new file mode 100644 index 0000000000000000000000000000000000000000..b0f4dd7928cc5714e002fd2a6e8f2faac0073f00 GIT binary patch literal 593 zcmV-X0l6k>CGhc0FIuigU9U^L+D`6bSr zIEp(+L4eIgaZT(|{B!*DbrTYc1t0J9*MLJm+n zOEVloE20S^g6s|1rvjjuW1W$TV;&TbK2|slm=91)Q{X{Kg;c!Saglq7xo8`(>{A}G zw@`8gScq(adr(4@;>^%e<~7+uNMv&?8L0#%0yj~@DW&fPImKeyFHkRKuNERO3(SOB z?S)niZbFEN`0<|w+LjBKR#DU7F3d&rQGGY&Y)Fv0w002i=Jm_>x9jBX>wg3XCKK`E f>xbvJ_5i;DeEQXvyE?}U00000NkvXXu0mjfKqCEw literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/book_link.png b/koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/book_link.png new file mode 100644 index 0000000000000000000000000000000000000000..dd0820e86d0ae7484a9d1fea509ce168ad44699a GIT binary patch literal 789 zcmV+w1M2*VP)Ibg27S@bI=*bsb;IgkCPuV5Vkc|%HT6t6!`B9|*t zHpjbmR#Y%cB>BZ6G~K|TYq0zotNP0+pjRo1^k6y zQ(zK-ZCXSU!1IwY=-xjmu$Tf4f+)hU{HAV5V3E@>O&HWaHz0u%1Ry{!z_DJC&*o_V zmjEy=8pfOy7Z^<;&>NY@@?}se=09I0f1Ga6p zG?rs_c2-+00f7M84YeaZ-G+53gSTz{SPWVdFiPaPX+$~@n)fi9>qgJ zh4fN-QcEhq^wI<|vImjml9)pF*W2zl+qWbTPaSyKyqWKt`DS)j3xa?yVgf%ewhl|m zA$_0x^Rx4E@d&=>uRoSN*Cm&aL#`7&zr0;L(pKMn1G#$ZszFkMC^?B8f`0w&-UD$u zd-(?iK6#!;xZ`>J^A9DGiTfguewDOKwDEKoL}`ZE_M}0=xvsgf$usmJeV$oo28d0#yu!pdgpag$giC zhlKP!CMX3wsPMGgZ5n>Xg+hV--ENofAcH61#0B7Hvl-7Il}g2A6;lfG`FxbX8A>p$ z0P;GW4il9Mr9jO9)xB^Rgy%*CSTdQ6D;kDDnM{U{5Q21FA4#ZM71$_Dba8z<-Y_Na zS@|v#c0PZNDux9AoXD-ZoWP~q)7QrC`G5M>TH{B>uwY0wtGA0+Y*fG8|ORs-ktON{mwbxCmDu;|E*Xo_NZ2? zjaRExg*?a$J2*IC|5W-HKq8T_P{N$mYW1q>F;plCx(*RdIX0UW3k$EI{4F^ik6-2F zj*gC=*49?6f87SN>$(Bm&P{631d~YsBVG<;X_QobW zTT#>S;O<4i_&&A_R@;63MneHhWmXQfwY5W*Wk_Ul)A*SI486hFcWyvD8_gcbtbpDL zK!(X=I%0Cu^Wx?)WA^wu<_iH)mQYY_jz^Lum=xuZU3e~md}DGA#`#YVQ7+bm3IV_y zH-t-I#uGLZwA3op$~L+j?fCL74b^Bzsl12%{e6trCy^;-k%&hdO=JMMS*KRW>wJAB9qB909slU+@JIy5{V$0G~v?V zAZGjld|X{ccXt>1`};+b-|rW`x7Ur4kzs6XY(OCyGvRRPG6O9xE;`+Aw}a<-`jiWi zcW>eI`RLf%P%4#>&1Nw>JBv}@E!3)euvjcOau>W_?=y$PF??rgN_p})NEayrg&NDp znHQJDW2YEQPfsHl4Au_;0)c>C)3glB@_0PxaXRT(0qJxaYinzwc9+YA&dyE-$!%_K z%HeSM`{8Ax5^^+&7~Q@Lp->2RyB%h;Sxj(ucXxvPcClD|zOu5?LS?I|R4Pk~ZvFx_ WAFY|n`T1f10000WO3(`_cf+b25@DJ#zdQm}8GzWtq2-QnZ8W6mB^kfeK5f%S{ zUW%tGMCwrwic~ZrQcG=4f?5bkV+3dRk8hw6bk~y$KX#b!y*J4EJ~>;dRASqrSu;ZpM>?P}K~6AT zWv6Dmq?v&9LdXC(m%WCO6ma_di$R(v$@ad_>@R41N3N5lSJq9@6CGhX84-$%Xrd_6 z;){?{E|Ytt5$S-&Au>t4wDlIxdkfe-a22LMj``McG};r8@{GsRPm*+8fFey6C)@ifDBXVyTw(N@Xd41b45OFg6x_QA zpwLiigyy~cVoPxW^r~C7ZQpr%>1$*HKmv~AY-qJw4;gUecS--wnqslISSS=^KA&Ic n@BK|Onfz#3R%n{$a)0j^sqv5F(1NTL00000NkvXXu0mjf3S}fX literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/map.png b/koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/map.png new file mode 100644 index 0000000000000000000000000000000000000000..f90ef25ec7f1cb0fdae38d9fe2d9edeee9928ef1 GIT binary patch literal 804 zcmV+<1Ka$GP)mbpQb1@7I~O+ue5CWtZi#AZox@gcwb{Xkx^Rf;Ty8yn6DWhJV4kC*wg94<7Vt zlteKm5+jKLV^qM1yt2HO4YZw^&a^Wfzb_m+@y40e_0^+M6ajz$03Zl}fU=sqfA9W} z@#^~O(a%3QB{YI^J_A4y)M^1_vjjn1H`Mc5t@6>y50A!C6seTL>`UqQ7p$DgY@K|> zQm^as;HM{#Qwj<3}(>R-AM4&+cd0t49%y2X`UaCBJg8YmB)K#uA{Z>9n zOp8>WCg#&r06`o8oz6gaIn`fY2FR)ssCr@3rc|5f%`bIJO$zbt__PK3gH51Sff`H}0ZWac9&q~*( zO@qNscV0VSU%X#sYO9)Qx4M=(eR(m}UFhondELHSnO2hr&mMO3 zv6gmw!P2y#u0c!?LPO88NyxOTj>XWm>*77F&55fo9Z?)iynObdfA;SdwVRl$W~G3* zEGt!2+1T-%ja32&!XdoMS_mM#IQK#{6D_nvjYu`GlvO3XdE)qYJJ;7klCE>?a@fNhGaV ftv%qM$TQzJ6;XjO8erVL00000NkvXXu0mjfw}q7O literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/newspaper.png b/koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/newspaper.png new file mode 100644 index 0000000000000000000000000000000000000000..6a2ecce1b85eaa9084b427ee2c5226e2296eaeb8 GIT binary patch literal 658 zcmV;D0&V??P)oVs((xWgD$)EF}_d~6|E9cYZTvaqk~9`i&BW97*P>v z@lDk@Xl;b%^t%HQ(pa0tz@5kM+;h(T<_N&ip(~wEOB0DiJ{F5{;c!^;_xs1dg=jRo z3WY*KAQ0euKA+@K0;yC=8jr^rydICoSglqd_{QV$a4whY=|O=zI1-7hhr=Og4T=Ck z5O8*O_S@lbByBd^lf44TWKv2W^LH=<&(F_6aj;k{L?;9b7K?>5nM{(sFqO3)3}ZrBV@HFj%2boa`NCnylwer*m5<6vU%rtuL2L)a!Nd zJP*qIOD>n6?i;$@!fv-8Tdme9+l?I|%bm;R7`!3)<-bP$-VIIGvB6*%vHYw+%Da)t sWG@c=a1S2nbh=||dPK1BKbT#A0Qk`HN6lbD;Q#;t07*qoM6N<$f^gU==>Px# literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/report_disk.png b/koha-tmpl/intranet-tmpl/prog/img/famfamfam/silk/report_disk.png new file mode 100644 index 0000000000000000000000000000000000000000..1c856cd61593e944e09238a6c2cee7e10cb42c56 GIT binary patch literal 760 zcmV^u|ySI)$xo}?> za_FHfThhJj`M)!)y1Ken7-L>YP?_pt$X`6n=F1=cYufX?^1}RqJ{J3UFP&@z zECfL?sZm6*)=sM9@pvfG($ccT7;|1yt+;54&pQ5j$#EP+q*g1XYJxR_XwSX$w3G!2 z8vst-96|&vgaZNsoZQ_szDA8;W-G4J{Ce716A*!AbK_$I;eFp<0>BspfZNc}Fj7}n zH&}UjW2aN>p_1)q;jW_`Z~sC}RT&uigd@Cv23*T7n=wUqsU zAEO$8$8UyegB1-$AM!t|C?yj;*oTW|EL?#jJ$3auL-+@vJEf(KsTqgop6ei4H zEY=EI2UM$i0>P`>>10YEOo!2OKty@8ZJUOcD&T+xtAv;r<;?W~3dPa{g6#)Fg1eo# zu8R?iO9bIJ?eC7zl$eLYAzvQk(Asl2#3=h?9%!wXum1F)FEJyIwUEtb@jRFLvtd?p zluawwQ6HTH4*aalAvIN#h=QjS>hGUEu&8mvykvA^t`rPj{#@u;b@0}uB@3EX)K94= q=1oUSfD%DjgQzmS1APn^1O5Pr0d*Bb`9~`N0000FDRfPcVFW5d%9V=z{?A#;oriL5xO+n6O2X~nf!lQuE^VWXpgu83qI(qCF{ zS}dqc=wWy-JjhR6YYDxINHb)T^nMSh)vA20R`F7)lzCSCZF94My}d73T>N+m zpyXWPL`#FF;s+j3t(LL2R!6+EP98p9G9EaJe<5S)o@#CPu0JyV*YBbiNC<>y{C`3_2 zFc^fUC0P=`0GC2D0rmxry!i<{eh#|t2UjSV*w|QyY37m5W)KQZKoA6m%^;bK|K7sb zq~^Y!1U(%y>Cs5W^^bz?JUQeR7IK)M&$43OYdMwDJVcVBtSjl_Ar8Hmr2)a$eK-tv zNC4d)(7D`Piq~gVUR7m2k$BH5O6=$i%I6Kpa_sVNy!&j)9UKPT@*VWNNNm+UIUciF wPJ00!a`S;oH}3WS@hUTDnx*^y9@F3E2OYGed{u8eJ^%m!07*qoM6N<$f+a~A3jhEB literal 0 HcmV?d00001 -- 1.7.9.5