@@ -, +, @@
- Make sure you have a couple of ILL requests created with the
FreeForm backend. (FreeForm does not let you tie a request to
a biblio through the UI, but we will add connections directly
in the database.) Lets assume these have illrequest_id's a and b.
- Make sure you have a record, let's call the biblionumber x.
- Apply the patch and make sure there are no changes in the biblio
detail view of biblionumber x.
- Log into the database and connect the biblio to the first request:
UPDATE illrequests SET biblio_id = x where illrequest_id = a;
- Check that the biblio detail view now says this:
"ILL requests: Request a"
- Verify that the "Request a" part is a working link to the detail
view of ILL request a.
- Do this in the database:
UPDATE illrequests SET biblio_id = x where illrequest_id = b;
- Check that the biblio detail view now says this:
"ILL requests: Request a, Request b"
- Verify the links work as expected.
- Log in as a staff user and check that the requests are still
listed, but not displayed as clickable links.
- Sign off
---
catalogue/detail.pl | 5 +++++
.../prog/en/modules/catalogue/detail.tt | 15 +++++++++++++++
2 files changed, 20 insertions(+)
--- a/catalogue/detail.pl
+++ a/catalogue/detail.pl
@@ -43,6 +43,7 @@ use C4::CourseReserves qw(GetItemCourseReservesInfo);
use C4::Acquisition qw(GetOrdersByBiblionumber);
use Koha::AuthorisedValues;
use Koha::Biblios;
+use Koha::Illrequests;
use Koha::Items;
use Koha::ItemTypes;
use Koha::Patrons;
@@ -523,6 +524,10 @@ if (C4::Context->preference('TagsEnabled') and $tag_quantity = C4::Context->pref
my $holds = $biblio->holds;
$template->param( holdcount => $holds->count );
+# Check if there are any ILL requests connected to the biblio
+my $illrequests = Koha::Illrequests->search({ biblio_id => $biblionumber });
+$template->param( illrequests => $illrequests );
+
my $StaffDetailItemSelection = C4::Context->preference('StaffDetailItemSelection');
if ($StaffDetailItemSelection) {
# Only enable item selection if user can execute at least one action
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
@@ -126,6 +126,21 @@
[% END %]
+ [% IF ( illrequests ) %]
+
+ ILL requests:
+ [% IF CAN_user_ill %]
+ [% FOREACH ill IN illrequests %]
+ Request [% ill.illrequest_id | html %][% IF ! loop.last %], [% END %]
+ [% END %]
+ [% ELSE %]
+ [% FOREACH ill IN illrequests %]
+ Request [% ill.illrequest_id | html %][% IF ! loop.last %], [% END %]
+ [% END %]
+ [% END %]
+
+ [% END %]
+
[% IF ( article_requests_count = Biblio.ArticleRequestsActiveCount( biblionumber ) ) %]
Article requests:
--