From d4b75dd7d051128d2d4fb1cf7f9f5b37d6ebe3b7 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 14 Jul 2014 14:29:20 -0400 Subject: [PATCH] [SIGNED OFF] Bug 12542: Tabs inconsistency in different circ-menu.inc uses Differences between circ-menu.tt and circ-menu.inc always crop up when a new menu item is added--usually only to circ-menu.inc as happened with Bug 9261. Other sidebar differences are present due to differences in the patron data passed by various patron-related script to their templates. This patch also irons out some of these inconsistencies. To test, apply the patch and check out to a patron whose record has more than just basic data: othername, country, patron attributes, street number, road types, etc. View the following pages and compare the patron data and visible tabs to confirm that they match: circ/circulation.pl?borrowernumber=X members/boraccount.pl?borrowernumber=X members/files.pl?borrowernumber=X members/mancredit.pl?borrowernumber=X members/maninvoice.pl?borrowernumber=X members/member-flags.pl?member=X members/member-password.pl?member=X members/moremember.pl?borrowernumber=X members/notices.pl?borrowernumber=X members/pay.pl?borrowernumber=X members/paycollect.pl?borrowernumber=X members/purchase-suggestions.pl?borrowernumber=X members/readingrec.pl?borrowernumber=X members/routing-lists.pl?borrowernumber=X members/statistics.pl?borrowernumber=X tools/viewlog.pl?do_it=1&modules=MEMBERS&modules=circulation&src=circ&object=X The only difference I've found which is not fixed by this patch is the display of extended patron attributes in the sidebar of moremember.pl. This is a piecemeal fix for a problem which really deserves a centralized solution, but at least it gets us back to consistency for the moment. Signed-off-by: Tomas Cohen Arazi Going through all tabs shows consistency is back. A mid term solution should implement this in a centralized way. Great job Owen! No koha-qa errors btw. --- circ/circulation.pl | 4 +++- .../intranet-tmpl/prog/en/includes/circ-menu.inc | 4 ++-- .../intranet-tmpl/prog/en/includes/circ-menu.tt | 5 +++-- .../prog/en/modules/members/mancredit.tt | 2 +- .../prog/en/modules/members/maninvoice.tt | 2 +- .../prog/en/modules/members/moremember.tt | 3 +-- members/boraccount.pl | 9 ++++++++- members/files.pl | 7 ++++++- members/mancredit.pl | 12 ++++++++++-- members/maninvoice.pl | 11 ++++++++++- members/member-flags.pl | 10 +++++++++- members/member-password.pl | 9 ++++++++- members/moremember.pl | 4 ++++ members/notices.pl | 5 +++++ members/pay.pl | 4 ++++ members/paycollect.pl | 12 ++++++++++++ members/purchase-suggestions.pl | 15 +++++++++++++++ members/readingrec.pl | 10 +++++++++- members/routing-lists.pl | 17 ++++++++++++++++- members/statistics.pl | 5 +++++ tools/viewlog.pl | 20 ++++++++++++++++++-- 21 files changed, 150 insertions(+), 20 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 81737ee..4c0010c 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -534,7 +534,9 @@ $template->param( state => $borrower->{'state'}, zipcode => $borrower->{'zipcode'}, country => $borrower->{'country'}, - phone => $borrower->{'phone'} || $borrower->{'mobile'}, + phone => $borrower->{'phone'}, + mobile => $borrower->{'mobile'}, + phonepro => $borrower->{'phonepro'}, cardnumber => $borrower->{'cardnumber'}, othernames => $borrower->{'othernames'}, amountold => $amountold, diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc index 7505d06..2fe0a68 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -20,7 +20,7 @@
  • [% address2 %]
  • [% END %] [% ELSE %] -
  • No address stored.
  • +
  • No address stored.
  • [% END %]
  • [% IF ( city ) %] [% city %][% IF ( state ) %], [% state %][% END %] @@ -83,7 +83,7 @@ [% IF EnableBorrowerFiles %] [% IF ( borrower_files ) %]
  • [% ELSE %]
  • [% END %]Files
  • [% END %] - [% IF ( suggestionsview ) %]
  • [% ELSE %]
  • [% END %]Purchase
    suggestions
  • + [% IF ( suggestionsview ) %]
  • [% ELSE %]
  • [% END %]Purchase suggestions
  • [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt index e98f846..aead23b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt @@ -1,7 +1,7 @@ [%# duplicates circ-menu.inc but assumes all borrower attributes are in a borrower variable rather than in the global namespace %] [% IF borrower %] -
    [% borrower.firstname %] [% borrower.surname %] ([% borrower.cardnumber %])
    +
    [% borrower.firstname %] [% IF borrower.othernames %] ([% borrower.othernames %]) [% END %] [% borrower.surname %] ([% borrower.cardnumber %])