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

Evergreen Git git at git.evergreen-ils.org
Thu Feb 28 13:38:54 EST 2013


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  a189fca3210ec334979aea601758594118bea887 (commit)
      from  f1c1d0b0de3b170cc1cc6ec0b2b1800c9e01177c (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 a189fca3210ec334979aea601758594118bea887
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Wed Jan 16 15:05:17 2013 -0500

    TPAC: Don't display serial headers without content
    
    Currently, the TPAC serial display code will print a section
    header, then see if there is any content to show.  This causes
    headers to show up when they are unnecessary or unwanted.
    
    Now, we only show the header if we have content needing heading.
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/parts/record/issues-mfhd.tt2 b/Open-ILS/src/templates/opac/parts/record/issues-mfhd.tt2
index 15b9ab9..ced0ec6 100644
--- a/Open-ILS/src/templates/opac/parts/record/issues-mfhd.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/issues-mfhd.tt2
@@ -15,26 +15,29 @@
         };
 
         FOREACH serial IN ctx.mfhd_summaries;
-%]
-            <tr>
-                <td class="rdetail-mfhd-head" colspan="2">[% l('Holdings summary ([_1])', serial.location) %]</td>
-            </tr>
-[%
+            printed_mfhd_header = 0;
             FOREACH type IN mfhd.keys;
                 NEXT UNLESS serial.$type.size;
-%]
-            <tr>
-                <td class="rdetail-mfhd-type">[% mfhd.$type %]</td>
-                <td class="rdetail-mfhd-contents">[%
-                    FOR thing IN serial.$type;
-                        thing.join(", ");
-                    END %]</td>
-            </tr>
+                IF !printed_mfhd_header; %]
+                <tr>
+                    <td class="rdetail-mfhd-head" colspan="2">[% l('Holdings summary ([_1])', serial.location) %]</td>
+                </tr>
+                [% printed_mfhd_header = 1;
+                END; %]
+                <tr>
+                    <td class="rdetail-mfhd-type">[% mfhd.$type %]</td>
+                    <td class="rdetail-mfhd-contents">[%
+                        FOR thing IN serial.$type;
+                            thing.join(", ");
+                        END %]</td>
+                </tr>
+            [% END;
+            IF printed_mfhd_header; %]
+                <tr>
+                    <td class="rdetail-mfhd-foot" colspan="2"> </td>
+                </tr>
+            [% END; %]
         [% END %]
-            <tr>
-                <td class="rdetail-mfhd-foot" colspan="2"> </td>
-            </tr>
-    [% END %]
         </tbody></table>
     </div>
 [% END %]

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

Summary of changes:
 .../templates/opac/parts/record/issues-mfhd.tt2    |   37 +++++++++++---------
 1 files changed, 20 insertions(+), 17 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list