From: Terran McCanna Date: Mon, 21 Dec 2015 19:55:01 +0000 (-0500) Subject: Fixes to OPAC holds & patron self-registration pages X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b289f52e6c98cb75fb2d206c1ff304758211cf3c;p=evergreen%2Fpines.git Fixes to OPAC holds & patron self-registration pages Signed-off-by: Terran McCanna --- diff --git a/Open-ILS/src/templates/opac/myopac/circs.tt2 b/Open-ILS/src/templates/opac/myopac/circs.tt2 index 37afd155b3..7ca39647a9 100644 --- a/Open-ILS/src/templates/opac/myopac/circs.tt2 +++ b/Open-ILS/src/templates/opac/myopac/circs.tt2 @@ -6,15 +6,14 @@

[% l('Current Items Checked Out') %]

+ @@ -153,12 +152,15 @@ [%- circ.ATTRS.title.substr(0,circ.ATTRS.nonfiling_characters) | html %] [%- circ.ATTRS.title.substr(circ.ATTRS.nonfiling_characters) | html %] [% END %] - [% IF circ.circ.target_copy.call_number.id == -1 %]   /   + + + [% IF circ.circ.target_copy.call_number.id == -1 %] [% circ.circ.target_copy.dummy_author | html %] - [% ELSIF attrs.author %]   /   - [% attrs.author | html %] + [% ELSIF circ.ATTRS.author %] + [% circ.ATTRS.author | html %] [% END %] diff --git a/Open-ILS/src/templates/opac/myopac/holds.tt2 b/Open-ILS/src/templates/opac/myopac/holds.tt2 index d93f3115b1..e91ed5f94e 100644 --- a/Open-ILS/src/templates/opac/myopac/holds.tt2 +++ b/Open-ILS/src/templates/opac/myopac/holds.tt2 @@ -11,18 +11,14 @@

[% l('My Holds') %]

-
- -->
@@ -35,39 +31,37 @@ limit,offset => (offset - limit)}) %]' - [% if offset <= 0 %] class='invisible' [% end %]>[% l('previous') %] - [% if offset > 0 || count > limit; + [% IF offset <= 0 %] class='invisible' [% END %]>[% l('Previous') %] + [% IF offset > 0 || count > limit; curpage = 0; - while curpage * limit < count; - if curpage * limit == offset; + WHILE curpage * limit < count; + IF curpage * limit == offset; %] [% curpage + 1 %] - [%- else %] + [%- ELSE %] limit, offset => (curpage * limit)}) %]'>[% curpage + 1 %] - [%- end; + [%- END; curpage = curpage + 1; - end; - end %] + END; + END %] limit, offset => (offset + limit)}) %]' - [% if count <= limit + offset %] class='invisible' [% end %] >[% l('next') %] + [% IF count <= limit + offset %] class='invisible' [% END %] >[% l('Next') %]
-

If you require assistance placing a hold or have a question about a hold that you have placed, - please contact your local library.

If you require assistance placing a hold or have a question about a hold that you have placed, please contact your local library.

+ title="[% l('Actions for Items on Hold') %]"> - --> @@ -112,7 +105,7 @@ class="table_no_border_space"> - @@ -124,74 +117,95 @@ - - [%# copy the ctx.holds into a local array, then add a sort field - that contains the value to sort on. since we need the item attrs, - invoke it and save the result in attrs. + [%# Copy the ctx.holds into a local array, then add a SORT field + that contains the value to sort on. Since we need the item attrs, + invoke it and save the result in ATTRS. %] [% hold_items = ctx.holds; - sort_field = cgi.param('sort'); + sort_field = CGI.param('sort'); - for hold in hold_items; - hold.attrs = {marc_xml => hold.marc_xml}; - process get_marc_attrs args=hold.attrs; + FOR hold IN hold_items; + hold.ATTRS = {marc_xml => hold.marc_xml}; + PROCESS get_marc_attrs args=hold.ATTRS; - switch sort_field; + SWITCH sort_field; - case "sort_title"; - hold.sorting = hold.attrs.sort_title; + CASE "sort_title"; + hold.SORTING = hold.ATTRS.sort_title; - case "author"; - hold.sorting = hold.attrs.author; + CASE "author"; + hold.SORTING = hold.ATTRS.author; - case "format"; - hold.sorting = hold.attrs.format_label; + CASE "format"; + hold.SORTING = hold.ATTRS.format_label; - case; + CASE; sort_field = ""; - end; # switch - end; #for hold + END; # SWITCH + END; #FOR hold - if (sort_field != "sort_title"); + IF (sort_field != "sort_title"); deemphasize_class = ""; - else; + ELSE; deemphasize_class = " class=\"sort_deemphasize\""; - end; + END; - # apply sorting to hold_items - if (sort_field != ""); - hold_items = hold_items.sort("sorting"); - if (cgi.param("sort_type") == "desc"); + # Apply sorting to hold_items + IF (sort_field != ""); + hold_items = hold_items.sort("SORTING"); + IF (CGI.param("sort_type") == "desc"); hold_items = hold_items.reverse; - end; + END; - # shorten the hold_items list per offset/limit/count + # Shorten the hold_items list per offset/limit/count hi = offset + limit - 1; hi = hi > hold_items.max ? hold_items.max : hi; hold_items = hold_items.slice(offset, hi); - end; + END; - # hold_items list is now sorted. traverse and dump the information. + # hold_items list is now sorted. Traverse and dump the information. - for hold in hold_items; + FOR hold IN hold_items; ahr = hold.hold.hold %] - + - + - - - - - - - - - - [% end %] + [% END %]
+ - [% if ctx.hold_suspend_post_capture; - l('one or more holds could not be suspended because the item is at (or en route to) the pickup library.'); - end; + [% IF ctx.hold_suspend_post_capture; + l('One or more holds could not be suspended because the item is at (or en route to) the pickup library.'); + END; %] [% IF CGI.param("available") -%] - [% l('Show All Holds') %]   |   - [% l("Showing Holds That Are Ready to Pick Up") %] + [% l('Show all holds') %] | + [% l("Holds that are ready to pick up") %] [% ELSE -%] - [% l("Show all holds") %] | + [% l("All holds") %] | [% l("Show holds that are ready to pick up") %] [% END -%]
+ [% l('Cancel if not filled by') %] [% l('Active?') %] [% l('Status') %][% l('Notes') %] [% l('Edit') %]
+
+ +
+ [% title = hold.ATTRS.title; + IF ahr.hold_type == 'P'; + title = l('[_1] ([_2])', title, hold.hold.part.label); + END; %] + + + [%- title.substr(0,hold.ATTRS.nonfiling_characters) | html %] + [%- title.substr(hold.ATTRS.nonfiling_characters) | html %]
+ + [%- FOREACH pubnote IN ahr.notes; + IF pubnote.pub == 't'; + %] +
+ [% pubnote.title | html %] +
+ [% pubnote.body | html %] +
+ [%- END; END; %]
-
+ - - -
- [% PROCESS get_hold_status hold=hold; %] -
-
-
- [% l(ahr.frozen == 'f' ? 'Yes' : 'No') %] -
-
-
+
[% IF ahr.frozen == 't' AND ahr.thaw_date; date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT); END %] - -
+
[% IF ahr.expire_time; date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT); END %] - -
- [% ctx.get_aou(ahr.pickup_lib).name | html %] -
+
+ [% l(ahr.frozen == 'f' ? 'Active' : 'Suspended') %] -
+
- [% l('edit') %] + [% html_text_attr('title', l('Edit hold for item [_1]', attrs.title)) %]> + [% l('Edit') %] -
- [% end %] + [% END %]
diff --git a/Open-ILS/src/templates/opac/parts/hold_status.tt2 b/Open-ILS/src/templates/opac/parts/hold_status.tt2 index e443ea6e2b..4b537c2a4b 100644 --- a/Open-ILS/src/templates/opac/parts/hold_status.tt2 +++ b/Open-ILS/src/templates/opac/parts/hold_status.tt2 @@ -25,7 +25,7 @@ END %] -
+