Bugzilla – Attachment 106407 Details for
Bug 20799
Add a link from biblio detail view to ILL request detail view, if a biblio has an ILL request
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20799: Add link from biblio to ILL detail view
Bug-20799-Add-link-from-biblio-to-ILL-detail-view.patch (text/plain), 4.08 KB, created by
Katrin Fischer
on 2020-06-29 15:58:50 UTC
(
hide
)
Description:
Bug 20799: Add link from biblio to ILL detail view
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-06-29 15:58:50 UTC
Size:
4.08 KB
patch
obsolete
>From 923df73cd6cf3e01c3103805df737dfb258374d9 Mon Sep 17 00:00:00 2001 >From: Magnus Enger <magnus@libriotech.no> >Date: Mon, 9 Dec 2019 17:48:35 +0100 >Subject: [PATCH] Bug 20799: Add link from biblio to ILL detail view > >Some ILL systems (e.g. Libris in Sweden) require a link between >a biblio and an ILL request. When such a link exists it is nice >to display an actual link from the biblio detail view to the >ILL request detail view. This patch adds such a link. For users >without ILL privileges, the requests should still show, but not >be clickable links. > >To test: >- 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 > >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > catalogue/detail.pl | 5 +++++ > .../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 15 +++++++++++++++ > 2 files changed, 20 insertions(+) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index c968e33dc9..5e10954a63 100755 >--- a/catalogue/detail.pl >+++ b/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; >@@ -538,6 +539,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 >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index efbf34fb5d..88737e1df9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -128,6 +128,21 @@ > </span> > [% END %] > >+ [% IF ( illrequests ) %] >+ <span class="results_summary"> >+ <span class="label">ILL requests:</span> >+ [% IF CAN_user_ill %] >+ [% FOREACH ill IN illrequests %] >+ <a href="/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=[% ill.illrequest_id | uri %]">Request [% ill.illrequest_id | html %]</a>[% IF ! loop.last %], [% END %] >+ [% END %] >+ [% ELSE %] >+ [% FOREACH ill IN illrequests %] >+ <span>Request [% ill.illrequest_id | html %]</span>[% IF ! loop.last %], [% END %] >+ [% END %] >+ [% END %] >+ </span> >+ [% END %] >+ > [% IF ( article_requests_count = Biblio.ArticleRequestsActiveCount( biblionumber ) ) %] > <span class="results_summary"> > <span class="label">Article requests:</span> >-- >2.11.0
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 20799
:
96102
|
96103
|
96105
|
106407
|
106408
|
106584
|
106585
|
107175
|
107277