FF mediated holds TPAC support
authorBill Erickson <berick@esilibrary.com>
Tue, 11 Feb 2014 19:13:45 +0000 (14:13 -0500)
committerBill Erickson <berick@esilibrary.com>
Tue, 11 Feb 2014 19:13:45 +0000 (14:13 -0500)
When using mediated holds (YAOUS ff.request.force_mediation is true),
disallow patron access to the hold suspend and activate functions.

Signed-off-by: Bill Erickson <berick@esilibrary.com>

Open-ILS/src/templates/opac/myopac/holds.tt2
Open-ILS/src/templates/opac/myopac/holds/edit.tt2

index e6ddb5a..f029e7b 100644 (file)
                         <option id='myopac_holds_actions_none' value=''>
                         -- [% l("Actions for selected holds") %] --
                         </option>
+                        [%  req_lib = ctx.user.home_ou.id || ctx.user.home_ou;
+                            IF NOT ctx.get_org_setting(req_lib, 'ff.request.force_mediation') %]
                         <option value='suspend'>[% l("Suspend") %]</option>
                         <option value='activate'>[% l("Activate") %]</option>
+                        [% END %]
                         <!-- XXX maybe later <option value='thaw_date'>[% l("Set Active Date") %]</option> -->
                         <option value='cancel'>[% l("Cancel") %]</option>
                     </select>
index 271cdad..2e418fd 100644 (file)
@@ -71,6 +71,7 @@
                             -->
                         </td>
                     </tr>
+                    [% IF NOT ctx.get_org_setting(ahr.request_lib, 'ff.request.force_mediation') %]
                     <tr>
                         <th>
                             [% l('Active?') %]
@@ -98,7 +99,8 @@
                             <em>[% l('Enter date in MM/DD/YYYY format') %]</em>
                         </td>
                     </tr>
-                    [% END %]
+                    [% END # mediated %]
+                    [% END # hold status%]
                     <tr>
                         <td colspan="2" class="hold-editor-controls">
                             <a href="[% ctx.opac_root %]/myopac/holds"><button