[open-ils-commits] [GIT] Evergreen ILS branch rel_2_2 updated. d259cf6448d52a6c05744b3aeae8729b4dfbf788

Evergreen Git git at git.evergreen-ils.org
Thu Feb 28 13:39:05 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, rel_2_2 has been updated
       via  d259cf6448d52a6c05744b3aeae8729b4dfbf788 (commit)
      from  7f00e5a3cd285d1c45dd56306eca5ef7c4d3148b (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 d259cf6448d52a6c05744b3aeae8729b4dfbf788
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