TPAC: Use a single table for all content notes
authorDan Scott <dscott@laurentian.ca>
Tue, 23 Oct 2012 15:57:46 +0000 (11:57 -0400)
committerDan Scott <dscott@laurentian.ca>
Tue, 23 Oct 2012 21:58:52 +0000 (17:58 -0400)
Rather than having one table per kind of content note, keep them all in
a single table. Thanks to Ben Shum for the prod.

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

index f8778fc..956a72d 100644 (file)
@@ -168,20 +168,15 @@ BLOCK render_contents;
     END;
 END 
 %]
-
 [%  BLOCK render_all_contents;
     FOREACH cont IN contents;
         content = PROCESS render_contents(xpath=cont.xpath);
         IF content.match('\S');
-%]
-        <table class='rdetail_content'>
-            <tbody>
-                <tr>
-                    <td class='rdetail_content_type'>[% cont.label %]</td>
-                    <td class='rdetail_content_value' itemprop='keywords'>[% content %]</td>
-                </tr>
-            </tbody>
-        </table>
+-%]
+<tr>
+    <td class='rdetail_content_type'>[% cont.label %]</td>
+    <td class='rdetail_content_value' itemprop='keywords'>[% content %]</td>
+</tr>
         [%- END; %]
     [%- END; %]
 [%- END %]
@@ -190,5 +185,9 @@ END
     IF content_html.length > 0;
 %]
 <h2 class='rdetail_contents'>[% l('Content descriptions') %]</h2>
+<table class='rdetail_content'>
+    <tbody>
 [%- content_html %]
+    </tbody>
+</table>
 [%- END %]