From 3968d9b23784fb816447d90ea53145c12e982e13 Mon Sep 17 00:00:00 2001 From: Art Rhyno Date: Tue, 2 Oct 2012 00:41:21 -0400 Subject: [PATCH] Option to hide holds from appearing at all This may be a stretch for most sites but this suppresses the holds link. --- .../src/templates_windsor/opac/parts/config.tt2 | 21 +++ .../opac/parts/record/summary.tt2 | 164 +++++++++++++++++++++ 2 files changed, 185 insertions(+) create mode 100644 Open-ILS/src/templates_windsor/opac/parts/record/summary.tt2 diff --git a/Open-ILS/src/templates_windsor/opac/parts/config.tt2 b/Open-ILS/src/templates_windsor/opac/parts/config.tt2 index 9a4143de8e..799a175e11 100644 --- a/Open-ILS/src/templates_windsor/opac/parts/config.tt2 +++ b/Open-ILS/src/templates_windsor/opac/parts/config.tt2 @@ -6,6 +6,12 @@ ############################################################################## ############################################################################## +# Holds hiding +############################################################################## +# Hide the ability to place holds at all +ctx.holds_hide.enabled = 'true'; + +############################################################################## # Holds blocking ############################################################################## # Block the ability to place holds if item is available @@ -130,4 +136,19 @@ search.adv_config = [ search.default_qtypes = ['keyword','title','author']; +############################################################################## +# Basic Search Box definition +# This allows selection of what, exactly, basic search uses for a selection +# box. Previously it was hardcoded to use an attr box of mattype or item_type. +# +# type can be "attr" or "filter" +# group is the attr or filter entries you want to check for +# none_label is the label for the default nothing selected entry. + +search.basic_config = { + type => 'attr', + group => ['item_form'], + none_label => l("All Formats"), +}; + %] diff --git a/Open-ILS/src/templates_windsor/opac/parts/record/summary.tt2 b/Open-ILS/src/templates_windsor/opac/parts/record/summary.tt2 new file mode 100644 index 0000000000..5fb1dd54d6 --- /dev/null +++ b/Open-ILS/src/templates_windsor/opac/parts/record/summary.tt2 @@ -0,0 +1,164 @@ +[% PROCESS "opac/parts/misc_util.tt2"; + USE ResolverResolver; + ctx.page_title = attrs.title | html +%] + + + +
+ +[%-# This holds the record summary information %] +
+
+ [% ident = attrs.isbn_clean || attrs.upc; IF ident; %] + [% l('Image of item') %] + [% END %] +
+
+ +
+ [%- search_ou = ctx.search_ou; IF (attrs.org_copy_counts.$search_ou.available == 0 AND ctx.holds_hide.enabled=='false') OR ctx.holds_block.enabled == 'false' %] + + [%- END %] +
+ [%- + operation = ctx.mylist.grep(ctx.bre_id).size ? "delete" : "add"; + label = (operation == "add") ? l("Add to my list") : l("Remove from my list"); + %] + + + [% label %] + +
+ + [%- IF ctx.refworks.enabled == 'true' %] + [%- INCLUDE 'opac/parts/record/refworks.tt2' %] + [%- END %] +
+
+ [%- IF attrs.format_icon %] +
+ [% attrs.format_label %] +
+ [%- END %] +

[% attrs.title_extended | html %]

+ [%- INCLUDE "opac/parts/record/authors.tt2" %] +
+
+ +[%- IF openurl.enabled == 'true'; + openurls = []; + FOREACH issn IN args.issns; + NEXT IF issn == ''; + openurls = openurls.import(ResolverResolver.resolve_issn(issn, openurl.baseurl)); + END; + IF openurls.size && openurls.0 != ''; +%] +
+ [% l("Electronic resources") %] + +[%- + FOREACH res IN openurls; +%] + + + + + [%- END %] +
[% res.public_name %][% res.target_coverage %]
+[%- END %] +
+[%- END %] +[%- merged_uris = args.uris.merge(args.online_res); +num_uris = merged_uris.size; +IF num_uris > 0; +-%] +

[% l("Electronic resources") %]

+
+ [%- IF num_uris > 1 %][% END %] +
+[%- END %] +[%- IF ctx.mfhd_summaries.size; %] +

[% l('Issues held') %]

+[% INCLUDE "opac/parts/record/issues-mfhd.tt2" %] +[%- END; %] +[%- # Hold/copy summary + IF ctx.copy_summary.0.count +%] +
+[%- INCLUDE "opac/parts/record/copy_counts.tt2" %] + +

[% l('Current holds') %]

+

+ [%- l("[quant,_1,current hold,current holds] with [quant,_2,total copy,total copies].", + ctx.record_hold_count, ctx.copy_summary.0.count) %] +

+
+[%- INCLUDE "opac/parts/record/copy_table.tt2" copies=ctx.copies %] +
+[%- END %] + +

[% l("Record details") %]

+ + +[%- INCLUDE "opac/parts/record/subjects.tt2" %] +[%- INCLUDE "opac/parts/record/series.tt2" %] +[%- INCLUDE "opac/parts/record/extras.tt2" %] -- 2.11.0