From: Bill Erickson Date: Thu, 4 Aug 2011 19:41:32 +0000 (-0400) Subject: Merge remote branch 'esi/template-toolkit-opac' into template-toolkit-opac-master... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8119e5df48807336b4ffe0fe6520973dda5e1301;p=contrib%2FConifer.git Merge remote branch 'esi/template-toolkit-opac' into template-toolkit-opac-master-merge --- 8119e5df48807336b4ffe0fe6520973dda5e1301 diff --cc Open-ILS/src/templates/default/opac/myopac/holds/edit.tt2 index 53e12c9b7b,0000000000..2fda76c044 mode 100644,000000..100644 --- a/Open-ILS/src/templates/default/opac/myopac/holds/edit.tt2 +++ b/Open-ILS/src/templates/default/opac/myopac/holds/edit.tt2 @@@ -1,117 -1,0 +1,111 @@@ +[% PROCESS "default/opac/parts/header.tt2"; + PROCESS "default/opac/parts/misc_util.tt2"; + PROCESS "default/opac/parts/org_selector.tt2"; + WRAPPER "default/opac/parts/base.tt2" + + "default/opac/parts/myopac/base.tt2"; + myopac_page = "holds"; # in this case, just for tab coloring. + - hold = 0; - FOR h IN ctx.holds; - IF h.hold.hold.id == CGI.param('id'); - hold = h; - ahr = hold.hold.hold; - attrs = {marc_xml => hold.marc_xml}; - PROCESS get_marc_attrs args=attrs; - hold.human_status = PROCESS get_hold_status hold=hold; ++ hold = ctx.holds.0; ++ ahr = hold.hold.hold; ++ attrs = {marc_xml => hold.marc_xml}; ++ PROCESS get_marc_attrs args=attrs; ++ hold.human_status = PROCESS get_hold_status hold=hold; + - # Do this up front to avoid verbosity later - expire_time = ahr.expire_time ? date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT) : ''; - thaw_date = ahr.thaw_date ? date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT) : ''; - LAST; - END; - END; ++ # Do this up front to avoid verbosity later ++ expire_time = ahr.expire_time ? date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT) : ''; ++ thaw_date = ahr.thaw_date ? date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT) : ''; +%] +
+
+ [% l('Editing Hold') %] +         + [% l('List all holds') %] +
+
+ [% IF hold %] +

[% attrs.title %]

+

[% attrs.author %]

+ [% IF attrs.format_icon %]

+ [% l('Format:') %] + [% attrs.format %] +

[% END %] +

+ [% l('Status') %]: [% hold.human_status %] +

+
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + [% l('Pickup library') %] + + [% PROCESS build_org_selector + name='pickup_lib' value=ahr.pickup_lib %] +
+ [% l('Cancel unless filled by') %] + + + + [% l('Enter date in MM/DD/YYYY format') %] + +
+ [% l('Active?') %] + + +
+ [% l('If suspended, activate on') %] + + + + [% l('Enter date in MM/DD/YYYY format') %] +
+ + [% l('Cancel') %] +
+
+ [% ELSE; + l('Hold not found'); + END %] +
+
+[% END %] diff --cc Open-ILS/src/templates/default/opac/parts/filtersort.tt2 index 795b179d30,0000000000..428626ce99 mode 100644,000000..100644 --- a/Open-ILS/src/templates/default/opac/parts/filtersort.tt2 +++ b/Open-ILS/src/templates/default/opac/parts/filtersort.tt2 @@@ -1,15 -1,0 +1,15 @@@ + diff --cc Open-ILS/src/templates/default/opac/parts/org_selector.tt2 index 3a203f69d4,0000000000..52500f0518 mode 100644,000000..100644 --- a/Open-ILS/src/templates/default/opac/parts/org_selector.tt2 +++ b/Open-ILS/src/templates/default/opac/parts/org_selector.tt2 @@@ -1,33 -1,0 +1,31 @@@ +[% + BLOCK build_org_selector_options; + disabled = ''; + selected = ''; - IF can_have_vols_only; - IF walker.ou_type.can_have_vols != 't'; - disabled = 'disabled="disabled"'; - ELSIF walker.id == value; - selected = 'selected="selected"'; - END; ++ IF can_have_vols_only AND walker.ou_type.can_have_vols != 't'; ++ disabled = 'disabled="disabled"'; ++ ELSIF walker.id == value; ++ selected = 'selected="selected"'; + END; +%] + + [% FOR child IN walker.children; + PROCESS build_org_selector_options walker=child value=value; + END; + END; + + # XXX TODO probably put this BLOCK somewhere else so it can be used widely. + # Org Unit Selector Widget : + # PROCESS build_org_selector id='selector-id' name='selector-name' + BLOCK build_org_selector; +%] + +[% END %]