View | Details | Raw Unified | Return to bug 11647
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-serial-issues.tt (-7 / +11 lines)
Lines 113-126 Link Here
113
        </p>
113
        </p>
114
    [% END %]
114
    [% END %]
115
    [% IF ( subscription_LOO.letter ) %]
115
    [% IF ( subscription_LOO.letter ) %]
116
        [% IF ( subscription_LOO.hasalert ) %]
116
        [% IF ( loggedinusername ) %]
117
            You have subscribed to email notification on new issues <a href="opac-alert-subscribe.pl?op=cancel&amp;externalid=[% subscription_LOO.subscriptionid %]&amp;alerttype=issue&amp;biblionumber=[% subscription_LOO.biblionumber %]" class="button" title="Cancel email notification">
117
            [% IF ( subscription_LOO.hasalert ) %]
118
                Cancel email notification
118
                You have subscribed to email notification on new issues <a href="opac-alert-subscribe.pl?op=cancel&amp;externalid=[% subscription_LOO.subscriptionid %]&amp;alerttype=issue&amp;biblionumber=[% subscription_LOO.biblionumber %]" class="button" title="Cancel email notification">
119
            </a>
119
                    Cancel email notification
120
                </a>
121
            [% ELSE %]
122
                <a href="opac-alert-subscribe.pl?externalid=[% subscription_LOO.subscriptionid %]&amp;alerttype=issue&amp;biblionumber=[% subscription_LOO.biblionumber %]" class="button" title="Subscribe to email notification on new issues">
123
                    Subscribe to email notification on new issues
124
                </a>
125
            [% END %]
120
        [% ELSE %]
126
        [% ELSE %]
121
            <a href="opac-alert-subscribe.pl?externalid=[% subscription_LOO.subscriptionid %]&amp;alerttype=issue&amp;biblionumber=[% subscription_LOO.biblionumber %]" class="button" title="Subscribe to email notification on new issues">
127
            You must log in if you want to subscribe to email notification on new issues
122
                Subscribe to email notification on new issues
123
            </a>
124
        [% END %]
128
        [% END %]
125
    [% END %]
129
    [% END %]
126
</div>
130
</div>
(-)a/opac/opac-serial-issues.pl (-8 / +11 lines)
Lines 62-70 if ( $selectview eq "full" ) { Link Here
62
    }
62
    }
63
63
64
    # now, check is there is an alert subscription for one of the subscriptions
64
    # now, check is there is an alert subscription for one of the subscriptions
65
    foreach (@$subscriptions) {
65
    if ($loggedinuser) {
66
        if (getalert($loggedinuser,'issue',$_->{subscriptionid})) {
66
        foreach (@$subscriptions) {
67
            $_->{hasalert} = 1;
67
            if (getalert($loggedinuser,'issue',$_->{subscriptionid})) {
68
                $_->{hasalert} = 1;
69
            }
68
        }
70
        }
69
    }
71
    }
70
72
Lines 100-109 else { Link Here
100
102
101
    my $subscriptions = GetSubscriptionsFromBiblionumber($biblionumber);
103
    my $subscriptions = GetSubscriptionsFromBiblionumber($biblionumber);
102
    # now, check is there is an alert subscription for one of the subscriptions
104
    # now, check is there is an alert subscription for one of the subscriptions
103
    foreach (@$subscriptions) {
105
    if ($loggedinuser){
104
        my $subscription = getalert($loggedinuser,'issue',$_->{subscriptionid});
106
        foreach (@$subscriptions) {
105
        if (@$subscription[0]) {
107
            my $subscription = getalert($loggedinuser,'issue',$_->{subscriptionid});
106
            $_->{hasalert} = 1;
108
            if (@$subscription[0]) {
109
                $_->{hasalert} = 1;
110
            }
107
        }
111
        }
108
    }
112
    }
109
113
110
- 

Return to bug 11647