From 7bcc226facc17eca9bc94cbab9535b2677462446 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 11 May 2017 16:45:42 +0000 Subject: [PATCH] Bug 18582 - Hide empty rows in detailed suggestion view This patch adds a check for the existence of various template variables before showing the row containing that data. This will prevent the display of rows containing labels but no data in the suggestions detailed view. To test, apply the patch and go to Acquisitions -> Suggestions. View the detail page of various suggestions and confirm that only fields with data are displaying. Signed-off-by: Josef Moravec Signed-off-by: Brendan A Gallagher Signed-off-by: Jonathan Druart --- .../prog/en/modules/suggestion/suggestion.tt | 65 +++++++++++++++---- 1 file changed, 54 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt index 62335e8edd..85b0821d20 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -210,16 +210,54 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o
Bibliographic information
    -
  1. Title:[% title |html %]
  2. -
  3. Author:[% author |html %]
  4. -
  5. Copyright date:[% copyrightdate |html %]
  6. -
  7. ISBN or ISSN or other standard number:[% isbn |html %]
  8. -
  9. Publisher:[% publishercode |html %]
  10. -
  11. Publication place:[% place |html %]
  12. -
  13. Collection title:[% collectiontitle |html %]
  14. -
  15. Document type: - [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', itemtype, 0 ) %] -
  16. + [% IF ( title ) %] +
  17. + Title: + [% title |html %] +
  18. + [% END %] + [% IF ( author ) %] +
  19. + Author: + [% author |html %] +
  20. + [% END %] + [% IF ( copyrightdate ) %] +
  21. + Copyright date: + [% copyrightdate |html %] +
  22. + [% END %] + [% IF ( isbn ) %] +
  23. + ISBN or ISSN or other standard number: + [% isbn |html %] +
  24. + [% END %] + [% IF ( publishercode ) %] +
  25. + Publisher: + [% publishercode |html %] +
  26. + [% END %] + [% IF ( place ) %] +
  27. + Publication place: + [% place |html %] +
  28. + [% END %] + [% IF ( collectiontitle ) %] +
  29. + Collection title: + [% collectiontitle |html %] +
  30. + [% END %] + [% IF ( itemtype ) %] +
  31. + Document type: + [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', itemtype, 0 ) %] +
  32. + [% END %] [% IF ( patron_reason_loop ) %]
  33. Reason for suggestion: [% FOREACH patron_reason_loo IN patron_reason_loop %] @@ -227,7 +265,12 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o [% END %]
  34. [% END %] -
  35. Notes:[% note |html %]
  36. + [% IF ( note ) %] +
  37. + Notes: + [% note |html %] +
  38. + [% END %]
Suggestion management -- 2.39.5