My Account curbside subtab on the holds UI
authorMike Rylander <mrylander@gmail.com>
Fri, 29 May 2020 16:17:54 +0000 (12:17 -0400)
committerMike Rylander <mrylander@gmail.com>
Fri, 29 May 2020 21:16:48 +0000 (17:16 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/templates/opac/myopac/holds_curbside.tt2 [new file with mode: 0644]

diff --git a/Open-ILS/src/templates/opac/myopac/holds_curbside.tt2 b/Open-ILS/src/templates/opac/myopac/holds_curbside.tt2
new file mode 100644 (file)
index 0000000..e4ed356
--- /dev/null
@@ -0,0 +1,106 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    PROCESS "opac/parts/hold_status.tt2";
+    PROCESS "opac/parts/hold_notify.tt2";
+    PROCESS "opac/parts/myopac/column_sort_support.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
+    myopac_page = "holds";
+    limit = (ctx.holds_limit.defined) ? ctx.holds_limit : 0;
+    offset = (ctx.holds_offset.defined) ? ctx.holds_offset : 0;
+    count = (ctx.holds_ids.size.defined) ? ctx.holds_ids.size : 0;
+%]
+<h3 class="sr-only">[% l('Curbside pickup') %]</h3>
+<div id='myopac_holds_div'>
+
+    <div id="acct_holds_tabs">
+        <div class="align">
+            <a href='#'>[% l("Items on Hold") %]</a>
+        </div>
+        [% IF ctx.curbside_pickup_libs.length > 0 %]
+        <div class="align selected">
+            <a href=''>[% l("Curbside pickup") %]</a>
+        </div>
+        [% END %]
+        [% IF ebook_api.enabled == 'true' %]
+        <div class="align">
+            <a href='[% mkurl('ebook_holds', {}, ['limit','offset','available','sort','sort_type']) %]'>[% l("E-Items on Hold") %]</a>
+        </div>
+        <div class="align">
+            <a href='[% mkurl('ebook_holds_ready', {}, ['limit','offset','available','sort','sort_type']) %]'>[% l("E-Items Ready for Checkout") %]</a>
+        </div>
+        [% END %]
+        <div class="align">
+            <a href='[% mkurl('hold_history', {}, ['limit','offset','available','sort','sort_type']) %]'>[% l("Holds History") %]</a>
+        </div>
+    </div>
+
+    <div class="header_middle">
+        <span id="acct_holds_header" style="float:left;">
+            [%  l("Curbside pickup appointments"); %]
+        </span>
+    </div>
+    <div class="clear-both"></div>
+    <div title="[% l('Curbside Pickup Appointments') %]"
+        class="egtable table_no_border_space table_no_cell_pad">
+        <div class="egtr">
+            <span class="egth">[% l('Pickup Location') %]</span>
+            <span class="egth">[% l('Date') %]</span>
+            <span class="egth">[% l('Time') %]</span>
+            <span class="egth">[% l('Notes') %]</span>
+            <span class="egth">[% l('Action') %]</span>
+        </div>
+    [% FOR lib IN ctx.curbside_pickup_libs %]
+        <form class="egtr" method="GET">
+            <input type="hidden" name="action" value="curbside"/>
+            <input type="hidden" name="cs_slot_id" value="[% ctx.cs_slot_id %]"/>
+            [% disable_me = 0 %]
+            [% IF ctx.slot && ctx.slot.arrival; disable_me = 1; END %]
+            <span class="egtd">
+                [% ctx.get_aou(lib).name | html %]
+                <input type="hidden" name="cs_org" value="[% lib %]"/>
+            </span>
+            <span class="egtd">
+                [% IF ctx.cs_date;
+                    cs_date = ctx.cs_date;
+                   ELSE;
+                    cs_date = date.format(date.now, '%F');
+                   END;
+                %]
+                <input type="date" name="cs_date" value="[% ctx.cs_date | html %]" [% IF disable_me %]disabled="disabled"[% END %]/>
+            </span>
+            <span class="egtd">
+                [% IF ctx.cs_times.length > 0; # show a select %]
+                  <select name="cs_time">
+                    [% FOR t IN ctx.cs_times %]
+                      <option value="[% t.0 | html %]"
+                        [% IF ctx.cs_time == t.0 %] selected="selected"[% END %]
+                        [% IF t.1 == %] disabled="disabled[% END %]>[% t.0 %]</option>
+                    [% END %]
+                [% ELSE %] 
+                  [% l('Select a date') %]
+                [% END %]
+            </span>
+            <span class="egtd">
+                [% IF ctx.cs_date; # show the notes box %]
+                <input type="text" name="cs_notes" value="[% ctx.cs_notes | html %]" [% IF disable_me %]disabled="disabled"[% END %]/>
+                [% END %]
+            </span>
+            <span class="egtd">
+                [% IF ctx.cs_time; # relevant submit action %]
+                    <button type="submit" name="cs_action" value="save" class="opac-button">
+                        [% l('Update appointment') %]
+                    </button>
+                [% ELSIF ctx.cs_date %]
+                    <button type="submit" name="cs_action" value="next" class="opac-button">
+                        [% l('Request appointment') %]
+                    </button>
+                [% ELSE %]
+                    <button type="submit" name="cs_action" value="next" class="opac-button">
+                        [% l('Check available times') %]
+                    </button>
+                [% END %]
+            </span>
+        </form>
+    </div>
+</div>
+[% END %]