From: Bill Erickson Date: Wed, 29 Oct 2014 21:07:13 +0000 (-0400) Subject: kmain-331_ecommerce_for_bibliocommons X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f7945215d93fd79aee148a95b2bee009aeecb25f;p=working%2FEvergreen.git kmain-331_ecommerce_for_bibliocommons Cross-port: e3aa6e7 --- diff --git a/KCLS/openils/var/templates_kcls/opac/myopac/main_fines.tt2 b/KCLS/openils/var/templates_kcls/opac/myopac/main_fines.tt2 new file mode 100644 index 0000000000..ecec779e0b --- /dev/null +++ b/KCLS/openils/var/templates_kcls/opac/myopac/main_fines.tt2 @@ -0,0 +1,183 @@ + +[% PROCESS "opac/parts/header.tt2"; + + WRAPPER "opac/parts/base.tt2"; + myopac_page = "main"; + myopac_main_page = "main"; +%] + +
+
+ + + + +
+
+ +
+ [% IF ctx.fines.circulation.size > 0 %] +
+ + + + + + + + + + + + + + + + + [% FOR f IN ctx.fines.circulation; + NEXT IF f.xact.balance_owed < 0; # XXX middle layer + attrs = {marc_xml => f.marc_xml}; + IF f.marc_xml; + PROCESS get_marc_attrs args=attrs; + ELSIF f.xact.reservation; + attrs.title = f.xact.reservation.target_resource_type.name; + END %] + + + + + + + + + + [% END %] + +
+ [% l("Fines") %] +
[% l("Title") %][% l("Author") %][% l("Checkout Date") %][% l("Due Date") %][% l("Date Returned") %][% l("Balance Owed") %] + + +
+ [% recid = f.xact.circulation.target_copy.call_number.record.id || f.xact.reservation.target_resource_type.record.id; + IF recid; %] + [% attrs.title | html %] + [% ELSE %] + [% attrs.title | html %] + [% END %] + + [% attrs.author | html %] + + [% ts = f.xact.circulation.xact_start || f.xact.reservation.start_time || 0; + IF ts; + date.format(ctx.parse_datetime(ts), DATE_FORMAT); + END %] + + [% ts = f.xact.circulation.due_date || f.xact.reservation.end_time || 0; + IF ts; + date.format(ctx.parse_datetime(ts), DATE_FORMAT); + END %] + + [% ts = f.xact.circulation.checkin_time || f.xact.reservation.return_time || 0; + IF ts; + date.format(ctx.parse_datetime(ts), DATE_FORMAT); + ELSE %] + + [% l('(fines accruing)') %] + [% END %] + + + [% money(f.xact.balance_owed) %] + + + +
+
+ [% END %] + + [% IF ctx.fines.grocery.size > 0 %] + +
+
+
+
+ + + + + + + + + + + + + + + + + [% FOR f IN ctx.fines.grocery %] + [% NEXT IF f.xact.balance_owed < 0 %] + + + + + + + + + + [% END %] + +
+ [% l("Other Fees") %] +
[% l("Transaction Start Time") %][% l("Last Payment Time") %][% l("Initial Amount Owed") %][% l("Total Amount Paid") %][% l("Balance Owed") %][% l("Billing Type") %] + + +
[% date.format( + ctx.parse_datetime(f.xact.xact_start), + DATE_FORMAT + ) %] + [% IF f.xact.last_payment_ts; + date.format( + ctx.parse_datetime( + f.xact.last_payment_ts + ), DATE_FORMAT + ); + END %] + [% money(f.xact.total_owed) %][% money(f.xact.total_paid) %] + + [% money(f.xact.balance_owed) %] + + [% f.xact.last_billing_type %] + +
+
+ [% END %] + [% UNLESS ctx.fines.grocery.size OR ctx.fines.circulation.size %] +
[% l('You have no current fines.') %]
+ [% ELSE %] +
+ +
+ [% END %] +
+[% END %] diff --git a/KCLS/openils/var/templates_kcls/opac/myopac/main_payment_form.tt2 b/KCLS/openils/var/templates_kcls/opac/myopac/main_payment_form.tt2 index daee808c8f..082af0e983 100644 --- a/KCLS/openils/var/templates_kcls/opac/myopac/main_payment_form.tt2 +++ b/KCLS/openils/var/templates_kcls/opac/myopac/main_payment_form.tt2 @@ -1,19 +1,26 @@ -[% PROCESS "opac/parts/header.tt2"; - PROCESS "opac/parts/misc_util.tt2"; - WRAPPER "opac/parts/myopac/main_base.tt2"; - myopac_page = "main"; - myopac_main_page = "payment_form"; +[% + WRAPPER "opac/parts/base.tt2"; last_chance = CGI.param("last_chance"); %] + +
+
+ + + + +
+
+ [% IF ctx.fines.balance_owed <= 0 %]
[% l("You either have no fines to pay or you have selected fines whose " _ "total is non-positive. We cannot process non-positive amounts.") %]
[% ELSE %] -
+
[% IF last_chance %]

[% l("Are you sure you are ready to charge [_1] to your credit card?", money(ctx.fines.balance_owed)) %]

diff --git a/KCLS/openils/var/templates_kcls/opac/myopac/main_payments.tt2 b/KCLS/openils/var/templates_kcls/opac/myopac/main_payments.tt2 index 6de3bbb665..cfbf56b033 100644 --- a/KCLS/openils/var/templates_kcls/opac/myopac/main_payments.tt2 +++ b/KCLS/openils/var/templates_kcls/opac/myopac/main_payments.tt2 @@ -1,13 +1,20 @@ -[% PROCESS "opac/parts/header.tt2"; - PROCESS "opac/parts/misc_util.tt2"; - WRAPPER "opac/parts/myopac/main_base.tt2"; - myopac_page = "main"; - myopac_main_page = "payments"; +[% + WRAPPER "opac/parts/base.tt2"; + limit = ctx.payment_history_limit; offset = ctx.payment_history_offset; %] -
+
+
+ + + + +
+
+ +
[% l('Payments History') %]