Bugzilla – Attachment 16546 Details for
Bug 9875
Don't display empty tab when using (OPAC)SeparateHoldings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 9875: Hide empty items tab
PASSED-QA-Bug-9875-Hide-empty-items-tab.patch (text/plain), 1.70 KB, created by
Katrin Fischer
on 2013-03-20 16:24:17 UTC
(
hide
)
Description:
[PASSED QA] Bug 9875: Hide empty items tab
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-03-20 16:24:17 UTC
Size:
1.70 KB
patch
obsolete
>From 07eaa25995c47d067384d44f0fd157344b9b5d95 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 10 Jan 2013 17:01:37 +0100 >Subject: [PATCH] [PASSED QA] Bug 9875: Hide empty items tab > >The two holdings tabs displayed whether >or not there is anything to go in them. > >Signed-off-by: Corinne Bulac <corinne.hayet@bulac.fr> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >If one item list is empty, no empty tab is shown. >All tests and QA script pass. >--- > catalogue/detail.pl | 8 ++++++++ > opac/opac-detail.pl | 8 ++++++++ > 2 files changed, 16 insertions(+) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index ec6f6eb..a5b32c6 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -281,6 +281,14 @@ foreach my $item (@items) { > } > } > >+# Display only one tab if one items list is empty >+if (scalar(@itemloop) == 0 || scalar(@otheritemloop) == 0) { >+ $template->param(SeparateHoldings => 0); >+ if (scalar(@itemloop) == 0) { >+ @itemloop = @otheritemloop; >+ } >+} >+ > $template->param( norequests => $norequests ); > $template->param( > MARCNOTES => $marcnotesarray, >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 883ea7c..4371f65 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -576,6 +576,14 @@ for my $itm (@items) { > } > } > >+# Display only one tab if one items list is empty >+if (scalar(@itemloop) == 0 || scalar(@otheritemloop) == 0) { >+ $template->param(SeparateHoldings => 0); >+ if (scalar(@itemloop) == 0) { >+ @itemloop = @otheritemloop; >+ } >+} >+ > # If there is a lot of items, and the user has not decided > # to view them all yet, we first warn him > # TODO: The limit of 50 could be a syspref >-- >1.7.9.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 9875
: 16546