Bug 3382: Add CSS classes to OPAC XSLT <img> tags
This patch adds materialtype, format, and natureofcontents CSS classes to the <img> tags produced by the OPAC XSLT stylesheets for use with CSS and jQuery. Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
parent
c098c164ed
commit
eeaf2e7c9e
2 changed files with 39 additions and 39 deletions
|
@ -186,7 +186,7 @@
|
|||
<xsl:if test="$DisplayOPACiconsXSLT!='0'">
|
||||
<xsl:if test="$materialTypeCode!=''">
|
||||
<span class="results_summary"><span class="label">Type: </span>
|
||||
<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>
|
||||
<xsl:element name="img"><xsl:attribute name="src">/opac-tmpl/prog/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt">materialTypeLabel</xsl:attribute><xsl:attribute name="class">materialtype</xsl:attribute></xsl:element>
|
||||
<xsl:value-of select="$materialTypeLabel"/>
|
||||
</span>
|
||||
</xsl:if>
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
chip cartridge
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='c']">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/cd.png" alt="computer optical disc cartridge" title="computer optical disc cartridge"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/cd.png" alt="computer optical disc cartridge" title="computer optical disc cartridge" class="format"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='j']">
|
||||
magnetic disc
|
||||
|
@ -169,11 +169,11 @@
|
|||
magneto-optical disc
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='o']">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/cd.png" alt="optical disc" title="optical disc"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/cd.png" alt="optical disc" title="optical disc" class="format"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='r']">
|
||||
available online
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/drive_web.png" alt="remote" title="remote"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/drive_web.png" alt="remote" title="remote" class="format"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='a']">
|
||||
tape cartridge
|
||||
|
@ -186,16 +186,16 @@
|
|||
</xsl:if>
|
||||
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='a']">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/world.png" alt="celestial globe" title="celestial globe"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/world.png" alt="celestial globe" title="celestial globe" class="format"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='e']">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/world.png" alt="earth moon globe" title="earth moon globe"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/world.png" alt="earth moon globe" title="earth moon globe" class="format"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='b']">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/world.png" alt="planetary or lunar globe" title="planetary or lunar globe"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/world.png" alt="planetary or lunar globe" title="planetary or lunar globe" class="format"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='c']">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/world.png" alt="terrestrial globe" title="terrestrial globe"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/world.png" alt="terrestrial globe" title="terrestrial globe" class="format"/>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='o'][substring(text(),2,1)='o']">
|
||||
|
@ -258,19 +258,19 @@
|
|||
film reel
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='n']">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/chart_curve.png" alt="chart" title="chart"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/chart_curve.png" alt="chart" title="chart" class="format"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='c']">
|
||||
collage
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='d']">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/pencil.png" alt="drawing" title="drawing"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/pencil.png" alt="drawing" title="drawing" class="format"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='o']">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/note.png" alt="flash card" title="flash card"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/note.png" alt="flash card" title="flash card" class="format"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='e']">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/paintbrush.png" alt="painting" title="painting"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/paintbrush.png" alt="painting" title="painting" class="format"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='f']">
|
||||
photomechanical print
|
||||
|
@ -282,7 +282,7 @@
|
|||
photoprint
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='i']">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/picture.png" alt="picture" title="picture"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/picture.png" alt="picture" title="picture" class="format"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='j']">
|
||||
print
|
||||
|
@ -291,7 +291,7 @@
|
|||
technical drawing
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='q'][substring(text(),2,1)='q']">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/script.png" alt="notated music" title="notated music"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/script.png" alt="notated music" title="notated music" class="format"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='d']">
|
||||
filmslip
|
||||
|
@ -306,7 +306,7 @@
|
|||
other filmstrip type
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='s']">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/pictures.png" alt="slide" title="slide"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/pictures.png" alt="slide" title="slide" class="format"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='t']">
|
||||
transparency
|
||||
|
@ -327,7 +327,7 @@
|
|||
sound cassette
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='d']">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/cd.png" alt="sound disc" title="sound disc"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/cd.png" alt="sound disc" title="sound disc" class="format"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='t']">
|
||||
sound-tape reel
|
||||
|
@ -354,7 +354,7 @@
|
|||
braille
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='b']">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/magnifier.png" alt="large print" title="large print"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/magnifier.png" alt="large print" title="large print" class="format"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='a']">
|
||||
regular print
|
||||
|
@ -369,7 +369,7 @@
|
|||
videocassette
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='d']">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/dvd.png" alt="videodisc" title="videodisc"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/dvd.png" alt="videodisc" title="videodisc" class="format"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='r']">
|
||||
videoreel
|
||||
|
@ -517,23 +517,23 @@
|
|||
<xsl:if test="$typeOf008!=''">
|
||||
<span class="label">Type: </span>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$leader19='a'"><img src="/opac-tmpl/prog/famfamfam/silk/book_link.png" alt="book" title="book"/> Set</xsl:when>
|
||||
<xsl:when test="$leader19='a'"><img src="/opac-tmpl/prog/famfamfam/silk/book_link.png" alt="book" title="book" class="materialtype"/> Set</xsl:when>
|
||||
<xsl:when test="$leader6='a'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'"><img src="/opac-tmpl/prog/famfamfam/silk/book.png" alt="book" title="book"/> Book</xsl:when>
|
||||
<xsl:when test="$leader7='i' or $leader7='s'"><img src="/opac-tmpl/prog/famfamfam/silk/newspaper.png" alt="serial" title="serial"/> Continuing Resource</xsl:when>
|
||||
<xsl:when test="$leader7='a' or $leader7='b'"><img src="/opac-tmpl/prog/famfamfam/silk/book_open.png" alt="article" title="article"/> Article</xsl:when>
|
||||
<xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'"><img src="/opac-tmpl/prog/famfamfam/silk/book.png" alt="book" title="book" class="materialtype"/> Book</xsl:when>
|
||||
<xsl:when test="$leader7='i' or $leader7='s'"><img src="/opac-tmpl/prog/famfamfam/silk/newspaper.png" alt="serial" title="serial" class="materialtype"/> Continuing Resource</xsl:when>
|
||||
<xsl:when test="$leader7='a' or $leader7='b'"><img src="/opac-tmpl/prog/famfamfam/silk/book_open.png" alt="article" title="article" class="materialtype"/> Article</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="$leader6='t'"><img src="/opac-tmpl/prog/famfamfam/silk/book.png" alt="book" title="book"/> Book</xsl:when>
|
||||
<xsl:when test="$leader6='o'"><img src="/opac-tmpl/prog/famfamfam/silk/report_disk.png" alt="kit" title="kit"/> Kit</xsl:when>
|
||||
<xsl:when test="$leader6='p'"><img src="/opac-tmpl/prog/famfamfam/silk/report_disk.png" alt="mixed materials" title="mixed materials"/>Mixed Materials</xsl:when>
|
||||
<xsl:when test="$leader6='m'"><img src="/opac-tmpl/prog/famfamfam/silk/computer_link.png" alt="computer file" title="computer file"/> Computer File</xsl:when>
|
||||
<xsl:when test="$leader6='e' or $leader6='f'"><img src="/opac-tmpl/prog/famfamfam/silk/map.png" alt="map" title="map"/> Map</xsl:when>
|
||||
<xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'"><img src="/opac-tmpl/prog/famfamfam/silk/film.png" alt="visual material" title="visual material"/> Visual Material</xsl:when>
|
||||
<xsl:when test="$leader6='c' or $leader6='d'"><img src="/opac-tmpl/prog/famfamfam/silk/music.png" alt="score" title="score"/> Score</xsl:when>
|
||||
<xsl:when test="$leader6='i'"><img src="/opac-tmpl/prog/famfamfam/silk/sound.png" alt="sound" title="sound"/> Sound</xsl:when>
|
||||
<xsl:when test="$leader6='j'"><img src="/opac-tmpl/prog/famfamfam/silk/sound.png" alt="music" title="music"/> Music</xsl:when>
|
||||
<xsl:when test="$leader6='t'"><img src="/opac-tmpl/prog/famfamfam/silk/book.png" alt="book" title="book" class="materialtype"/> Book</xsl:when>
|
||||
<xsl:when test="$leader6='o'"><img src="/opac-tmpl/prog/famfamfam/silk/report_disk.png" alt="kit" title="kit" class="materialtype"/> Kit</xsl:when>
|
||||
<xsl:when test="$leader6='p'"><img src="/opac-tmpl/prog/famfamfam/silk/report_disk.png" alt="mixed materials" title="mixed materials" class="materialtype"/>Mixed Materials</xsl:when>
|
||||
<xsl:when test="$leader6='m'"><img src="/opac-tmpl/prog/famfamfam/silk/computer_link.png" alt="computer file" title="computer file" class="materialtype"/> Computer File</xsl:when>
|
||||
<xsl:when test="$leader6='e' or $leader6='f'"><img src="/opac-tmpl/prog/famfamfam/silk/map.png" alt="map" title="map" class="materialtype"/> Map</xsl:when>
|
||||
<xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'"><img src="/opac-tmpl/prog/famfamfam/silk/film.png" alt="visual material" title="visual material" class="materialtype"/> Visual Material</xsl:when>
|
||||
<xsl:when test="$leader6='c' or $leader6='d'"><img src="/opac-tmpl/prog/famfamfam/silk/music.png" alt="score" title="score" class="materialtype"/> Score</xsl:when>
|
||||
<xsl:when test="$leader6='i'"><img src="/opac-tmpl/prog/famfamfam/silk/sound.png" alt="sound" title="sound" class="materialtype"/> Sound</xsl:when>
|
||||
<xsl:when test="$leader6='j'"><img src="/opac-tmpl/prog/famfamfam/silk/sound.png" alt="music" title="music" class="materialtype"/> Music</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
<xsl:if test="string-length(normalize-space($physicalDescription))">
|
||||
|
@ -548,7 +548,7 @@
|
|||
</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$controlField008-21='d'">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/database.png" alt="database" title="database"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/database.png" alt="database" title="database" class="format"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$controlField008-21='l'">
|
||||
loose-leaf
|
||||
|
@ -563,7 +563,7 @@
|
|||
periodical
|
||||
</xsl:when>
|
||||
<xsl:when test="$controlField008-21='w'">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/world_link.png" alt="web site" title="web site"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/world_link.png" alt="web site" title="web site" class="format"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
|
@ -577,7 +577,7 @@
|
|||
</xsl:when>
|
||||
<xsl:when test="contains($controlField008-24,'b')">
|
||||
bibliography
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/text_list_bullets.png" alt="bibliography" title="bibliography"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/text_list_bullets.png" alt="bibliography" title="bibliography" class="natureofcontents"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="contains($controlField008-24,'c')">
|
||||
catalog
|
||||
|
@ -625,7 +625,7 @@
|
|||
statistics
|
||||
</xsl:when>
|
||||
<xsl:when test="contains($controlField008-24,'t')">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/report.png" alt="technical report" title="technical report"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/report.png" alt="technical report" title="technical report" class="natureofcontents"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="contains($controlField008-24,'v')">
|
||||
legal case and case notes
|
||||
|
@ -652,13 +652,13 @@
|
|||
numeric data
|
||||
</xsl:when>
|
||||
<xsl:when test="$controlField008-26='e'">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/database.png" alt="database" title="database"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/database.png" alt="database" title="database" class="format"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$controlField008-26='f'">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/font.png" alt="font" title="font"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/font.png" alt="font" title="font" class="format"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$controlField008-26='g'">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/controller.png" alt="game" title="game"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/controller.png" alt="game" title="game" class="format"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
|
@ -673,7 +673,7 @@
|
|||
festschrift
|
||||
</xsl:if>
|
||||
<xsl:if test="$controlField008-34='a' or $controlField008-34='b' or $controlField008-34='c' or $controlField008-34='d'">
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/user.png" alt="biography" title="biography"/>
|
||||
<img src="/opac-tmpl/prog/famfamfam/silk/user.png" alt="biography" title="biography" class="natureofcontents"/>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="$controlField008-33 and $controlField008-33!='|' and $controlField008-33!='u' and $controlField008-33!=' '">
|
||||
|
|
Loading…
Reference in a new issue