Bug 8793 - Fix materialTypeCode/typeOf008 icons for NORMARC XSLT
Summary: Fix materialTypeCode/typeOf008 icons for NORMARC XSLT
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff Client (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low minor (vote)
Assignee: Magnus Enger
QA Contact:
URL:
Keywords:
Depends on: 8624
Blocks: 8662
  Show dependency treegraph
 
Reported: 2012-09-19 13:27 UTC by Magnus Enger
Modified: 2013-12-05 20:01 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 8793 - Fix materialTypeCode/typeOf008 icons for NORMARC XSLT (26.34 KB, patch)
2012-09-23 10:32 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 8793 - Fix materialTypeCode/typeOf008 icons for NORMARC XSLT (26.44 KB, patch)
2012-10-04 10:19 UTC, Mirko Tietgen
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2012-09-19 13:27:35 UTC
This was first pointed out on Bug 8624. 

NORMARCslim2intranetDetail.xsl:

<xsl:element name="img"><xsl:attribute name="src">/opac-tmpl/prog/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt"></xsl:attribute></xsl:element>

NORMARCslim2intranetResults.xsl:

<xsl:when test="$typeOf008='Mon'"><img src="/opac-tmpl/prog/famfamfam/silk/book.png" alt="Bok" title="Bok"/> Bok</xsl:when>
<xsl:when test="$typeOf008='Per'"><img src="/opac-tmpl/prog/famfamfam/silk/newspaper.png" alt="Periodika" title="Periodika"/> Periodika</xsl:when>
<xsl:when test="$typeOf008='Fil'"><img src="/opac-tmpl/prog/famfamfam/silk/computer_link.png" alt="Fil" title="Fil"/> Fil</xsl:when>
<xsl:when test="$typeOf008='Kar'"><img src="/opac-tmpl/prog/famfamfam/silk/map.png" alt="Kart" title="Kart"/> Kart</xsl:when>
<xsl:when test="$typeOf008='FV'"><img src="/opac-tmpl/prog/famfamfam/silk/film.png" alt="Film og video" title="Film og video"/> Film og video</xsl:when>
<xsl:when test="$typeOf008='Mus'"><img src="/opac-tmpl/prog/famfamfam/silk/sound.png" alt="Musikktrykk og lydopptak" title="Musikktrykk og lydopptak"/> Musikk</xsl:when>

MARC21 does not seem to use images like this, so I'll probably just remove them.
Comment 1 Magnus Enger 2012-09-22 13:07:29 UTC
Broadening the scope of this bug a bit, to cover more (closely related) problems.
Comment 2 Magnus Enger 2012-09-23 10:32:35 UTC Comment hidden (obsolete)
Comment 3 Mirko Tietgen 2012-10-04 10:19:38 UTC
Created attachment 12678 [details] [review]
Bug 8793 - Fix materialTypeCode/typeOf008 icons for NORMARC XSLT

This patch fixes some issues with icons related to materialtypes in NORMARC:

Remove references to opac-tmpl in the *intranet* NORMARC XSLT files.

Add two new icons to koha-tmpl/intranet-tmpl/prog/img/famfamfam/ and
koha-tmpl/opac-tmpl/lib/famfamfam/
GR.png - Graphical materials
TD.png - Three dimentional objects

Copy PR.png from koha-tmpl/intranet-tmpl/prog/img/famfamfam/ to
koha-tmpl/opac-tmpl/lib/famfamfam/

Rename the XSLT variable materialTypeCode to typeOf008 for increased consistency
between stylesheets.

Make sure the XSLT uses icons that are actually available.

To test:
- No use testing all the different permutations of leader pos. 06 and 019b, I think.
- Set marcflavour = NORMARC and turn on default XSLT for OPAC and Intranet, details
  and results.
- Make sure you have a record with something relevant in leader position 6, like
  g for movies or c for music
- Check that the icon turns up in results and details, in the OPAC and Intranet
- Toggle DisplayOPACiconsXSLT and check that the results in the OPAC are as expected

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Comment 4 Mirko Tietgen 2012-10-04 10:20:17 UTC
Before patch:
OPAC results: +icon, +norwegian descriptions
OPAC detail: -icon, +norwegian descriptions; FV.png not found
Staff result: -icon, +norwegian descriptions; Film.png, Sound.png not found
Staff detail: -icon, +norwegian descriptions; FV.png not found

After patch:
OPAC results: +icon, +norwegian descriptions
OPAC detail: +icon, +norwegian descriptions; (no errors)
Staff result: +icon, +norwegian descriptions; (no errors)
Staff detail: +icon, +norwegian descriptions; (no errors)

I also tried the new icons. GR.png for 'k' (grafiske materialer) and TD.png for tre-dimensjonale gjenstander ('r') works for me in all areas. Signed off.
Comment 5 Paul Poulain 2012-10-12 20:35:16 UTC
QA comments
 * add new icons to famfam directory, they are graphically consistent 
 * the rest is related to NORMARC only, no side-effect risk
 * passes koha-qa.pl

passed QA
Comment 6 Paul Poulain 2012-10-12 20:36:16 UTC
Patch pushed to master
(untested, Magnus, please, double check ;-) )
Comment 7 Chris Cormack 2012-10-17 19:36:39 UTC
Pushed to 3.8.x will be in 3.8.6
Comment 8 Magnus Enger 2012-10-18 09:30:32 UTC
(In reply to comment #6)
> Patch pushed to master
> (untested, Magnus, please, double check ;-) )

Works nicely on master, as far as I can tell.