TPAC: Fix record summary e-resource and copy display
authorDan Scott <dscott@laurentian.ca>
Fri, 9 Dec 2011 20:12:53 +0000 (15:12 -0500)
committerDan Scott <dscott@laurentian.ca>
Fri, 9 Dec 2011 20:12:53 +0000 (15:12 -0500)
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>

Open-ILS/src/templates/opac/parts/record/summary.tt2
Open-ILS/web/css/skin/default/opac/style.css

index 125546c..595978f 100644 (file)
 [%- 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].", 
     </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>
index 5e6a494..ffd92ec 100644 (file)
@@ -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;
 }