Browse Source

Bug 6195 : Opac user should not have serial manage tab

PrepareSerialData adds a year of 'manage' for staff display
Opac should not see this
Would be better if it returned a cleaner data structure and
let the template engine handle the display

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
3.4.x
Colin Campbell 13 years ago
committed by Chris Cormack
parent
commit
291ed049d8
  1. 7
      koha-tmpl/opac-tmpl/prog/en/modules/opac-full-serial-issues.tt
  2. 13
      opac/opac-serial-issues.pl

7
koha-tmpl/opac-tmpl/prog/en/modules/opac-full-serial-issues.tt

@ -164,8 +164,11 @@ function showlayer(numlayer){
</div>
[% FOREACH year IN years %]
[% IF ( year.first ) %]
<div class="yeardata tabsub" id="show[% year.year %]" style="display:block">[% ELSE %]<div class="yeardata tabsub" id="show[% year.year %]" style="display:none">[% END %]
[% IF loop.first %]
<div class="yeardata tabsub" id="show[% year.year %]" style="display:block">
[% ELSE %]
<div class="yeardata tabsub" id="show[% year.year %]" style="display:none">
[% END %]
<table class="subscriptionstclass">
<thead>
<tr>

13
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 <br> in librarian note

Loading…
Cancel
Save