Bugzilla – Attachment 184568 Details for
Bug 37219
In OPAC item holds, separate copy number from radio button and add table configuration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37219: In OPAC item holds, separate copy number from radio button and add table configuration
Bug-37219-In-OPAC-item-holds-separate-copy-number-.patch (text/plain), 90.08 KB, created by
Owen Leonard
on 2025-07-23 18:17:36 UTC
(
hide
)
Description:
Bug 37219: In OPAC item holds, separate copy number from radio button and add table configuration
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-07-23 18:17:36 UTC
Size:
90.08 KB
patch
obsolete
>From bec50e08475533fdbd48b247a466636402dbc3d8 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 23 Jul 2025 14:06:03 +0000 >Subject: [PATCH] Bug 37219: In OPAC item holds, separate copy number from > radio button and add table configuration > >This patch changes the way items are displayed during the process of >placing a single or multiple item-level holds in the OPAC. The >item-selection radio button is now in a separate column from copy >number, and the columns can be configured. > >Note: This patch includes indentation changes by the tidy script, so >ignore whitespace when viewing the diff. > >The patch also includes some code changes to hide the copy number column >if it contains no data. > >To test, apply the patch and restart services. > >- If necessary, go to Administration -> Circulation and fine rules and > enable item-level holds in one of the rules. >- Log in to the OPAC and start the process of placing a hold on a title > which falls under your configured circulation rule. >- On the place hold page, click "Show more options" and "A specific > item" to show the table of items. >- The radio buttons and copy numbers should appear in separate columns. >- Go to Administration -> Table settings -> OPAC -> opac_holds and > change the table's configuration to hide one or more columns. >- Return to the OPAC holds process and confirm that the table reflects > your configuration changes. >- Perform the same test with multiple holds (selecting multiple items in > catalog search results). > >Sponsored-by: Athens County Public Libraries >--- > admin/columns_settings.yml | 28 + > .../opac-tmpl/bootstrap/css/src/opac.scss | 5 - > .../bootstrap/en/modules/opac-reserve.tt | 908 +++++++++--------- > opac/opac-reserve.pl | 20 +- > 4 files changed, 506 insertions(+), 455 deletions(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index 21e8e8a6186..129a6cdec65 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -2346,6 +2346,34 @@ modules: > - > columnname: link > >+ opac_holds: >+ opac_holds_items: >+ columns: >+ - >+ cannot_be_toggled: 1 >+ cannot_be_modified: 1 >+ columnname: selection >+ - >+ columnname: copy_number >+ - >+ columnname: itemtype >+ - >+ columnname: barcode >+ - >+ columnname: current_library >+ - >+ columnname: home_library >+ - >+ columnname: collection >+ - >+ columnname: call_number >+ - >+ columnname: enumchron >+ - >+ columnname: notes >+ - >+ columnname: information >+ > serials: > subscription-detail: > orders: >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >index 05063f81603..6c8ab039ea0 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >+++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >@@ -2315,11 +2315,6 @@ nav { > } > } > >-#holds { >- margin: 0 auto; >- max-width: 800px; >-} >- > .holdrow { > border-bottom: 1px solid #CCC; > clear: both; >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >index 6a7fb94e4f8..d89295141e1 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >@@ -5,6 +5,7 @@ > [% USE Price %] > [% USE ItemTypes %] > [% USE AuthorisedValues %] >+[% USE TablesSettings %] > [% SET reserve_input_type = 'radio' %] > [% IF ( Koha.Preference('DisplayMultiItemHolds') ) %] > [% SET reserve_input_type = 'checkbox' %] >@@ -27,481 +28,492 @@ > [% END #/ WRAPPER breadcrumbs %] > > <div class="container-fluid"> >- <div id="holds" class="maincontent"> >- <h1>Placing a hold</h1> >- [% IF ( message ) %] >- <div id="holdmessages" class="alert alert-warning"> >- <h2>Sorry, you cannot place holds.</h2> >- <ul> >- [% IF ( GNA ) %] >- <li id="gna"> >- According to our records, we don't have up-to-date contact information. Please contact the library. >- <a href="/cgi-bin/koha/opac-memberentry.pl">[% IF ( Koha.Preference('OPACPatronDetails') ) %]<span>Update your contact information</span>[% ELSE %]<span>Go to your contact information</span>[% END %]</a> >- [% IF ( Koha.Preference('OPACPatronDetails') ) %]<em>(Please note: there may be a delay in restoring your account if you submit online.)</em>[% END %] >- </li> >- [% END %] >+ <div class="row"> >+ <div class="col-md-12 offset-md-0 col-lg-10 offset-lg-1"> >+ <div id="holds" class="maincontent"> >+ <h1>Placing a hold</h1> >+ [% IF ( message ) %] >+ <div id="holdmessages" class="alert alert-warning"> >+ <h2>Sorry, you cannot place holds.</h2> >+ <ul> >+ [% IF ( GNA ) %] >+ <li id="gna"> >+ According to our records, we don't have up-to-date contact information. Please contact the library. >+ <a href="/cgi-bin/koha/opac-memberentry.pl" >+ >[% IF ( Koha.Preference('OPACPatronDetails') ) %]<span>Update your contact information</span>[% ELSE %]<span>Go to your contact information</span>[% END %]</a >+ > >+ [% IF ( Koha.Preference('OPACPatronDetails') ) %]<em>(Please note: there may be a delay in restoring your account if you submit online.)</em>[% END %] >+ </li> >+ [% END %] > >- [% IF ( lost ) %] >- <li id="lost"> >- Your library card has been marked as lost or stolen.<br /> >- <em>If this is an error, please take your library card to the circulation desk at your local library and the error will be corrected.</em> >- </li> >- [% END %] >+ [% IF ( lost ) %] >+ <li id="lost"> >+ Your library card has been marked as lost or stolen.<br /> >+ <em>If this is an error, please take your library card to the circulation desk at your local library and the error will be corrected.</em> >+ </li> >+ [% END %] > >- [% IF ( debarred ) %] >- [% INCLUDE "patron-restrictions.inc" %] >- [% END %] >+ [% IF ( debarred ) %] >+ [% INCLUDE "patron-restrictions.inc" %] >+ [% END %] > >- [% IF ( too_much_oweing ) %] >- <li id="too_much_oweing"> You have unpaid fines. Amount: [% too_much_oweing | $Price %]. </li> >- [% END %] >+ [% IF ( too_much_oweing ) %] >+ <li id="too_much_oweing"> You have unpaid fines. Amount: [% too_much_oweing | $Price %]. </li> >+ [% END %] > >- [% IF ( too_many_reserves ) %] >- <li id="too_many_reserves"> Sorry, you cannot place more than [% too_many_reserves | html %] holds. </li> >- [% END %] >+ [% IF ( too_many_reserves ) %] >+ <li id="too_many_reserves"> Sorry, you cannot place more than [% too_many_reserves | html %] holds. </li> >+ [% END %] > >- [% IF ( bad_biblionumber ) %] >- <li id="bad_biblionumber"> ERROR: No record found for record ID [% bad_biblionumber | html %]. </li> >- [% END %] >+ [% IF ( bad_biblionumber ) %] >+ <li id="bad_biblionumber"> ERROR: No record found for record ID [% bad_biblionumber | html %]. </li> >+ [% END %] > >- [% IF ( no_items_selected ) %] >- <li id="no_items_selected"> You must select at least one item. </li> >- [% END %] >+ [% IF ( no_items_selected ) %] >+ <li id="no_items_selected"> You must select at least one item. </li> >+ [% END %] > >- [% IF ( no_branch_selected ) %] >- <li id="no_branch_selected"> You must select a library for pickup. </li> >- [% END %] >+ [% IF ( no_branch_selected ) %] >+ <li id="no_branch_selected"> You must select a library for pickup. </li> >+ [% END %] > >- [% IF ( no_biblionumber ) %] >- <li id="no_biblionumber"> ERROR: No record ID specified. </li> >- [% END %] >+ [% IF ( no_biblionumber ) %] >+ <li id="no_biblionumber"> ERROR: No record ID specified. </li> >+ [% END %] > >- [% IF ( bad_data ) %] >- <li id="bad_data"> ERROR: Internal error: incomplete hold request. </li> >- [% END %] >+ [% IF ( bad_data ) %] >+ <li id="bad_data"> ERROR: Internal error: incomplete hold request. </li> >+ [% END %] > >- [% IF ( expired_patron ) %] >- <li id="expired_patron"> Your library card has expired. Please contact your librarian if you wish to renew your card. </li> >- [% END %] >+ [% IF ( expired_patron ) %] >+ <li id="expired_patron"> Your library card has expired. Please contact your librarian if you wish to renew your card. </li> >+ [% END %] > >- [% IF ( no_pickup_locations ) %] >- <li id="no_pickup_locations"> None of the libraries are available for pickup location. </li> >- [% END %] >- </ul> >- </div> >- <!-- /.message --> >- [% ELSE # /IF message %] >+ [% IF ( no_pickup_locations ) %] >+ <li id="no_pickup_locations"> None of the libraries are available for pickup location. </li> >+ [% END %] >+ </ul> >+ </div> >+ <!-- /.message --> >+ [% ELSE # /IF message %] > >- [% IF ( none_available && multi_hold ) %] >- <div id="none_available" class="alert"> Sorry, none of these titles can be placed on hold. </div> >- [% END %] >- [% END # / IF message %] >+ [% IF ( none_available && multi_hold ) %] >+ <div id="none_available" class="alert"> Sorry, none of these titles can be placed on hold. </div> >+ [% END %] >+ [% END # / IF message %] > >- [% UNLESS ( message ) %] >- [% UNLESS ( none_available ) %] >- <h2>Confirm holds for:[% INCLUDE 'patron-title.inc' patron = logged_in_user %] ([% logged_in_user.cardnumber | html %])</h2> >- [% END # / UNLESS none_available %] >+ [% UNLESS ( message ) %] >+ [% UNLESS ( none_available ) %] >+ <h2>Confirm holds for:[% INCLUDE 'patron-title.inc' patron = logged_in_user %] ([% logged_in_user.cardnumber | html %])</h2> >+ [% END # / UNLESS none_available %] > >- [% IF ( new_reserves_allowed ) %] >- <div id="new_reserves_allowed" class="alert"> <strong>Sorry,</strong> you can only place [% new_reserves_allowed | html %] more holds. Please uncheck the checkboxes for the items you wish to not place holds on. </div> >- [% END %] >+ [% IF ( new_reserves_allowed ) %] >+ <div id="new_reserves_allowed" class="alert"> >+ <strong>Sorry,</strong> you can only place [% new_reserves_allowed | html %] more holds. Please uncheck the checkboxes for the items you wish to not place holds on. >+ </div> >+ [% END %] > >- <form action="/cgi-bin/koha/opac-reserve.pl" method="post" id="hold-request-form"> >- [% INCLUDE 'csrf-token.inc' %] >- <legend class="sr-only">Hold requests</legend> >- <input type="hidden" name="op" value="cud-place_reserve" /> >- <!-- These values are set dynamically by js --> >- <input type="hidden" name="biblionumbers" id="biblionumbers" /> >- <input type="hidden" name="selecteditems" id="selections" /> >- <div id="bigloop"> >- [% FOREACH bibitemloo IN bibitemloop %] >- <div class="holdrow"> >- [% IF bibitemloo.forced_hold_level %] >- <div class="alert alert-info forced_hold_level"> >- [% IF bibitemloo.forced_hold_level == 'item' %] >- <span>You already have at least one item level hold on this title. All further holds must be item level.</span> >- [% ELSE %] >- <span>You already have at least one record level hold on this title. All further holds must be record level.</span> >+ <form action="/cgi-bin/koha/opac-reserve.pl" method="post" id="hold-request-form"> >+ [% INCLUDE 'csrf-token.inc' %] >+ <legend class="sr-only">Hold requests</legend> >+ <input type="hidden" name="op" value="cud-place_reserve" /> >+ <!-- These values are set dynamically by js --> >+ <input type="hidden" name="biblionumbers" id="biblionumbers" /> >+ <input type="hidden" name="selecteditems" id="selections" /> >+ <div id="bigloop"> >+ [% FOREACH bibitemloo IN bibitemloop %] >+ <div class="holdrow"> >+ [% IF bibitemloo.forced_hold_level %] >+ <div class="alert alert-info forced_hold_level"> >+ [% IF bibitemloo.forced_hold_level == 'item' %] >+ <span>You already have at least one item level hold on this title. All further holds must be item level.</span> >+ [% ELSE %] >+ <span>You already have at least one record level hold on this title. All further holds must be record level.</span> >+ [% END %] >+ </div> > [% END %] >- </div> >- [% END %] > >- [% IF ( bibitemloo.reserve_charge ) %] >- <div class="alert" id="reserve_fee"> >- [% IF Koha.Preference('HoldFeeMode') == 'any_time_is_collected' %] >- <span>You will be charged a hold fee of [% bibitemloo.reserve_charge | $Price %] when you collect this item</span> >- [% ELSE %] >- <span>You will be charged a hold fee of [% bibitemloo.reserve_charge | $Price %] for placing this hold</span> >+ [% IF ( bibitemloo.reserve_charge ) %] >+ <div class="alert" id="reserve_fee"> >+ [% IF Koha.Preference('HoldFeeMode') == 'any_time_is_collected' %] >+ <span>You will be charged a hold fee of [% bibitemloo.reserve_charge | $Price %] when you collect this item</span> >+ [% ELSE %] >+ <span>You will be charged a hold fee of [% bibitemloo.reserve_charge | $Price %] for placing this hold</span> >+ [% END %] >+ </div> > [% END %] >- </div> >- [% END %] > >- <p> >- [% IF ( bibitemloo.holdable ) %] >- <input class="reserve_mode" name="reserve_mode" type="hidden" value="single" /> >- <input class="single_bib" name="single_bib" type="hidden" value="[% bibitemloo.biblionumber | html %]" /> >- <span class="confirmjs_hold" title="[% bibitemloo.biblionumber | html %]" style="padding:.3em"></span> >- <span class="confirm_nonjs"> >- <input >- type="radio" >- class="confirmbox checkitem [% bibitemloo.biblionumber | html %]" >- name="[% bibitemloo.biblionumber | html %]" >- checked="checked" >- id="single_[% bibitemloo.biblionumber | html %]" >- value="any" >- /> >- <label class="confirm_label" for="single_[% bibitemloo.biblionumber | html %]">Place a hold on </label> >- </span> >- [% END # / bibitemloo.holdable %] >- >- [% INCLUDE 'biblio-title.inc' biblio=bibitemloo link=> 1 %] >- >- [% IF ( bibitemloo.author ) %], by [% bibitemloo.author | html %][% END %] >- </p> >- >- [% UNLESS ( bibitemloo.holdable ) %] >- [% IF ( bibitemloo.ageRestricted ) %] >- <div class="alert alert-warning">Sorry, you are too young to place a hold for this item.</div> >- [% END %] >- [% IF ( bibitemloo.already_reserved ) %] >- <div class="alert alert-warning">You have already requested this title.</div> >- [% ELSIF ( bibitemloo.recall ) %] >- <div class="alert alert-warning">You have already placed a recall on this title.</div> >- [% ELSE %] >- [% IF bibitemloo.alreadypossession %] >- <div class="alert alert-warning">This title cannot be requested because it's already in your possession.</div> >- [% ELSIF bibitemloo.tooManyReserves %] >- <div class="alert alert-warning">This title cannot be requested because you reached the maximum number of holds.</div> >- [% ELSIF bibitemloo.tooManyHoldsForThisRecord %] >- <div class="alert alert-warning">This title cannot be requested because you exceeded max holds per record.</div> >- [% ELSIF bibitemloo.tooManyReservesToday %] >- <div class="alert alert-warning">This title cannot be requested because you reached the daily hold limit.</div> >- [% ELSIF bibitemloo.itemAlreadyOnHold %] >- <div class="alert alert-warning">This title cannot be requested because you already have hold for this item.</div> >- [% ELSE %] >- [% UNLESS ( bibitemloo.bib_available ) %] >- <div class="alert">There are no items that can be placed on hold.</div> >- [% ELSE %] >- <div class="alert">This title cannot be requested.</div> >- [% END %] >- [% END # / UNLESS bibitemloo.already_patron_possession %] >- [% END # / IF bibitemloo.already_reserved %] >- [% END # / UNLESS bibitemloo.holdable %] >- >- [% IF ( bibitemloo.holdable ) %] >- <fieldset class="rows"> >- <ul> >- <!-- HOLDABLE --> >- [% UNLESS ( item_level_itypes ) %] >- <li class="itype"> >- <span class="label">Item type: </span> >- [% IF ( bibitemloo.imageurl ) %]<img class="itemtype-image" src="[% bibitemloo.imageurl | html %]" alt="" />[% END %] >- <span class="itypetext">[% bibitemloo.translated_description | html %]</span> >- </li> >- [% END %] >+ <p> >+ [% IF ( bibitemloo.holdable ) %] >+ <input class="reserve_mode" name="reserve_mode" type="hidden" value="single" /> >+ <input class="single_bib" name="single_bib" type="hidden" value="[% bibitemloo.biblionumber | html %]" /> >+ <span class="confirmjs_hold" title="[% bibitemloo.biblionumber | html %]" style="padding:.3em"></span> >+ <span class="confirm_nonjs"> >+ <input >+ type="radio" >+ class="confirmbox checkitem [% bibitemloo.biblionumber | html %]" >+ name="[% bibitemloo.biblionumber | html %]" >+ checked="checked" >+ id="single_[% bibitemloo.biblionumber | html %]" >+ value="any" >+ /> >+ <label class="confirm_label" for="single_[% bibitemloo.biblionumber | html %]">Place a hold on </label> >+ </span> >+ [% END # / bibitemloo.holdable %] > >- [% SET OPACShowHoldQueueDetails = Koha.Preference('OPACShowHoldQueueDetails') %] >- [% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'priority' %] >- <li class="priority"> >- <span class="label">Your priority: </span> >- [% bibitemloo.rank | html %] >- </li> >- [% END %] >+ [% INCLUDE 'biblio-title.inc' biblio=bibitemloo link=> 1 %] > >- [% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'holds' %] >- <li class="holds-count"> >- <span class="label">Number of holds: </span> >- [% bibitemloo.reservecount | html %] >- </li> >- [% END %] >+ [% IF ( bibitemloo.author ) %], by [% bibitemloo.author | html %][% END %] >+ </p> > >- [% UNLESS ( singleBranchMode ) %] >- [% IF ( bibitemloo.holdable && Koha.Preference('OPACAllowUserToChooseBranch')) %] >- <li class="branch"> >- <label for="branch_[% bibitemloo.biblionumber | html %]">Pick up location:</label> >- [% UNLESS ( bibitemloo.holdable ) %] >- <select name="branch" id="branch_[% bibitemloo.biblionumber | html %]" disabled="disabled"> >- [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => bibitemloo.biblionumber, patron => logged_in_user }, selected => branch }) %] >- </select> >- [% ELSE %] >- [% SET at_least_one_library_not_available_for_pickup = 0 %] >- <select name="branch" id="branch_[% bibitemloo.biblionumber | html %]"> >- [% FOREACH library IN Branches.pickup_locations({ search_params => { biblio => bibitemloo.biblionumber, patron => logged_in_user }, selected => branch }) %] >- [% SET pickup_available_at = bibitemloo.not_available_at.grep('^' _ library.branchcode _ '$').size ? 0 : 1 %] >- [% IF library.selected AND pickup_available_at %] >- <option value="[% library.branchcode | html %]" selected="selected">[% library.branchname | html %]</option> >- [% ELSIF pickup_available_at %] >- <option value="[% library.branchcode | html %]">[% library.branchname | html %]</option> >- [% ELSE %] >- [% SET at_least_one_library_not_available_for_pickup = 1 %] >- <option value="[% library.branchcode | html %]" disabled="disabled" title="At least one item is available at this library">[% library.branchname | html %]</option> >- [% END %] >- [% END %] >- </select> >- [% IF at_least_one_library_not_available_for_pickup %] >- <div class="at_least_one_library_not_available_note"> >- Note: Library policy does not allow hold/pickup of an item available locally. Please come to the library to retrieve these items >- </div> >- [% END %] >- [% END # / UNLESS bibitemloo.holdable %] >- </li> >- [% END # / IF bibitemloo.holdable && Koha.Preference('OPACAllowUserToChooseBranch') %] >- [% END # / UNLESS singleBranchMode %] >- </ul> >- >- <a class="toggle-hold-options" id="toggle-hold-options-[% bibitemloo.biblionumber | html %]" style="display:none;" href="#">Show more options</a> >- >- <div id="hold-options-[% bibitemloo.biblionumber | html %]" class="hold-options"> >- <ul> >- [% IF ( reserve_in_future ) %] >- <li> >- <label for="from[% bibitemloo.biblionumber | html %]">Hold starts on date:</label> >- <input >- type="text" >- name="reserve_date_[% bibitemloo.biblionumber | html %]" >- id="from[% bibitemloo.biblionumber | html %]" >- data-start_for="to[% bibitemloo.biblionumber | html %]" >- data-flatpickr-futureinclusive="true" >- size="10" >- class="flatpickr holddatefrom" >- value="[% KohaDates.datetime_from_string | $KohaDates dateformat => 'iso' %]" >- /> >- <span class="date-format from" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span> >- <div class="required_label" style="display:none;">Required</div> >- </li> >- [% END %] >+ [% UNLESS ( bibitemloo.holdable ) %] >+ [% IF ( bibitemloo.ageRestricted ) %] >+ <div class="alert alert-warning">Sorry, you are too young to place a hold for this item.</div> >+ [% END %] >+ [% IF ( bibitemloo.already_reserved ) %] >+ <div class="alert alert-warning">You have already requested this title.</div> >+ [% ELSIF ( bibitemloo.recall ) %] >+ <div class="alert alert-warning">You have already placed a recall on this title.</div> >+ [% ELSE %] >+ [% IF bibitemloo.alreadypossession %] >+ <div class="alert alert-warning">This title cannot be requested because it's already in your possession.</div> >+ [% ELSIF bibitemloo.tooManyReserves %] >+ <div class="alert alert-warning">This title cannot be requested because you reached the maximum number of holds.</div> >+ [% ELSIF bibitemloo.tooManyHoldsForThisRecord %] >+ <div class="alert alert-warning">This title cannot be requested because you exceeded max holds per record.</div> >+ [% ELSIF bibitemloo.tooManyReservesToday %] >+ <div class="alert alert-warning">This title cannot be requested because you reached the daily hold limit.</div> >+ [% ELSIF bibitemloo.itemAlreadyOnHold %] >+ <div class="alert alert-warning">This title cannot be requested because you already have hold for this item.</div> >+ [% ELSE %] >+ [% UNLESS ( bibitemloo.bib_available ) %] >+ <div class="alert">There are no items that can be placed on hold.</div> >+ [% ELSE %] >+ <div class="alert">This title cannot be requested.</div> >+ [% END %] >+ [% END # / UNLESS bibitemloo.already_patron_possession %] >+ [% END # / IF bibitemloo.already_reserved %] >+ [% END # / UNLESS bibitemloo.holdable %] >+ >+ [% IF ( bibitemloo.holdable ) %] >+ <fieldset class="rows"> >+ <ul> >+ <!-- HOLDABLE --> >+ [% UNLESS ( item_level_itypes ) %] >+ <li class="itype"> >+ <span class="label">Item type: </span> >+ [% IF ( bibitemloo.imageurl ) %]<img class="itemtype-image" src="[% bibitemloo.imageurl | html %]" alt="" />[% END %] >+ <span class="itypetext">[% bibitemloo.translated_description | html %]</span> >+ </li> >+ [% END %] > >- <li> >- <label for="to[% bibitemloo.biblionumber | html %]">Hold not needed after:</label> >- <input >- type="text" >- name="expiration_date_[% bibitemloo.biblionumber | html %]" >- id="to[% bibitemloo.biblionumber | html %]" >- size="10" >- data-flatpickr-future="true" >- class="flatpickr futuredate" >- /> >- <span class="date-format to" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span> >- <div class="required_label" style="display:none;">Required</div> >- </li> >- >- [% IF Koha.Preference('AllowHoldItemTypeSelection') %] >- <li> >- <label for="itemtype">Request specific item type:</label> >- <select name="itemtype" id="itemtype"> >- <option value="">Any item type</option> >- [% FOREACH i IN bibitemloo.allowed_item_types %] >- <option value="[% i | html %]">[% ItemTypes.GetDescription( i ) | html %]</option> >- [%- END %] >- </select> >- </li> >- [% END %] >+ [% SET OPACShowHoldQueueDetails = Koha.Preference('OPACShowHoldQueueDetails') %] >+ [% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'priority' %] >+ <li class="priority"> >+ <span class="label">Your priority: </span> >+ [% bibitemloo.rank | html %] >+ </li> >+ [% END %] > >- [% UNLESS bibitemloo.forced_hold_level && ( bibitemloo.forced_hold_level == 'item' || bibitemloo.forced_hold_level == 'record' ) %] >- [% IF Koha.Preference('EnableItemGroupHolds') && bibitemloo.object.item_groups.count %] >- <li> >- <label for="itemtype">Request specific item group:</label> >- <select name="item_group_id_[% bibitemloo.biblionumber | html %]" id="item_group_id_[% bibitemloo.biblionumber | html %]"> >- <option value="">Any item group</option> >- [% FOREACH g IN bibitemloo.object.item_groups.search({}, { order_by => ['display_order'] }) %] >- [% IF g.items.count %] >- <option value="[% g.id | html %]">[% g.description | html %]</option> >- [% END %] >- [% END %] >- </select> >+ [% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'holds' %] >+ <li class="holds-count"> >+ <span class="label">Number of holds: </span> >+ [% bibitemloo.reservecount | html %] > </li> > [% END %] >- [% END %] > >- [% IF ( OpacHoldNotes ) %] >- <li> >- <div class="notesrow" id="notesrow_[% bibitemloo.biblionumber | html %]"> >- <label for="holdnotes_[% bibitemloo.biblionumber | html %]">Hold notes:</label> >- <textarea id="holdnotes_[% bibitemloo.biblionumber | html %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber | html %]">[% bibitemloo.holdnotes | html %]</textarea> >- </div> >- </li> >- [% END # / IF OpacHoldNotes %] >- >- [% IF bibitemloo.itemholdable %] >- <!-- ITEM HOLDS --> >- <li class="lradio place_on_type" style="display:none;"> >- [% UNLESS bibitemloo.forced_hold_level == 'item' || bibitemloo.forced_hold_level == 'item_group' || bibitemloo.force_hold %] >- <label class="radio inline" for="reqany_[% bibitemloo.biblionumber | html %]">Next available item</label> >- <input type="radio" name="reqtype_[% bibitemloo.biblionumber | html %]" id="reqany_[% bibitemloo.biblionumber | html %]" class="selectany" value="Any" checked="checked" /> >- [% END %] >- <label class="radio inline" for="reqspecific_[% bibitemloo.biblionumber | html %]">A specific item</label> >- <input type="radio" name="reqtype_[% bibitemloo.biblionumber | html %]" id="reqspecific_[% bibitemloo.biblionumber | html %]" class="selectspecific" value="Specific" /> >- </li> >- [% END # / IF bibitemloo.itemholdable %] >- </ul> >- >- [% IF bibitemloo.itemholdable %] >- <div id="copiesrow_[% bibitemloo.biblionumber | html %]" class="copiesrow"> >- <table class="table table-bordered table-striped itemstable"> >- <caption>Select a specific item:</caption> >- <thead> >- <tr> >- <th>Copy number</th> >- [% IF ( item_level_itypes ) %] >- <th>Item type</th> >- [% END %] >- <th>Barcode</th> >- [% UNLESS ( singleBranchMode ) %] >- <th>Home library</th> >- <th>Last location</th> >- [% END %] >- [% IF ( itemdata_ccode ) %] >- <th>Collection</th> >- [% END %] >- <th>Call number</th> >- [% IF ( itemdata_enumchron ) %] >- <th>Vol info</th> >- [% END %] >- <th>Notes</th> >- <th>Information</th> >- </tr> >- </thead> >- <tbody> >- [% SET unholdable_items = 0 %] >- [% FOREACH itemLoo IN bibitemloo.itemLoop %] >- [% SET row_class = "holdable" %] >- [% SET row_style = "" %] >- [% IF ( itemLoo.available ) %] >- [% IF ( itemLoo.checkout ) %] >- [% row_class = "holdable onloan" %] >- [% ELSE %] >- [% row_class = "holdable" %] >- [% END %] >+ [% UNLESS ( singleBranchMode ) %] >+ [% IF ( bibitemloo.holdable && Koha.Preference('OPACAllowUserToChooseBranch')) %] >+ <li class="branch"> >+ <label for="branch_[% bibitemloo.biblionumber | html %]">Pick up location:</label> >+ [% UNLESS ( bibitemloo.holdable ) %] >+ <select name="branch" id="branch_[% bibitemloo.biblionumber | html %]" disabled="disabled"> >+ [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => bibitemloo.biblionumber, patron => logged_in_user }, selected => branch }) %] >+ </select> > [% ELSE %] >- [% SET unholdable_items = 1 %] >- [% row_style = "display:none" %] >- [% IF ( itemLoo.checkout ) %] >- [% row_class = "unholdable onloan" %] >- [% ELSE %] >- [% row_class = "unholdable" %] >+ [% SET at_least_one_library_not_available_for_pickup = 0 %] >+ <select name="branch" id="branch_[% bibitemloo.biblionumber | html %]"> >+ [% FOREACH library IN Branches.pickup_locations({ search_params => { biblio => bibitemloo.biblionumber, patron => logged_in_user }, selected => branch }) %] >+ [% SET pickup_available_at = bibitemloo.not_available_at.grep('^' _ library.branchcode _ '$').size ? 0 : 1 %] >+ [% IF library.selected AND pickup_available_at %] >+ <option value="[% library.branchcode | html %]" selected="selected">[% library.branchname | html %]</option> >+ [% ELSIF pickup_available_at %] >+ <option value="[% library.branchcode | html %]">[% library.branchname | html %]</option> >+ [% ELSE %] >+ [% SET at_least_one_library_not_available_for_pickup = 1 %] >+ <option value="[% library.branchcode | html %]" disabled="disabled" title="At least one item is available at this library" >+ >[% library.branchname | html %]</option >+ > >+ [% END %] >+ [% END %] >+ </select> >+ [% IF at_least_one_library_not_available_for_pickup %] >+ <div class="at_least_one_library_not_available_note"> >+ Note: Library policy does not allow hold/pickup of an item available locally. Please come to the library to retrieve these items >+ </div> > [% END %] >+ [% END # / UNLESS bibitemloo.holdable %] >+ </li> >+ [% END # / IF bibitemloo.holdable && Koha.Preference('OPACAllowUserToChooseBranch') %] >+ [% END # / UNLESS singleBranchMode %] >+ </ul> >+ >+ <a class="toggle-hold-options" id="toggle-hold-options-[% bibitemloo.biblionumber | html %]" style="display:none;" href="#">Show more options</a> >+ >+ <div id="hold-options-[% bibitemloo.biblionumber | html %]" class="hold-options"> >+ <ul> >+ [% IF ( reserve_in_future ) %] >+ <li> >+ <label for="from[% bibitemloo.biblionumber | html %]">Hold starts on date:</label> >+ <input >+ type="text" >+ name="reserve_date_[% bibitemloo.biblionumber | html %]" >+ id="from[% bibitemloo.biblionumber | html %]" >+ data-start_for="to[% bibitemloo.biblionumber | html %]" >+ data-flatpickr-futureinclusive="true" >+ size="10" >+ class="flatpickr holddatefrom" >+ value="[% KohaDates.datetime_from_string | $KohaDates dateformat => 'iso' %]" >+ /> >+ <span class="date-format from" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span> >+ <div class="required_label" style="display:none;">Required</div> >+ </li> >+ [% END %] >+ >+ <li> >+ <label for="to[% bibitemloo.biblionumber | html %]">Hold not needed after:</label> >+ <input >+ type="text" >+ name="expiration_date_[% bibitemloo.biblionumber | html %]" >+ id="to[% bibitemloo.biblionumber | html %]" >+ size="10" >+ data-flatpickr-future="true" >+ class="flatpickr futuredate" >+ /> >+ <span class="date-format to" data-biblionumber="[% bibitemloo.biblionumber | html %]">[% INCLUDE 'date-format.inc' %]</span> >+ <div class="required_label" style="display:none;">Required</div> >+ </li> >+ >+ [% IF Koha.Preference('AllowHoldItemTypeSelection') %] >+ <li> >+ <label for="itemtype">Request specific item type:</label> >+ <select name="itemtype" id="itemtype"> >+ <option value="">Any item type</option> >+ [% FOREACH i IN bibitemloo.allowed_item_types %] >+ <option value="[% i | html %]">[% ItemTypes.GetDescription( i ) | html %]</option> >+ [%- END %] >+ </select> >+ </li> >+ [% END %] >+ >+ [% UNLESS bibitemloo.forced_hold_level && ( bibitemloo.forced_hold_level == 'item' || bibitemloo.forced_hold_level == 'record' ) %] >+ [% IF Koha.Preference('EnableItemGroupHolds') && bibitemloo.object.item_groups.count %] >+ <li> >+ <label for="itemtype">Request specific item group:</label> >+ <select name="item_group_id_[% bibitemloo.biblionumber | html %]" id="item_group_id_[% bibitemloo.biblionumber | html %]"> >+ <option value="">Any item group</option> >+ [% FOREACH g IN bibitemloo.object.item_groups.search({}, { order_by => ['display_order'] }) %] >+ [% IF g.items.count %] >+ <option value="[% g.id | html %]">[% g.description | html %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ </li> >+ [% END %] >+ [% END %] >+ >+ [% IF ( OpacHoldNotes ) %] >+ <li> >+ <div class="notesrow" id="notesrow_[% bibitemloo.biblionumber | html %]"> >+ <label for="holdnotes_[% bibitemloo.biblionumber | html %]">Hold notes:</label> >+ <textarea id="holdnotes_[% bibitemloo.biblionumber | html %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber | html %]"> >+[% bibitemloo.holdnotes | html %]</textarea >+ > >+ </div> >+ </li> >+ [% END # / IF OpacHoldNotes %] >+ >+ [% IF bibitemloo.itemholdable %] >+ <!-- ITEM HOLDS --> >+ <li class="lradio place_on_type" style="display:none;"> >+ [% UNLESS bibitemloo.forced_hold_level == 'item' || bibitemloo.forced_hold_level == 'item_group' || bibitemloo.force_hold %] >+ <label class="radio inline" for="reqany_[% bibitemloo.biblionumber | html %]">Next available item</label> >+ <input type="radio" name="reqtype_[% bibitemloo.biblionumber | html %]" id="reqany_[% bibitemloo.biblionumber | html %]" class="selectany" value="Any" checked="checked" /> > [% END %] >- <tr class="[% row_class | html %]" style="[% row_style | html %]"> >- [% IF ( itemLoo.available ) %] >- <td class="copynumber" data-order="[% itemLoo.copynumber | html %]"> >- <input >- type="[% reserve_input_type | html %]" >- class="checkitem checkitem_[% bibitemloo.biblionumber | html %]" >- name="checkitem_[% bibitemloo.biblionumber | html %]" >- value="[% itemLoo.itemnumber | html %]" >- /> >- [% IF ( itemLoo.copynumber ) %] >- [% itemLoo.copynumber | html %] >+ <label class="radio inline" for="reqspecific_[% bibitemloo.biblionumber | html %]">A specific item</label> >+ <input type="radio" name="reqtype_[% bibitemloo.biblionumber | html %]" id="reqspecific_[% bibitemloo.biblionumber | html %]" class="selectspecific" value="Specific" /> >+ </li> >+ [% END # / IF bibitemloo.itemholdable %] >+ </ul> >+ >+ [% IF bibitemloo.itemholdable %] >+ <div id="copiesrow_[% bibitemloo.biblionumber | html %]" class="copiesrow"> >+ <table class="table table-bordered table-striped itemstable"> >+ <caption>Select a specific item:</caption> >+ <thead> >+ <tr> >+ <th data-colname="selection" class="no-sort">Choose</th> >+ [% IF ( itemdata_copynumber ) %] >+ <th data-colname="copy_number">Copy number</th> >+ [% END %] >+ [% IF ( item_level_itypes ) %] >+ <th data-colname="itemtype">Item type</th> >+ [% END %] >+ <th data-colname="barcode">Barcode</th> >+ [% UNLESS ( singleBranchMode ) %] >+ <th data-colname="current_library">Current library</th> >+ <th data-colname="home_library">Home library</th> >+ [% END %] >+ [% IF ( itemdata_ccode ) %] >+ <th data-colname="collection">Collection</th> >+ [% END %] >+ <th data-colname="call_number">Call number</th> >+ [% IF ( itemdata_enumchron ) %] >+ <th data-colname="enumchron">Vol info</th> >+ [% END %] >+ <th data-colname="notes">Notes</th> >+ <th data-colname="information">Information</th> >+ <th data-colname=""></th> >+ </tr> >+ </thead> >+ <tbody> >+ [% SET unholdable_items = 0 %] >+ [% FOREACH itemLoo IN bibitemloo.itemLoop %] >+ [% SET row_class = "holdable" %] >+ [% SET row_style = "" %] >+ [% IF ( itemLoo.available ) %] >+ [% IF ( itemLoo.checkout ) %] >+ [% row_class = "holdable onloan" %] >+ [% ELSE %] >+ [% row_class = "holdable" %] >+ [% END %] >+ [% ELSE %] >+ [% SET unholdable_items = 1 %] >+ [% row_style = "display:none" %] >+ [% IF ( itemLoo.checkout ) %] >+ [% row_class = "unholdable onloan" %] >+ [% ELSE %] >+ [% row_class = "unholdable" %] > [% END %] >- </td> >- [%# copynumber %] >- [% ELSE %] >- <td class="copynumber"> >- <input >- disabled="disabled" >- type="radio" >- aria-label="Cannot be put on hold" >- class="checkitem" >- name="checkitem" >- value="[% itemLoo.itemnumber | html %]" >- style="display:none;" >- /> >- <i class="fa fa-times danger" aria-hidden="true" title="Cannot be put on hold"></i> >- [% IF ( itemLoo.copynumber ) %] >- [% itemLoo.copynumber | html %] >+ [% END %] >+ <tr class="[% row_class | html %]" style="[% row_style | html %]"> >+ [% IF ( itemLoo.available ) %] >+ <td class="checkbox"> >+ <input >+ type="[% reserve_input_type | html %]" >+ class="checkitem checkitem_[% bibitemloo.biblionumber | html %]" >+ name="checkitem_[% bibitemloo.biblionumber | html %]" >+ value="[% itemLoo.itemnumber | html %]" >+ /> >+ </td> >+ [% ELSE %] >+ <td class="checkbox"> >+ <input disabled="disabled" type="radio" class="checkitem" name="checkitem" value="[% itemLoo.itemnumber | html %]" style="display:none;" /> >+ <i class="fa fa-times danger" aria-hidden="true"></i> >+ <span class="fa-sr-only">Cannot be put on hold</span> >+ </td> > [% END %] >- </td> >- [%# copynumber %] >- [% END %] > >- [% IF ( item_level_itypes ) %] >- <td class="itype"> >- [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %] >- [% IF ( itemLoo.imageurl ) %] >- <img class="itemtype-image" src="[% itemLoo.imageurl | html %]" alt="" /> >- [% END %] >+ [% IF ( itemdata_copynumber ) %] >+ <td class="copynumber" data-order="[% itemLoo.copynumber | html %]"> >+ [% IF ( itemLoo.copynumber ) %] >+ [% itemLoo.copynumber | html %] >+ [% END %] >+ </td> > [% END %] >- <span class="itypetext">[% itemLoo.translated_description | html %]</span> >- </td> >- [% END %] > >- <td class="barcode">[% itemLoo.barcode | html %]</td> >- [% UNLESS ( singleBranchMode ) %] >- <td class="homebranch">[% Branches.GetName( itemLoo.homebranch) | html %]</td> >- <td class="holdingbranch">[% Branches.GetName( itemLoo.holdingbranch ) | html %]</td> >- [% END %] >- [% IF ( itemdata_ccode ) %] >- <td class="ccode"> >- [% IF ( itemLoo.ccode ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemLoo.ccode, opac => 1 ) | html %][% END %]</td >- > >- [% END %] >- <td class="call_no">[% itemLoo.itemcallnumber | html %]</td> >- [% IF ( itemdata_enumchron ) %] >- <td class="vol_info">[% itemLoo.enumchron | html %]</td> >- [% END %] >- <td class="itemnotes"> [% itemLoo.itemnotes | html %] </td> >- <td class="information"> >- [% IF ( itemLoo.checkout.date_due) %] >- <span class="checkedout">Due [% itemLoo.checkout.date_due| $KohaDates as_due_date => 1 %]</span> >- [% ELSIF ( itemLoo.transfertwhen ) %] >- <span class="intransit" >- >In transit from [% Branches.GetName( itemLoo.transfertfrom ) | html %] to [% Branches.GetName( itemLoo.transfertto ) | html %] since >- [% itemLoo.transfertwhen | $KohaDates %]</span >- > >- [% END %] >+ [% IF ( item_level_itypes ) %] >+ <td class="itype"> >+ [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %] >+ [% IF ( itemLoo.imageurl ) %] >+ <img class="itemtype-image" src="[% itemLoo.imageurl | html %]" alt="" /> >+ [% END %] >+ [% END %] >+ <span class="itypetext">[% itemLoo.translated_description | html %]</span> >+ </td> >+ [% END %] > >- [% IF ( itemLoo.itemlost == 1 || itemLoo.itemlost == 2 ) %] >- [%# FIXME Why only for 1 or 2? Shouldn't we test for withdrawn as well? %] >- <span class="lost">Unavailable (lost or missing)</span> >- [% END %] >+ <td class="barcode">[% itemLoo.barcode | html %]</td> >+ [% UNLESS ( singleBranchMode ) %] >+ <td class="homebranch">[% Branches.GetName( itemLoo.homebranch) | html %]</td> >+ <td class="holdingbranch">[% Branches.GetName( itemLoo.holdingbranch ) | html %]</td> >+ [% END %] >+ [% IF ( itemdata_ccode ) %] >+ <td class="ccode"> >+ [% IF ( itemLoo.ccode ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemLoo.ccode, opac => 1 ) | html %][% END %]</td >+ > >+ [% END %] >+ <td class="call_no">[% itemLoo.itemcallnumber | html %]</td> >+ [% IF ( itemdata_enumchron ) %] >+ <td class="vol_info">[% itemLoo.enumchron | html %]</td> >+ [% END %] >+ <td class="itemnotes"> [% itemLoo.itemnotes | html %] </td> >+ <td class="information"> >+ [% IF ( itemLoo.checkout.date_due) %] >+ <span class="checkedout">Due [% itemLoo.checkout.date_due| $KohaDates as_due_date => 1 %]</span> >+ [% ELSIF ( itemLoo.transfertwhen ) %] >+ <span class="intransit" >+ >In transit from [% Branches.GetName( itemLoo.transfertfrom ) | html %] to [% Branches.GetName( itemLoo.transfertto ) | html %] since >+ [% itemLoo.transfertwhen | $KohaDates %]</span >+ > >+ [% END %] > >- [% IF ( itemLoo.notforloan ) %] >- <span class="notforloan" >- >Not for loan ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => itemLoo.notforloan ) %])</span >- > >- [% END %] >+ [% IF ( itemLoo.itemlost == 1 || itemLoo.itemlost == 2 ) %] >+ [%# FIXME Why only for 1 or 2? Shouldn't we test for withdrawn as well? %] >+ <span class="lost">Unavailable (lost or missing)</span> >+ [% END %] > >- [% IF ( itemLoo.first_hold ) %] >- <span class="waiting"> >- [% IF ( itemLoo.waitingdate ) %] >- <span>Waiting for patron at [% Branches.GetName( itemLoo.ExpectedAtLibrary ) | html %] since [% itemLoo.waitingdate | $KohaDates %]</span> >- [% ELSIF ( itemLoo.reservedate ) %] >- <span>On hold for patron expected at [% Branches.GetName( itemLoo.ExpectedAtLibrary ) | html %] since [% itemLoo.reservedate | $KohaDates %]</span> >- [% ELSE %] >- <span>On hold for patron expected at [% Branches.GetName( itemLoo.ExpectedAtLibrary ) | html %]</span> >+ [% IF ( itemLoo.notforloan ) %] >+ <span class="notforloan" >+ >Not for loan ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => itemLoo.notforloan ) %])</span >+ > > [% END %] >- </span> >- [% ELSE %] >- <span class="notonhold">Not on hold</span> >- [% END # / IF ( itemLoo.first_hold ) %] >- </td> >- </tr> >- [% END # / FOREACH itemLoo IN bibitemloo.itemLoop %] >- </tbody> >- </table> >- <!-- / #copiesrow_[% bibitemloo.biblionumber | html %] --> >- [% IF unholdable_items %] >- <button id="show_unholdable" class="btn btn-primary toggle_unholdable unholdable">Show unholdable items</button> >- <button id="hide_unholdable" class="btn btn-primary toggle_unholdable unholdable" style="display:none;">Hide unholdable items</button> >- [% END %] >+ >+ [% IF ( itemLoo.first_hold ) %] >+ <span class="waiting"> >+ [% IF ( itemLoo.waitingdate ) %] >+ <span>Waiting for patron at [% Branches.GetName( itemLoo.ExpectedAtLibrary ) | html %] since [% itemLoo.waitingdate | $KohaDates %]</span> >+ [% ELSIF ( itemLoo.reservedate ) %] >+ <span>On hold for patron expected at [% Branches.GetName( itemLoo.ExpectedAtLibrary ) | html %] since [% itemLoo.reservedate | $KohaDates %]</span> >+ [% ELSE %] >+ <span>On hold for patron expected at [% Branches.GetName( itemLoo.ExpectedAtLibrary ) | html %]</span> >+ [% END %] >+ </span> >+ [% ELSE %] >+ <span class="notonhold">Not on hold</span> >+ [% END # / IF ( itemLoo.first_hold ) %] >+ </td> >+ <td></td> >+ </tr> >+ [% END # / FOREACH itemLoo IN bibitemloo.itemLoop %] >+ </tbody> >+ </table> >+ <!-- / #copiesrow_[% bibitemloo.biblionumber | html %] --> >+ [% IF unholdable_items %] >+ <button id="show_unholdable" class="btn btn-primary toggle_unholdable unholdable">Show unholdable items</button> >+ <button id="hide_unholdable" class="btn btn-primary toggle_unholdable unholdable" style="display:none;">Hide unholdable items</button> >+ [% END %] >+ </div> >+ <!-- /.copiesrow --> >+ [% END # / IF ( bibitemloo.itemholdable ) %] > </div> >- [% END # / IF ( bibitemloo.itemholdable ) %] >- </div> >- <!-- / #hold-options-[% bibitemloo.biblionumber | html %] --> >- </fieldset> >- [% END # / IF ( bibitemloo.holdable ) %] >- </div> >- <!-- / .holdrow --> >- [% END # / FOREACH bibitemloo IN bibitemloop %] </div >- ><!-- #bigloop --> >- >- [% UNLESS ( none_available ) %] >- <input type="submit" value="Confirm hold" class="btn btn-primary placehold" /> >- [% END %] >- </form> >- [% END # / UNLESS message %] >+ <!-- / #hold-options-[% bibitemloo.biblionumber | html %] --> >+ </fieldset> >+ [% END # / IF ( bibitemloo.holdable ) %] >+ </div> >+ <!-- / .holdrow --> >+ [% END # / FOREACH bibitemloo IN bibitemloop %] </div >+ ><!-- #bigloop --> >+ >+ [% UNLESS ( none_available ) %] >+ <input type="submit" value="Confirm hold" class="btn btn-primary placehold" /> >+ [% END %] >+ </form> >+ [% END # / UNLESS message %] >+ </div> >+ <!-- / #holds --> >+ </div> > </div> >- <!-- / #holds --> > </div> > <!-- / .container --> > </main> >@@ -731,15 +743,25 @@ > > return true; > }); >- $(".itemstable").each(function(){ >- $(this).DataTable({ >- dom: "t", >- initComplete: function() { >- this.find("input:radio").first().prop("checked", true ); >- }, >- paging: false >- }); >- }); >+ >+ var table_settings = [% TablesSettings.GetTableSettings( 'opac', 'opac_holds', 'opac_holds_items', 'json' ) | $raw %]; >+ >+ $(".itemstable").kohaTable({ >+ bKohaColumnsUseNames: true, >+ order: [[ 1, "asc" ]], >+ responsive: { >+ details: { "type": 'column',"target": -1 } >+ }, >+ columnDefs: [ >+ { "className": 'dtr-control', "orderable": false, "targets": -1 } >+ ], >+ initComplete: function(settings, json) { >+ /* Select the first radio button in the table as a default */ >+ $( "#" + settings.sInstance ).find("input:radio").first().prop("checked", true ); >+ }, >+ paging: false >+ }, table_settings >+ ); > }); > </script> > [% END %] >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index 6db213f2985..39b1124a8bf 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -366,13 +366,14 @@ $template->param( select_item_types => 1 ); > # > # > >-my $biblioLoop = []; >-my $numBibsAvailable = 0; >-my $itemdata_enumchron = 0; >-my $itemdata_ccode = 0; >-my $anyholdable = 0; >-my $itemLevelTypes = C4::Context->preference('item-level_itypes'); >-my $pickup_locations = Koha::Libraries->search( { pickup_location => 1 } ); >+my $biblioLoop = []; >+my $numBibsAvailable = 0; >+my $itemdata_copynumber = 0; >+my $itemdata_enumchron = 0; >+my $itemdata_ccode = 0; >+my $anyholdable = 0; >+my $itemLevelTypes = C4::Context->preference('item-level_itypes'); >+my $pickup_locations = Koha::Libraries->search( { pickup_location => 1 } ); > $template->param( 'item_level_itypes' => $itemLevelTypes ); > > my $patron_unblessed = $patron->unblessed; >@@ -486,6 +487,11 @@ foreach my $biblioNum (@biblionumbers) { > } > } > >+ # Show copy number when needed >+ if ( $item_info->{copynumber} ) { >+ $itemdata_copynumber = 1; >+ } >+ > # Show serial enumeration when needed > if ( $item_info->{enumchron} ) { > $itemdata_enumchron = 1; >-- >2.39.5
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 37219
:
168465
|
168564
|
171455
|
174551
| 184568