LP#1053397 tpac support disabling MR search/holds
authorBill Erickson <berick@esilibrary.com>
Fri, 7 Feb 2014 15:31:44 +0000 (10:31 -0500)
committerBill Erickson <berick@esilibrary.com>
Fri, 7 Feb 2014 15:31:44 +0000 (10:31 -0500)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/opac/parts/advanced/search.tt2
Open-ILS/src/templates/opac/parts/config.tt2
Open-ILS/src/templates/opac/parts/place_hold.tt2
Open-ILS/src/templates/opac/results.tt2

index bf6c9e9..dbefc76 100644 (file)
                         value=CGI.param('sort') class='results_header_sel';
                     %]
 
-                    <!-- applies metarecord search -->
-                    <br/><!-- <br> may seem redundant, but it allows the
-                        <input> (below) to drop down inline w/ its label -->
-                    <div class="adv_search_available">
-                        <input type='checkbox' name="modifier" value="metabib"
-                          [%- CGI.param('modifier').grep('metabib').size ? 
-                                ' checked="checked"' : '' %]
-                            id='opac.result.ismetabib' />
-                        <label for='opac.result.ismetabib'>
-                            [% l("Group Formats and Editions") %]</label>
-                    </div>
+                    [% IF NOT metarecords.disabled %]
+                        <br/><!-- <br> may seem redundant, but it allows the
+                            <input> (below) to drop down inline w/ its label -->
+                        <div class="adv_search_available">
+                            <input type='checkbox' name="modifier" value="metabib"
+                              [%- CGI.param('modifier').grep('metabib').size ? 
+                                    ' checked="checked"' : '' %]
+                                id='opac.result.ismetabib' />
+                            <label for='opac.result.ismetabib'>
+                                [% l("Group Formats and Editions") %]</label>
+                        </div>
+                    [% END %]
 
                 [% CASE "copy_location" %]
                     <select id="adv_copy_location_selector" 
index 77e1936..509d6a1 100644 (file)
@@ -162,4 +162,11 @@ ctx.google_books_preview = 0;
 #
 # ctx.maintenance_message = "The system will not be available February 29, 2104.";
 
+
+##############################################################################
+# Metarecords configuration
+# metarecords.disabled = 1; # disable all metarecord access points
+##############################################################################
+
+
 %]
index 4ca0a12..390b9ea 100644 (file)
                         <input type='hidden' name='part' value=''/>
                         [% END %]
                     [% END %]
-                    [% IF CGI.param('hold_type') == 'T' AND hdata.record.metarecord %]
-                        <a href="[% mkurl('', {hold_type => 'M', hold_target => hdata.record.metarecord.id}) %]">
-                            [% l('Advanced Hold Options') %]
-                        </a>
-                    [% END %]
-                    [% IF hdata.metarecord_filters.formats.size OR # should this be size > 1
-                          hdata.metarecord_filters.langs.size > 1;
-                        PROCESS metarecord_hold_filters_selector hold_data=hdata;
+                    [% IF NOT metarecords.disabled %]
+                        [% IF CGI.param('hold_type') == 'T' AND hdata.record.metarecord %]
+                            <a href="[% mkurl('', {hold_type => 'M', hold_target => hdata.record.metarecord.id}) %]">
+                                [% l('Advanced Hold Options') %]</a>
+                        [% END %]
+                        [% IF hdata.metarecord_filters.formats.size OR # should this be size > 1
+                            hdata.metarecord_filters.langs.size > 1;
+                            PROCESS metarecord_hold_filters_selector hold_data=hdata;
+                        END;
                     END %]
                 </td>
             </tr>
index 7ea66a0..6265b6b 100644 (file)
                             [% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %] />
                         [% l('Limit to available items') %]
                     </label>
-                    <label class="results_header_lbl">
-                        <input type="checkbox" name="modifier" value="metabib"
-                            onchange="search_modifier_onchange('metabib', this, true)"
-                            [% CGI.param('modifier').grep('metabib').size ? ' checked="checked"' : '' %] />
-                        [% l('Group Formats and Editions') %]
-                    </label>
+                    [% IF NOT metarecords.disabled %]
+                        <label class="results_header_lbl">
+                            <input type="checkbox" name="modifier" value="metabib"
+                                onchange="search_modifier_onchange('metabib', this, true)"
+                                [% CGI.param('modifier').grep('metabib').size ? ' checked="checked"' : '' %] />
+                            [% l('Group Formats and Editions') %]
+                        </label>
+                    [% END %]
                     [% IF CGI.param('detail_record_view') %]
                         <input type="hidden" name="detail_record_view" value="1" />
                     [% END %]