Bugzilla – Attachment 141933 Details for
Bug 31775
Show opac_info of single library
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31775: Show single library
Bug-31775-Show-single-library.patch (text/plain), 1.88 KB, created by
Katrin Fischer
on 2022-10-15 20:49:05 UTC
(
hide
)
Description:
Bug 31775: Show single library
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2022-10-15 20:49:05 UTC
Size:
1.88 KB
patch
obsolete
>From a52c2d33700e616ad01b3e52208ce0f508bc101f Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 13 Oct 2022 14:49:31 +0200 >Subject: [PATCH] Bug 31775: Show single library > >Test plan: >Check both cases: one library (public accessible) and more >libraries (public accessible). In the latter case click on >one of these libraries too. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > opac/opac-library.pl | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > >diff --git a/opac/opac-library.pl b/opac/opac-library.pl >index fda1956278..24611a1980 100755 >--- a/opac/opac-library.pl >+++ b/opac/opac-library.pl >@@ -21,6 +21,7 @@ use Modern::Perl; > > use CGI qw ( -utf8 ); > use C4::Auth qw( get_template_and_user ); >+use C4::Context; > use C4::Output qw( output_html_with_http_headers ); > use Koha::Libraries; > >@@ -37,21 +38,20 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > } > ); > >-my $found; >-if ($branchcode) { >- my $library = Koha::Libraries->find($branchcode); >- if ( $library && $library->public ) { >- $found++; >- $template->param( library => $library ); >- } >+my $library; >+if( $template->{VARS}->{singleBranchMode} ) { >+ $library = Koha::Libraries->search({ public => 1 })->next; >+} elsif( $branchcode ) { >+ $library = Koha::Libraries->search({ branchcode => $branchcode, public => 1 })->next; > } > >-unless ($found) { >+if( $library ) { >+ $template->param( library => $library ); >+} else { > my $libraries = Koha::Libraries->search( { public => 1 }, { order_by => ['branchname'] } ); >- > $template->param( > libraries => $libraries, >- branchcode => $branchcode, >+ branchcode => C4::Context->userenv ? C4::Context->userenv->{branch} : q{}, > ); > } > >-- >2.30.2
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 31775
:
141824
|
141825
|
141871
|
141872
| 141933 |
141934