1222 lines
74 KiB
Plaintext
1222 lines
74 KiB
Plaintext
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% USE Branches %]
|
|
[% USE Koha %]
|
|
[% USE KohaDates %]
|
|
[% USE AuthorisedValues %]
|
|
[% USE TablesSettings %]
|
|
[% USE Price %]
|
|
[% PROCESS 'i18n.inc' %]
|
|
[% PROCESS 'manageable-mixin.inc' %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title
|
|
>[% FILTER collapse %]
|
|
[% t("ILL requests") | html %]
|
|
› [% t("Koha") | html %]
|
|
[% END %]</title
|
|
>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% IF ( bidi ) %]
|
|
[% Asset.css("css/ill-requests-rtl.css") | $raw %]
|
|
[% ELSE %]
|
|
[% Asset.css("css/ill-requests.css") | $raw %]
|
|
[% END %]
|
|
[% Asset.css("lib/jquery/plugins/multiple-select/multiple-select.min.css") | $raw %]
|
|
</head>
|
|
|
|
<body id="illrequests" class="ill">
|
|
[% WRAPPER 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
[% END %]
|
|
|
|
[% WRAPPER 'sub-header.inc' %]
|
|
[% WRAPPER breadcrumbs %]
|
|
[% WRAPPER breadcrumb_item bc_active = (op == 'illlist' || op == 'batch_list' ? 1 : 0) %]
|
|
[% IF op == 'batch_list' %]
|
|
<a href="/cgi-bin/koha/ill/ill-requests.pl">ILL batch requests</a>
|
|
[% ELSE %]
|
|
[% IF op == 'illlist' %]
|
|
<span>ILL requests</span>
|
|
[% ELSE %]
|
|
<a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
[% WRAPPER breadcrumb_item bc_active= 1 %]
|
|
[% IF op == 'cud-create' %]
|
|
<span>New request</span>
|
|
[% ELSIF op == 'illview' %]
|
|
<span>Manage request [% request.id_prefix _ request.illrequest_id | html %]</span>
|
|
[% ELSIF op == 'confirm' %]
|
|
<span>Confirm request [% request.id_prefix _ request.illrequest_id | html %]</span>
|
|
[% ELSIF op == 'mark_completed' %]
|
|
<span>Complete request [% request.id_prefix _ request.illrequest_id | html %]</span>
|
|
[% ELSIF op == 'delete_confirm' %]
|
|
<span>Delete request [% request.id_prefix _ request.illrequest_id | html %]</span>
|
|
[% ELSIF op == 'generic_confirm' %]
|
|
<span>Place request [% request.id_prefix _ request.illrequest_id | html %] with partners</span>
|
|
[% ELSIF op == 'edititem' %]
|
|
<span>Edit item metadata for request [% request.id_prefix _ request.illrequest_id | html %]</span>
|
|
[% ELSIF op == 'edit_action' %]
|
|
<span>Edit request [% request.id_prefix _ request.illrequest_id | html %]</span>
|
|
[% ELSIF op == 'check_out' %]
|
|
<span>Check out request [% request.id_prefix _ request.illrequest_id | html %]</span>
|
|
[% ELSIF op == 'cud-cancel' %]
|
|
<span>Cancel request [% request.id_prefix _ request.illrequest_id | html %]</span>
|
|
[% ELSIF op == 'availability' %]
|
|
<span>Availability check</span>
|
|
[% ELSIF op == 'typedisclaimer' %]
|
|
<span>Request type disclaimer</span>
|
|
[% ELSIF op == 'confirmautoill' %]
|
|
[% IF(auto_migrate) %]
|
|
<span>Confirm switch provider</span>
|
|
[% ELSE %]
|
|
<span>Confirm request</span>
|
|
[% END %]
|
|
[% ELSIF op == 'historycheck' %]
|
|
<span>Request history check</span>
|
|
[% END %]
|
|
[% END %]
|
|
[% END #/ WRAPPER breadcrumbs %]
|
|
[% END #/ WRAPPER sub-header.inc %]
|
|
|
|
[% WRAPPER 'main-container.inc' wide_centered => ( op == 'illlist' ? 0 : 1 ) aside = ( op == 'illlist' ? 'ill-filter' : '' ) %]
|
|
|
|
[% IF op == 'illlist' %]
|
|
<script nonce="[% Koha.CSPNonce | $raw %]">
|
|
var ill_table_actions = [% table_actions | $raw %];
|
|
</script>
|
|
[% END %]
|
|
|
|
<div id="interlibraryloans">
|
|
[% IF !backends_available || !has_branch || ill_deprecated_backend_freeform_is_installed %]
|
|
<div class="alert alert-info">ILL module configuration problem. Take a look at the <a href="/cgi-bin/koha/about.pl?tab=sysinfo">about page</a></div>
|
|
[% ELSE %]
|
|
[% INCLUDE 'ill-toolbar.inc' %]
|
|
[% INCLUDE 'ill-batch-modal.inc' %]
|
|
|
|
[% IF whole.error %]
|
|
<h1>Error performing operation</h1>
|
|
<!-- Dispatch on Status -->
|
|
<p>We encountered an error:</p>
|
|
<p>
|
|
[% SWITCH whole.status %]
|
|
[% CASE 'invalid_patron' %]
|
|
<pre>The patron ID you entered is invalid.</pre>
|
|
[% CASE 'invalid_biblio' %]
|
|
<pre>The bibliographic record ID you entered is invalid.</pre>
|
|
[% CASE %]
|
|
<pre>[% whole.message | html %] ([% whole.status | html %])</pre>
|
|
[% END %]
|
|
</p>
|
|
[% END %]
|
|
|
|
[% IF whole.success %]
|
|
<p>[% whole.success | html %]</p>
|
|
[% END %]
|
|
|
|
[% IF op == 'cud-create' %]
|
|
<h1>New ILL request</h1>
|
|
[% PROCESS $whole.template %]
|
|
[% ELSIF op == 'confirm' %]
|
|
<h1>Confirm ILL request</h1>
|
|
[% PROCESS $whole.template %]
|
|
[% ELSIF op == 'mark_completed' %]
|
|
<h1>Complete ILL request</h1>
|
|
<p>Proceeding with this action will set this request to 'Completed'.</p>
|
|
<p>You can select a status alias from the available options:</p>
|
|
[% base_url = "/cgi-bin/koha/ill/ill-requests.pl" %]
|
|
[% proceed_url = base_url _ "?method=mark_completed&stage=complete" _ "&illrequest_id=" _ request.illrequest_id %]
|
|
<form action="[% proceed_url | url %]" method="get">
|
|
<select name="status_alias">
|
|
<option value="" selected></option>
|
|
[% FOREACH alias IN AuthorisedValues.Get('ILL_STATUS_ALIAS') %]
|
|
<option value="[% alias.authorised_value | html %]"> [% alias.lib | html %] </option>
|
|
[% END %]
|
|
</select>
|
|
<input type="hidden" name="method" value="mark_completed" />
|
|
<input type="hidden" name="stage" value="complete" />
|
|
<input type="hidden" name="illrequest_id" value="[% request.illrequest_id | html %]" />
|
|
<fieldset class="action">
|
|
<button type="submit" class="btn btn-sm btn-primary">Complete request</button>
|
|
<a class="btn btn-sm btn-default cancel" href="[% base_url | url %]">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
[% ELSIF op == 'cud-cancel' and !whole.error %]
|
|
<h1>Cancel a confirmed request</h1>
|
|
[% PROCESS $whole.template %]
|
|
[% ELSIF op == 'check_out' and !whole.error %]
|
|
[% IF !whole.stage || whole.stage == 'form' %]
|
|
<h1 id="ill-issue-title">Issue requested item to [% INCLUDE 'patron-title.inc' patron = request.patron %]</h1>
|
|
[% IF !request.biblio_id || request.biblio_id.length == 0 %]
|
|
<div class="alert alert-warning">This item cannot be checked out as it has no bibliographic record associated with it</div>
|
|
[% END %]
|
|
[% IF whole.value.errors.itemcount %]
|
|
<div class="alert alert-warning">The bibliographic record for this request has multiple items, it should only have one. Please fix this then try again.</div>
|
|
[% END %]
|
|
[% IF whole.value.errors.item_creation %]
|
|
<div class="alert alert-warning">An unknown error occurred while trying to add an item</div>
|
|
[% END %]
|
|
[% IF whole.value.errors.item_check_out %]
|
|
<div class="alert alert-warning">An unknown error occurred while trying to check out the item</div>
|
|
[% END %]
|
|
[% IF whole.value.check_out_errors %]
|
|
[% IF whole.value.check_out_errors.error.STATS %]
|
|
<div class="alert alert-warning"> Local use recorded </div>
|
|
[% ELSIF whole.value.check_out_errors.error.UNKNOWN_BARCODE %]
|
|
<div class="alert alert-warning"> The bibliographic record's item contains an unknown (or empty) barcode. </div>
|
|
[% ELSE %]
|
|
<div class="alert alert-warning">
|
|
There was a problem checking this item out, please check for problems with the <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% whole.value.patron.borrowernumber | uri %]">patron's account</a>
|
|
</div>
|
|
[% END %]
|
|
[% END %]
|
|
[% IF request.biblio_id && request.biblio_id.length > 0 && !whole.value.check_out_errors.error.STATS %]
|
|
<form method="POST" action="/cgi-bin/koha/ill/ill-requests.pl">
|
|
[% INCLUDE 'csrf-token.inc' %]
|
|
<fieldset class="rows">
|
|
<legend>Check out details</legend>
|
|
[% items = whole.value.biblio.items.unblessed %]
|
|
[% IF items.size == 1 %]
|
|
<p
|
|
><a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% whole.value.biblio.biblionumber | uri %]">The bibliographic record</a> for this request already has an item attached to it,
|
|
you are about to check it out</p
|
|
>
|
|
[% ELSE %]
|
|
<p>A bibliographic record for this request exists, but no item. You are about to create an item and check it out</p>
|
|
[% END %]
|
|
<ol>
|
|
<li class="ill_checkout_inhouse">
|
|
<label for="inhouse" class="ill_checkout_inhouse_label">Statistical patron:</label>
|
|
<select id="ill_checkout_inhouse_select" name="inhouse" class="ill_checkout_inhouse_select">
|
|
<option value=""></option>
|
|
[% FOREACH stat IN whole.value.statistical %]
|
|
[% IF stat.borrowernumber == params.inhouse %]
|
|
<option value="[% stat.cardnumber | html %]" selected>[% INCLUDE 'patron-title.inc' patron = stat %]</option>
|
|
[% ELSE %]
|
|
<option value="[% stat.cardnumber | html %]">[% INCLUDE 'patron-title.inc' patron = stat %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
[% IF whole.value.errors.inhouse %]
|
|
<span class="required">You must choose a valid patron</span>
|
|
[% END %]
|
|
<div class="hint"
|
|
>If you do not wish to check out the item to [% INCLUDE 'patron-title.inc' patron = request.patron %] and would rather issue it to an in-house statistical patron, choose the patron here</div
|
|
>
|
|
</li>
|
|
<li class="ill_checkout_item_type">
|
|
<label for="item_type" class="ill_checkout_item_type_label required">Item type:</label>
|
|
[% IF items.size != 1 %]
|
|
<select id="ill_checkout_item_type_select" name="item_type" required>
|
|
[% FOREACH type IN whole.value.itemtypes %]
|
|
<option value="[% type.itemtype | html %]" [% IF type.itemtype == params.item_type %]selected[% END %]> [% type.description | html %] </option>
|
|
[% END %]
|
|
</select>
|
|
[% ELSE %]
|
|
[% FOREACH type IN whole.value.itemtypes %]
|
|
[% IF type.itemtype == items.0.itype %]
|
|
[% type.description | html %]
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
[% IF whole.value.errors.item_type %]
|
|
<span class="required">You must choose an item type</span>
|
|
[% END %]
|
|
</li>
|
|
[% IF items.size == 1 %]
|
|
<li>
|
|
<label for="barcode" class="ill_checkout_barcode_label">Item barcode:</label>
|
|
[% items.0.barcode | html %]
|
|
</li>
|
|
[% END %]
|
|
<li class="ill_checkout_branchcode">
|
|
<label for="branchcode" class="ill_checkout_branchcode_label required">Library:</label>
|
|
[% branchcode = items.size == 1 ? items.0.homebranch : params.branchcode ? params.branchcode : request.branchcode %]
|
|
[% IF items.size != 1 %]
|
|
<select name="branchcode" id="ill_checkout_branchcode_select" required>
|
|
[% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
|
|
</select>
|
|
[% ELSE %]
|
|
[% FOREACH branch IN whole.value.libraries.unblessed %]
|
|
[% IF branch.branchcode == branchcode %]
|
|
[% branch.branchname | html %]
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
[% IF whole.value.errors.branchcode %]
|
|
<span class="required">You must choose a library</span>
|
|
[% END %]
|
|
</li>
|
|
<li class="ill_checkout_due_date">
|
|
<label for="duedate" class="ill_checkout_duedate_label">Due date:</label>
|
|
<input name="duedate" id="ill_checkout_duedate_input" type="text" value="[% params.duedate | html %]" class="flatpickr" data-flatpickr-enable-time="true" /> [% INCLUDE 'date-format.inc' %]
|
|
<div class="hint">If you do not specify a due date, it will be set according to circulation rules</div>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="action">
|
|
<input type="hidden" value="cud-check_out" name="op" />
|
|
<input type="hidden" value="form" name="stage" />
|
|
[% IF items.size == 1 %]
|
|
<input name="branchcode" type="hidden" value="[% branchcode | html %]" />
|
|
<input name="item_type" type="hidden" value="[% items.0.itype | html %]" />
|
|
[% END %]
|
|
<input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id" />
|
|
<input type="submit" class="btn btn-primary" value="Submit" />
|
|
<a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=[% request.id | html %]">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
[% END %]
|
|
[% IF whole.value.check_out_errors.error.STATS %]
|
|
<a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=[% request.id | html %]">Return to request</a>
|
|
[% END %]
|
|
[% ELSIF whole.stage == 'done_check_out' %]
|
|
<h1>Item checked out</h1>
|
|
<fieldset class="rows">
|
|
<legend>Check out details</legend>
|
|
<ol>
|
|
<li>
|
|
<label>Checked out to:</label>
|
|
[% INCLUDE 'patron-title.inc' patron = whole.value.patron %]
|
|
</li>
|
|
<li>
|
|
<label>Due date:</label>
|
|
[% whole.value.check_out.date_due | $KohaDates as_due_date => 1 %]
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="action">
|
|
<a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=[% request.id | html %]">Return to request</a>
|
|
</fieldset>
|
|
[% END %]
|
|
[% ELSIF op == 'generic_confirm' %]
|
|
<h1>Place request with partner libraries</h1>
|
|
[% IF error %]
|
|
[% IF error == 'no_target_email' %]
|
|
<div class="alert alert-warning"> No target email addresses found. Either select at least one partner or check your ILL partner library records. </div>
|
|
[% ELSIF error == 'no_library_email' %]
|
|
<div class="alert alert-warning"> Your library has no usable email address. Please set it. </div>
|
|
[% ELSIF error == 'unkown_error' %]
|
|
<div class="alert alert-warning"> Unknown error processing your request. Contact your administrator. </div>
|
|
[% END %]
|
|
[% END %]
|
|
<!-- Start of GENERIC_EMAIL case -->
|
|
[% IF whole.value.partners %]
|
|
[% ill_url = "/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=" _ request.illrequest_id %]
|
|
<form method="POST" action="/cgi-bin/koha/ill/ill-requests.pl">
|
|
[% INCLUDE 'csrf-token.inc' %]
|
|
<fieldset class="rows">
|
|
<legend>Interlibrary loan request details</legend>
|
|
<ol>
|
|
<li>
|
|
<label for="partner_filter">Filter partner libraries:</label>
|
|
<input type="text" id="partner_filter" />
|
|
</li>
|
|
<li>
|
|
<label for="partners" class="required">Select partner libraries:</label>
|
|
<select size="5" multiple="true" id="partners" name="partners" required="required">
|
|
[% FOREACH partner IN whole.value.partners %]
|
|
[% IF partner.email && partner.email.length > 0 %]
|
|
<option data-partner-id="[% partner.id | html %]" value="[% partner.borrowernumber | html %]"> [% partner.branchcode _ " - " _ partner.surname %] </option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
[% IF Koha.Preference('ILLCheckAvailability') %]
|
|
<div id="generic_confirm_search_count">Partners available for searching: <span id="generic_confirm_enabled">none</span></div>
|
|
<div id="generic_confirm_search">
|
|
<button type="button">Search selected partners</button>
|
|
</div>
|
|
[% END %]
|
|
</li>
|
|
<li>
|
|
<label for="subject" class="required">Subject line:</label>
|
|
<input type="text" name="subject" id="subject" type="text" value="[% whole.value.draft.subject | html %]" required="required" />
|
|
</li>
|
|
<li>
|
|
<label for="body" class="required">Email text:</label>
|
|
<textarea name="body" id="body" rows="20" cols="80" required="required">[% whole.value.draft.body | html %]</textarea>
|
|
</li>
|
|
</ol>
|
|
<input type="hidden" value="cud-generic_confirm" name="op" />
|
|
<input type="hidden" value="draft" name="stage" />
|
|
<input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id" />
|
|
</fieldset>
|
|
<fieldset class="action">
|
|
<input type="submit" class="btn btn-primary" value="Send email" />
|
|
<span><a href="[% ill_url | url %]" title="Return to request details">Cancel</a></span>
|
|
</fieldset>
|
|
</form>
|
|
[% IF Koha.Preference('ILLCheckAvailability') %]
|
|
<div id="partnerSearch" class="modal" tabindex="-1" role="dialog" aria-labelledby="partnerSearchLabel" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h1 class="modal-title" id="partnerSearchLabel"> Search partners</h1>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
[% FOR service IN services %]
|
|
<h4 class="ill_availability_sourcename">[% service.name | html %]</h4>
|
|
[% INCLUDE 'ill-availability-table.inc' service=service %]
|
|
[% END %]
|
|
<span id="service_id_restrict" data-service_id_restrict_plugin="ILL availability - z39.50" data-service_id_restrict_ids=""></span>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button class="btn btn-default" data-bs-dismiss="modal">Close</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
[% END %]
|
|
[% ELSE %]
|
|
<fieldset class="rows">
|
|
<legend>Interlibrary loan request details</legend>
|
|
<p>No partners have been defined yet. Please create appropriate patron records (by default IL category).</p>
|
|
<p>Be sure to provide email addresses for these patrons.</p>
|
|
<p
|
|
><span><a href="[% ill_url | url %]" title="Return to request details">Cancel</a></span></p
|
|
>
|
|
</fieldset>
|
|
[% END %]
|
|
<!-- generic_confirm ends here -->
|
|
[% ELSIF op == 'edit_action' %]
|
|
<form method="POST" id="ill_edit_action_form" action="/cgi-bin/koha/ill/ill-requests.pl">
|
|
[% INCLUDE 'csrf-token.inc' %]
|
|
<fieldset class="rows">
|
|
<legend>Request details</legend>
|
|
<ol>
|
|
[% type = request.get_type %]
|
|
<li class="borrowernumber">
|
|
<label for="borrowernumber">Patron ID:</label>
|
|
<input name="borrowernumber" id="borrowernumber" type="text" value="[% request.borrowernumber | html %]" />
|
|
</li>
|
|
[% PROCESS select_manager_form
|
|
manager => request.manager
|
|
required_permission => CAN_user_ill
|
|
%]
|
|
<li class="biblio_id">
|
|
<label for="biblio_id" class="biblio_id">Bibliographic record ID:</label>
|
|
<input name="biblio_id" id="biblio_id" type="text" value="[% request.biblio_id | html %]" />
|
|
</li>
|
|
<li class="branchcode">
|
|
<label for="library" class="branchcode">Library:</label>
|
|
<select name="branchcode" id="library">
|
|
[% PROCESS options_for_libraries libraries => Branches.all( selected => request.branchcode ) %]
|
|
</select>
|
|
</li>
|
|
<li class="status">
|
|
<label class="status">Status:</label>
|
|
[% stat = request.status %]
|
|
[% current_alias = request.status_alias %]
|
|
<select id="status_alias" name="status_alias">
|
|
<option value="" [% UNLESS current_alias %]selected[% END %]> [% request.capabilities.$stat.name | html %] </option>
|
|
[% FOREACH alias IN AuthorisedValues.Get('ILL_STATUS_ALIAS') %]
|
|
<option value="[% alias.authorised_value | html %]" [% IF alias.authorised_value == current_alias %]selected[% END %]> [% alias.lib | html %] </option>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
[% IF batches.count > 0 %]
|
|
<li class="batch">
|
|
<label class="batch_label">Batch:</label>
|
|
<select id="batch_id" name="batch_id">
|
|
<option value="">
|
|
[% FOREACH batch IN batches %]
|
|
<option value="[% batch.id | html %]" [% IF batch.id == request.batch_id %]selected[% END %]> [% batch.name | html %] </option>
|
|
[% END %]
|
|
</option></select
|
|
>
|
|
</li>
|
|
[% END %]
|
|
<li class="updated">
|
|
<label class="updated">Last updated:</label>
|
|
[% request.updated | $KohaDates with_hours => 1 %]
|
|
</li>
|
|
<li class="medium">
|
|
<label class="medium">Request type:</label>
|
|
[% IF type %][% type | html %][% ELSE %]<span>N/A</span>[% END %]
|
|
</li>
|
|
<li class="cost">
|
|
<label class="cost">Cost:</label>
|
|
[% IF request.cost %][% request.cost | $Price %][% ELSE %]<span>N/A</span>[% END %]
|
|
</li>
|
|
<li class="price_paid">
|
|
<label class="price_paid">Price paid:</label>
|
|
<input name="price_paid" id="price_paid" type="text" value="[% request.price_paid | html %]" />
|
|
</li>
|
|
<li class="req_id">
|
|
<label class="req_id">Request ID:</label>
|
|
[% request.id_prefix _ request.illrequest_id | html %]
|
|
</li>
|
|
<li class="notesstaff">
|
|
<label for="notesstaff" class="notesstaff">Staff notes:</label>
|
|
<textarea name="notesstaff" id="notesstaff" rows="5">[% request.notesstaff | html %]</textarea>
|
|
</li>
|
|
<li class="notesopac">
|
|
<label for="notesopac" class="notesopac">OPAC notes:</label>
|
|
<textarea name="notesopac" id="notesopac" rows="5">[% request.notesopac | html %]</textarea>
|
|
</li>
|
|
[% IF stat == 'UNAUTH' %]
|
|
<h4>Unauthenticated request details</h4>
|
|
[% INCLUDE unauthenticated_details %]
|
|
[% END %]
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="action">
|
|
<input type="hidden" value="cud-edit_action" name="op" />
|
|
<input type="hidden" value="form" name="stage" />
|
|
<input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id" />
|
|
<input type="submit" class="btn btn-primary" value="Submit" />
|
|
<a class="cancel" href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=[% request.id | html %]">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
[% ELSIF op == 'delete_confirm' %]
|
|
<div class="alert alert-warning">
|
|
<h3>Are you sure you wish to delete this request?</h3>
|
|
<form action="/cgi-bin/koha/ill/ill-requests.pl" method="post">
|
|
[% INCLUDE 'csrf-token.inc' %]
|
|
<input type="hidden" name="op" value="cud-delete" />
|
|
<input type="hidden" name="confirmed" value="1" />
|
|
<input type="hidden" name="illrequest_id" value="[% request.id | html %]" />
|
|
<button type="submit" class="btn btn-default approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
|
|
</form>
|
|
<a class="btn btn-default deny" href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=[% request.id | html %]"><i class="fa fa-fw fa-times"></i>No, do not delete</a>
|
|
</div>
|
|
[% ELSIF op == 'illview' %]
|
|
[% IF whole.template.length > 0 %]
|
|
[% PROCESS $whole.template %]
|
|
[% END %]
|
|
[% req_status = request.status %]
|
|
|
|
[% IF error %]
|
|
[% IF error == 'migrate_target' %]
|
|
<div class="alert alert-warning"> The backend you tried to migrate to does not yet support migrations, please try again with an alternative target. </div>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% IF tran_success %]
|
|
[% succ_methods = [] %]
|
|
[% IF tran_success.match('email') %]
|
|
[% succ_methods.push('email') %]
|
|
[% END %]
|
|
[% IF tran_success.match('sms') %]
|
|
[% succ_methods.push('SMS') %]
|
|
[% END %]
|
|
<div class="alert alert-warning"> The requested notice was queued for delivery by [% succ_methods.join(', ') | html %] </div>
|
|
[% END %]
|
|
[% IF tran_fail %]
|
|
[% fail_methods = [] %]
|
|
[% IF tran_fail.match('email') %]
|
|
[% fail_methods.push('email') %]
|
|
[% END %]
|
|
[% IF tran_fail.match('sms') %]
|
|
[% fail_methods.push('SMS') %]
|
|
[% END %]
|
|
<div class="alert alert-warning"> The requested notice was NOT queued for delivery by [% fail_methods.join(', ') | html %] </div>
|
|
[% END %]
|
|
|
|
<h1>Manage ILL request [% request.id_prefix _ request.illrequest_id | html %]</h1>
|
|
<div id="request-toolbar" class="btn-toolbar">
|
|
[% FOREACH action IN request.available_actions %]
|
|
[% needs_prefs = action.needs_prefs.size ? action.needs_prefs : [] %]
|
|
[% needs_perms = action.needs_perms.size ? action.needs_perms : [] %]
|
|
[% needs_all = action.needs_all.size ? action.needs_all : [] %]
|
|
[% has_prefs_count = 0 %]
|
|
[% has_perms_count = 0 %]
|
|
[% has_all_count = 0 %]
|
|
[% FOREACH pref IN needs_prefs %]
|
|
[% IF Koha.Preference(pref) %]
|
|
[% has_prefs_count = has_prefs_count + 1 %]
|
|
[% END %]
|
|
[% END %]
|
|
[% FOREACH perm IN needs_perms %]
|
|
[% perm_name = 'CAN_' _ perm %]
|
|
[% IF ($perm_name) %]
|
|
[% has_perms_count = has_perms_count + 1 %]
|
|
[% END %]
|
|
[% END %]
|
|
[% FOREACH func IN needs_all %]
|
|
[% IF func(request) %]
|
|
[% has_all_count = has_all_count + 1 %]
|
|
[% END %]
|
|
[% END %]
|
|
[% NEXT IF has_prefs_count < needs_prefs.size || has_perms_count < needs_perms.size || has_all_count < needs_all.size %]
|
|
[% IF action.method == 'migrate' %]
|
|
[% IF Koha.Preference('AutoILLBackendPriority') && backends.size > 1 %]
|
|
<a
|
|
title="[% action.ui_method_name | html %]"
|
|
id="ill-toolbar-btn-[% action.id | lower | html %]"
|
|
class="btn btn-default"
|
|
href="/cgi-bin/koha/ill/ill-requests.pl?op=[% action.method | uri %]&illrequest_id=[% request.illrequest_id | uri %]&auto_migrate=1"
|
|
>
|
|
<span class="fa [% action.ui_method_icon | html %]"></span>
|
|
[% action.ui_method_name | html %]
|
|
</a>
|
|
[% ELSIF backends.size > 2 %]
|
|
<div class="dropdown btn-group">
|
|
<button class="btn btn-default dropdown-toggle" type="button" id="ill-migrate-dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
|
<i class="fa [% action.ui_method_icon | html %]"></i> [% action.ui_method_name | html %]
|
|
</button>
|
|
<ul class="dropdown-menu" aria-labelledby="ill-migrate-dropdown">
|
|
[% FOREACH backend IN backends %]
|
|
[% IF backend != request.backend %]
|
|
<li
|
|
><a class="dropdown-item" href="/cgi-bin/koha/ill/ill-requests.pl?op=[% action.method | uri %]&illrequest_id=[% request.illrequest_id | uri %]&backend=[% backend | uri %]"
|
|
>[% backend | html %]</a
|
|
></li
|
|
>
|
|
[% END %]
|
|
[% END %]
|
|
</ul>
|
|
</div>
|
|
[% ELSIF backends.size == 2 %]
|
|
[% FOREACH backend IN backends %]
|
|
[% IF backend != request.backend %]
|
|
<a
|
|
title="[% action.ui_method_name | html %]"
|
|
id="ill-toolbar-btn-[% action.id | lower | html %]"
|
|
class="btn btn-default"
|
|
href="/cgi-bin/koha/ill/ill-requests.pl?op=[% action.method | uri %]&illrequest_id=[% request.illrequest_id | uri %]&backend=[% backend | uri %]"
|
|
>
|
|
<span class="fa [% action.ui_method_icon | html %]"></span>
|
|
[% action.ui_method_name | html %]
|
|
</a>
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
[% ELSIF action.method != 0 %]
|
|
<a
|
|
title="[% action.ui_method_name | html %]"
|
|
id="ill-toolbar-btn-[% action.id | lower | html %]"
|
|
[% IF action.id == 'REQ' %]
|
|
class="btn btn-primary"
|
|
[% ELSE %]
|
|
class="btn btn-default"
|
|
[% END %]
|
|
href="/cgi-bin/koha/ill/ill-requests.pl?op=[% action.method | uri %]&illrequest_id=[% request.illrequest_id | uri %]"
|
|
>
|
|
<span class="fa [% action.ui_method_icon | html %]"></span>
|
|
[% action.ui_method_name | html %]
|
|
</a>
|
|
[% END %]
|
|
[% END %]
|
|
<a title="Edit request" id="ill-toolbar-btn-edit-action" class="btn btn-default" href="/cgi-bin/koha/ill/ill-requests.pl?op=edit_action&illrequest_id=[% request.illrequest_id | html %]">
|
|
<i class="fa-solid fa-pencil" aria-hidden="true"></i>
|
|
Edit request
|
|
</a>
|
|
[% IF request.borrowernumber %]
|
|
<div class="dropdown btn-group">
|
|
<button class="btn btn-default dropdown-toggle" type="button" id="ill-notice-dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
|
<i class="fa-solid fa-envelope"></i> Send notice to patron
|
|
</button>
|
|
<ul class="dropdown-menu" aria-labelledby="ill-notice-dropdown">
|
|
[% FOREACH notice IN notices %]
|
|
<li
|
|
><a class="dropdown-item" href="/cgi-bin/koha/ill/ill-requests.pl?op=send_notice&illrequest_id=[% request.illrequest_id | uri %]&notice_code=[% notice.code | uri %]"
|
|
>[% notice.name | html %]</a
|
|
></li
|
|
>
|
|
[% END %]
|
|
</ul>
|
|
</div>
|
|
[% END %]
|
|
<a title="Display supplier metadata" id="ill-request-display-metadata" class="btn btn-default" href="#">
|
|
<span class="fa-solid fa-eye"></span>
|
|
Display supplier metadata
|
|
</a>
|
|
<a title="ILL request log" id="ill-request-display-log" class="btn btn-default" href="#">
|
|
<span class="fa-solid fa-calendar-days"></span>
|
|
ILL request log
|
|
</a>
|
|
</div>
|
|
<div class="page-section">
|
|
<h3>Request details</h3>
|
|
<h4>Details from library</h4>
|
|
[% IF request.get_copyright_clearance_confirmed %]
|
|
<h5> <i class="fa fa-fw fa-check text-success" aria-hidden="true"></i> <span class="tab-title">Patron has confirmed copyright clearance for this request</span> </h5>
|
|
[% END %]
|
|
<div class="rows">
|
|
<ol>
|
|
[% IF request.orderid %]
|
|
<li class="orderid">
|
|
<span class="label orderid">Order ID:</span>
|
|
[% request.orderid | html %]
|
|
</li>
|
|
[% END %]
|
|
[% IF request.borrowernumber %]
|
|
<li class="borrowernumber">
|
|
<span class="label borrowernumber">Patron:</span>
|
|
[% borrowerlink = "/cgi-bin/koha/members/moremember.pl" _ "?borrowernumber=" _ request.patron.borrowernumber %]
|
|
<a href="[% borrowerlink | url %]" title="View borrower details"> [% request.patron.firstname _ " " _ request.patron.surname _ " [" _ request.patron.cardnumber _ "]" | html %] </a>
|
|
</li>
|
|
[% END %]
|
|
[% PROCESS select_manager_show
|
|
manager => request.manager
|
|
display => "fieldset"
|
|
%]
|
|
[% IF request.biblio_id %]
|
|
<li class="biblio_id">
|
|
<span class="label biblio_id">Bibliographic record ID:</span>
|
|
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% request.biblio_id | uri %]">[% request.biblio_id | html %]</a>
|
|
</li>
|
|
[% END %]
|
|
<li class="branchcode">
|
|
<span class="label branchcode">Library:</span>
|
|
[% Branches.GetName(request.branchcode) | html %]
|
|
</li>
|
|
<li class="status">
|
|
<span class="label status">Status:</span>
|
|
[% IF request.statusalias %]
|
|
[% request.statusalias.lib | html %]
|
|
[% ELSE %]
|
|
[% request.capabilities.$req_status.name | html %]
|
|
[% IF request.requested_partners %]
|
|
([% request.requested_partners | html %])
|
|
[% END %]
|
|
[% END %]
|
|
</li>
|
|
[% IF request.ill_batch > 0 %]
|
|
<li class="batch">
|
|
<span class="label batch">Batch:</span>
|
|
<a href="/cgi-bin/koha/ill/ill-requests.pl?batch_id=[% request.ill_batch.ill_batch_id | uri %]"> [% request.ill_batch.name | html %] </a>
|
|
</li>
|
|
[% END %]
|
|
<li class="updated">
|
|
<span class="label updated">Last updated:</span>
|
|
[% request.updated | $KohaDates with_hours => 1 %]
|
|
</li>
|
|
[% type = request.get_type %]
|
|
[% IF type %]
|
|
<li class="medium">
|
|
<span class="label medium">Request type:</span>
|
|
[% type | html %]
|
|
</li>
|
|
[% END %]
|
|
[% IF request.accessurl %]
|
|
<li class="accessurl">
|
|
<span class="label accessurl">Access URL:</span>
|
|
<a href="[% request.accessurl | url %]" target="_blank" title="[% request.accessurl | html %]"><i class="fa-solid fa-arrow-up-right-from-square"></i> View document</a>
|
|
</li>
|
|
[% END %]
|
|
[% historycheck_requests = request.get_history_check_requests %]
|
|
[% IF historycheck_requests.count %]
|
|
<li class="historycheck_requests_value">
|
|
<span class="label historycheck_requests_value">History check requests:</span>
|
|
[% FOREACH historycheck_request IN historycheck_requests %]
|
|
[% SET status = historycheck_request.status %]
|
|
<a target="_blank" href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=[% historycheck_request.illrequest_id | uri %]"
|
|
><i class="fa fa-fw fa-external-link-square"></i>Request [% historycheck_request.id_prefix | html %][% historycheck_request.illrequest_id | html %]
|
|
([% historycheck_request.capabilities.$status.name | html %]) on [% historycheck_request.placed | $KohaDates %]</a
|
|
>
|
|
[% END %]
|
|
</li>
|
|
[% END %]
|
|
[% type_disclaimer_value = request.get_type_disclaimer_value %]
|
|
[% IF type_disclaimer_value %]
|
|
<li class="type_disclaimer_value">
|
|
<span class="label type_disclaimer_value">Type disclaimer value:</span>
|
|
[% type_disclaimer_value | html %]
|
|
</li>
|
|
[% END %]
|
|
[% type_disclaimer_date = request.get_type_disclaimer_date %]
|
|
[% IF type_disclaimer_date %]
|
|
<li class="type_disclaimer_date">
|
|
<span class="label type_disclaimer_date">Type disclaimer date:</span>
|
|
[% type_disclaimer_date | $KohaDates with_hours => 1 %]
|
|
</li>
|
|
[% END %]
|
|
[% IF request.cost %]
|
|
<li class="cost">
|
|
<span class="label cost">Cost:</span>
|
|
[% request.cost | $Price %]
|
|
</li>
|
|
[% END %]
|
|
[% IF request.price_paid %]
|
|
<li class="price_paid">
|
|
<span class="label price_paid">Price paid:</span>
|
|
[% request.price_paid | $Price %]
|
|
</li>
|
|
[% END %]
|
|
[% IF request.notesstaff %]
|
|
<li class="notesstaff">
|
|
<span class="label notes_staff">Staff notes:</span>
|
|
<pre>[% request.notesstaff | $raw %]</pre>
|
|
</li>
|
|
[% END %]
|
|
[% IF request.notesopac %]
|
|
<li class="notesopac">
|
|
<span class="label notes_opac">Notes:</span>
|
|
<p>[% request.notesopac | html %]</p>
|
|
</li>
|
|
[% END %]
|
|
</ol>
|
|
</div>
|
|
[% IF req_status == 'UNAUTH' %]
|
|
<div class="rows">
|
|
<h4>Unauthenticated request details</h4>
|
|
<ol>
|
|
[% INCLUDE unauthenticated_details %]
|
|
</ol>
|
|
</div>
|
|
[% END %]
|
|
<div class="rows">
|
|
<h4>Details from supplier ([% request.backend | html %])</h4>
|
|
<ol>
|
|
[% FOREACH meta IN request.metadata %]
|
|
[% IF meta.value.defined && meta.value.length %]
|
|
<li class="requestmeta-[% meta.key.replace('\s','_') | html %]">
|
|
<span class="label">[% meta.key.replace('_',' ') | html %]:</span>
|
|
[% meta.value | html %]
|
|
</li>
|
|
[% END %]
|
|
[% END %]
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="dataPreview" class="modal" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h1 class="modal-title" id="dataPreviewLabel"> Supplier metadata</h1>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div id="requestattributes">
|
|
[% FOREACH attr IN request.extended_attributes %]
|
|
<div class="requestattr-[% attr.type | html %]">
|
|
<span class="label">[% attr.type | html %]:</span>
|
|
[% attr.value | html %]
|
|
</div>
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button class="btn btn-default" data-bs-dismiss="modal">Close</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="requestLog" class="modal" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h1 class="modal-title" id="requestLogLabel"> Request log</h1>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
[% IF request.logs.size > 0 %]
|
|
[% FOREACH log IN request.logs %]
|
|
[% tpl = log.template %]
|
|
[% INCLUDE $tpl log=log %]
|
|
[% END %]
|
|
[% ELSE %]
|
|
<span>There are no recorded logs for this request</span>
|
|
[% END %]
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button class="btn btn-default" data-bs-dismiss="modal">Close</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="page-section">
|
|
<h3>[% request.illcomments.count | html %] comments</h3>
|
|
[% IF request.illcomments.count && request.illcomments.count > 0 %]
|
|
[% FOREACH comment IN request.illcomments %]
|
|
<div class="rows comment_[% comment.patron.categorycode | html %]">
|
|
<h5
|
|
>Comment by:
|
|
<a href="[% borrowerlink | url %]" title="View borrower details"> [% comment.patron.firstname _ " " _ comment.patron.surname _ " [" _ comment.patron.cardnumber _ "]" | html %]</a>
|
|
[% comment.timestamp | $KohaDates with_hours => 1 %]</h5
|
|
>
|
|
<p>[% comment.comment | html %]</p>
|
|
</div>
|
|
[% END %]
|
|
[% END %]
|
|
<div class="rows">
|
|
<h3><a id="toggle_addcomment" href="#">Add comment</a></h3>
|
|
<div id="addcomment" class="content_hidden">
|
|
<form class="validated" method="post" action="/cgi-bin/koha/ill/ill-requests.pl">
|
|
<input type="hidden" value="cud-save_comment" name="op" />
|
|
[% INCLUDE 'csrf-token.inc' %]
|
|
<input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id" />
|
|
<fieldset class="rows">
|
|
<ol>
|
|
<li>
|
|
<label class="required" for="comment">Comment: </label>
|
|
<textarea class="required" required="required" cols="80" rows="10" id="comment" name="comment"></textarea>
|
|
<span class="required">Required</span>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="action">
|
|
<input type="submit" class="btn btn-primary" value="Submit" />
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
[% ELSIF op == 'illlist' %]
|
|
<!-- illlist -->
|
|
<h1>
|
|
[% IF !batch %]
|
|
<span>View ILL requests</span>
|
|
[% ELSIF batch %]
|
|
<span>View ILL requests for batch "[% batch.name | html %]"</span>
|
|
[% END %]
|
|
</h1>
|
|
<div id="results" class="page-section">
|
|
[% WRAPPER tabs id= "ill-list-tabs" %]
|
|
[% WRAPPER tabs_nav %]
|
|
[% WRAPPER tab_item tabname= "ill-list-tab-all" bt_active= 1 %]
|
|
<span>All</span>
|
|
[% END %]
|
|
[% FOREACH illreq_tab IN illreq_tabs %]
|
|
[% WRAPPER tab_item tabname= "ill-list-tab-${loop.index}" %]
|
|
<span data-statuses="[% illreq_tab.status.join('|') | html %]">[% illreq_tab.name | html %]</span>
|
|
[% END %]
|
|
[% END %]
|
|
[% END # /WRAPPER tabs_nav %]
|
|
[% END %]
|
|
<h2>Details for all requests</h2>
|
|
[% INCLUDE 'ill-list-table.inc' %]
|
|
</div>
|
|
<!-- /#results -->
|
|
[% ELSIF op == 'availability' %]
|
|
<!-- availability -->
|
|
<h1>Availability</h1>
|
|
<div id="results" class="page-section">
|
|
<h3>Displaying availability results</h3>
|
|
<form method="POST" action="/cgi-bin/koha/ill/ill-requests.pl">
|
|
[% INCLUDE 'csrf-token.inc' %]
|
|
[% FOREACH key IN whole.keys %]
|
|
[% value = whole.$key %]
|
|
[% IF key != 'op' && key != 'method' && key != 'custom_key' && key != 'custom_value' && key != 'csrf_token' %]
|
|
<input type="hidden" name="[% key | html %]" value="[% value | html %]" />
|
|
[% END %]
|
|
[% END %]
|
|
[% custom_keys = whole.custom_key.split('\0') %]
|
|
[% custom_values = whole.custom_value.split('\0') %]
|
|
[% i = 0 %]
|
|
[% FOREACH custom_key IN custom_keys %]
|
|
<input type="hidden" name="custom_key" value="[% custom_key | html %]" />
|
|
<input type="hidden" name="custom_value" value="[% custom_values.$i | html %]" />
|
|
[% i = i + 1 %]
|
|
[% END %]
|
|
<input type="hidden" name="op" value="cud-create" />
|
|
<input type="hidden" name="stage" value="form" />
|
|
<input type="hidden" name="checked_availability" value="1" />
|
|
<div id="continue-request-row" class="alert alert-warning">
|
|
If you can't find what you are looking for, you can
|
|
<button class="button" type="submit">continue creating your request</button> or
|
|
<a href="/cgi-bin/koha/ill/ill-requests.pl">cancel your request</a>
|
|
</div>
|
|
</form>
|
|
[% FOR service IN services %]
|
|
<h4 class="ill_availability_sourcename">[% service.name | html %]</h4>
|
|
[% INCLUDE 'ill-availability-table.inc' service=service %]
|
|
[% END %]
|
|
</div>
|
|
[% ELSIF op == 'typedisclaimer' %]
|
|
<!-- typedisclaimer -->
|
|
<h1>Request type disclaimer</h1>
|
|
<div id="results" class="page-section">
|
|
<form method="post" id="typedisclaimer-form">
|
|
[% INCLUDE 'csrf-token.inc' %]
|
|
<fieldset class="rows">
|
|
[% disclaimer.text | $raw %]
|
|
[% SET disc_av_category_code = AuthorisedValues.GetAuthValueDropbox(disclaimer.av_cat) %]
|
|
[% IF disc_av_category_code.count %]
|
|
<br />
|
|
<select name="type_disclaimer_value">
|
|
[% FOR av_option IN disc_av_category_code %]
|
|
<option value="[% av_option.lib_opac | html %]">[% av_option.lib_opac | html %]</option>
|
|
[% END %]
|
|
</select>
|
|
[% END %]
|
|
</fieldset>
|
|
<fieldset class="action">
|
|
[% FOREACH key IN whole.keys %]
|
|
[% value = whole.$key %]
|
|
[% IF key != 'op' && key != 'method' && key != 'custom_key' && key != 'custom_value' && key != 'csrf_token' %]
|
|
<input type="hidden" name="[% key | html %]" value="[% value | html %]" />
|
|
[% END %]
|
|
[% END %]
|
|
[% custom_keys = whole.custom_key.split('\0') %]
|
|
[% custom_values = whole.custom_value.split('\0') %]
|
|
[% i = 0 %]
|
|
[% FOREACH custom_key IN custom_keys %]
|
|
<input type="hidden" name="custom_key" value="[% custom_key | html %]" />
|
|
<input type="hidden" name="custom_value" value="[% custom_values.$i | html %]" />
|
|
[% i = i + 1 %]
|
|
[% END %]
|
|
<input type="hidden" name="op" value="cud-create" />
|
|
<input type="hidden" name="stage" value="form" />
|
|
<input type="hidden" name="type_disclaimer_submitted" value="1" />
|
|
<input type="submit" value="Submit" />
|
|
<a class="cancel" href="ill-requests.pl">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
[% ELSIF op == 'historycheck' %]
|
|
<!-- historycheck -->
|
|
<h1>Request history check</h1>
|
|
<div id="results" class="page-section">
|
|
<form method="post" id="historycheck-form">
|
|
[% INCLUDE 'csrf-token.inc' %]
|
|
<h3>You are attempting to place the following request:</h3>
|
|
<table>
|
|
[% FOREACH param IN sorted_params %]
|
|
[% key = param.keys.0 %]
|
|
[% value = param.$key %]
|
|
[% IF key != 'op' && key != 'method' && key != 'custom_key' && key != 'custom_value' && key != 'csrf_token' && value %]
|
|
<tr>
|
|
<td>[% key_mapping(key) || key | ucfirst | html %]</td>
|
|
[% IF key == 'branchcode' %]
|
|
<td>[% Branches.GetName(value) | html %]</td>
|
|
[% ELSE %]
|
|
<td>[% value | html %]</td>
|
|
[% END %]
|
|
</tr>
|
|
[% END %]
|
|
[% END %]
|
|
</table>
|
|
|
|
[% IF matching_requests_for_patron.size %]
|
|
<h4>This request has already been placed by patron [%- INCLUDE 'patron-title.inc' patron => request_patron_obj hide_patron_infos_if_needed => 1 -%]:</h4>
|
|
<ul class="list-unstyled">
|
|
[% FOREACH matching_request_for_patron IN matching_requests_for_patron %]
|
|
[% SET matching_req_status = matching_request_for_patron.status %]
|
|
<li>
|
|
<a target="_blank" href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=[% matching_request_for_patron.illrequest_id | uri %]"
|
|
><i class="fa fa-fw fa-external-link-square"></i>Request [% matching_request_for_patron.id_prefix | html %][% matching_request_for_patron.illrequest_id | html %]
|
|
([% matching_request_for_patron.capabilities.$matching_req_status.name | html %]) on [% matching_request_for_patron.placed | $KohaDates %]</a
|
|
>
|
|
</li>
|
|
[% END %]
|
|
</ul>
|
|
[% END %]
|
|
<fieldset class="action">
|
|
[% FOREACH key IN whole.keys %]
|
|
[% value = whole.$key %]
|
|
[% IF key != 'op' && key != 'method' && key != 'custom_key' && key != 'custom_value' && key != 'csrf_token' %]
|
|
<input type="hidden" name="[% key | html %]" value="[% value | html %]" />
|
|
[% END %]
|
|
[% END %]
|
|
[% custom_keys = whole.custom_key.split('\0') %]
|
|
[% custom_values = whole.custom_value.split('\0') %]
|
|
[% i = 0 %]
|
|
[% FOREACH custom_key IN custom_keys %]
|
|
<input type="hidden" name="custom_key" value="[% custom_key | html %]" />
|
|
<input type="hidden" name="custom_value" value="[% custom_values.$i | html %]" />
|
|
[% i = i + 1 %]
|
|
[% END %]
|
|
<input type="hidden" name="op" value="cud-create" />
|
|
<input type="hidden" name="stage" value="form" />
|
|
<input type="hidden" name="history_check_submitted" value="1" />
|
|
<input type="submit" class="btn btn-primary" value="Submit anyway" />
|
|
<a class="cancel" href="ill-requests.pl">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
[% ELSIF op == 'confirmautoill' %]
|
|
<!-- confirmautoill -->
|
|
[% IF(auto_migrate) %]
|
|
<h1>Confirm switch provider</h1>
|
|
[% ELSE %]
|
|
<h1>Confirm request</h1>
|
|
[% END %]
|
|
<div id="results" class="page-section">
|
|
<form method="post" id="confirmautoill-goback-form">
|
|
[% INCLUDE 'csrf-token.inc' %]
|
|
[% FOREACH key IN whole.keys %]
|
|
[% value = whole.$key %]
|
|
[% IF key != 'op' && key != 'method' && key != 'custom_key' && key != 'custom_value' %]
|
|
<input type="hidden" name="[% key | html %]" value="[% value | html %]" />
|
|
[% END %]
|
|
[% END %]
|
|
[% custom_keys = whole.custom_key.split('\0') %]
|
|
[% custom_values = whole.custom_value.split('\0') %]
|
|
[% i = 0 %]
|
|
[% FOREACH custom_key IN custom_keys %]
|
|
<input type="hidden" name="custom_key" value="[% custom_key | html %]" />
|
|
<input type="hidden" name="custom_value" value="[% custom_values.$i | html %]" />
|
|
[% i = i + 1 %]
|
|
[% END %]
|
|
<input type="hidden" name="op" value="cud-create" />
|
|
<input type="hidden" name="stage" value="0" />
|
|
[% IF auto_migrate %]
|
|
<a class="btn btn-link" href="ill-requests.pl?op=illview&illrequest_id=[% request.illrequest_id | uri %]"> <i class="fa fa-arrow-left"></i> Return to request </a>
|
|
[% ELSE %]
|
|
<button type="submit" class="btn btn-link" onclick="this.form.submit()"> <i class="fa fa-arrow-left"></i> Return to form </button>
|
|
[% END %]
|
|
</form>
|
|
<form method="post" id="confirmautoill-form">
|
|
[% INCLUDE 'csrf-token.inc' %]
|
|
<fieldset class="rows">
|
|
<ul class="list-group" id="autoillbackends"> </ul>
|
|
<p id="autoillbackend-message" class="text-info"></p>
|
|
</fieldset>
|
|
<fieldset class="action">
|
|
[% IF auto_migrate %]
|
|
<a id="confirm-auto-migrate" data-illrequest_id="[% request.illrequest_id | html %]" class="btn btn-primary disabled">Confirm</a>
|
|
<a class="cancel" href="ill-requests.pl">Cancel</a>
|
|
[% ELSE %]
|
|
[% FOREACH key IN whole.keys %]
|
|
[% value = whole.$key %]
|
|
[% IF key != 'op' && key != 'method' && key != 'custom_key' && key != 'custom_value' %]
|
|
<input type="hidden" name="[% key | html %]" value="[% value | html %]" />
|
|
[% END %]
|
|
[% END %]
|
|
[% custom_keys = whole.custom_key.split('\0') %]
|
|
[% custom_values = whole.custom_value.split('\0') %]
|
|
[% i = 0 %]
|
|
[% FOREACH custom_key IN custom_keys %]
|
|
<input type="hidden" name="custom_key" value="[% custom_key | html %]" />
|
|
<input type="hidden" name="custom_value" value="[% custom_values.$i | html %]" />
|
|
[% i = i + 1 %]
|
|
[% END %]
|
|
<input type="hidden" name="op" value="cud-create" />
|
|
<input type="hidden" name="stage" value="form" />
|
|
<input type="hidden" name="confirm_auto_submitted" value="1" />
|
|
<input type="submit" class="btn btn-primary" value="Confirm" />
|
|
<a class="cancel" href="ill-requests.pl">Cancel</a>
|
|
[% END %]
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
[% ELSIF op == 'batch_list' %]
|
|
[% INCLUDE 'ill-batch.inc' %]
|
|
[% ELSE %]
|
|
<!-- Custom Backend Action -->
|
|
[% PROCESS $whole.template %]
|
|
[% END %]
|
|
[% END %]
|
|
</div>
|
|
<!-- /#interlibraryloans -->
|
|
[% END %]
|
|
|
|
[% BLOCK unauthenticated_details %]
|
|
[% unauthenticated_first_name = request.extended_attributes.find({'type'=>'unauthenticated_first_name'}).value %]
|
|
[% IF unauthenticated_first_name %]
|
|
<li>
|
|
<span class="label unauthenticated_first_name">First name:</span>
|
|
[% unauthenticated_first_name | html %]
|
|
</li>
|
|
[% END %]
|
|
[% unauthenticated_last_name = request.extended_attributes.find({'type'=>'unauthenticated_last_name'}).value %]
|
|
[% IF unauthenticated_last_name %]
|
|
<li>
|
|
<span class="label unauthenticated_last_name">Last name:</span>
|
|
[% unauthenticated_last_name | html %]
|
|
</li>
|
|
[% END %]
|
|
[% unauthenticated_email = request.extended_attributes.find({'type'=>'unauthenticated_email'}).value %]
|
|
[% IF unauthenticated_email %]
|
|
<li>
|
|
<span class="label unauthenticated_email">Email:</span>
|
|
[% unauthenticated_email | html %]
|
|
</li>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
[% INCLUDE 'js-biblio-format.inc' %]
|
|
[% INCLUDE 'calendar.inc' %]
|
|
[% INCLUDE 'select2.inc' %]
|
|
[% IF op == 'edit_action' %]
|
|
[% INCLUDE 'select_manager.inc'
|
|
add_modal => 1
|
|
manager => request.manager
|
|
filter => 'ill_users'
|
|
%]
|
|
[% END %]
|
|
[% IF metadata_enrichment_services %]
|
|
<script nonce="[% Koha.CSPNonce | $raw %]">
|
|
var ill_check_availability_syspref = '[% Koha.Preference('ILLCheckAvailability') | html %]';
|
|
var metadata_enrichment_services = [% metadata_enrichment_services | $raw %];
|
|
</script>
|
|
<script nonce="[% Koha.CSPNonce | $raw %]">
|
|
[% IF batch_availability_services %]
|
|
var batch_availability_services = [% batch_availability_services | $raw %];
|
|
[% ELSE %]
|
|
var batch_availability_services = [];
|
|
[% END %]
|
|
</script>
|
|
[% END %]
|
|
<script nonce="[% Koha.CSPNonce | $raw %]">
|
|
var prefilters = '[% prefilters | $raw %]';
|
|
// Set column settings
|
|
var table_settings = [% TablesSettings.GetTableSettings( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) | $raw %];
|
|
|
|
[% IF services_json.length > 0 %]
|
|
var services = [% services_json | $raw %];
|
|
[% ELSE %]
|
|
var services = [];
|
|
[% END %]
|
|
[% IF auto_backends_json.length > 0 %]
|
|
var auto_backends = [% auto_backends_json | $raw %];
|
|
[% ELSE %]
|
|
var auto_backends = [];
|
|
[% END %]
|
|
[% IF metadata.length > 0 %]
|
|
var metadata = "[% metadata | $raw %]";
|
|
[% END %]
|
|
</script>
|
|
<script nonce="[% Koha.CSPNonce | $raw %]">
|
|
$("#ill_checkout_inhouse_select").on("change", function () {
|
|
if ($(this).val().length > 0) {
|
|
$(".ill_checkout_due_date").hide();
|
|
} else {
|
|
$(".ill_checkout_due_date").show();
|
|
}
|
|
});
|
|
|
|
if ($("#ill_edit_action_form #borrowernumber").length) {
|
|
patron_autocomplete($("#ill_edit_action_form #borrowernumber"), {
|
|
"on-select-callback": function (event, ui) {
|
|
$("#ill_edit_action_form #borrowernumber").val(ui.item.patron_id);
|
|
return false;
|
|
},
|
|
});
|
|
}
|
|
</script>
|
|
[% INCLUDE 'ill-list-table-strings.inc' %]
|
|
[% INCLUDE 'ill-batch-table-strings.inc' %]
|
|
[% INCLUDE 'ill-batch-modal-strings.inc' %]
|
|
[% Asset.js("js/ill-list-table.js") | $raw %]
|
|
[% Asset.js("js/ill-batch.js") | $raw %]
|
|
[% Asset.js("js/ill-batch-table.js") | $raw %]
|
|
[% Asset.js("js/ill-batch-modal.js") | $raw %]
|
|
[% IF (op == 'availability' || op == 'generic_confirm') && Koha.Preference('ILLCheckAvailability') %]
|
|
[% Asset.js("js/ill-availability.js") | $raw %]
|
|
[% END %]
|
|
[% IF (op == 'confirmautoill' && Koha.Preference('AutoILLBackendPriority')) %]
|
|
[% Asset.js("js/ill-autobackend.js") | $raw %]
|
|
[% END %]
|
|
[% IF op == 'availability' && Koha.Preference('ILLCheckAvailability') %]
|
|
<script nonce="[% Koha.CSPNonce | $raw %]">
|
|
$(document).ready(function () {
|
|
window.doSearch();
|
|
});
|
|
</script>
|
|
[% END %]
|
|
[% IF op == 'generic_confirm' && Koha.Preference('ILLCheckAvailability') %]
|
|
[% Asset.js("js/ill-availability-partner.js") | $raw %]
|
|
[% END %]
|
|
[% Asset.js("lib/jquery/plugins/multiple-select/multiple-select.min.js") | $raw %]
|
|
[% END %]
|
|
<!-- prettier-ignore-start -->
|
|
[% TRY %]
|
|
[% PROCESS backend_jsinclude %]
|
|
[% CATCH %]
|
|
[% END %]
|
|
<!-- prettier-ignore-end -->
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|