Bugzilla – Attachment 141612 Details for
Bug 30487
Convert checkout and patron details page tabs to Bootstrap
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30487: Convert checkout and patron details page tabs to Bootstrap
Bug-30487-Convert-checkout-and-patron-details-page.patch (text/plain), 46.91 KB, created by
Owen Leonard
on 2022-10-11 16:21:27 UTC
(
hide
)
Description:
Bug 30487: Convert checkout and patron details page tabs to Bootstrap
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2022-10-11 16:21:27 UTC
Size:
46.91 KB
patch
obsolete
>From 895932c45ae2aea2dfc49d77136e593f0fc0281d Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 7 Apr 2022 10:54:38 +0000 >Subject: [PATCH] Bug 30487: Convert checkout and patron details page tabs to > Bootstrap > >This patch updates the checkout and patron details pages, updating >jQueryUI tabs to Bootstrap tabs. > >To test, apply the patch and rebuild the staff interface CSS >(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). > >Go to Circulation -> Check out and load a patron record for checkout. >Ideally the patron record should have a variet of data associated with >it: > > - Checkouts > - Relative's checkouts (if patron is a guarantor or guarantee to > another patron with checkouts) > - Holds > - Article requests > - Claims > - Restrictions > - Clubs > >On the patron's checkout page, test the various tabs corresponding to >the features listed above. Having data to display in those tabs helps >confirm that any table functionality triggered by the tab activation is >working correctly. > >The checkouts tab should work correctly whether you have "Always show >checkouts immediately" checked or not. > >Test that you can pre-select any tab by appending its anchor to the URL, >e.g.: > >/cgi-bin/koha/circ/circulation.pl?borrowernumber=123#reserves > >Perform the same checks on the patron details page. >--- > .../prog/css/src/staff-global.scss | 6 - > .../prog/en/includes/blocked-fines.inc | 2 +- > .../prog/en/includes/borrower_debarments.inc | 2 +- > .../prog/en/includes/checkouts-table.inc | 2 +- > .../en/includes/patron-article-requests.inc | 2 +- > .../prog/en/includes/patron-return-claims.inc | 2 +- > .../en/includes/relatives-issues-table.inc | 2 +- > .../prog/en/modules/circ/circulation.tt | 211 +++++++-------- > .../prog/en/modules/members/moremember.tt | 242 +++++++++--------- > koha-tmpl/intranet-tmpl/prog/js/holds.js | 2 +- > .../prog/js/pages/circulation.js | 12 +- > 11 files changed, 239 insertions(+), 246 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >index def560e936..e833601af2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -1402,12 +1402,6 @@ div { > } > } > >-#reserves, >-#checkouts { >- border: 1px solid #B9D8D9; >- padding: 1em; >-} >- > #sales { > display: none; > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc >index 7625708ecf..b53f98d2f6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc >@@ -9,7 +9,7 @@ > [% END %] > [% IF CAN_user_updatecharges_remaining_permissions %] > <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber | uri %]" class="btn btn-default btn-xs" >Make payment</a> >- <a href="/cgi-bin/koha/members/paycollect.pl?borrowernumber=[% patron.borrowernumber | uri %]" class="btn btn-default btn-xs" >Pay all charges</a></li> >+ <a href="/cgi-bin/koha/members/paycollect.pl?borrowernumber=[% patron.borrowernumber | uri %]" class="btn btn-default btn-xs" >Pay all charges</a> > [% END %] > </li> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc >index c70073db7a..c6b7dff63e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc >@@ -1,7 +1,7 @@ > [% USE raw %] > [% USE Koha %] > [% PROCESS 'patron_restrictions.inc' %] >-<div id="reldebarments"> >+<div id="reldebarments" role="tabpanel" class="tab-pane"> > [% IF ( not debarments.defined || debarments.size < 1 ) %] > <p>Patron is currently unrestricted.</p> > [% ELSE %] >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 ab75568e52..68e43464f2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc >@@ -1,7 +1,7 @@ > [% USE Koha %] > [% PROCESS 'modal-claims.inc' %] > [% INCLUDE 'format_price.inc' %] >-<div id="checkouts"> >+<div id="checkouts" role="tabpanel" class="tab-pane active"> > [% IF ( issuecount ) %] > <div id="issues-table-loading-message"> > <p> >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 d326859f18..efde7d0dd9 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,6 @@ > [% USE Context %] > [% SET current_article_requests = Context.Scalar( Context.Scalar( patron, 'article_requests' ), 'filter_by_current' ) %] >-<div id="article-requests"> >+<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> >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 b2ad9700a9..4aee20ccab 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,4 +1,4 @@ >-<div id="return-claims"> >+<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> >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 f3ad849562..5c8956397c 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,6 +1,6 @@ > [% USE Koha %] > [% IF ( relatives_issues_count ) %] >- <div id="relatives-issues"> >+ <div id="relatives-issues" role="tabpanel" class="tab-pane"> > <table id="relatives-issues-table" style="width: 100% !Important;"> > <thead> > <tr> >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 e194dfc3d5..7b5e62f2eb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -814,38 +814,38 @@ > </div> <!-- /.row --> > > <div id="patronlists" class="toptabs"> >- <ul> >- <li> >- <a href="#checkouts">Checkouts ([% issuecount || 0 | html %])</a> >+ <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> >- <a id="relatives-issues-tab" href="#relatives-issues">Relatives' checkouts ([% relatives_issues_count | html %])</a> >+ <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> >- <a href="#reserves" id="holds-tab">Holds ([% holds_count || 0 | html %])</a> >+ <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> >- <a href="#recalls" id="recalls-tab">Recalls ([% recalls.count || 0 | html %])</a> >+ <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> >- <a href="#article-requests" id="article-requests-tab">Article requests ([% current_article_requests.count || 0 | html %])</a> >+ <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> >+ <li role="presentation"> > [% IF ( patron.return_claims.count ) %] >- <a href="#return-claims" id="return-claims-tab"> >+ <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> >@@ -859,7 +859,7 @@ > [% END %]) > </a> > [% ELSE %] >- <a href="#return-claims" id="return-claims-tab"> >+ <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">0</span> > <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">0</span>) >@@ -868,116 +868,117 @@ > </li> > [% END %] > >- <li> >- <a id="debarments-tab-link" href="#reldebarments">Restrictions ([% debarments.size || 0 | html %])</a> >+ <li role="presentation"> >+ <a id="debarments-tab-link" href="#reldebarments" aria-controls="reldebarments" role="tab" data-toggle="tab">Restrictions ([% debarments.size || 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> >- <a id="clubs-tab-link" href="#clubs-tab"> >+ <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> > >- <!-- SUMMARY : TODAY & PREVIOUS ISSUES --> >+ <div class="tab-content"> >+ <!-- SUMMARY : TODAY & PREVIOUS ISSUES --> > >- [% INCLUDE "checkouts-table.inc" %] >+ [% INCLUDE "checkouts-table.inc" %] > >- [% INCLUDE "relatives-issues-table.inc" %] >+ [% INCLUDE "relatives-issues-table.inc" %] > >- [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %] >- <div id="clubs-tab"> >- Loading... >- </div> <!-- /#clubs-tab --> >- [% END %] >+ [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %] >+ <div id="clubs-tab" role="tabpanel" class="tab-pane"> >+ Loading... >+ </div> <!-- /#clubs-tab --> >+ [% END %] > >- [% INCLUDE borrower_debarments.inc %] >- >- <div id="reserves"> >- [% 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> >+ [% INCLUDE borrower_debarments.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" 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" 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"> >- [% INCLUDE 'recalls.inc' %] >- </div> >- [% END %] >+ [% 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" 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" 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('ClaimReturnedLostValue') || Koha.Preference('BundleLostValue') %] >- [% INCLUDE 'patron-return-claims.inc' %] >- [% END %] >+ [% IF Koha.Preference('UseRecalls') %] >+ <div id="recalls" role="tabpanel" class="tab-pane"> >+ [% INCLUDE 'recalls.inc' %] >+ </div> >+ [% END %] > >- [% IF Koha.Preference('ArticleRequests') %] >- [% INCLUDE 'patron-article-requests.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 %] >+ </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> >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 791693195d..f21304388e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -643,43 +643,43 @@ > </div> <!-- /div.row --> > > <div id="finesholdsissues" class="toptabs"> >- <ul> >- <li> >- <a href="#checkouts">Checkouts ([% issuecount || 0 | html %])</a> >+ <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> >- <a href="#relatives-issues" id="relatives-issues-tab">Relatives' checkouts ([% relatives_issues_count | html %])</a> >+ <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 id="finestab"> >- <a href="#finesandcharges">Charges ([% fines | $Price %])</a> >+ <li role="presentation" id="finestab"> >+ <a href="#finesandcharges" aria-controls="finesandcharges" role="tab" data-toggle="tab">Charges ([% fines | $Price %])</a> > </li> > [% END %] > [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] >- <li> >- <a href="#reserves" id="holds-tab">Holds ([% holds_count || 0 | html %])</a> >+ <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 %] > > [% IF Koha.Preference('UseRecalls') %] >- <li> >- <a href="#recalls" id="recalls-tab">Recalls ([% recalls.count || 0 | html %])</a> >+ <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> >- <a href="#article-requests" id="article-requests-tab">Article requests ([% article_requests.count || 0 | html %])</a> >+ <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> >+ <li role="presentation"> > [% IF ( patron.return_claims.count ) %] >- <a href="#return-claims" id="return-claims-tab"> >+ <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> >@@ -693,7 +693,7 @@ > [% END %]) > </a> > [% ELSE %] >- <a href="#return-claims" id="return-claims-tab"> >+ <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">0</span> > <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">0</span>) >@@ -702,127 +702,128 @@ > </li> > [% END %] > >- <li> >- <a id="debarments-tab-link" href="#reldebarments">Restrictions ([% debarments.size || 0 | html %])</a> >+ <li role="presentation"> >+ <a id="debarments-tab-link" href="#reldebarments" aria-controls="reldebarments" role="tab" data-toggle="tab">Restrictions ([% debarments.size || 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> >- <a id="clubs-tab-link" href="#clubs-tab"> >+ <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> > >- [% INCLUDE "checkouts-table.inc" %] >+ <div class="tab-content"> >+ [% INCLUDE "checkouts-table.inc" %] > >- [% INCLUDE "relatives-issues-table.inc" %] >+ [% INCLUDE "relatives-issues-table.inc" %] > >- [% IF ( fines ) %] >- <div id="finesandcharges"> >- [% IF ( fines ) %] >- <p>Total due: [% fines | $Price %]</p> >- [% ELSE %] >- <p>No outstanding charges</p> >- [% END %] >- </div> >- [% END %] >+ [% 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 CAN_user_clubs && ( enrollments.count || enrollable.count ) %] >- <div id="clubs-tab"> >- Loading... >- </div> >- [% END %] >+ [% IF CAN_user_clubs && ( enrollments.count || enrollable.count ) %] >+ <div id="clubs-tab" role="tabpanel" class="tab-pane"> >+ Loading... >+ </div> >+ [% END %] > >- [% INCLUDE borrower_debarments.inc %] >- >- [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] >- <div id="reserves"> >- [% 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> >+ [% INCLUDE borrower_debarments.inc %] > >- [% 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" 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> >+ [% 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> > >- <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" value="Resume all suspended holds" /> >+ <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> >- [% END # IF SuspendHoldsIntranet %] > >- [% ELSE %] >- <p>Patron has nothing on hold.</p> >- [% END %] >- </div> [% # /div#reserves %] >- [% END %] >+ [% 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" 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" value="Resume all suspended holds" /> >+ </fieldset> >+ </form> >+ [% END # IF SuspendHoldsIntranet %] > >- [% IF Koha.Preference('UseRecalls') %] >- <div id="recalls"> >- [% INCLUDE 'recalls.inc' %] >- </div> >- [% END %] >+ [% ELSE %] >+ <p>Patron has nothing on hold.</p> >+ [% END %] >+ </div> [% # /div#reserves %] >+ [% END %] > >- [% IF Koha.Preference('ClaimReturnedLostValue') %] >- [% INCLUDE 'patron-return-claims.inc' %] >- [% END %] >+ [% IF Koha.Preference('UseRecalls') %] >+ <div id="recalls" role="tabpanel" class="tab-pane"> >+ [% INCLUDE 'recalls.inc' %] >+ </div> >+ [% END %] > >- [% IF Koha.Preference('ArticleRequests') %] >- [% INCLUDE 'patron-article-requests.inc' %] >- [% 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 --> >@@ -891,19 +892,12 @@ > }); > } > >- $('#finesholdsissues').tabs({ >- // Correct table sizing for tables hidden in tabs >- // http://www.datatables.net/examples/api/tabs_and_scrolling.html >- "show": function(event, ui) { >- var oTable = $('div.dataTables_wrapper>table', ui.panel).dataTable(); >- if ( oTable.length > 0 ) { >- oTable.fnAdjustColumnSizing(); >- } >- }, >- "activate": function( event, ui ) { >- $("a", ui.newTab ).click(); >+ $("#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 ) { >+ oTable.fnAdjustColumnSizing(); > } >- } ); >+ }); > > $("#view_restrictions").on("click",function(){ > $('#debarments-tab-link').click(); >diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js >index 964528a33d..58ecb622c2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js >@@ -120,7 +120,7 @@ $(document).ready(function() { > $("#holds-tab").on( "click", function(){ load_holds_table() } ); > > // If the holds tab is preselected on load, we need to load the table >- if ( $("#holds-tab").parent().hasClass('ui-state-active') ) { load_holds_table() } >+ if ( $("#holds-tab").parent().hasClass('active') ) { load_holds_table() } > > function load_holds_table() { > var holds = new Array(); >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js b/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js >index db8576f442..b628b3951c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js >@@ -8,10 +8,8 @@ $(document).ready(function() { > return false; > }); > >- $('#patronlists').tabs({ >- activate: function( event, ui ) { >- $("a", ui.newTab ).click(); >- } >+ $("#patronlists a[data-toggle='tab']").on("shown.bs.tab", function(e){ >+ $(this).click(); > }); > > $("#borrower_messages .cancel").on("click",function(){ >@@ -91,6 +89,12 @@ $(document).ready(function() { > $("#" + fieldID).val(""); > }); > >+ /* Preselect Bootstrap tab based on location hash */ >+ var hash = window.location.hash.substring(1); >+ if( hash ){ >+ var activeTab = $('a[href="#' + hash + '"]'); >+ activeTab && activeTab.tab('show'); >+ } > > }); > >-- >2.20.1
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 30487
:
141612
|
141624
|
141894
|
141959