Add BooPAC support for Hold Groups
authorMike Rylander <mrylander@gmail.com>
Fri, 13 Nov 2020 19:42:10 +0000 (14:42 -0500)
committerMike Rylander <mrylander@gmail.com>
Fri, 13 Nov 2020 19:42:10 +0000 (14:42 -0500)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/templates-bootstrap/opac/myopac/hold_subscriptions.tt2 [new file with mode: 0644]
Open-ILS/src/templates-bootstrap/opac/parts/myopac/base.tt2

diff --git a/Open-ILS/src/templates-bootstrap/opac/myopac/hold_subscriptions.tt2 b/Open-ILS/src/templates-bootstrap/opac/myopac/hold_subscriptions.tt2
new file mode 100644 (file)
index 0000000..d5d6c07
--- /dev/null
@@ -0,0 +1,51 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    PROCESS "opac/parts/hold_status.tt2";
+    PROCESS "opac/parts/myopac/column_sort_support.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
+    myopac_page = "holds";
+    parent="holds";
+%]
+<div id='myopac_holds_div'>
+
+    <div class="header_middle">
+        <span style="float:left;">[% l("Current Hold Groups") %]</span>
+        <span style="float:right;">
+            <a class="hide_me" href="#">[% l('Export List') %]</a>
+        </span>
+    </div>
+    <div class="clear-both"></div>
+
+    <div id='holds_main'>
+        [% IF ctx.my_hold_subscriptions.size AND ctx.my_hold_subscriptions.size < 1 %]
+        <div class="warning_box">
+            <big><strong>[% l('No subscriptions found.') %]</strong></big>
+        </div>
+        [% ELSE %]
+        <table id='acct_holds_hist_header' class='table_no_border_space table_no_cell_pad' title="[% l('Hold Groups') %]">
+            <thead>
+                <tr>
+                    <th><span>[% l('Name') %]</span></th>
+                    <th><span>[% l('Description') %]</span></th>
+                    <th><span>[% l('Actions') %]</span></th>
+                </tr>
+            </thead>
+            <tbody id='holds_temp_parent'>
+                [% FOR sub IN ctx.my_hold_subscriptions %]
+                <tr name="acct_holds_temp" class="acct_holds_temp">
+
+                    <td> [% sub.name | html %] </td>
+                    <td> [% sub.description | html %] </td>
+                    <td>
+                        <a href='[% mkurl('hold_subscriptions', {remove => sub.id}) %]'>
+                            [% l('Remove me') %]
+                        </a>
+                    </td>
+                </tr>
+                [% END %]
+            </tbody>
+        </table>
+        [% END %]
+    </div>
+</div>
+[% END %]
index 0374be1..14e425a 100755 (executable)
@@ -32,6 +32,9 @@
      IF (ctx.show_reservations_tab == 'true');
         myopac_pages.push({children => 0, parent => "parent", url => "reservations", text => l("<i class='fas fa-splotch' aria-hidden='true'></i>  Reservations"), name => l("Reservations")});
     END;
+    IF ctx.my_hold_subscriptions.size > 0;
+        myopac_pages.push({children => 0, parent => "holds", url => "hold_subscriptions", text => l("<i class='fas fa-redo' aria-hidden='true'></i> Hold Groups"), name => l("Hold Groups")});
+    END;
     skin_root = "../"
 %]