[open-ils-commits] [GIT] Evergreen ILS branch master updated. 29a1f4178f83fe57942d07afd33d62b2a8268c21

Evergreen Git git at git.evergreen-ils.org
Wed Mar 28 15:27:00 EDT 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  29a1f4178f83fe57942d07afd33d62b2a8268c21 (commit)
      from  d4751e023dd75c0aa4e945a4866aff8393cb81f8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 29a1f4178f83fe57942d07afd33d62b2a8268c21
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue Mar 27 22:33:31 2012 -0400

    TPAC: Suppress copy counts for libraries that own zero copies
    
    Rather than slavishly showing the copy counts for libraries even when
    the library has no copies to show, avoid wasting the precious display
    space and suppress the output.
    
    This was a problem for both search scope libraries and preferred library
    in the search results, and for just preferred library in record details.
    This commit makes the behaviour consistent, in favour of suppressing the
    display of copy counts when there's nothing to display.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>
    Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>

diff --git a/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2 b/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2
index 47f8f44..a573161 100644
--- a/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2
@@ -27,6 +27,7 @@
         ou_id = attrs.plib_copy_counts.$depth.org_unit;
         UNLESS depth < 0 || displayed_ous.exists(ou_name);
     %]
+    [%- IF attrs.plib_copy_counts.$depth.count > 0; %]
     <li class="preferred">[%
         l('[_1] of [quant,_2,copy,copies] available at [_3].',
             attrs.plib_copy_counts.$depth.available,
@@ -37,5 +38,6 @@
        l('(Show preferred library)');
     %]</a></li>
     [%- END %]
+    [%- END %]
     </ul>
 </span>
diff --git a/Open-ILS/src/templates/opac/parts/result/copy_counts.tt2 b/Open-ILS/src/templates/opac/parts/result/copy_counts.tt2
index 943066e..d95d3a7 100644
--- a/Open-ILS/src/templates/opac/parts/result/copy_counts.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/copy_counts.tt2
@@ -4,6 +4,7 @@
     WHILE depth < depths;
         ou_name = ctx.get_aou(attrs.copy_counts.$depth.org_unit).name;
         displayed_ous.$ou_name = 1;
+        IF attrs.copy_counts.$depth.count > 0;
 %]
 <div class="result_count">
     [% l('[_1] of [quant,_2,copy,copies] available at [_3].',
@@ -12,7 +13,8 @@
         ou_name) | html
     %]
 </div>
-[%- depth = depth + 1;
+[%-     END;
+    depth = depth + 1;
     END;
 
     depth = attrs.plib_copy_counts.size - 1;
@@ -20,6 +22,7 @@
     UNLESS displayed_ous.exists(ou_name);
     
 %]
+[%- IF attrs.plib_copy_counts.$depth.count > 0; %]
 <div class="result_count preferred">[%
      l('[_1] of [quant,_2,copy,copies] available at [_3].',
         attrs.plib_copy_counts.$depth.available,
@@ -28,3 +31,4 @@
     %]<span> [% l('(Preferred)') %]</span>
 </div>
 [%- END %]
+[%- END %]

-----------------------------------------------------------------------

Summary of changes:
 .../templates/opac/parts/record/copy_counts.tt2    |    2 ++
 .../templates/opac/parts/result/copy_counts.tt2    |    6 +++++-
 2 files changed, 7 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list