From 3b78418c1b09d1ad8d25b78c42e6a491027dba04 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Tue, 5 Mar 2024 17:08:03 +0000 Subject: [PATCH] Bug 36197: OPAC unauthenticated screen unauth_view to show request details after its been submitted Signed-off-by: David Nind --- .../bootstrap/en/modules/opac-illrequests.tt | 58 +++++++++++++++++++ opac/opac-illrequests.pl | 8 ++- 2 files changed, 64 insertions(+), 2 deletions(-) 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 8fd343d4d6..5636f66648 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt @@ -267,6 +267,64 @@ [% END %] + [% ELSIF op == 'unauth_view' %] + +

View interlibrary loan request

+ [% INCLUDE messages %] + [% status = request.status %] +
+ Details from library +
    + [% type = request.get_type %] +
  1. + + [% request.id | html %] +
  2. +
  3. + + [% request.backend | html %] +
  4. + [% IF request.biblio_id %] +
  5. + + View the requested item +
  6. + [% END %] +
  7. + + [% Branches.GetName(request.branchcode) | html %] +
  8. +
  9. + + [% request.status_alias ? request.statusalias.lib_opac : request.capabilities.$status.name | html %] +
  10. +
  11. + + [% IF type %][% type | html %][% ELSE %]N/A[% END %] +
  12. +
  13. + + [% request.placed | $KohaDates %] +
  14. +
  15. + + [% request.updated | $KohaDates %] +
  16. +
  17. + + [% request.notesopac | html %] +
  18. +
+
+
+ Details from [% request.backend | html %] + [% FOREACH meta IN request.metadata %] +
+ [% meta.key | html %]: + [% IF meta.value %][% meta.value | html %][% ELSE %]N/A[% END %] +
+ [% END %] +
[% ELSIF op == 'availability' %]

Interlibrary loan item availability

diff --git a/opac/opac-illrequests.pl b/opac/opac-illrequests.pl index ae28f4ed29..98272deb60 100755 --- a/opac/opac-illrequests.pl +++ b/opac/opac-illrequests.pl @@ -187,8 +187,12 @@ if ( $op eq 'list' ) { if ( $params->{type_disclaimer_submitted} ) { $type_disclaimer->after_request_created( $params, $request ); } - print $query->redirect('/cgi-bin/koha/opac-illrequests.pl?message=2'); - exit; + if ( C4::Context->preference('ILLOpacUnauthenticatedRequest') && !$patron ) { + $op = 'unauth_view'; + } else { + print $query->redirect('/cgi-bin/koha/opac-illrequests.pl?message=2'); + exit; + } } } -- 2.39.5