Bugzilla – Attachment 151984 Details for
Bug 33528
Use template wrapper for tabs: Patron details and circulation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33528: Use template wrapper for tabs: Patron details page
Bug-33528-Use-template-wrapper-for-tabs-Patron-det.patch (text/plain), 77.06 KB, created by
Sam Lau
on 2023-06-02 14:41:30 UTC
(
hide
)
Description:
Bug 33528: Use template wrapper for tabs: Patron details page
Filename:
MIME Type:
Creator:
Sam Lau
Created:
2023-06-02 14:41:30 UTC
Size:
77.06 KB
patch
obsolete
>From 2486a4d684a425ee0656c3c6e5f3b086fd9b7c3e Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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 <samalau@gmail.com> >--- > .../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/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, 446 insertions(+), 615 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 8df4d2af7c..a230202048 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc >@@ -1,98 +1,97 @@ > [% USE Koha %] > [% PROCESS 'modal-claims.inc' %] > [% INCLUDE 'format_price.inc' %] >-<div id="checkouts" role="tabpanel" class="tab-pane active"> >- [% IF ( issuecount ) %] >- <div id="issues-table-loading-message"> >- <p> >- <a id="issues-table-load-now-button" href="#" class="btn btn-default"><i class="fa fa-book"></i> Show checkouts</a> >- </p> >- </div> >- <form name="issues" action="/cgi-bin/koha/tools/export.pl" method="post"> >- <table id="issues-table" style="width: 100% !Important;"> >- <thead> >- <tr> >- <th scope="col"> </th> >- <th scope="col"> </th> >- <th scope="col">Due date</th> >- <th scope="col">Due date</th> >- <th scope="col">Title</th> >- <th scope="col">Record-level item type</th> >- <th scope="col">Item type</th> >- <th scope="col">Collection</th> >- <th scope="col">Location</th> >- <th scope="col">Home library</th> >- <th scope="col"> </th> >- <th scope="col">Checked out on</th> >- <th scope="col">Checked out from</th> >- <th scope="col">Call number</th> >- <th scope="col">Copy number</th> >- <th scope="col">Charge</th> >- <th scope="col">Fine</th> >- <th scope="col">Price</th> >- <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllRenewals">select all</a> | <a href="#" id="UncheckAllRenewals">none</a></p></th> >- <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllCheckins">select all</a> | <a href="#" id="UncheckAllCheckins">none</a></p></th> >- <th scope="col">Return claims</th> >- <th scope="col">Export <p class="column-tool"><a href="#" id="CheckAllExports">select all</a> | <a href="#" id="UncheckAllExports">none</a></p></th> >- </tr> >- </thead> >- [% INCLUDE 'checkouts-table-footer.inc' %] >- </table> > >- <label for="issues-table-load-immediately">Always show checkouts immediately</label> >- <input id="issues-table-load-immediately" type="checkbox" /> >+[% IF ( issuecount ) %] >+ <div id="issues-table-loading-message"> >+ <p> >+ <a id="issues-table-load-now-button" href="#" class="btn btn-default"><i class="fa fa-book"></i> Show checkouts</a> >+ </p> >+ </div> >+ <form name="issues" action="/cgi-bin/koha/tools/export.pl" method="post"> >+ <table id="issues-table" style="width: 100% !Important;"> >+ <thead> >+ <tr> >+ <th scope="col"> </th> >+ <th scope="col"> </th> >+ <th scope="col">Due date</th> >+ <th scope="col">Due date</th> >+ <th scope="col">Title</th> >+ <th scope="col">Record-level item type</th> >+ <th scope="col">Item type</th> >+ <th scope="col">Collection</th> >+ <th scope="col">Location</th> >+ <th scope="col">Home library</th> >+ <th scope="col"> </th> >+ <th scope="col">Checked out on</th> >+ <th scope="col">Checked out from</th> >+ <th scope="col">Call number</th> >+ <th scope="col">Copy number</th> >+ <th scope="col">Charge</th> >+ <th scope="col">Fine</th> >+ <th scope="col">Price</th> >+ <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllRenewals">select all</a> | <a href="#" id="UncheckAllRenewals">none</a></p></th> >+ <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllCheckins">select all</a> | <a href="#" id="UncheckAllCheckins">none</a></p></th> >+ <th scope="col">Return claims</th> >+ <th scope="col">Export <p class="column-tool"><a href="#" id="CheckAllExports">select all</a> | <a href="#" id="UncheckAllExports">none</a></p></th> >+ </tr> >+ </thead> >+ [% INCLUDE 'checkouts-table-footer.inc' %] >+ </table> > >- <div id="issues-table-actions"> >- <fieldset class="action"> >- [% IF ( CAN_user_circulate_override_renewals ) %] >- [% IF Koha.Preference( 'AllowRenewalLimitOverride' ) || Koha.Preference( 'AllowRenewalOnHoldOverride' ) %] >- <label for="override_limit">Override renewal restrictions:</label> >- <input type="checkbox" name="override_limit" id="override_limit" value="1" /> >- [% END %] >+ <label for="issues-table-load-immediately">Always show checkouts immediately</label> >+ <input id="issues-table-load-immediately" type="checkbox" /> >+ >+ <div id="issues-table-actions"> >+ <fieldset class="action"> >+ [% IF ( CAN_user_circulate_override_renewals ) %] >+ [% IF Koha.Preference( 'AllowRenewalLimitOverride' ) || Koha.Preference( 'AllowRenewalOnHoldOverride' ) %] >+ <label for="override_limit">Override renewal restrictions:</label> >+ <input type="checkbox" name="override_limit" id="override_limit" value="1" /> > [% END %] >- [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] >- [% IF Koha.Preference( 'UnseenRenewals' ) %] >- <label id="renew_as_unseen_label" for="override_limit">Renew as "unseen" if appropriate:</label> >- <input type="checkbox" name="renew_as_unseen" id="renew_as_unseen_checkbox" value="1" /> >- [% END %] >- <button class="btn btn-default" id="RenewCheckinChecked"><i class="fa fa-check"></i> Renew or check in selected items</button> >- <button class="btn btn-default" id="RenewAll"><i class="fa fa-book"></i> Renew all</button> >+ [% END %] >+ [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] >+ [% IF Koha.Preference( 'UnseenRenewals' ) %] >+ <label id="renew_as_unseen_label" for="override_limit">Renew as "unseen" if appropriate:</label> >+ <input type="checkbox" name="renew_as_unseen" id="renew_as_unseen_checkbox" value="1" /> > [% END %] >- </fieldset> >- >- [% IF Koha.Preference('ExportCircHistory') %] >- <fieldset> >- <label for="issues-table-output-format"><strong>Export checkouts using format:</strong></label> >- <select name="issues-table-output-format" id="issues-table-output-format"> >- <option value="iso2709_995">MARC with items</option> >- <option value="iso2709">MARC without items</option> >- [% IF csv_profiles.count %] >- <option value="csv">CSV</option> >- [% END %] >- </select> >+ <button class="btn btn-default" id="RenewCheckinChecked"><i class="fa fa-check"></i> Renew or check in selected items</button> >+ <button class="btn btn-default" id="RenewAll"><i class="fa fa-book"></i> Renew all</button> >+ [% END %] >+ </fieldset> > >+ [% IF Koha.Preference('ExportCircHistory') %] >+ <fieldset> >+ <label for="issues-table-output-format"><strong>Export checkouts using format:</strong></label> >+ <select name="issues-table-output-format" id="issues-table-output-format"> >+ <option value="iso2709_995">MARC with items</option> >+ <option value="iso2709">MARC without items</option> > [% IF csv_profiles.count %] >- <select name="csv_profile_id"> >- [% FOREACH csv_profile IN csv_profiles %] >- <option value="[% csv_profile.export_format_id | html %]">[% csv_profile.profile | html %]</option> >- [% END %] >- </select> >+ <option value="csv">CSV</option> > [% END %] >- <label for="export_items_bundle_contents">Export items bundle contents</label> <input type="checkbox" name="export_items_bundle_contents" id="export_items_bundle_contents"> >- <label for="export_remove_fields">Don't export fields:</label> <input type="text" id="export_remove_fields" name="export_remove_fields" value="[% Koha.Preference('ExportRemoveFields') | html %]" title="Use for MARC exports" /> >- <input type="hidden" name="op" value="export" /> >- <input type="hidden" id="output_format" name="output_format" value="iso2709" /> >- <input type="hidden" id="dont_export_item" name="dont_export_item" value="0" /> >- <input type="hidden" id="record_type" name="record_type" value="bibs" /> >- <button class="btn btn-default btn-sm" id="export_submit"><i class="fa fa-download"></i> Export</button> >- </fieldset> >- [% END %] >- </div> >- </form> >- [% ELSE %] >- <p>Patron has nothing checked out.</p> >- [% END %] >-</div> >+ </select> >+ >+ [% IF csv_profiles.count %] >+ <select name="csv_profile_id"> >+ [% FOREACH csv_profile IN csv_profiles %] >+ <option value="[% csv_profile.export_format_id | html %]">[% csv_profile.profile | html %]</option> >+ [% END %] >+ </select> >+ [% END %] >+ <label for="export_items_bundle_contents">Export items bundle contents</label> <input type="checkbox" name="export_items_bundle_contents" id="export_items_bundle_contents"> >+ <label for="export_remove_fields">Don't export fields:</label> <input type="text" id="export_remove_fields" name="export_remove_fields" value="[% Koha.Preference('ExportRemoveFields') | html %]" title="Use for MARC exports" /> >+ <input type="hidden" name="op" value="export" /> >+ <input type="hidden" id="output_format" name="output_format" value="iso2709" /> >+ <input type="hidden" id="dont_export_item" name="dont_export_item" value="0" /> >+ <input type="hidden" id="record_type" name="record_type" value="bibs" /> >+ <button class="btn btn-default btn-sm" id="export_submit"><i class="fa fa-download"></i> Export</button> >+ </fieldset> >+ [% END %] >+ </div> >+ </form> >+[% ELSE %] >+ <p>Patron has nothing checked out.</p> >+[% END %] > > <!-- Claims Returned Modal --> > [% 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 f0d695bc9c..0248f00dbe 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 %] > <li role="presentation"> > [% END %] >- <a href="#[% tabname | uri %]_panel" data-tabname="[% tabname | uri %]" aria-controls="[% tabname | uri %]_panel" role="tab" data-toggle="tab"> >+ <a href="#[% tabname | uri %]_panel" id="[% tabname | uri %]-tab" data-tabname="[% tabname | uri %]" aria-controls="[% tabname | uri %]_panel" role="tab" data-toggle="tab"> > [% content | $raw %] > </a> > </li> >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' ) %] >-<div id="article-requests" role="tabpanel" class="tab-pane"> > [% IF current_article_requests.count > 0 %] > <table id="article-requests-table" class="table table-bordered table-striped"> > <thead> >@@ -102,4 +101,3 @@ > [% ELSE %] > <span>Patron has no current article requests.</span> > [% END %] >-</div> >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 @@ >+<!-- patron-detail-tabs.inc --> >+[% USE raw %] >+[% PROCESS 'html_helpers.inc' %] >+[% WRAPPER tabs id= "finesholdsissues" %] >+ [% WRAPPER tabs_nav %] >+ [% WRAPPER tab_item tabname= "checkouts" bt_active= 1 %] >+ <span>Checkouts ([% issuecount || 0 | html %])</span> >+ [% END %] >+ >+ [% IF relatives_issues_count %] >+ [% WRAPPER tab_item tabname= "relatives-issues" %] >+ <span>Relatives' checkouts ([% relatives_issues_count | html %])</span> >+ [% END %] >+ [% END %] >+ >+ [% IF ( fines ) %] >+ [% WRAPPER tab_item tabname= "finesandcharges" %] >+ <span>Charges ([% fines | $Price %])</span> >+ [% END %] >+ [% END %] >+ >+ [% IF ( guarantees_fines ) %] >+ [% WRAPPER tab_item tabname= "guarantees_finesandcharges" %] >+ <span>Guarantees' charges ([% guarantees_fines | $Price %])</span> >+ [% END %] >+ [% END %] >+ >+ [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] >+ [% WRAPPER tab_item tabname= "holds" %] >+ <span>Holds ([% holds_count || 0 | html %])</span> >+ [% END %] >+ [% END %] >+ >+ [% IF Koha.Preference('UseRecalls') %] >+ [% WRAPPER tab_item tabname= "recalls" %] >+ <span>Recalls ([% recalls.count || 0 | html %])</span> >+ [% 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" %] >+ <span>Article requests ([% article_requests.count || 0 | html %])</span> >+ [% END %] >+ [% END %] >+ >+ [% IF Koha.Preference('ClaimReturnedLostValue') || Koha.Preference('BundleLostValue') %] >+ [% WRAPPER tab_item tabname= "return-claims" %] >+ <span>Claims</span> >+ [% IF ( patron.return_claims.count ) %] >+ ([% IF patron.return_claims.resolved.count == 0 %] >+ <span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span> >+ [% ELSE %] >+ <span title="Resolved claims" class="label label-success" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span> >+ [% END %] >+ [% IF patron.return_claims.unresolved.count == 0 %] >+ <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span> >+ [% ELSE %] >+ <span title="Unresolved claims" class="label label-warning" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span> >+ [% END %]) >+ [% ELSE %] >+ [% no_claims = 0 %] >+ (<span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">[% no_claims | html %]</span> >+ <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">[% no_claims | html %]</span>) >+ [% END # /IF patron.return_claims.count %] >+ [% END # /WRAPPER tab_item return-claims %] >+ [% END %] >+ >+ [% WRAPPER tab_item tabname= "reldebarments" %] >+ <span>Restrictions ([% patron.restrictions.count || 0 | html %])</span> >+ [% END %] >+ >+ [% SET enrollments = patron.get_club_enrollments %] >+ [% SET enrollable = patron.get_enrollable_clubs(0) %] <!-- 0 => not OPAC --> >+ [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %] >+ [% WRAPPER tab_item tabname= "clubs" %] >+ <span>Clubs ([% enrollments.count | html %]/[% enrollable.count | html %])</span> >+ [% 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 ) %] >+ <p>Total due: [% fines | $Price %]</p> >+ [% ELSE %] >+ <p>No outstanding charges</p> >+ [% END %] >+ [% END # /tab_panel# %] >+ >+ [% IF ( guarantees_fines ) %] >+ [% WRAPPER tab_panel tabname="guarantees_finesandcharges" %] >+ <table id="tguaranteesfines"> >+ <thead> >+ <tr> >+ <th>Guarantee</th> >+ <th>Amount outstanding</th> >+ </tr> >+ </thead> >+ [% FOREACH guarantee IN guarantees %] >+ <tr> >+ <td>[% INCLUDE 'patron-title.inc' patron=guarantee hide_patron_infos_if_needed=1 %]</td> >+ [% IF logged_in_user.can_see_patron_infos( guarantee ) %] >+ <td>[% guarantee.account.balance | $Price %]</td> >+ [% ELSE %] >+ <td>-</td> >+ [% END %] >+ </tr> >+ [% END %] >+ <tfoot> >+ <td>Total due</td> >+ <td>[% guarantees_fines | $Price %]</td> >+ </tfoot> >+ </table> >+ [% 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 ) %] >+ <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post"> >+ <input type="hidden" name="from" value="circ" /> >+ <table id="holds-table" style="width: 100% !Important;"> >+ <thead> >+ <tr> >+ <th>Hold date</th> >+ <th>Title</th> >+ <th>Call number</th> >+ <th>Item type</th> >+ <th>Barcode</th> >+ <th>Pickup at</th> >+ <th>Expiration</th> >+ <th>Priority</th> >+ <th>Delete?</th> >+ <th>Suspend?</th> >+ <th>Status</th> >+ </tr> >+ </thead> >+ </table> >+ >+ <fieldset class="action"> >+ <input type="submit" class="cancel" name="submit" value="Cancel marked holds" /> >+ >+ [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] >+ [% IF hold_cancellation.count %] >+ <label for="cancellation-reason">Cancellation reason:</label> >+ <select name="cancellation-reason"> >+ <option value="">No reason given</option> >+ [% FOREACH reason IN hold_cancellation %] >+ <option value="[% reason.authorised_value | html %]">[% reason.lib | html %]</option> >+ [% END %] >+ </select> >+ [% END %] >+ </fieldset> >+ </form> >+ >+ [% IF Koha.Preference('SuspendHoldsIntranet') %] >+ <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post"> >+ <fieldset class="action"> >+ <input type="hidden" name="from" value="[% patronpage | html %]" /> >+ <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> >+ <input type="submit" class="btn btn-primary" value="Suspend all holds" /> >+ >+ [% IF Koha.Preference('AutoResumeSuspendedHolds') %] >+ <label for="suspend_until">until</label> >+ <input type="text" size="10" id="suspend_until" name="suspend_until" class="flatpickr" data-flatpickr-futuredate="true"/> >+ <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span> >+ [% END %] >+ </fieldset> >+ </form> >+ >+ <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post"> >+ <fieldset class="action"> >+ <input type="hidden" name="from" value="borrower" /> >+ <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> >+ <input type="hidden" name="suspend" value="0" /> >+ <input type="submit" class="btn btn-primary" value="Resume all suspended holds" /> >+ </fieldset> >+ </form> >+ [% END # IF SuspendHoldsIntranet %] >+ >+ [% ELSE %] >+ <p>Patron has nothing on hold.</p> >+ [% 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 %] >+<!-- /patron-detail-tabs.inc --> >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 1242dbf746..b7a001a0d7 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,79 @@ > [% USE raw %] > [% USE Koha %] > [% PROCESS 'restriction-types.inc' %] >-<div id="reldebarments" role="tabpanel" class="tab-pane"> >- [% IF ( patron.restrictions.count == 0 ) %] >- <p>Patron is currently unrestricted.</p> >- [% ELSE %] >- <table> >- <thead> >+[% IF ( patron.restrictions.count == 0 ) %] >+ <p>Patron is currently unrestricted.</p> >+[% ELSE %] >+ <table> >+ <thead> >+ <tr> >+ <th>Type</th> >+ <th>Comment</th> >+ <th>Expiration</th> >+ <th>Created</th> >+ [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] >+ <th> </th> >+ [% END %] >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH restriction IN patron.restrictions %] > <tr> >- <th>Type</th> >- <th>Comment</th> >- <th>Expiration</th> >- <th>Created</th> >- [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] >- <th> </th> >- [% END %] >- </tr> >- </thead> >- <tbody> >- [% FOREACH restriction IN patron.restrictions %] >- <tr> >+ <td> >+ [% PROCESS restriction_type_description restriction_type=restriction.type %] >+ </td> >+ <td> >+ [% IF restriction.comment.search('OVERDUES_PROCESS') %] >+ <span>Restriction added by overdues process [% restriction.comment.remove('OVERDUES_PROCESS ') | $raw %]</span> >+ [% ELSE %] >+ [% restriction.comment | $raw %] >+ [% END %] >+ </td> >+ <td>[% IF restriction.expiration %] [% restriction.expiration | $KohaDates %] [% ELSE %] <em>Indefinite</em> [% END %]</td> >+ <td>[% restriction.created | $KohaDates %]</td> >+ [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] > <td> >- [% PROCESS restriction_type_description restriction_type=restriction.type %] >+ <a class="remove_restriction btn btn-default btn-xs" href="/cgi-bin/koha/members/mod_debarment.pl?borrowernumber=[% patron.borrowernumber | html %]&borrower_debarment_id=[% restriction.borrower_debarment_id | html %]&action=del"> >+ <i class="fa fa-trash"></i> Remove >+ </a> > </td> >- <td> >- [% IF restriction.comment.search('OVERDUES_PROCESS') %] >- <span>Restriction added by overdues process [% restriction.comment.remove('OVERDUES_PROCESS ') | $raw %]</span> >- [% ELSE %] >- [% restriction.comment | $raw %] >+ [% END %] >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+[% END %] >+[% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] >+ <p><a href="#" id="add_manual_restriction"><i class="fa fa-plus"></i> Add manual restriction</a></p> >+ <form method="post" action="/cgi-bin/koha/members/mod_debarment.pl" class="clearfix"> >+ <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> >+ <input type="hidden" name="action" value="add" /> >+ <fieldset class="rows" id="manual_restriction_form"> >+ <legend>Add manual restriction</legend> >+ <ol> >+ [% IF Koha.Preference('PatronRestrictionTypes') %] >+ <li> >+ <label for="debarred_type">Type:</label> >+ <select name="debarred_type"> >+ [% FOREACH restriction_type IN restriction_types %] >+ [% IF !restriction_type.is_system %] >+ [% IF restriction_type.is_default %] >+ <option value="[% restriction_type.code | html %]" selected>[% PROCESS restriction_type_description %]</option> >+ [% ELSE %] >+ <option value="[% restriction_type.code | html %]">[% PROCESS restriction_type_description %]</option> >+ [% END %] > [% END %] >- </td> >- <td>[% IF restriction.expiration %] [% restriction.expiration | $KohaDates %] [% ELSE %] <em>Indefinite</em> [% END %]</td> >- <td>[% restriction.created | $KohaDates %]</td> >- [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] >- <td> >- <a class="remove_restriction btn btn-default btn-xs" href="/cgi-bin/koha/members/mod_debarment.pl?borrowernumber=[% patron.borrowernumber | html %]&borrower_debarment_id=[% restriction.borrower_debarment_id | html %]&action=del"> >- <i class="fa fa-trash"></i> Remove >- </a> >- </td> > [% END %] >- </tr> >+ </select> >+ </li> > [% END %] >- </tbody> >- </table> >- [% END %] >- [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] >- <p><a href="#" id="add_manual_restriction"><i class="fa fa-plus"></i> Add manual restriction</a></p> >- <form method="post" action="/cgi-bin/koha/members/mod_debarment.pl" class="clearfix"> >- <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> >- <input type="hidden" name="action" value="add" /> >- <fieldset class="rows" id="manual_restriction_form"> >- <legend>Add manual restriction</legend> >- <ol> >- [% IF Koha.Preference('PatronRestrictionTypes') %] >- <li> >- <label for="debarred_type">Type:</label> >- <select name="debarred_type"> >- [% FOREACH restriction_type IN restriction_types %] >- [% IF !restriction_type.is_system %] >- [% IF restriction_type.is_default %] >- <option value="[% restriction_type.code | html %]" selected>[% PROCESS restriction_type_description %]</option> >- [% ELSE %] >- <option value="[% restriction_type.code | html %]">[% PROCESS restriction_type_description %]</option> >- [% END %] >- [% END %] >- [% END %] >- </select> >- </li> >- [% END %] >- <li><label for="rcomment">Comment:</label> <input type="text" id="rcomment" name="comment" /></li> >- <li> >- <label for="rexpiration">Expiration:</label> >- <input name="expiration" id="rexpiration" size="20" value="" class="flatpickr" data-flatpickr-futuredate="true" type="text" /> >- </li> >- </ol> >- <fieldset class="action"><input type="submit" value="Add restriction" /> <a href="#" class="cancel" id="cancel_manual_restriction">Cancel</a></fieldset> >- </fieldset> >- </form> >- [% END %] >-</div> >+ <li><label for="rcomment">Comment:</label> <input type="text" id="rcomment" name="comment" /></li> >+ <li> >+ <label for="rexpiration">Expiration:</label> >+ <input name="expiration" id="rexpiration" size="20" value="" class="flatpickr" data-flatpickr-futuredate="true" type="text" /> >+ </li> >+ </ol> >+ <fieldset class="action"><input type="submit" value="Add restriction" /> <a href="#" class="cancel" id="cancel_manual_restriction">Cancel</a></fieldset> >+ </fieldset> >+ </form> >+[% 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 @@ >-<div id="return-claims" role="tabpanel" class="tab-pane"> >- <p id="return-claims-controls"> >- [% IF ( patron.return_claims.resolved.count > 0 || patron.return_claims.unresolved.count > 0 ) %] >- <a id="show_all_claims" class="ctrl_link" href="#">Show all [% patron.return_claims.count | html %] claim(s)</a> >- <a id="show_unresolved_claims" class="ctrl_link disabled" href="#">Show [% patron.return_claims.unresolved.count | html %] unresolved claims</a> >- [% ELSE %] >- <a id="show_all_claims" class="ctrl_link" href="#"></a> >- <a id="show_unresolved_claims" class="ctrl_link disabled" href="#"></a> >- [% END %] >- </p> >- <table id="return-claims-table" class="table table-bordered table-striped"> >- <thead> >- <tr> >- <th class="return-claim-id">Claim ID</th> >- <th class="return-claim-id">Resolved?</th> >- <th class="return-claim-record-title anti-the">Title</th> >- <th class="return-claim-notes">Notes</th> >- <th class="return-claim-created-on">Created on</th> >- <th class="return-claim-updated-on">Updated on</th> >- <th class="return-claim-resolution">Resolution</th> >- <th class="return-claim-actions NoSort"> </th> >- </tr> >- </thead> >- </table> >-</div> >+<p id="return-claims-controls"> >+ [% IF ( patron.return_claims.resolved.count > 0 || patron.return_claims.unresolved.count > 0 ) %] >+ <a id="show_all_claims" class="ctrl_link" href="#">Show all [% patron.return_claims.count | html %] claim(s)</a> >+ <a id="show_unresolved_claims" class="ctrl_link disabled" href="#">Show [% patron.return_claims.unresolved.count | html %] unresolved claims</a> >+ [% ELSE %] >+ <a id="show_all_claims" class="ctrl_link" href="#"></a> >+ <a id="show_unresolved_claims" class="ctrl_link disabled" href="#"></a> >+ [% END %] >+</p> >+<table id="return-claims-table" class="table table-bordered table-striped"> >+ <thead> >+ <tr> >+ <th class="return-claim-id">Claim ID</th> >+ <th class="return-claim-id">Resolved?</th> >+ <th class="return-claim-record-title anti-the">Title</th> >+ <th class="return-claim-notes">Notes</th> >+ <th class="return-claim-created-on">Created on</th> >+ <th class="return-claim-updated-on">Updated on</th> >+ <th class="return-claim-resolution">Resolution</th> >+ <th class="return-claim-actions NoSort"> </th> >+ </tr> >+ </thead> >+</table> >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 183fd3f31b..df49136e8c 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 %] > </em><br/> > [% END %] >- <a class="btn btn-xs btn-default" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="fa fa-ban"></i> View restrictions</a> >+ <a class="btn btn-xs btn-default" href="#reldebarments" onclick="$('#reldebarments-tab').click()"><i class="fa fa-ban"></i> View restrictions</a> > > [% IF (noissues && CAN_user_circulate_force_checkout) %] > <span class="override_debarment"> >@@ -314,10 +314,10 @@ > </span> > [% IF patron_message.branchcode == Branches.GetLoggedInBranchcode OR Koha.Preference('AllowAllMessageDeletion') %] > [% IF moremember %] >- <a id="#edit_message_form_[% patron_message.message_id | html %]" class="btn btn-link edit_message" href="#edit_message_form_[% patron_message.message_id | uri %]" data-target="#edit_message_form_[% patron_message.message_id | html %]" data-toggle="modal" class="btn btn-default"><i class="fa fa-edit"></i> Edit</a> >+ <a id="#edit_message_form_[% patron_message.message_id | html %]" class="btn btn-link edit_message" href="#edit_message_form_[% patron_message.message_id | uri %]" data-target="#edit_message_form_[% patron_message.message_id | html %]" data-toggle="modal"><i class="fa fa-edit"></i> Edit</a> > <a class="btn btn-link delete_message" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% patron_message.message_id | html %]&borrowernumber=[% patron_message.borrowernumber | html %]&from=moremember"><i class="fa fa-trash"></i> Delete</a> > [% ELSE %] >- <a id="#edit_message_form_[% patron_message.message_id | html %]" class="btn btn-link edit_message" href="#edit_message_form_[% patron_message.message_id | uri %]" data-target="#edit_message_form_[% patron_message.message_id | html %]" data-toggle="modal" class="btn btn-default"><i class="fa fa-edit"></i> Edit</a> >+ <a id="#edit_message_form_[% patron_message.message_id | html %]" class="btn btn-link edit_message" href="#edit_message_form_[% patron_message.message_id | uri %]" data-target="#edit_message_form_[% patron_message.message_id | html %]" data-toggle="modal"><i class="fa fa-edit"></i> Edit</a> > <a class="btn btn-link delete_message" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% patron_message.message_id | html %]&borrowernumber=[% patron_message.borrowernumber | html %]"><i class="fa fa-trash"></i> Delete</a> > [% END %] > [% END %] >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 ) %] >- <div id="relatives-issues" role="tabpanel" class="tab-pane"> >- <table id="relatives-issues-table" style="width: 100% !Important;"> >- <thead> >- <tr> >- <th scope="col">Due date (unformatted, hidden)</th> >- <th scope="col">Due date</th> >- <th scope="col">Title</th> >- <th scope="col">Record-level item type</th> >- <th scope="col">Item type</th> >- <th scope="col">Collection</th> >- <th scope="col">Location</th> >- <th scope="col">Checked out on (hidden, unformatted)</th> >- <th scope="col">Checked out on</th> >- <th scope="col">Checked out from</th> >- <th scope="col">Call number</th> >- <th scope="col">Copy number</th> >- <th scope="col">Charge</th> >- <th scope="col">Fine</th> >- <th scope="col">Price</th> >- <th scope="col">Patron</th> >- </tr> >- </thead> >- </table> >- </div> >+ <table id="relatives-issues-table" style="width: 100% !Important;"> >+ <thead> >+ <tr> >+ <th scope="col">Due date (unformatted, hidden)</th> >+ <th scope="col">Due date</th> >+ <th scope="col">Title</th> >+ <th scope="col">Record-level item type</th> >+ <th scope="col">Item type</th> >+ <th scope="col">Collection</th> >+ <th scope="col">Location</th> >+ <th scope="col">Checked out on (hidden, unformatted)</th> >+ <th scope="col">Checked out on</th> >+ <th scope="col">Checked out from</th> >+ <th scope="col">Call number</th> >+ <th scope="col">Copy number</th> >+ <th scope="col">Charge</th> >+ <th scope="col">Fine</th> >+ <th scope="col">Price</th> >+ <th scope="col">Patron</th> >+ </tr> >+ </thead> >+ </table> > [% 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 6fc4e740c5..c37af16ea7 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 @@ > </div> <!-- /div or div.col-sm-6 --> > </div> <!-- /.row --> > >- <div id="patronlists" class="toptabs"> >- <ul class="nav nav-tabs" role="tablist"> >- <li role="presentation" class="active"> >- <a href="#checkouts" aria-controls="checkouts" role="tab" data-toggle="tab">Checkouts ([% issuecount || 0 | html %])</a> >- </li> >- >- [% IF relatives_issues_count %] >- <li role="presentation"> >- <a id="relatives-issues-tab" href="#relatives-issues" aria-controls="relatives-issues" role="tab" data-toggle="tab">Relatives' checkouts ([% relatives_issues_count | html %])</a> >- </li> >- [% END %] >- >- <li role="presentation"> >- <a href="#reserves" id="holds-tab" aria-controls="reserves" role="tab" data-toggle="tab">Holds ([% holds_count || 0 | html %])</a> >- </li> >- >- [% IF Koha.Preference('UseRecalls') %] >- <li role="presentation"> >- <a href="#recalls" id="recalls-tab" aria-controls="recalls" role="tab" data-toggle="tab">Recalls ([% recalls.count || 0 | html %])</a> >- </li> >- [% END %] >- >- [% IF Koha.Preference('ArticleRequests') %] >- [% SET current_article_requests = Context.Scalar( Context.Scalar( patron, 'article_requests' ), 'filter_by_current' ) %] >- <li role="presentation"> >- <a href="#article-requests" id="article-requests-tab" aria-controls="article-requests" role="tab" data-toggle="tab">Article requests ([% current_article_requests.count || 0 | html %])</a> >- </li> >- [% END %] >- >- [% IF Koha.Preference('ClaimReturnedLostValue') || Koha.Preference('BundleLostValue') %] >- <li role="presentation"> >- [% IF ( patron.return_claims.count ) %] >- <a href="#return-claims" id="return-claims-tab" aria-controls="return-claims" role="tab" data-toggle="tab"> >- Claims >- ([% IF patron.return_claims.resolved.count == 0 %] >- <span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span> >- [% ELSE %] >- <span title="Resolved claims" class="label label-success" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span> >- [% END %] >- [% IF patron.return_claims.unresolved.count == 0 %] >- <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span> >- [% ELSE %] >- <span title="Unresolved claims" class="label label-warning" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span> >- [% END %]) >- </a> >- [% ELSE %] >- [% no_claims = 0 %] >- <a href="#return-claims" id="return-claims-tab" aria-controls="return-claims" role="tab" data-toggle="tab"> >- Claims >- (<span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">[% no_claims | html %]</span> >- <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">[% no_claims | html %]</span>) >- </a> >- [% END %] >- </li> >- [% END %] >- >- <li role="presentation"> >- <a id="debarments-tab-link" href="#reldebarments" aria-controls="reldebarments" role="tab" data-toggle="tab">Restrictions ([% patron.restrictions.count || 0 | html %])</a> >- </li> >- >- [% SET enrollments = patron.get_club_enrollments %] >- [% SET enrollable = patron.get_enrollable_clubs(0) %] <!-- 0 => not OPAC --> >- [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %] >- <li role="presentation"> >- <a id="clubs-tab-link" href="#clubs-tab" aria-controls="clubs-tab" role="tab" data-toggle="tab"> >- Clubs ([% enrollments.count | html %]/[% enrollable.count | html %]) >- </a> >- </li> >- [% END %] >- </ul> >- >- <div class="tab-content"> >- <!-- SUMMARY : TODAY & PREVIOUS ISSUES --> >- >- [% INCLUDE "checkouts-table.inc" %] >+ [% INCLUDE 'patron-detail-tabs.inc' patronpage = "circ" %] > >- [% INCLUDE "relatives-issues-table.inc" %] >- >- [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %] >- <div id="clubs-tab" role="tabpanel" class="tab-pane"> >- Loading... >- </div> <!-- /#clubs-tab --> >- [% END %] >- >- [% INCLUDE "patron-restrictions-tab.inc" %] >- >- <div id="reserves" role="tabpanel" class="tab-pane"> >- [% IF ( holds_count ) %] >- <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post"> >- <input type="hidden" name="from" value="circ" /> >- <table id="holds-table" style="width: 100% !Important;"> >- <thead> >- <tr> >- <th>Hold date</th> >- <th>Title</th> >- <th>Call number</th> >- <th>Item type</th> >- <th>Barcode</th> >- <th>Pickup at</th> >- <th>Expiration</th> >- <th>Priority</th> >- <th>Cancel?</th> >- <th>Suspend?</th> >- <th>Status</th> >- </tr> >- </thead> >- </table> >- >- <fieldset class="action"> >- <input type="submit" class="cancel" name="submit" value="Cancel marked holds" /> >- >- [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] >- [% IF hold_cancellation.count %] >- <select name="cancellation-reason"> >- <option value="">No reason given</option> >- [% FOREACH reason IN hold_cancellation %] >- <option value="[% reason.authorised_value | html %]">[% reason.lib | html %]</option> >- [% END %] >- </select> >- [% END %] >- </fieldset> >- </form> >- >- [% IF Koha.Preference('SuspendHoldsIntranet') %] >- <fieldset class="action"> >- <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post"> >- <input type="hidden" name="from" value="circ" /> >- <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> >- <input type="submit" class="btn btn-primary" value="Suspend all holds" /> >- >- [% IF Koha.Preference('AutoResumeSuspendedHolds') %] >- <label for="suspend_until">until</label> >- <input type="text" size="10" id="suspend_until" name="suspend_until" class="flatpickr" data-flatpickr-futuredate="true" /> >- <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span> >- [% END %] >- </form> >- </fieldset> >- >- <fieldset class="action"> >- <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post"> >- <input type="hidden" name="from" value="circ" /> >- <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> >- <input type="hidden" name="suspend" value="0" /> >- <input type="submit" class="btn btn-primary" value="Resume all suspended holds" /> >- </form> >- </fieldset> >- [% END # /IF SuspendHoldsIntranet %] >- >- [% ELSE # IF holds_count %] >- <p>Patron has nothing on hold.</p> >- [% END # /IF holds_count %] >- </div> <!-- /#reserves --> >- >- [% IF Koha.Preference('UseRecalls') %] >- <div id="recalls" role="tabpanel" class="tab-pane"> >- [% INCLUDE 'recalls.inc' %] >- </div> >- [% END %] >- >- [% IF Koha.Preference('ClaimReturnedLostValue') || Koha.Preference('BundleLostValue') %] >- [% INCLUDE 'patron-return-claims.inc' %] >- [% END %] >- >- [% IF Koha.Preference('ArticleRequests') %] >- [% INCLUDE 'patron-article-requests.inc' %] >- [% END %] >- </div> <!-- /.tab-content --> >- </div> <!-- /#patronlists --> > [% ELSIF borrowernumber # IF patron %] > <div class="dialog message">Patron not found. <a href="/cgi-bin/koha/members/members-home.pl">Return to search</a></div> > [% END # /IF patron %] >@@ -1102,13 +936,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 ddfe228327..43b8b5a245 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 6baa7e2ace..991cf3c3c3 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 @@ > </div> <!-- /div.col-sm-6 --> > </div> <!-- /div.row --> > >- <div id="finesholdsissues" class="toptabs"> >- <ul class="nav nav-tabs" role="tablist"> >- <li role="presentation" class="active"> >- <a href="#checkouts" aria-controls="checkouts" role="tab" data-toggle="tab">Checkouts ([% issuecount || 0 | html %])</a> >- </li> >- [% IF relatives_issues_count %] >- <li role="presentation"> >- <a href="#relatives-issues" id="relatives-issues-tab" aria-controls="relatives-issues" role="tab" data-toggle="tab">Relatives' checkouts ([% relatives_issues_count | html %])</a> >- </li> >- [% END %] >- [% IF ( fines ) %] >- <li role="presentation" id="finestab"> >- <a href="#finesandcharges" aria-controls="finesandcharges" role="tab" data-toggle="tab">Charges ([% fines | $Price %])</a> >- </li> >- [% END %] >- [% IF ( guarantees_fines ) %] >- <li role="presentation" id="guarantees_finestab"> >- <a href="#guarantees_finesandcharges" aria-controls="guarantees_finesandcharges" role="tab" data-toggle="tab">Guarantees' charges ([% guarantees_fines | $Price %])</a> >- </li> >- [% END %] >- [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] >- <li role="presentation"> >- <a href="#reserves" id="holds-tab" aria-controls="reserves" role="tab" data-toggle="tab">Holds ([% holds_count || 0 | html %])</a> >- </li> >- [% END %] >+ [% INCLUDE 'patron-detail-tabs.inc' patronpage = "borrower" %] > >- [% IF Koha.Preference('UseRecalls') %] >- <li role="presentation"> >- <a href="#recalls" id="recalls-tab" aria-controls="recalls" role="tab" data-toggle="tab">Recalls ([% recalls.count || 0 | html %])</a> >- </li> >- [% END %] >- >- [% IF Koha.Preference('ArticleRequests') %] >- [% SET article_requests = Context.Scalar( Context.Scalar( patron, 'article_requests' ), 'filter_by_current') %] >- <li role="presentation"> >- <a href="#article-requests" id="article-requests-tab" aria-controls="article-requests" role="tab" data-toggle="tab">Article requests ([% article_requests.count || 0 | html %])</a> >- </li> >- [% END %] >- >- [% IF Koha.Preference('ClaimReturnedLostValue') || Koha.Preference('BundleLostValue') %] >- <li role="presentation"> >- [% IF ( patron.return_claims.count ) %] >- <a href="#return-claims" id="return-claims-tab" aria-controls="return-claims" role="tab" data-toggle="tab"> >- Claims >- ([% IF patron.return_claims.resolved.count == 0 %] >- <span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span> >- [% ELSE %] >- <span title="Resolved claims" class="label label-success" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span> >- [% END %] >- [% IF patron.return_claims.unresolved.count == 0 %] >- <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span> >- [% ELSE %] >- <span title="Unresolved claims" class="label label-warning" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span> >- [% END %]) >- </a> >- [% ELSE %] >- [% no_claims = 0 %] >- <a href="#return-claims" id="return-claims-tab" aria-controls="return-claims" role="tab" data-toggle="tab"> >- Claims >- (<span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">[% no_claims | html %]</span> >- <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">[% no_claims | html %]</span>) >- </a> >- [% END %] >- </li> >- [% END %] >- >- <li role="presentation"> >- <a id="debarments-tab-link" href="#reldebarments" aria-controls="reldebarments" role="tab" data-toggle="tab">Restrictions ([% patron.restrictions.count | html %])</a> >- </li> >- >- [% SET enrollments = patron.get_club_enrollments %] >- [% SET enrollable = patron.get_enrollable_clubs(0) %] <!-- 0 => not OPAC --> >- [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %] >- <li role="presentation"> >- <a id="clubs-tab-link" href="#clubs-tab" aria-controls="checkouts" role="tab" data-toggle="tab"> >- Clubs ([% enrollments.count | html %]/[% enrollable.count | html %]) >- </a> >- </li> >- [% END %] >- </ul> >- >- <div class="tab-content"> >- [% INCLUDE "checkouts-table.inc" %] >- >- [% INCLUDE "relatives-issues-table.inc" %] >- >- [% IF ( fines ) %] >- <div id="finesandcharges" role="tabpanel" class="tab-pane"> >- [% IF ( fines ) %] >- <p>Total due: [% fines | $Price %]</p> >- [% ELSE %] >- <p>No outstanding charges</p> >- [% END %] >- </div> >- [% END %] >- >- [% IF ( guarantees_fines ) %] >- <div id="guarantees_finesandcharges" role="tabpanel" class="tab-pane"> >- <table id="tguaranteesfines"> >- <thead> >- <tr> >- <th>Guarantee</th> >- <th>Amount outstanding</th> >- </tr> >- </thead> >- [% FOREACH guarantee IN guarantees %] >- <tr> >- <td>[% INCLUDE 'patron-title.inc' patron=guarantee hide_patron_infos_if_needed=1 %]</td> >- [% IF logged_in_user.can_see_patron_infos( guarantee ) %] >- <td>[% guarantee.account.balance | $Price %]</td> >- [% ELSE %] >- <td>-</td> >- [% END %] >- </tr> >- [% END %] >- <tfoot> >- <td>Total due</td> >- <td>[% guarantees_fines | $Price %]</td> >- </tfoot> >- </table> >- </div> >- [% END %] >- >- [% IF CAN_user_clubs && ( enrollments.count || enrollable.count ) %] >- <div id="clubs-tab" role="tabpanel" class="tab-pane"> >- Loading... >- </div> >- [% END %] >- >- [% INCLUDE 'patron-restrictions-tab.inc' %] >- >- [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] >- <div id="reserves" role="tabpanel" class="tab-pane"> >- [% IF ( holds_count ) %] >- <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post"> >- <input type="hidden" name="from" value="circ" /> >- <table id="holds-table" style="width: 100% !Important;"> >- <thead> >- <tr> >- <th>Hold date</th> >- <th>Title</th> >- <th>Call number</th> >- <th>Item type</th> >- <th>Barcode</th> >- <th>Pickup at</th> >- <th>Expiration</th> >- <th>Priority</th> >- <th>Delete?</th> >- <th>Suspend?</th> >- <th>Status</th> >- </tr> >- </thead> >- </table> >- >- <fieldset class="action"> >- <input type="submit" class="cancel" name="submit" value="Cancel marked holds" /> >- >- [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] >- [% IF hold_cancellation.count %] >- <label for="cancellation-reason">Cancellation reason:</label> >- <select name="cancellation-reason"> >- <option value="">No reason given</option> >- [% FOREACH reason IN hold_cancellation %] >- <option value="[% reason.authorised_value | html %]">[% reason.lib | html %]</option> >- [% END %] >- </select> >- [% END %] >- </fieldset> >- </form> >- >- [% IF Koha.Preference('SuspendHoldsIntranet') %] >- <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post"> >- <fieldset class="action"> >- <input type="hidden" name="from" value="borrower" /> >- <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> >- <input type="submit" class="btn btn-primary" value="Suspend all holds" /> >- >- [% IF Koha.Preference('AutoResumeSuspendedHolds') %] >- <label for="suspend_until">until</label> >- <input type="text" size="10" id="suspend_until" name="suspend_until" class="flatpickr" data-flatpickr-futuredate="true"/> >- <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span> >- [% END %] >- </fieldset> >- </form> >- >- <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post"> >- <fieldset class="action"> >- <input type="hidden" name="from" value="borrower" /> >- <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> >- <input type="hidden" name="suspend" value="0" /> >- <input type="submit" class="btn btn-primary" value="Resume all suspended holds" /> >- </fieldset> >- </form> >- [% END # IF SuspendHoldsIntranet %] >- >- [% ELSE %] >- <p>Patron has nothing on hold.</p> >- [% END %] >- </div> [% # /div#reserves %] >- [% END %] >- >- [% IF Koha.Preference('UseRecalls') %] >- <div id="recalls" role="tabpanel" class="tab-pane"> >- [% INCLUDE 'recalls.inc' %] >- </div> >- [% END %] >- >- [% IF Koha.Preference('ClaimReturnedLostValue') %] >- [% INCLUDE 'patron-return-claims.inc' %] >- [% END %] >- >- [% IF Koha.Preference('ArticleRequests') %] >- [% INCLUDE 'patron-article-requests.inc' %] >- [% END %] >- </div> <!-- /.tab-content --> >- </div> <!-- /div#finesholdsissues --> > </main> > </div> <!-- /.col-sm-10.col-sm-push-2 --> > >@@ -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(); > }); > > }); >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.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33528
:
151313
|
151887
|
151935
|
151980
|
151984
|
152216
|
152291
|
152292
|
152344