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

(-)a/circ/del_message.pl (-1 / +1 lines)
Lines 43-49 my $message_id = $input->param('message_id'); Link Here
43
my $message = Koha::Patron::Messages->find($message_id);
43
my $message = Koha::Patron::Messages->find($message_id);
44
$message->delete if $message;
44
$message->delete if $message;
45
45
46
if ( $input->param('from') == "moremember" ) {
46
if ( $input->param('from') eq  "moremember" ) {
47
    print $input->redirect(
47
    print $input->redirect(
48
        "/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber");
48
        "/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber");
49
} else {
49
} else {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-9 / +9 lines)
Lines 194-215 function validate1(date) { Link Here
194
    <div id="messages" class="circmessage">
194
    <div id="messages" class="circmessage">
195
        <h4>Messages:</h4>
195
        <h4>Messages:</h4>
196
        <ul>
196
        <ul>
197
            [% FOREACH message IN messages %]
197
            [% FOREACH patron_message IN patron_messages %]
198
                <li>
198
                <li>
199
                    [% IF(message.message_type == "L") %]
199
                    [% IF(patron_message.message_type == "L") %]
200
                        <span class="circ-hlt">
200
                        <span class="circ-hlt">
201
                    [% ELSE %]
201
                    [% ELSE %]
202
                        <span>
202
                        <span>
203
                    [% END %]
203
                    [% END %]
204
                        [% message.message_date | $KohaDates %]
204
                        [% patron_message.message_date | $KohaDates %]
205
                        [% Branches.GetName( message.branchcode ) %]
205
                        [% Branches.GetName( patron_message.branchcode ) %]
206
                        [% IF message.manager_id %]
206
                        [% IF patron_message.manager_id %]
207
                            ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% message.manager_id %]">[% message.get_column('manager_firstname') %] [% message.get_column('manager_surname') %]</a> )
207
                            ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron_message.manager_id %]">[% patron_message.get_column('manager_firstname') %] [% patron_message.get_column('manager_surname') %]</a> )
208
                        [% END %]
208
                        [% END %]
209
                        <i>"[% message.message | html %]"</i>
209
                        <i>"[% patron_message.message | html %]"</i>
210
                    </span>
210
                    </span>
211
                    [% IF message.branchcode == branchcode OR Koha.Preference('AllowAllMessageDeletion') %]
211
                    [% IF patron_message.branchcode == branchcode OR Koha.Preference('AllowAllMessageDeletion') %]
212
                        <a class="btn btn-link btn-sm" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% message.message_id %]&amp;borrowernumber=[% message.borrowernumber %]&amp;from=moremember" onclick="return confirm(MSG_CONFIRM_DELETE_MESSAGE);"><i class="fa fa-trash"></i> Delete</a>
212
                        <a class="btn btn-link btn-sm" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% patron_message.message_id %]&amp;borrowernumber=[% patron_message.borrowernumber %]&amp;from=moremember" onclick="return confirm(MSG_CONFIRM_DELETE_MESSAGE);"><i class="fa fa-trash"></i> Delete</a>
213
                    [% END %]
213
                    [% END %]
214
                </li>
214
                </li>
215
            [% END %]
215
            [% END %]
(-)a/members/moremember.pl (-6 / +5 lines)
Lines 333-346 if ( C4::Context->preference("ExportCircHistory") ) { Link Here
333
    $template->param(csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc' }) ]);
333
    $template->param(csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc' }) ]);
334
}
334
}
335
335
336
my $messages = Koha::Patron::Messages->search(
336
my $patron_messages = Koha::Patron::Messages->search(
337
    {
337
    {
338
        'me.borrowernumber' => $borrowernumber,
338
        'me.borrowernumber' => $borrowernumber,
339
    },
339
    },
340
    {
340
    {
341
       join => 'manager',
341
        join => 'manager',
342
       '+select' => ['manager.surname', 'manager.firstname' ],
342
        '+select' => ['manager.surname', 'manager.firstname' ],
343
       '+as' => ['manager_surname', 'manager_firstname'],
343
        '+as' => ['manager_surname', 'manager_firstname'],
344
    }
344
    }
345
);
345
);
346
346
Lines 373-379 $template->param( Link Here
373
    PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20,
373
    PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20,
374
    relatives_issues_count => $relatives_issues_count,
374
    relatives_issues_count => $relatives_issues_count,
375
    relatives_borrowernumbers => \@relatives,
375
    relatives_borrowernumbers => \@relatives,
376
    messages       => $messages,
376
    patron_messages       => $patron_messages,
377
);
377
);
378
378
379
output_html_with_http_headers $input, $cookie, $template->output;
379
output_html_with_http_headers $input, $cookie, $template->output;
380
- 

Return to bug 19801