Bugzilla – Attachment 175303 Details for
Bug 38441
ILL - Allow for a history check workflow stage
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38441: ILLHistoryCheck: Staff UI
Bug-38441-ILLHistoryCheck-Staff-UI.patch (text/plain), 7.84 KB, created by
Pedro Amorim
on 2024-12-09 12:09:47 UTC
(
hide
)
Description:
Bug 38441: ILLHistoryCheck: Staff UI
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-12-09 12:09:47 UTC
Size:
7.84 KB
patch
obsolete
>From b2920d80101d4360a355ae12dac183498de9941e Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 14 Nov 2024 09:54:20 -0100 >Subject: [PATCH] Bug 38441: ILLHistoryCheck: Staff UI > >--- > ill/ill-requests.pl | 11 ++- > .../prog/en/modules/ill/ill-requests.tt | 72 +++++++++++++++++++ > 2 files changed, 82 insertions(+), 1 deletion(-) > >diff --git a/ill/ill-requests.pl b/ill/ill-requests.pl >index 37b2979ee8d..b1f2233e601 100755 >--- a/ill/ill-requests.pl >+++ b/ill/ill-requests.pl >@@ -30,6 +30,7 @@ use Koha::ILL::Requests; > use Koha::ILL::Request; > use Koha::ILL::Batches; > use Koha::ILL::Request::Workflow::Availability; >+use Koha::ILL::Request::Workflow::HistoryCheck; > use Koha::ILL::Request::Workflow::TypeDisclaimer; > use Koha::ILL::Request::Workflow::ConfirmAuto; > use Koha::Libraries; >@@ -134,6 +135,8 @@ if ( $backends_available ) { > my $request = Koha::ILL::Request->new->load_backend( $params->{backend} ); > > # Before request creation operations - Preparation >+ my $history_check = >+ Koha::ILL::Request::Workflow::HistoryCheck->new( $params, 'staff' ); > my $availability = > Koha::ILL::Request::Workflow::Availability->new( $params, 'staff' ); > my $type_disclaimer = >@@ -141,8 +144,14 @@ if ( $backends_available ) { > my $confirm_auto = > Koha::ILL::Request::Workflow::ConfirmAuto->new( $params, 'staff' ); > >+ # ILLHistoryCheck operation >+ if ($history_check->show_history_check($request)) { >+ $op = 'historycheck'; >+ $template->param( >+ $history_check->history_check_template_params($params) >+ ) > # ILLCheckAvailability operation >- if ($availability->show_availability($request)) { >+ } elsif ($availability->show_availability($request)) { > $op = 'availability'; > $template->param( > $availability->availability_template_params($params) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >index 60b8a4a62da..74728c5de1d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >@@ -44,6 +44,13 @@ > [% WRAPPER breadcrumb_item bc_active= 1 %] > <span>Request type disclaimer</span> > [% END %] >+ [% ELSIF op == 'historycheck' %] >+ [% WRAPPER breadcrumb_item %] >+ <a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a> >+ [% END %] >+ [% WRAPPER breadcrumb_item bc_active= 1 %] >+ <span>Request history check</span> >+ [% END %] > [% ELSIF op == 'confirmautoill' %] > [% WRAPPER breadcrumb_item %] > <a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a> >@@ -936,6 +943,71 @@ > </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 key IN whole.keys %] >+ [% value = whole.$key %] >+ [% IF key != 'op' && key != 'method' && key != 'custom_key' && key != 'custom_value' && key != 'csrf_token' && value %] >+ <tr> >+ <td>[% key_mapping(key) || key | html %]</td> >+ <td>[% value | html %]</td> >+ </tr> >+ [% END %] >+ [% END %] >+ </table> >+ >+ <h3>This interlibrary loan has been requested before:</h3> >+ [% IF matching_requests_for_patron.size %] >+ <h4>By this 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 %] >+ <li> >+ <a href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=[% matching_request_for_patron.illrequest_id %]">ILL Request #[% matching_request_for_patron.illrequest_id %]</a> >+ </li> >+ [% END %] >+ </ul> >+ [% END %] >+ [% IF remaining_matching_requests.size %] >+ [% IF matching_requests_for_patron.size %] >+ <h4>By other patrons:</h4> >+ [% END %] >+ <ul class="list-unstyled"> >+ [% FOREACH remaining_matching_request IN remaining_matching_requests %] >+ <li> >+ <a href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=[% remaining_matching_request.illrequest_id %]">ILL Request #[% remaining_matching_request.illrequest_id %]</a> by [%- INCLUDE 'patron-title.inc' patron => remaining_matching_request.patron hide_patron_infos_if_needed => 1 -%] >+ </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 --> > <h1>Confirm automatic request</h1> >-- >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 38441
:
174604
|
174605
|
174606
|
174607
|
174608
|
174609
|
174610
|
174611
|
175300
|
175301
|
175302
|
175303
|
175304
|
175305
|
175306
|
175307
|
176507
|
176508
|
176509
|
176510
|
176511
|
176512
|
176513
|
176514
|
176561
|
176566
|
176573
|
176829