From 8a4cf54af524b4e0b0afa4ec586a8ada04e23827 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 7 Oct 2013 10:39:19 -0400 Subject: [PATCH] [SIGNED-OFF] Bug 10309 [Follow-up] Applying changes from Bug 10349 This patch applies the changes from Bug 10349, Don't show empty Descriptions/Title notes tabs in OPAC and staff. "The descriptions/title notes tab appears on the detail page in both staff client and OPAC even if there are no notes. This is probably a relic of the pre-T:T days when it wasn't possible to use || in an IF. This patch adds a check for the various variables which might trigger the display of the tab. To test, apply the patch and view records in the OPAC and staff client which do and do not have title notes attached (whether that be in the MARC record or in the biblio.notes column). In the OPAC Syndetics content should also be tested if possible. The descriptions/title notes tab should only appear if there is content." Signed-off-by: Bernardo Gonzalez Kriegel Works well. No errors Tested on OPAC, records without notes don't show title notes tab. --- .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 42 +++++++++++--------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index af896ae..5e03941 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -522,7 +522,9 @@ [% IF (SeparateHoldings) %]
  • Other holdings ( [% otheritemloop.size || 0 %] )
  • [% END %] -
  • Title notes
  • + [% IF ( MARCNOTES || notes || ( SyndeticsEnabled && SyndeticsSummary && SYNDETICS_SUMMARY )) %] +
  • Title notes
  • + [% END %] [% IF ( SYNDETICS_TOC ) %]
  • TOC
  • [% END %] @@ -661,28 +663,30 @@ [% END # / SeparateHoldings %] -
    -
    - - [% IF ( SyndeticsEnabled && SyndeticsSummary && SYNDETICS_SUMMARY ) %] -

    Enhanced descriptions from Syndetics:

    -

    [% SYNDETICS_SUMMARY %]

    - [% END %] + [% IF ( MARCNOTES || notes || ( SyndeticsEnabled && SyndeticsSummary && SYNDETICS_SUMMARY )) %] +
    +
    - [% IF ( MARCNOTES ) %] -
    - [% FOREACH MARCNOTE IN MARCNOTES %] -

    [% MARCNOTE.marcnote FILTER html_line_break %]

    + [% IF ( SyndeticsEnabled && SyndeticsSummary && SYNDETICS_SUMMARY ) %] +

    Enhanced descriptions from Syndetics:

    +

    [% SYNDETICS_SUMMARY %]

    [% END %] -
    - [% ELSE %] - [% IF ( notes ) %] -

    [% notes %]

    + + [% IF ( MARCNOTES ) %] +
    + [% FOREACH MARCNOTE IN MARCNOTES %] +

    [% MARCNOTE.marcnote FILTER html_line_break %]

    + [% END %] +
    + [% ELSE %] + [% IF ( notes ) %] +

    [% notes %]

    + [% END %] [% END %] - [% END %] -
    -
    +
    +
    + [% END # / IF MARCNOTES || notes %] [% IF ( SyndeticsEnabled ) %] [% IF ( SyndeticsTOC && SYNDETICS_TOC ) %] -- 1.7.9.5