From: Dan Scott Date: Wed, 21 Dec 2011 17:58:46 +0000 (-0500) Subject: TPAC: Split result copy counts into a separate template X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=34900f4472145967b4f42f1f9971f0fc33403291;p=evergreen%2Fmasslnc.git 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 --- 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" %]