From f9c5ccdc2d5c2c60d9cd0f632eb34de0671bf601 Mon Sep 17 00:00:00 2001 From: senator Date: Tue, 22 Mar 2011 18:00:11 -0400 Subject: [PATCH] Show format icons in results and record detail pages --- Open-ILS/web/css/skin/default/opac/style.css | 1 + .../templates/default/opac/parts/header.tt2 | 26 +++++++++---------- .../default/opac/parts/marc_misc.tt2 | 4 +-- .../default/opac/parts/record/summary.tt2 | 15 +++-------- .../default/opac/parts/result/table.tt2 | 7 ++--- 5 files changed, 24 insertions(+), 29 deletions(-) diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css index 33040f48f7..5d402f9694 100644 --- a/Open-ILS/web/css/skin/default/opac/style.css +++ b/Open-ILS/web/css/skin/default/opac/style.css @@ -967,3 +967,4 @@ a.dash-link:hover { text-decoration: underline !important; } border-bottom: 1px dotted #666; } .list-create-table-buttons input[type=image] { margin-top: 2px; } +.result_table_format_cell { padding: 0px 10px; text-align: center; } diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2 index aa34ab5d3a..10788fa91b 100644 --- a/Open-ILS/web/templates/default/opac/parts/header.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/header.tt2 @@ -22,31 +22,31 @@ is_advanced = CGI.param("_adv").size; formats = [ # XXX KCLS-specific - {'code' => 'a', 'name' => 'Book', 'image' => 'media_book.jpg'}, - {'code' => 'i', 'name' => 'Book on cassette', 'image' => 'media_bookoncasset.jpg'}, - {'code' => 'n', 'name' => 'Book on CD', 'image' => 'media_bookoncd.jpg'}, + {'code' => 'a', 'name' => 'Book', 'image' => 'media_book.png'}, + {'code' => 'i', 'name' => 'Book on cassette', 'image' => 'media_bookoncassette.png'}, + {'code' => 'n', 'name' => 'Book on CD', 'image' => 'media_bookoncd.png'}, {'code' => 'x', 'name' => 'Download music', 'image' => 'media_downloadmusic.jpg'}, {'code' => 'y', 'name' => 'Download video', 'image' => 'media_downloadvideo.jpg'}, {'code' => 'h', 'name' => 'DVD', 'image' => 'media_dvd.jpg'}, - {'code' => 'w', 'name' => 'eBook - Audio', 'image' => 'media_eaudio.jpg'}, - {'code' => 'v', 'name' => 'eBook - Text', 'image' => 'media_ebooktext.jpg'}, - {'code' => 'e', 'name' => 'Equipment', 'image' => 'media_equipment.jpg'}, - {'code' => 'f', 'name' => 'Films', 'image' => 'media_films.jpg'}, + {'code' => 'w', 'name' => 'eBook - Audio', 'image' => 'media_eaudio.png'}, + {'code' => 'v', 'name' => 'eBook - Text', 'image' => 'media_ebooktext.png'}, + {'code' => 'e', 'name' => 'Equipment', 'image' => 'media_equipment.png'}, + {'code' => 'f', 'name' => 'Films', 'image' => 'media_films.png'}, {'code' => 'o', 'name' => 'Kit', 'image' => 'media_kit.jpg'}, {'code' => 'q', 'name' => 'Large print', 'image' => 'media_largeprint.jpg'}, - {'code' => 'b', 'name' => 'Magazine', 'image' => 'media_magazines.jpg'}, + {'code' => 'b', 'name' => 'Magazine', 'image' => 'media_magazines.png'}, {'code' => 'd', 'name' => 'Microform', 'image' => 'media_microform.jpg'}, {'code' => 'k', 'name' => 'Music cassette', 'image' => 'media_musiccassette.jpg'}, - {'code' => 'j', 'name' => 'Music CD', 'image' => 'media_musiccd.jpg'}, - {'code' => 'l', 'name' => 'Music LP', 'image' => 'media_musicrecord.jpg'}, + {'code' => 'j', 'name' => 'Music CD', 'image' => 'media_musiccd.png'}, + {'code' => 'l', 'name' => 'Music LP', 'image' => 'media_musicrecord.png'}, {'code' => 'p', 'name' => 'Newspaper', 'image' => 'media_newspaper.jpg'}, {'code' => 't', 'name' => 'Online', 'image' => 'media_online.jpg'}, {'code' => 'u', 'name' => 'Player', 'image' => 'media_eaudio.jpg'}, {'code' => 'c', 'name' => 'Printed music / scores', 'image' => 'media_printedmusic.jpg'}, - {'code' => '2', 'name' => 'Read along with cassette', 'image' => 'media_cassettewithbook.jpg'}, - {'code' => '5', 'name' => 'Read along with CD', 'image' => 'media_cdwithbook.jpg'}, + {'code' => '2', 'name' => 'Read along with cassette', 'image' => 'media_cassettewithbook.png'}, + {'code' => '5', 'name' => 'Read along with CD', 'image' => 'media_cdwithbook.png'}, {'code' => 'm', 'name' => 'Software', 'image' => 'media_software.jpg'}, - {'code' => 'g', 'name' => 'Video', 'image' => ''}, + {'code' => 'g', 'name' => 'Video', 'image' => 'media_films.png'}, {'code' => 'r', 'name' => '3-D Object', 'image' => 'media_3dobject.jpg'}, {'code' => 'z', 'name' => 'Map', 'image' => 'media_map.jpg'}, {'code' => 's', 'name' => 'Slide set', 'image' => 'media_slide.jpg'} diff --git a/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2 b/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2 index 8f561969c9..8c1c4a761f 100644 --- a/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/marc_misc.tt2 @@ -26,8 +26,8 @@ # KCLS-specific stuff; needs to change args.mattype = xml.findnodes('//*[@tag="998"]/*[@code="d"]').textContent; args.kcls_cn = xml.findnodes('//*[@tag="092" or @tag="099"]/*').textContent; - mattype = attrs.mattype; + mattype = args.mattype; args.format = ctx.find_citm(mattype).value; - args.format_icon = icon_by_mattype.$mattype; + args.format_icon = icon_by_format.$mattype; END; %] diff --git a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 index f151888b69..c60c248303 100644 --- a/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/record/summary.tt2 @@ -59,7 +59,10 @@
- [% l('Format') %] + [% IF attrs.format %] + [% attrs.format %] + [% END %]
@@ -82,16 +85,6 @@ [% IF attrs.edition; l("Edition"); END %] [% attrs.edition %] - - [% IF attrs.format; l("Format"); END %] - - - [% IF attrs.format %] - [% l('Format') %] - [% END %] - diff --git a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 b/Open-ILS/web/templates/default/opac/parts/result/table.tt2 index 90b25481e0..6dfb7b800d 100644 --- a/Open-ILS/web/templates/default/opac/parts/result/table.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/result/table.tt2 @@ -155,9 +155,10 @@ - Format + class='result_table_format_cell' width="1"> + [% IF attrs.format %] + [% attrs.format %] + [% END %] [% l("Match Score: ") %] -- 2.43.2