From 263196d194e06787b6c0d51ac603f0956d1fff6f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 9 May 2023 17:48:53 +0000 Subject: [PATCH] Bug 33528: Use template wrapper for tabs: Patron details page This patch updates the checkout and patron details templates so that they use the new WRAPPER directive to build tabbed navigation. The markup for the tab navigation and tab panels is moved into its own include file since the templates were duplicating essentially the same code. To fully test you should have patrons with checkouts, fines, holds, recalls, and article requests. Apply the patch and go to the checkout page in the staff interface. With each tab, test as much functionality as you can within that tab. - Checkouts - Holds - Recalls (with UseRecalls enabled) - Claims (with a LOST value defined in ClaimReturnedLostValue) - Restrictions - Article Requests (with ArticleRequests preference enabled) - Clubs (with at least one club defined) - Relatives' checkouts (patron must have a guarantee linked to their account). Perform the same tests on the patron details page. Note that the "Charges" tab is shown on the patron details page but not the checkout page. This is not a change made by this patch. Signed-off-by: Sam Lau Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/includes/checkouts-table.inc | 183 +++++++------- .../prog/en/includes/html_helpers.inc | 2 +- .../en/includes/patron-article-requests.inc | 2 - .../prog/en/includes/patron-detail-tabs.inc | 227 ++++++++++++++++++ .../en/includes/patron-restrictions-tab.inc | 143 ++++++----- .../prog/en/includes/patron-return-claims.inc | 48 ++-- .../prog/en/includes/patron_messages.inc | 2 +- .../en/includes/relatives-issues-table.inc | 46 ++-- .../prog/en/modules/circ/circulation.tt | 175 +------------- .../prog/en/modules/clubs/patron-clubs-tab.tt | 4 +- .../prog/en/modules/clubs/patron-enroll.tt | 4 +- .../prog/en/modules/members/moremember.tt | 227 +----------------- .../prog/js/pages/circulation.js | 9 +- 13 files changed, 452 insertions(+), 620 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc index 6c82f446d2..05c888f055 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc @@ -1,105 +1,104 @@ [% USE Koha %] [% PROCESS 'modal-claims.inc' %] [% INCLUDE 'format_price.inc' %] -
- [% IF ( issuecount ) %] -
-

- Show checkouts - [% SET LoadCheckoutsTableDelay = Koha.Preference('LoadCheckoutsTableDelay') %] - [% IF LoadCheckoutsTableDelay && page == 'circulation' %] - - - Checkouts table will show automatically in [% LoadCheckoutsTableDelay | html %] seconds... - - [% END %] -

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - [% INCLUDE 'checkouts-table-footer.inc' %] -
  Due dateDue dateTitleRecord-level item typeItem typeCollectionLocationHome library Checked out onChecked out fromCall numberCopy numberChargeFinePriceRenew

select all | none

Check in

select all | none

Return claimsExport

select all | none

- - +[% IF ( issuecount ) %] +
+

+ Show checkouts + [% SET LoadCheckoutsTableDelay = Koha.Preference('LoadCheckoutsTableDelay') %] + [% IF LoadCheckoutsTableDelay && page == 'circulation' %] + + + Checkouts table will show automatically in [% LoadCheckoutsTableDelay | html %] seconds... + + [% END %] +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + [% INCLUDE 'checkouts-table-footer.inc' %] +
  Due dateDue dateTitleRecord-level item typeItem typeCollectionLocationHome library Checked out onChecked out fromCall numberCopy numberChargeFinePriceRenew

select all | none

Check in

select all | none

Return claimsExport

select all | none

-
-
- [% IF ( CAN_user_circulate_override_renewals ) %] - [% IF Koha.Preference( 'AllowRenewalLimitOverride' ) || Koha.Preference( 'AllowRenewalOnHoldOverride' ) %] - - - [% END %] + + + +
+
+ [% IF ( CAN_user_circulate_override_renewals ) %] + [% IF Koha.Preference( 'AllowRenewalLimitOverride' ) || Koha.Preference( 'AllowRenewalOnHoldOverride' ) %] + + [% END %] - [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] - [% IF Koha.Preference( 'UnseenRenewals' ) %] - - - [% END %] - - + [% END %] + [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] + [% IF Koha.Preference( 'UnseenRenewals' ) %] + + [% END %] -
- - [% IF Koha.Preference('ExportCircHistory') %] -
- - + + + [% END %] +
+ [% IF Koha.Preference('ExportCircHistory') %] +
+ + - [% FOREACH csv_profile IN csv_profiles %] - - [% END %] - + [% END %] - - - - - - - -
- [% END %] -
- - [% ELSE %] -

Patron has nothing checked out.

- [% END %] -
+ + + [% IF csv_profiles.count %] + + [% END %] + + + + + + + + + [% END %] +
+ +[% ELSE %] +

Patron has nothing checked out.

+[% END %] [% PROCESS 'modal-claims-display' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc index 1b02377898..535cbca2c9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc @@ -393,7 +393,7 @@ [% ELSE %]
  • [% END %] - + [% content | $raw %]
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-article-requests.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-article-requests.inc index 8bbb614bbf..c9bd475954 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-article-requests.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-article-requests.inc @@ -1,6 +1,5 @@ [% USE Context %] [% SET current_article_requests = Context.Scalar( Context.Scalar( patron, 'article_requests' ), 'filter_by_current' ) %] -
    [% IF current_article_requests.count > 0 %] @@ -102,4 +101,3 @@ [% ELSE %] Patron has no current article requests. [% END %] - diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc new file mode 100644 index 0000000000..0d5c4c740a --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc @@ -0,0 +1,227 @@ + +[% USE raw %] +[% PROCESS 'html_helpers.inc' %] +[% WRAPPER tabs id= "finesholdsissues" %] + [% WRAPPER tabs_nav %] + [% WRAPPER tab_item tabname= "checkouts" bt_active= 1 %] + Checkouts ([% issuecount || 0 | html %]) + [% END %] + + [% IF relatives_issues_count %] + [% WRAPPER tab_item tabname= "relatives-issues" %] + Relatives' checkouts ([% relatives_issues_count | html %]) + [% END %] + [% END %] + + [% IF ( fines ) %] + [% WRAPPER tab_item tabname= "finesandcharges" %] + Charges ([% fines | $Price %]) + [% END %] + [% END %] + + [% IF ( guarantees_fines ) %] + [% WRAPPER tab_item tabname= "guarantees_finesandcharges" %] + Guarantees' charges ([% guarantees_fines | $Price %]) + [% END %] + [% END %] + + [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] + [% WRAPPER tab_item tabname= "holds" %] + Holds ([% holds_count || 0 | html %]) + [% END %] + [% END %] + + [% IF Koha.Preference('UseRecalls') %] + [% WRAPPER tab_item tabname= "recalls" %] + Recalls ([% recalls.count || 0 | html %]) + [% END %] + [% END %] + + [% IF Koha.Preference('ArticleRequests') %] + [% SET article_requests = Context.Scalar( Context.Scalar( patron, 'article_requests' ), 'filter_by_current') %] + [% WRAPPER tab_item tabname= "article-requests" %] + Article requests ([% article_requests.count || 0 | html %]) + [% END %] + [% END %] + + [% IF Koha.Preference('ClaimReturnedLostValue') || Koha.Preference('BundleLostValue') %] + [% WRAPPER tab_item tabname= "return-claims" %] + Claims + [% IF ( patron.return_claims.count ) %] + ([% IF patron.return_claims.resolved.count == 0 %] + [% patron.return_claims.resolved.count | html %] + [% ELSE %] + [% patron.return_claims.resolved.count | html %] + [% END %] + [% IF patron.return_claims.unresolved.count == 0 %] + [% patron.return_claims.unresolved.count | html %] + [% ELSE %] + [% patron.return_claims.unresolved.count | html %] + [% END %]) + [% ELSE %] + [% no_claims = 0 %] + ([% no_claims | html %] + [% no_claims | html %]) + [% END # /IF patron.return_claims.count %] + [% END # /WRAPPER tab_item return-claims %] + [% END %] + + [% WRAPPER tab_item tabname= "reldebarments" %] + Restrictions ([% patron.restrictions.count || 0 | html %]) + [% END %] + + [% SET enrollments = patron.get_club_enrollments %] + [% SET enrollable = patron.get_enrollable_clubs(0) %] + [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %] + [% WRAPPER tab_item tabname= "clubs" %] + Clubs ([% enrollments.count | html %]/[% enrollable.count | html %]) + [% END %] + [% END %] + [% END # /WRAPPER tabs_nav %] + + + [% WRAPPER tab_panels %] + [% WRAPPER tab_panel tabname="checkouts" bt_active= 1 %] + [% INCLUDE "checkouts-table.inc" %] + [% END # /tab_panel# %] + + [% WRAPPER tab_panel tabname="relatives-issues" %] + [% INCLUDE "relatives-issues-table.inc" %] + [% END # /tab_panel# %] + + [% WRAPPER tab_panel tabname="finesandcharges" %] + [% IF ( fines ) %] +

    Total due: [% fines | $Price %]

    + [% ELSE %] +

    No outstanding charges

    + [% END %] + [% END # /tab_panel# %] + + [% IF ( guarantees_fines ) %] + [% WRAPPER tab_panel tabname="guarantees_finesandcharges" %] +
    + + + + + + + [% FOREACH guarantee IN guarantees %] + + + [% IF logged_in_user.can_see_patron_infos( guarantee ) %] + + [% ELSE %] + + [% END %] + + [% END %] + + + + +
    GuaranteeAmount outstanding
    [% INCLUDE 'patron-title.inc' patron=guarantee hide_patron_infos_if_needed=1 %][% guarantee.account.balance | $Price %]-
    Total due[% guarantees_fines | $Price %]
    + [% END # /tab_panel# %] + [% END # /tab_panel# %] + + [% IF CAN_user_clubs && ( enrollments.count || enrollable.count ) %] + [% WRAPPER tab_panel tabname="clubs" %] + Loading... + [% END # /tab_panel# %] + [% END %] + + [% WRAPPER tab_panel tabname="reldebarments" %] + [% INCLUDE 'patron-restrictions-tab.inc' %] + [% END # /tab_panel# %] + + [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] + [% WRAPPER tab_panel tabname="holds" %] + [% IF ( holds_count ) %] +
    + + + + + + + + + + + + + + + + + +
    Hold dateTitleCall numberItem typeBarcodePickup atExpirationPriorityDelete?Suspend?Status
    + +
    + + + [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] + [% IF hold_cancellation.count %] + + + [% END %] +
    +
    + + [% IF Koha.Preference('SuspendHoldsIntranet') %] +
    +
    + + + + + [% IF Koha.Preference('AutoResumeSuspendedHolds') %] + + + Specify date on which to resume [% INCLUDE 'date-format.inc' %]: + [% END %] +
    +
    + +
    +
    + + + + +
    +
    + [% END # IF SuspendHoldsIntranet %] + + [% ELSE %] +

    Patron has nothing on hold.

    + [% END %] + [% END # /tab_panel#holds %] + [% END %] + + [% IF Koha.Preference('UseRecalls') %] + [% WRAPPER tab_panel tabname="recalls" %] + [% INCLUDE 'recalls.inc' %] + [% END # /tab_panel# %] + [% END %] + + [% IF Koha.Preference('ClaimReturnedLostValue') || Koha.Preference('BundleLostValue') %] + [% WRAPPER tab_panel tabname="return-claims" %] + [% INCLUDE 'patron-return-claims.inc' %] + [% END # /tab_panel# %] + [% END %] + + [% IF Koha.Preference('ArticleRequests') %] + [% WRAPPER tab_panel tabname="article-requests" %] + [% INCLUDE 'patron-article-requests.inc' %] + [% END %] + [% END # /tab_panel# %] + + [% END # /WRAPPER tab_panels %] +[% END # /WRAPPER tabs %] + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-restrictions-tab.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-restrictions-tab.inc index 698dab7bcd..20a9eaf19c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-restrictions-tab.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-restrictions-tab.inc @@ -1,81 +1,80 @@ [% USE raw %] [% USE Koha %] [% PROCESS 'restriction-types.inc' %] -
    - [% IF ( patron.restrictions.count == 0 ) %] -

    Patron is currently unrestricted.

    - [% ELSE %] - - + +[% IF ( patron.restrictions.count == 0 ) %] +

    Patron is currently unrestricted.

    +[% ELSE %] +
    + + + + + + + [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] + + [% END %] + + + + [% FOREACH restriction IN patron.restrictions %] - - - - - [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] - - [% END %] - - - - [% FOREACH restriction IN patron.restrictions %] - + + + + + [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] - + [% END %] + +
    TypeCommentExpirationCreated 
    TypeCommentExpirationCreated 
    + [% PROCESS restriction_type_description restriction_type=restriction.type %] + + [% IF restriction.comment.search('OVERDUES_PROCESS') %] + Restriction added by overdues process [% restriction.comment.remove('OVERDUES_PROCESS ') | $raw %] + [% ELSE %] + [% restriction.comment | $raw %] + [% END %] + [% IF restriction.expiration %] [% restriction.expiration | $KohaDates %] [% ELSE %] Indefinite [% END %][% restriction.created | $KohaDates %] - [% PROCESS restriction_type_description restriction_type=restriction.type %] + + Remove + - [% IF restriction.comment.search('OVERDUES_PROCESS') %] - Restriction added by overdues process [% restriction.comment.remove('OVERDUES_PROCESS ') | $raw %] - [% ELSE %] - [% restriction.comment | $raw %] + [% END %] +
    +[% END %] +[% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] +

    Add manual restriction

    +
    + + +
    + Add manual restriction +
      + [% IF Koha.Preference('PatronRestrictionTypes') %] +
    1. + + +
    2. [% END %] - - - [% END %] - [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] -

      Add manual restriction

      - - - -
      - Add manual restriction -
        - [% IF Koha.Preference('PatronRestrictionTypes') %] -
      1. - - -
      2. - [% END %] -
      3. -
      4. - - -
      5. -
      -
      Cancel
      -
      - - [% END %] -
    +
  • +
  • + + +
  • + +
    Cancel
    + + +[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-return-claims.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-return-claims.inc index 4aee20ccab..3b90d3497c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-return-claims.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-return-claims.inc @@ -1,25 +1,23 @@ -
    -

    - [% IF ( patron.return_claims.resolved.count > 0 || patron.return_claims.unresolved.count > 0 ) %] - Show all [% patron.return_claims.count | html %] claim(s) - Show [% patron.return_claims.unresolved.count | html %] unresolved claims - [% ELSE %] - - - [% END %] -

    - - - - - - - - - - - - - -
    Claim IDResolved?TitleNotesCreated onUpdated onResolution 
    -
    +

    + [% IF ( patron.return_claims.resolved.count > 0 || patron.return_claims.unresolved.count > 0 ) %] + Show all [% patron.return_claims.count | html %] claim(s) + Show [% patron.return_claims.unresolved.count | html %] unresolved claims + [% ELSE %] + + + [% END %] +

    + + + + + + + + + + + + + +
    Claim IDResolved?TitleNotesCreated onUpdated onResolution 
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc index 259ab2a75a..4f2dc41e24 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc @@ -74,7 +74,7 @@ [% END %]
    [% END %] - View restrictions + View restrictions [% IF (noissues && CAN_user_circulate_force_checkout) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/relatives-issues-table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/relatives-issues-table.inc index 5c8956397c..f541cacb8a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/relatives-issues-table.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/relatives-issues-table.inc @@ -1,27 +1,25 @@ [% USE Koha %] [% IF ( relatives_issues_count ) %] -
    - - - - - - - - - - - - - - - - - - - - - -
    Due date (unformatted, hidden)Due dateTitleRecord-level item typeItem typeCollectionLocationChecked out on (hidden, unformatted)Checked out onChecked out fromCall numberCopy numberChargeFinePricePatron
    -
    + + + + + + + + + + + + + + + + + + + + + +
    Due date (unformatted, hidden)Due dateTitleRecord-level item typeItem typeCollectionLocationChecked out on (hidden, unformatted)Checked out onChecked out fromCall numberCopy numberChargeFinePricePatron
    [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 641e30d352..e2fec123ee 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -816,174 +816,8 @@
    -
    - - -
    - - - [% INCLUDE "checkouts-table.inc" page="circulation" %] + [% INCLUDE 'patron-detail-tabs.inc' patronpage = "circ" %] - [% INCLUDE "relatives-issues-table.inc" %] - - [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %] -
    - Loading... -
    - [% END %] - - [% INCLUDE "patron-restrictions-tab.inc" %] - -
    - [% IF ( holds_count ) %] -
    - - - - - - - - - - - - - - - - - -
    Hold dateTitleCall numberItem typeBarcodePickup atExpirationPriorityCancel?Suspend?Status
    - -
    - - - [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] - [% IF hold_cancellation.count %] - - [% END %] -
    -
    - - [% IF Koha.Preference('SuspendHoldsIntranet') %] -
    -
    - - - - - [% IF Koha.Preference('AutoResumeSuspendedHolds') %] - - - Specify date on which to resume [% INCLUDE 'date-format.inc' %]: - [% END %] -
    -
    - -
    -
    - - - - -
    -
    - [% END # /IF SuspendHoldsIntranet %] - - [% ELSE # IF holds_count %] -

    Patron has nothing on hold.

    - [% END # /IF holds_count %] -
    - - [% IF Koha.Preference('UseRecalls') %] -
    - [% INCLUDE 'recalls.inc' %] -
    - [% END %] - - [% IF Koha.Preference('ClaimReturnedLostValue') || Koha.Preference('BundleLostValue') %] - [% INCLUDE 'patron-return-claims.inc' %] - [% END %] - - [% IF Koha.Preference('ArticleRequests') %] - [% INCLUDE 'patron-article-requests.inc' %] - [% END %] -
    -
    [% ELSIF borrowernumber # IF patron %]
    Patron not found. Return to search
    [% END # /IF patron %] @@ -1103,13 +937,6 @@ } }); - if ( $('#clubs-tab').length ) { - $('#clubs-tab-link').on('click', function() { - $('#clubs-tab').text(_("Loading...")); - $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% patron.borrowernumber | html %]'); - }); - } - // listen submit to trigger qslip on empty checkout $('#mainform').bind('submit',function() { if ($('#barcode').val() == '') { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-clubs-tab.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-clubs-tab.tt index 1c505c9aec..53dd18dc7a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-clubs-tab.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-clubs-tab.tt @@ -74,7 +74,7 @@ $("#table_clubnoenrollmemnts, #table_clubenrollments").dataTable($.extend(true, [% IF CAN_user_clubs_enroll %] function loadEnrollmentForm( id ) { $("body").css("cursor", "progress"); - $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-enroll.pl?borrowernumber=[% borrowernumber | html %]&id=' + id, function() { + $('#clubs_panel').load('/cgi-bin/koha/clubs/patron-enroll.pl?borrowernumber=[% borrowernumber | html %]&id=' + id, function() { $("body").css("cursor", "default"); }); @@ -89,7 +89,7 @@ function cancelEnrollment( id ) { data: { id: id }, success: function( data ) { if ( data.success ) { - $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% borrowernumber | html %]', function() { + $('#clubs_panel').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% borrowernumber | html %]', function() { $("body").css("cursor", "default"); }); } else { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt index d120da0d07..64adfafd71 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt @@ -44,7 +44,7 @@ function addEnrollment() { data: $( "#patron-enrollment-form" ).serialize(), success: function( data ) { if ( data.success ) { - $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% borrowernumber | html %]&id=[% club.id | html %]', function() { + $('#clubs_panel').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% borrowernumber | html %]&id=[% club.id | html %]', function() { $("body").css("cursor", "default"); }); } else { @@ -58,7 +58,7 @@ function addEnrollment() { function showClubs() { $("body").css("cursor", "progress"); - $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% borrowernumber | html %]&id=[% club.id | html %]', function() { + $('#clubs_panel').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% borrowernumber | html %]&id=[% club.id | html %]', function() { $("body").css("cursor", "default"); }); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 79c4350a13..baa8c60b01 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -650,222 +650,8 @@ -
    - - -
    - [% INCLUDE "checkouts-table.inc" page="moremember" %] - - [% INCLUDE "relatives-issues-table.inc" %] - - [% IF ( fines ) %] -
    - [% IF ( fines ) %] -

    Total due: [% fines | $Price %]

    - [% ELSE %] -

    No outstanding charges

    - [% END %] -
    - [% END %] - - [% IF ( guarantees_fines ) %] -
    - - - - - - - - [% FOREACH guarantee IN guarantees %] - - - [% IF logged_in_user.can_see_patron_infos( guarantee ) %] - - [% ELSE %] - - [% END %] - - [% END %] - - - - -
    GuaranteeAmount outstanding
    [% INCLUDE 'patron-title.inc' patron=guarantee hide_patron_infos_if_needed=1 %][% guarantee.account.balance | $Price %]-
    Total due[% guarantees_fines | $Price %]
    -
    - [% END %] - - [% IF CAN_user_clubs && ( enrollments.count || enrollable.count ) %] -
    - Loading... -
    - [% END %] - - [% INCLUDE 'patron-restrictions-tab.inc' %] - - [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] -
    - [% IF ( holds_count ) %] -
    - - - - - - - - - - - - - - - - - -
    Hold dateTitleCall numberItem typeBarcodePickup atExpirationPriorityDelete?Suspend?Status
    - -
    - - - [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] - [% IF hold_cancellation.count %] - - - [% END %] -
    -
    - - [% IF Koha.Preference('SuspendHoldsIntranet') %] -
    -
    - - - - - [% IF Koha.Preference('AutoResumeSuspendedHolds') %] - - - Specify date on which to resume [% INCLUDE 'date-format.inc' %]: - [% END %] -
    -
    - -
    -
    - - - - -
    -
    - [% END # IF SuspendHoldsIntranet %] - - [% ELSE %] -

    Patron has nothing on hold.

    - [% END %] -
    [% # /div#reserves %] - [% END %] - - [% IF Koha.Preference('UseRecalls') %] -
    - [% INCLUDE 'recalls.inc' %] -
    - [% END %] - - [% IF Koha.Preference('ClaimReturnedLostValue') %] - [% INCLUDE 'patron-return-claims.inc' %] - [% END %] - - [% IF Koha.Preference('ArticleRequests') %] - [% INCLUDE 'patron-article-requests.inc' %] - [% END %] -
    -
    @@ -927,13 +713,6 @@ $(document).ready(function() { $("#info_digests").tooltip(); - if ( $('#clubs-tab').length ) { - $('#clubs-tab-link').on('click', function() { - $('#clubs-tab').text(_("Loading...")); - $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% patron.borrowernumber | html %]'); - }); - } - $("#finesholdsissues a[data-toggle='tab']").on("shown.bs.tab", function(e){ var oTable = $('div.dataTables_wrapper > table', $(e.target.hash) ).dataTable(); if ( oTable.length > 0 ) { @@ -942,11 +721,11 @@ }); $("#view_restrictions").on("click",function(){ - $('#debarments-tab-link').click(); + $('#reldebarments-tab').click(); }); $("#view_guarantees_finesandcharges").on("click",function(){ - $('#guarantees_finestab a').click(); + $('#guarantees_finesandcharges-tab').click(); }); }); diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js b/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js index b628b3951c..bc11e37347 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js +++ b/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js @@ -1,3 +1,4 @@ +/* global borrowernumber */ $(document).ready(function() { $("#CheckAllExports").on("click",function(){ $(".export:visible").prop("checked", true); @@ -8,7 +9,7 @@ $(document).ready(function() { return false; }); - $("#patronlists a[data-toggle='tab']").on("shown.bs.tab", function(e){ + $("#finesholdsissues a[data-toggle='tab']").on("shown.bs.tab", function(e){ $(this).click(); }); @@ -96,6 +97,12 @@ $(document).ready(function() { activeTab && activeTab.tab('show'); } + if ( $('#clubs_panel').length ) { + $('#clubs-tab').on('click', function() { + $('#clubs_panel').text(_("Loading...")); + $('#clubs_panel').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=' + borrowernumber ); + }); + } }); function export_checkouts(format) { -- 2.39.5