From 3f561bd2bef2ddd4041b262bc346a57002bb6180 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 21 May 2024 16:36:54 +0000 Subject: [PATCH] Bug 36911: Reindent circ-menu.inc This patch reindents the circ-menu include file so that it has consistent indentation. These changes should have no visible effect on the page. To test, apply the patch and enable the 'CircSidebar' system preference if necessary. - View any circulation page, including the checkout page, to confirm that the left-hand sidebar menu is unchanged. - Test with the 'patronimages' system preference both on and off. Viewing the diff while ignoring whitespace changes should show only places where a line break was added. Signed-off-by: David Nind Signed-off-by: Katrin Fischer (cherry picked from commit 002fbdcc62c83a13ececb1e5e3c53b742f947b8b) Signed-off-by: Lucas Gass --- .../prog/en/includes/circ-menu.inc | 587 ++++++++++-------- 1 file changed, 320 insertions(+), 267 deletions(-) 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 b54aa71d6e..8753170959 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -2,301 +2,354 @@ [% USE KohaDates %] [% PROCESS 'member-display-address-style.inc' %] [% IF ( patron.borrowernumber ) %] -[% SET patron_is_staff = patron.has_permission({ 'catalogue' => 1 }) %] -[% SET patron_is_superlibrarian = patron.is_superlibrarian %] -[% SET patron_type_class = 'is-not-staff' %] -[% IF ( patron_is_superlibrarian ) %] - [% patron_type_class = 'is-staff is-superlibrarian' %] -[% ELSIF ( patron_is_staff ) %] - [% patron_type_class = 'is-staff' %] -[% END %] -
+ [% SET patron_is_staff = patron.has_permission({ 'catalogue' => 1 }) %] + [% SET patron_is_superlibrarian = patron.is_superlibrarian %] + [% SET patron_type_class = 'is-not-staff' %] + [% IF ( patron_is_superlibrarian ) %] + [% patron_type_class = 'is-staff is-superlibrarian' %] + [% ELSIF ( patron_is_staff ) %] + [% patron_type_class = 'is-staff' %] + [% END %] -[% IF ( patronimages ) %] -
-[% ELSE %] -
-[% END %] - [% IF ( patron_is_staff ) %] - +
+ [% IF ( patronimages ) %] +
+ [% ELSE %] +
[% END %] - [% IF ( patron_is_superlibrarian ) %] - + [% IF ( patron_is_staff ) %] + + [% END %] + [% IF ( patron_is_superlibrarian ) %] + + [% END %] + [% IF ( patron.protected ) %] + + [% END %] + [% INCLUDE 'patron-title.inc' %] +
+ + [% IF Koha.Preference('showLastPatron') %] + + + [% END %] - [% IF ( patron.protected ) %] - + + [% IF ( patronimages ) %] +
+
+ [% IF ( patron.image ) %] + [% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %]) + [% IF ( CAN_user_tools_batch_upload_patron_images ) %] +
+
+ Edit +
+
+ [% END %] + [% ELSE %] +
+ [% IF ( CAN_user_tools_batch_upload_patron_images ) %] +
+
+ Add +
+
+ [% END %] + [% END %] +
+
[% END %] - [% INCLUDE 'patron-title.inc' %] -
-[% IF Koha.Preference('showLastPatron') %] - - - -[% END %] -[% IF ( patronimages ) %] -
-
- [% IF ( patron.image ) %] - [% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %]) - [% IF ( CAN_user_tools_batch_upload_patron_images ) %] -
- -
- [% END %] - [% ELSE %] -
- [% IF ( CAN_user_tools_batch_upload_patron_images ) %] -
- -
- [% END %] +
    + [% IF patron.pronouns %] +
  • ([% patron.pronouns | html %])
  • [% END %] -
-
-[% END %] -
    - - [% IF patron.pronouns %] -
  • ([% patron.pronouns | html %])
  • - [% END %] + [% IF !(Koha.Preference('HidePersonalPatronDetailOnCirculation')) %] - [% IF !(Koha.Preference('HidePersonalPatronDetailOnCirculation')) %] + [% PROCESS 'display-address-style' %] - [% PROCESS 'display-address-style' %] + [% IF ( patron.phone || patron.mobile || patron.phonepro ) %] +
  • + [% IF ( patron.phone ) %] + [% patron.phone | html %] + [% ELSE %] + [% IF ( patron.mobile ) %] + [% patron.mobile | html %] + [% ELSE %] + [% IF ( patron.phonepro ) %] + [% patron.phonepro | html %] + [% END %] + [% END %] + [% END %] +
  • + [% END %] + [% IF ( patron.email ) %] + + [% ELSE %] + [% IF ( patron.emailpro ) %] + + [% END %] + [% END %] + [% IF ( patron.dateofbirth ) %] +
  • + Born: + [% INCLUDE 'patron-age.inc' %] +
  • + [% END %] - [% IF ( patron.phone || patron.mobile || patron.phonepro ) %]
  • - [% IF ( patron.phone ) %] - [% patron.phone | html %] - [% ELSE %] - [% IF ( patron.mobile ) %] - [% patron.mobile | html %] - [% ELSE %] - [% IF ( patron.phonepro ) %] - [% patron.phonepro | html %] + [% UNLESS ( patron.address or patron.address2 ) %] +
  • No address stored.
  • [% END %] + [% UNLESS ( patron.city ) %] +
  • No city stored.
  • + [% END %] + [% UNLESS ( patron.phone or patron.mobile or patron.phonepro) %] +
  • No phone stored.
  • + [% END %] + [% UNLESS ( patron.email or patron.emailpro) %] +
  • No email stored.
  • + [% END %] + [% UNLESS ( patron.dateofbirth ) %] +
  • No date of birth stored.
  • + [% END %] + [% END %] - [% END %][% END %] - [% IF ( patron.email ) %] - - [% ELSE %] - [% IF ( patron.emailpro ) %] - - [% END %] - [% END %] - [% IF ( patron.dateofbirth ) %] -
  • - Born: - [% INCLUDE 'patron-age.inc' %] -
  • - [% END %] - [% UNLESS ( patron.address or patron.address2 ) %] -
  • No address stored.
  • - [% END %] - [% UNLESS ( patron.city ) %] -
  • No city stored.
  • - [% END %] - [% UNLESS ( patron.phone or patron.mobile or patron.phonepro) %] -
  • No phone stored.
  • - [% END %] - [% UNLESS ( patron.email or patron.emailpro) %] -
  • No email stored.
  • - [% END %] - [% UNLESS ( patron.dateofbirth ) %] -
  • No date of birth stored.
  • - [% END %] + [% IF Koha.Preference('ExtendedPatronAttributes') %] + [% FOREACH extendedattribute IN patron.extended_attributes %] + [% IF ( extendedattribute.type.display_checkout ) %] [%# FIXME We should filter in the line above %] + [% IF ( extendedattribute.attribute.defined ) %] +
  • + [% extendedattribute.type.description | html %]: + [% IF extendedattribute.type.is_date %] + [% extendedattribute.description | $KohaDates %] + [% ELSE %] + [% extendedattribute.description | html %] + [% END %] +
  • + [% END %] + [% END %] + [% END %] + [% END %] - [% END %] +
  • + Category: [% patron.category.description | html %] ([% patron.categorycode | html %]) +
  • +
  • Home library: [% Branches.GetName( patron.branchcode ) | html %]
  • +
  • Borrowernumber: [% patron.borrowernumber | html %]
  • +
  • Updated on [% patron.updated_on | $KohaDates with_hours => 1 %]
  • + [% IF patron.account_locked %] + [% IF patron.login_attempts < 0 %] + + [% ELSE %] + + [% END %] + [% END %] +
+
- [% IF Koha.Preference('ExtendedPatronAttributes') %] - [% FOREACH extendedattribute IN patron.extended_attributes %] - [% IF ( extendedattribute.type.display_checkout ) %] [%# FIXME We should filter in the line above %] - [% IF ( extendedattribute.attribute.defined ) %] -
  • - [% extendedattribute.type.description | html %]: - [% IF extendedattribute.type.is_date %] - [% extendedattribute.description | $KohaDates %] - [% ELSE %] - [% extendedattribute.description | html %] - [% END %] + - + [% IF CAN_user_suggestions_suggestions_manage %] + [% IF ( suggestionsview ) %]
  • [% ELSE %]
  • [% END %] + Purchase suggestions +
  • + [% END %] + [% IF CAN_user_borrowers_edit_borrowers && useDischarge %] + [% IF dischargeview %]
  • [% ELSE %]
  • [% END %] + Discharges +
  • + [% END %] + [% IF Koha.Preference('HouseboundModule') %] + [% IF houseboundview %]
  • [% ELSE %]
  • [% END %] + Housebound +
  • + [% END %] + [% IF Koha.Preference('ILLModule') && CAN_user_ill %] + [% IF illview %]
  • [% ELSE %]
  • [% END %] + ILL requests history +
  • + [% END %] + [% IF Koha.Preference('UseRecalls') && CAN_user_recalls %] + [% IF recallsview %]
  • [% ELSE %]
  • [% END %] + Recalls history +
  • + [% END %] + [% IF ( CAN_user_serials && patron.alert_subscriptions.count ) %] + [% IF alertsview %]
  • [% ELSE %]
  • [% END %] + Alert subscriptions ([% patron.alert_subscriptions.count | html %]) +
  • + [% END %] + + -[% IF patronimages && CAN_user_tools_batch_upload_patron_images %] - -