From 9a5af472bd3e5d18ab0530d855c91471ca3aefa0 Mon Sep 17 00:00:00 2001 From: Dan Scott <dscott@laurentian.ca> Date: Fri, 9 Dec 2011 15:12:53 -0500 Subject: [PATCH] TPAC: Fix record summary e-resource and copy display Electronic resources were wrapped with an ugly black line and no differentiation from the outstanding text. Give them a light background and remove the black line. Also, use an unordered list if we have more than one URI to display. Move the copy summary below the "Copies" heading that immediately follows it for a more logical grouping of elements. Signed-off-by: Dan Scott <dscott@laurentian.ca> --- .../src/templates/opac/parts/record/summary.tt2 | 23 ++++++++++++++-------- Open-ILS/web/css/skin/default/opac/style.css | 6 ++---- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2 index 125546cec4..595978f37b 100644 --- a/Open-ILS/src/templates/opac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2 @@ -73,13 +73,25 @@ [%- IF sfx.size && sfx.0 != '' %] </div> [%- END %] -[%- FOR uri IN args.uris.merge(args.online_res); %] -<div class="rdetail_uri"> - <a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %] +[%- merged_uris = args.uris.merge(args.online_res); +num_uris = merged_uris.size; +IF num_uris > 0; +-%] +<h2 style="margin-top: 1em;">[% l("Electronic resources") %]</h2> +<div class="rdetail_uris"> + [%- IF num_uris > 1 %]<ul>[% END %] + [%- FOR uri IN merged_uris %] + [%- IF num_uris == 1 %]<p class="rdetail_uri">[% ELSE %]<li class="rdetail_uri">[% END %] + <a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %] + [%- IF num_uris == 1 %]</p>[% ELSE %]</li>[% END %] + [%- END %] + [%- IF num_uris > 1 %]</ul>[% END %] </div> [%- END %] [%- # hold/copy summary %] [%- IF ctx.copy_summary.0.count %] +<div id='rdetail_copies'> +<h2>[% l('Copies') %]</h2> <div class="rdetail_copy_counts"> <span> [%- l("[quant,_1,current hold,current holds] with [quant,_2,total copy,total copies].", @@ -87,11 +99,6 @@ </span> <span>[% l('[quant,_1,copy,copies] currently available.', ctx.copy_summary.0.available) %]</span> </div> -[% END %] - -[%- IF ctx.copy_summary.0.count %] -<div id='rdetail_copies'> -<h2>[% l('Copies') %]</h2> <table cellpadding="0" cellspacing="0" border="0" width="100%" id="rdetails_status"> <thead> <tr> diff --git a/Open-ILS/web/css/skin/default/opac/style.css b/Open-ILS/web/css/skin/default/opac/style.css index 5e6a49483a..ffd92ec570 100644 --- a/Open-ILS/web/css/skin/default/opac/style.css +++ b/Open-ILS/web/css/skin/default/opac/style.css @@ -349,9 +349,8 @@ span.dash_divider { padding-right: 10px; } -.rdetail_uri { - border: thin black solid; - padding: 3px; +.rdetail_uris { + padding: 1em; } .rdetail_aux_utils { @@ -369,7 +368,6 @@ span.dash_divider { } #rdetail_copies { - clear: both; padding-top: 1.5em; } -- 2.11.0