From 34900f4472145967b4f42f1f9971f0fc33403291 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Wed, 21 Dec 2011 12:58:46 -0500 Subject: [PATCH] TPAC: Split result copy counts into a separate template As Thomas Berezansky suggests, sites are likely to want to customize the display of copy counts depending on whether they're consortial sharers, how deep they want to display, whether they want to just show the matching search scope... make it easy to customize by moving the copy counts portion of the results table into a separate template. Signed-off-by: Dan Scott Signed-off-by: Thomas Berezansky --- Open-ILS/src/templates/opac/parts/result/copy_counts.tt2 | 12 ++++++++++++ Open-ILS/src/templates/opac/parts/result/table.tt2 | 13 +------------ 2 files changed, 13 insertions(+), 12 deletions(-) create mode 100644 Open-ILS/src/templates/opac/parts/result/copy_counts.tt2 diff --git a/Open-ILS/src/templates/opac/parts/result/copy_counts.tt2 b/Open-ILS/src/templates/opac/parts/result/copy_counts.tt2 new file mode 100644 index 0000000000..97d5b3205d --- /dev/null +++ b/Open-ILS/src/templates/opac/parts/result/copy_counts.tt2 @@ -0,0 +1,12 @@ +[%- depths = attrs.copy_counts.size; + depth = 0; + WHILE depth < depths; +%] +
+ [% l('[_1] of [quant,_2,copy,copies] available at [_3].', + attrs.copy_counts.$depth.available, + attrs.copy_counts.$depth.count, + ctx.get_aou(attrs.copy_counts.$depth.org_unit).name) | html + %] +
+[%- depth = depth + 1; END %] diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2 index 4ac7929af1..1ae2b17cc4 100644 --- a/Open-ILS/src/templates/opac/parts/result/table.tt2 +++ b/Open-ILS/src/templates/opac/parts/result/table.tt2 @@ -159,18 +159,7 @@ [% END %] [% END %] - [%- depths = attrs.copy_counts.size; - depth = 0; - WHILE depth < depths; - %] -
- [% l('[_1] of [quant,_2,copy,copies] available at [_3].', - attrs.copy_counts.$depth.available, - attrs.copy_counts.$depth.count, - ctx.get_aou(attrs.copy_counts.$depth.org_unit).name) | html - %] -
- [%- depth = depth + 1; END %] + [% PROCESS "opac/parts/result/copy_counts.tt2" %] -- 2.11.0