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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt (-2 / +2 lines)
Lines 16-22 Link Here
16
16
17
    $(".notice").hide();
17
    $(".notice").hide();
18
    $(".notice-title").click(function(e){
18
    $(".notice-title").click(function(e){
19
        $(this).next(".notice").toggle();
19
        $(this).closest("tr").children().children(".notice").toggle();
20
        e.preventDefault();
20
        e.preventDefault();
21
    });
21
    });
22
    
22
    
Lines 70-76 Link Here
70
		<td>
70
		<td>
71
            [% IF ( QUEUED_MESSAGE.status == 'sent' ) %]sent
71
            [% IF ( QUEUED_MESSAGE.status == 'sent' ) %]sent
72
            [% ELSIF ( QUEUED_MESSAGE.status == 'pending' ) %]pending
72
            [% ELSIF ( QUEUED_MESSAGE.status == 'pending' ) %]pending
73
            [% ELSIF ( QUEUED_MESSAGE.status == 'failed' ) %]failed
73
            [% ELSIF ( QUEUED_MESSAGE.status == 'failed' ) %]failed <div class="notice"><a href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrowernumber %]&resendnotice=[% QUEUED_MESSAGE.message_id %]" title="Attempt to resend the notice">Resend</a></div>
74
            [% ELSIF ( QUEUED_MESSAGE.status == 'deleted' ) %]deleted
74
            [% ELSIF ( QUEUED_MESSAGE.status == 'deleted' ) %]deleted
75
            [% ELSE %][% QUEUED_MESSAGE.status %][% END %]
75
            [% ELSE %][% QUEUED_MESSAGE.status %][% END %]
76
        </td>
76
        </td>
(-)a/members/notices.pl (-1 / +14 lines)
Lines 53-58 $template->param( picture => 1 ) if $picture; Link Here
53
# Getting the messages
53
# Getting the messages
54
my $queued_messages = C4::Letters::GetQueuedMessages({borrowernumber => $borrowernumber});
54
my $queued_messages = C4::Letters::GetQueuedMessages({borrowernumber => $borrowernumber});
55
55
56
if ($input->param('resendnotice')) {
57
    foreach my $message (@$queued_messages){
58
        if ($message->{message_id} == $input->param('resendnotice')) {
59
            last unless $message->{status} eq "failed";
60
            
61
            $message->{status} = 'pending' if (C4::Letters::_set_message_status( {
62
                                                message_id => $message->{message_id},
63
                                                status     => 'pending'
64
                                            } ) > 0);
65
            last;
66
        }
67
    }
68
}
69
56
if (C4::Context->preference('ExtendedPatronAttributes')) {
70
if (C4::Context->preference('ExtendedPatronAttributes')) {
57
    my $attributes = GetBorrowerAttributes($borrowernumber);
71
    my $attributes = GetBorrowerAttributes($borrowernumber);
58
    $template->param(
72
    $template->param(
59
- 

Return to bug 12426