TTpac: added simple/detailed record view option to results page
authorBill Erickson <berick@esilibrary.com>
Mon, 15 Aug 2011 21:38:12 +0000 (17:38 -0400)
committerBill Erickson <berick@esilibrary.com>
Mon, 15 Aug 2011 21:38:12 +0000 (17:38 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/web/templates/default/opac/parts/result/table.tt2
Open-ILS/web/templates/default/opac/results.tt2

index 955f68c..424b952 100644 (file)
@@ -72,6 +72,9 @@
                                                             </td>
                                                             <td>[% args.holdings.0 %]</td>
                                                         </tr>
+
+                                                        [% IF CGI.param('detail_record_view') %]
+                                                        <!-- These fields are visible when viewing the results page in 'detailed' mode -->
                                                         <tr name="results_pub_tr" class="[% attrs.publisher ? '' : 'hide_me' %]">
                                                             <td valign="top">
                                                                 <strong>[% l('Publisher:') %]</strong>
                                                                 [% args.phys_desc %]
                                                             </td>
                                                         </tr>
+                                                        [% END %]
+
                                                     </table>
                                                     <div>
                                                         [% l('[_1] of [quant,_2,copy,copies] available',
index 9b2d242..5c0a620 100644 (file)
                     <div class="results_header_lbl">Sort by</div>
                     [% INCLUDE "default/opac/parts/filtersort.tt2" value=CGI.param('sort') %]
                     <div class="results_header_div"></div>
-                    <!-- XXX still needed?<div class="results_header_lbl">View</div>
-                    <select class="results_header_sel">
-                        <option>Simple</option>
-                        <option>Detailed</option>
-                    </select>
-                    <div class="results_header_div"></div> -->
-                    <input type="checkbox" id="limit_to_available"
-                        name="modifier" value="available"
-                        [% CGI.param('modifier').grep('available').size
-                            ? ' checked="checked"' : '' %] />
+
+                    <div class='results_header_sel' id='simple-detail-view-links'>
+                        [% IF CGI.param('detail_record_view') %]
+                        <a href="[% mkurl('', {detail_record_view => ''}) %]">[% l('Simple View') %]</a>
+                        [% ELSE %]
+                        <a href="[% mkurl('', {detail_record_view => 1}) %]">[% l('Detailed View') %]</a>
+                        [% END %]
+                    </div>
+                    <div class="results_header_div"></div>
+
+                    <input type="checkbox" id="limit_to_available" name="modifier" value="available"
+                        [% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %] />
+
                     <label for="limit_to_available" class="results_header_lbl">
                         [% l('Limit to available items') %]
                     </label>