Improved copy table CSS/markup for conjoined bibs
authorDan Scott <dscott@laurentian.ca>
Mon, 15 Jul 2013 18:36:30 +0000 (14:36 -0400)
committerBen Shum <bshum@biblio.org>
Tue, 20 Aug 2013 15:31:42 +0000 (11:31 -0400)
Let the library name column wrap now that it may potentially contain
stupidly long title/author combos. Also, associate the table cells with
their corresponding headers for improved accessibility.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/templates/opac/css/style.css.tt2
Open-ILS/src/templates/opac/parts/record/copy_table.tt2

index 4490089..39cd573 100644 (file)
@@ -448,9 +448,14 @@ div.format_icon {
     padding-top: 1.5em;
 }
 
-#rdetails_status td, #rdetails_status2 td {
-    white-space:nowrap !important;
+#rdetails_status td {
     padding: 7px 0px 3px 13px;
+    white-space: nowrap;
+}
+
+#rdetails_status td[header=copy_header_library], 
+#rdetails_status td[header=copy_header_shelfloc] {
+    white-space: normal;
 }
 
 #rdetails_status thead th {
index d558c85..5bab2b7 100644 (file)
@@ -54,7 +54,7 @@ END;
     <tbody class="copy_details_table">
 [%- FOREACH peer IN ctx.foreign_copies;
         FOREACH bib IN peer.foreign_copy_maps; %]
-    <tr><td>
+    <tr><td header='copy_header_shelfloc'>
     [%- bib_lib_name = ctx.get_aou(bib.target_copy.circ_lib).name | html;
         l("[_1] (foreign item)", bib_lib_name); -%]
         <ul><li>
@@ -65,11 +65,11 @@ END;
             </a>
         </li></ul>
     </td>
-    <td>[% bib.target_copy.call_number.label | html %]</td>
-    <td>[% bib.target_copy.barcode | html %]</td>
-    <td>[% copy_info.copy_location | html %]</td>
-    <td>[% copy_info.copy_status | html %]</td>
-    <td>[% copy_info.due_date | html %]</td>
+    <td header='copy_header_callnumber'>[% bib.target_copy.call_number.label | html %]</td>
+    <td header='copy_header_barcode'>[% bib.target_copy.barcode | html %]</td>
+    <td header='copy_header_shelfloc'>[% copy_info.copy_location | html %]</td>
+    <td header='copy_header_status'>[% copy_info.copy_status | html %]</td>
+    <td header='copy_header_due_date'>[% copy_info.due_date | html %]</td>
 </tr>
    [%- END; # FOREACH peer
 END; # FOREACH bib
@@ -189,7 +189,7 @@ END; # FOREACH bib
             [% END %]
         [% END %]
 
-<tr><td>
+<tr><td header='copy_header_shelfloc'>
 [%- IF copy_info.peer_bib_marc.size > 1;
 '<ul>';
     FOREACH bib IN copy_info.peer_bib_marc;