@@ -, +, @@
---
.../prog/en/modules/opac-full-serial-issues.tt | 7 +++++--
opac/opac-serial-issues.pl | 13 ++++++++++---
2 files changed, 15 insertions(+), 5 deletions(-)
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-full-serial-issues.tt
+++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-full-serial-issues.tt
@@ -164,8 +164,11 @@ function showlayer(numlayer){
[% FOREACH year IN years %]
- [% IF ( year.first ) %]
-
[% ELSE %]
[% END %]
+ [% IF loop.first %]
+
+ [% ELSE %]
+
+ [% END %]
--- a/opac/opac-serial-issues.pl
+++ a/opac/opac-serial-issues.pl
@@ -54,6 +54,13 @@ if ( $selectview eq "full" ) {
);
my $subscriptions = GetFullSubscriptionsFromBiblionumber($biblionumber);
my $subscriptioninformation=PrepareSerialsData($subscriptions);
+ # PrepareSerialsData does some bogus stuff that the template could handle
+ # But at least it sorts the array by the year field so we dont have to
+ # find 'manage' if its there
+ if ($subscriptioninformation->[0]->{year} eq 'manage') {
+ shift @{$subscriptioninformation};
+ }
+
# now, check is there is an alert subscription for one of the subscriptions
foreach (@$subscriptions) {
if (getalert($loggedinuser,'issue',$_->{subscriptionid})) {
@@ -61,9 +68,9 @@ if ( $selectview eq "full" ) {
}
}
- my $title = $subscriptions->[0]{bibliotitle};
- my $yearmin = $subscriptions->[0]{year};
- my $yearmax = $subscriptions->[ scalar(@$subscriptions) - 1 ]{year};
+ my $title = $subscriptions->[0]->{bibliotitle};
+ my $yearmin = $subscriptions->[0]->{year};
+ my $yearmax = $subscriptions->[ -1 ]->{year};
# replace CR by
in librarian note
--