Bugzilla – Attachment 174608 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: OPAC
Bug-38441-ILLHistoryCheck-OPAC.patch (text/plain), 6.20 KB, created by
Pedro Amorim
on 2024-11-15 16:20:38 UTC
(
hide
)
Description:
Bug 38441: ILLHistoryCheck: OPAC
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-11-15 16:20:38 UTC
Size:
6.20 KB
patch
obsolete
>From b58176aa785acf945d7596a68ea2bffcf1431601 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 14 Nov 2024 10:27:27 -0100 >Subject: [PATCH] Bug 38441: ILLHistoryCheck: OPAC > >--- > .../bootstrap/en/modules/opac-illrequests.tt | 38 +++++++++++++++++++ > opac/opac-illrequests.pl | 18 ++++++++- > 2 files changed, 55 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt >index 5636f66648..9500c77ac1 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt >@@ -398,6 +398,44 @@ > </fieldset> > </form> > </div> >+ [% ELSIF op == 'historycheck' %] >+ <h1>Request history check</h1> >+ <div id="results" class="page-section"> >+ [% INCLUDE messages %] >+ <form method="post" id="historycheck-form"> >+ [%# This will get its name="op" value="cud-" from the loop over whole.keys below %] >+ [% INCLUDE 'csrf-token.inc' %] >+ <p>You have requested this interlibrary loan before:</p> >+ [% IF matching_requests_for_patron.size %] >+ <ul class="list-unstyled"> >+ [% FOREACH matching_request_for_patron IN matching_requests_for_patron %] >+ <li> >+ <a href="/cgi-bin/koha/opac-illrequests.pl?op=view&illrequest_id=[% matching_request_for_patron.illrequest_id %]">ILL Request #[% matching_request_for_patron.illrequest_id %]</a> >+ </li> >+ [% END %] >+ </ul> >+ [% END %] >+ <fieldset class="action"> >+ [% FOREACH key IN whole.keys %] >+ [% value = whole.$key %] >+ [% IF 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="history_check_submitted" value="1"> >+ <input type="submit" class="btn btn-primary" value="Submit anyway" /> >+ <a class="action" href="/cgi-bin/koha/opac-illrequests.pl">Cancel</a> >+ </fieldset> >+ </form> >+ </div> > [% ELSIF op == 'confirmautoill' %] > <h1>Confirming automatic request</h1> > <div id="results" class="page-section"> >diff --git a/opac/opac-illrequests.pl b/opac/opac-illrequests.pl >index d5c6c9e75f..0f078d81db 100755 >--- a/opac/opac-illrequests.pl >+++ b/opac/opac-illrequests.pl >@@ -35,6 +35,7 @@ use Koha::Libraries; > use Koha::Patrons; > use Koha::ILL::Request::Workflow::Availability; > use Koha::ILL::Request::Workflow::ConfirmAuto; >+use Koha::ILL::Request::Workflow::HistoryCheck; > use Koha::ILL::Request::Workflow::TypeDisclaimer; > > my $query = CGI->new; >@@ -128,6 +129,8 @@ if ( $op eq 'list' ) { > ->load_backend($params->{backend}); > > # Before request creation operations - Preparation >+ my $history_check = >+ Koha::ILL::Request::Workflow::HistoryCheck->new( $params, 'opac' ); > my $availability = > Koha::ILL::Request::Workflow::Availability->new( $params, 'opac' ); > my $type_disclaimer = >@@ -135,8 +138,18 @@ if ( $op eq 'list' ) { > my $confirm_auto = > Koha::ILL::Request::Workflow::ConfirmAuto->new( $params, 'opac' ); > >+ # ILLHistoryCheck operation >+ if ($history_check->show_history_check($request)) { >+ $op = 'historycheck'; >+ $template->param( >+ $history_check->history_check_template_params($params) >+ ); >+ output_html_with_http_headers $query, $cookie, >+ $template->output, undef, >+ { force_no_caching => 1 }; >+ exit; > # ILLCheckAvailability operation >- if ($availability->show_availability($request)) { >+ } elsif ($availability->show_availability($request)) { > $op = 'availability'; > $template->param( > $availability->availability_template_params($params) >@@ -190,6 +203,9 @@ if ( $op eq 'list' ) { > if ( $params->{type_disclaimer_submitted} ) { > $type_disclaimer->after_request_created( $params, $request ); > } >+ if ( C4::Context->preference('ILLHistoryCheck') ) { >+ $history_check->after_request_created( $params, $request ); >+ } > if ( C4::Context->preference('ILLOpacUnauthenticatedRequest') && !$patron ) { > $op = 'unauth_view'; > } else { >-- >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