@@ -, +, @@ - 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). --- .../prog/en/includes/checkouts-table.inc | 169 +++++++------ .../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 | 142 ++++++----- .../prog/en/includes/patron-return-claims.inc | 48 ++-- .../prog/en/includes/patron_messages.inc | 6 +- .../en/includes/relatives-issues-table.inc | 46 ++-- .../prog/en/modules/circ/circulation.tt | 175 +------------- .../prog/en/modules/members/moremember.tt | 227 +----------------- .../prog/js/pages/circulation.js | 9 +- 11 files changed, 442 insertions(+), 611 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc --- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc @@ -1,98 +1,97 @@ [% USE Koha %] [% PROCESS 'modal-claims.inc' %] [% INCLUDE 'format_price.inc' %] -
- [% IF ( issuecount ) %] -
-

- Show checkouts -

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - [% 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 ) %] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [% 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' %] --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc @@ -393,7 +393,7 @@ [% ELSE %]
  • [% END %] - + [% content | $raw %]
  • --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-article-requests.inc +++ a/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 %] - --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc +++ a/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 %] + --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-restrictions-tab.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-restrictions-tab.inc @@ -1,81 +1,79 @@ [% 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 %] --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-return-claims.inc +++ a/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 
    --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc +++ a/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) %] @@ -314,10 +314,10 @@ [% IF patron_message.branchcode == Branches.GetLoggedInBranchcode OR Koha.Preference('AllowAllMessageDeletion') %] [% IF moremember %] - Edit + Edit Delete [% ELSE %] - Edit + Edit Delete [% END %] [% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/includes/relatives-issues-table.inc +++ a/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 %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -815,174 +815,8 @@
    -
    - - -
    - - - [% INCLUDE "checkouts-table.inc" %] + [% 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 %] @@ -1101,13 +935,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() == '') { --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -650,222 +650,8 @@ -
    - - -
    - [% INCLUDE "checkouts-table.inc" %] - - [% 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 %] -
    -
    @@ -926,13 +712,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 ) { @@ -941,11 +720,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(); }); }); --- a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js +++ a/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) { --