@@ -, +, @@ --- .../opac-tmpl/bootstrap/en/modules/opac-alert-subscribe.tt | 2 ++ koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 4 ++-- .../opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt | 4 ++-- opac/opac-alert-subscribe.pl | 14 +++++++------- opac/opac-detail.pl | 5 +---- opac/opac-serial-issues.pl | 10 ++-------- 6 files changed, 16 insertions(+), 23 deletions(-) --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-alert-subscribe.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-alert-subscribe.tt @@ -26,6 +26,7 @@ [% IF ( notes ) %]

[% notes %]

[% END %] + @@ -40,6 +41,7 @@ [% IF ( notes ) %]

[% notes %]

[% END %] + --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -813,9 +813,9 @@ [% IF ( subscription.letter ) %] [% IF ( loggedinusername ) %] [% IF ( subscription.hasalert ) %] - You have subscribed to email notification on new issues. Cancel email notification + You have subscribed to email notification on new issues. Cancel email notification [% ELSE %] - Subscribe to email notification on new issues + Subscribe to email notification on new issues [% END %] [% ELSE %] You must log in if you want to subscribe to email notification on new issues --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-serial-issues.tt @@ -137,11 +137,11 @@ [% IF ( subscription_LOO.letter ) %] [% IF ( loggedinusername ) %] [% IF ( subscription_LOO.hasalert ) %] - You have subscribed to email notification on new issues + You have subscribed to email notification on new issues Cancel email notification [% ELSE %] - + Subscribe to email notification on new issues [% END %] --- a/opac/opac-alert-subscribe.pl +++ a/opac/opac-alert-subscribe.pl @@ -38,6 +38,7 @@ my $sth; my ( $template, $loggedinuser, $cookie ); my $externalid = $query->param('externalid'); my $alerttype = $query->param('alerttype') || ''; +my $referer = $query->param('referer') || 'detail'; my $biblionumber = $query->param('biblionumber'); ( $template, $loggedinuser, $cookie ) = get_template_and_user( @@ -53,11 +54,11 @@ my $biblionumber = $query->param('biblionumber'); if ( $op eq 'alert_confirmed' ) { addalert( $loggedinuser, $alerttype, $externalid ); - if ( $alerttype eq 'issue_ser' ) { + if ( $referer eq 'serial' ) { print $query->redirect( "opac-serial-issues.pl?biblionumber=$biblionumber"); exit; - } elsif ( $alerttype eq 'issue_det' ) { + } else { print $query->redirect( "opac-detail.pl?biblionumber=$biblionumber"); exit; @@ -70,11 +71,11 @@ elsif ( $op eq 'cancel_confirmed' ) { { # we are supposed to have only 1 result, but just in case... delalert( $_->{alertid} ); } - if ( $alerttype eq 'issue_ser' ) { + if ( $referer eq 'serial' ) { print $query->redirect( "opac-serial-issues.pl?biblionumber=$biblionumber"); exit; - } elsif ( $alerttype eq 'issue_det' ) { + } else { print $query->redirect( "opac-detail.pl?biblionumber=$biblionumber"); exit; @@ -83,18 +84,17 @@ elsif ( $op eq 'cancel_confirmed' ) { } else { - if ( $alerttype eq 'issue_ser' || $alerttype eq 'issue_det' ) { # alert for subscription issues + if ( $alerttype eq 'issue' ) { # alert for subscription issues my $subscription = &GetSubscription($externalid); $template->param( alerttype => $alerttype, + referer => $referer, "typeissue$op" => 1, bibliotitle => $subscription->{bibliotitle}, notes => $subscription->{notes}, externalid => $externalid, biblionumber => $biblionumber, ); - } else { } - } output_html_with_http_headers $query, $cookie, $template->output; --- a/opac/opac-detail.pl +++ a/opac/opac-detail.pl @@ -582,10 +582,7 @@ foreach my $subscription (@subscriptions) { $cell{latestserials} = GetLatestSerials( $subscription->{subscriptionid}, $serials_to_display ); if ( $borrowernumber ) { - my $sub = getalert($borrowernumber,'issue_det',$subscription->{subscriptionid}); - if ( !defined $sub ) { - $sub = getalert($borrowernumber,'issue_ser',$subscription->{subscriptionid}); - } + my $sub = getalert($borrowernumber,'issue',$subscription->{subscriptionid}); if (@$sub[0]) { $cell{hasalert} = 1; } --- a/opac/opac-serial-issues.pl +++ a/opac/opac-serial-issues.pl @@ -62,10 +62,7 @@ if ( $selectview eq "full" ) { # now, check is there is an alert subscription for one of the subscriptions if ($loggedinuser) { foreach (@$subscriptions) { - my $sub = getalert($loggedinuser,'issue_ser',$_->{subscriptionid}); - if (!defined $sub) { - $sub = getalert($loggedinuser,'issue_det',$_->{subscriptionid}); - } + my $sub = getalert($loggedinuser,'issue',$_->{subscriptionid}); if ($sub) { $_->{hasalert} = 1; } @@ -105,10 +102,7 @@ else { # now, check is there is an alert subscription for one of the subscriptions if ($loggedinuser){ foreach (@$subscriptions) { - my $subscription = getalert($loggedinuser,'issue_ser',$_->{subscriptionid}); - if (!defined $subscription) { - $subscription = getalert($loggedinuser,'issue_det',$_->{subscriptionid}); - } + my $subscription = getalert($loggedinuser,'issue',$_->{subscriptionid}); if (@$subscription[0]) { $_->{hasalert} = 1; } --