[Patches] [PATCH] Bug 7338 Links on Serial Collection page
koha-patchbot at kohaaloha.com
koha-patchbot at kohaaloha.com
Sat Dec 10 01:05:59 NZDT 2011
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians at tamil.fr>
Date: Fri, 9 Dec 2011 08:32:01 +0100
Subject: [PATCH] Bug 7338 Links on Serial Collection page
Don't display link to the serial, when the collection page displays just
one subscription. Display it when several subscriptions. Alway display a
link for displaying biblio record other subscriptions.
---
.../prog/en/modules/serials/serials-collection.tt | 11 +++++------
serials/serials-collection.pl | 1 -
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt
index 93c4fdc..ed126af 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt
@@ -71,7 +71,7 @@ $(document).ready(function() {
[% IF ( subscriptions ) %]
<table>
-[% IF ( onesubscription ) %]
+[% IF ( subscriptions.size == 1 ) %]
<caption> Subscription Summary</caption>
[% ELSE %]
<caption> Subscription Summaries</caption>
@@ -161,9 +161,8 @@ $(document).ready(function() {
</tr>
[% END %]
[% IF ( subscr ) %]
-[% UNLESS ( onesubscription ) %]
-<tr ><td colspan="7"> <a href="serials-collection.pl?biblionumber=[% biblionumber %]">See any subscription attached to this biblio</a></td>
-</tr>[% END %]
+<tr ><td colspan="8"> <a href="serials-collection.pl?biblionumber=[% biblionumber %]">See any subscription attached to this biblio</a></td>
+</tr>
[% END %]
</table>
[% END %]
@@ -183,7 +182,7 @@ $(document).ready(function() {
<div id="subscription-year-[% year.year %]">
<table>
<tr>
-[% UNLESS ( year.onesubscription ) %]
+[% IF ( subscriptions.size > 1 ) %]
<th># Subs</th>
[% END %]
<th>Date published
@@ -205,7 +204,7 @@ $(document).ready(function() {
</tr>
[% FOREACH serial IN year.serials %]
[% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
-[% UNLESS ( serial.onesubscription ) %]
+[% IF ( subscriptions.size > 1 ) %]
<td><a href="serials-collection.pl?subscriptionid=[% serial.subscriptionid %]">[% serial.subscriptionid %]</a></td>
[% END %]
<td>
diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl
index 8c7c32b..c4605e0 100755
--- a/serials/serials-collection.pl
+++ b/serials/serials-collection.pl
@@ -147,7 +147,6 @@ foreach (@$location) {
chop $subscriptionidlist;
$template->param(
- onesubscription => (scalar(@$subscriptiondescs)==1),
subscriptionidlist => $subscriptionidlist,
biblionumber => $biblionumber,
subscriptions => $subscriptiondescs,
--
1.7.8
More information about the Patches
mailing list