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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-24 / +27 lines)
Lines 63-93 Link Here
63
      </ul>
63
      </ul>
64
    </div>
64
    </div>
65
    [% END %]
65
    [% END %]
66
    <div id="messages" class="circmessage">
66
67
        <h4>Messages:</h4>
67
    [% IF ( patron_messages ) %]
68
        <ul>
68
        <div id="messages" class="circmessage">
69
            [% FOREACH patron_message IN patron_messages %]
69
            <h4>Messages:</h4>
70
                <li>
70
            <ul>
71
                    [% IF(patron_message.message_type == "L") %]
71
                [% FOREACH patron_message IN patron_messages %]
72
                        <span class="circ-hlt">
72
                    <li>
73
                    [% ELSE %]
73
                        [% IF(patron_message.message_type == "L") %]
74
                        <span>
74
                            <span class="circ-hlt">
75
                    [% END %]
75
                        [% ELSE %]
76
                        [% patron_message.message_date | $KohaDates %]
76
                            <span>
77
                        [% Branches.GetName( patron_message.branchcode ) %]
78
                        [% IF patron_message.manager_id %]
79
                            ( <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> )
80
                        [% END %]
77
                        [% END %]
81
                        <i>"[% patron_message.message | html %]"</i>
78
                            [% patron_message.message_date | $KohaDates %]
82
                    </span>
79
                            [% Branches.GetName( patron_message.branchcode ) %]
83
                    [% IF patron_message.branchcode == branchcode OR Koha.Preference('AllowAllMessageDeletion') %]
80
                            [% IF patron_message.manager_id %]
84
                        <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>
81
                                ( <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> )
85
                    [% END %]
82
                            [% END %]
86
                </li>
83
                            <i>"[% patron_message.message | html %]"</i>
87
            [% END %]
84
                        </span>
88
        </ul>
85
                        [% IF patron_message.branchcode == branchcode OR Koha.Preference('AllowAllMessageDeletion') %]
89
        <a id="addnewmessageLabel" href="#add_message_form" class="btn btn-link btn-sm" data-toggle="modal"><i class="fa fa-plus"></i> Add a new message</a>
86
                            <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>
90
    </div>
87
                        [% END %]
88
                    </li>
89
                [% END %]
90
            </ul>
91
            <a id="addnewmessageLabel" href="#add_message_form" class="btn btn-link btn-sm" data-toggle="modal"><i class="fa fa-plus"></i> Add a new message</a>
92
        </div>
93
    [% END %]
91
94
92
    [% IF ( flagged ) %]
95
    [% IF ( flagged ) %]
93
    <div id="circmessages" class="circmessage attention">
96
    <div id="circmessages" class="circmessage attention">
(-)a/members/moremember.pl (-3 / +4 lines)
Lines 216-222 my $library = Koha::Libraries->find( $data->{branchcode})->unblessed; Link Here
216
@{$data}{keys %$library} = values %$library; # merge in all branch columns # FIXME This is really ugly, we should pass the library instead
216
@{$data}{keys %$library} = values %$library; # merge in all branch columns # FIXME This is really ugly, we should pass the library instead
217
217
218
# If printing a page, send the account informations to the template
218
# If printing a page, send the account informations to the template
219
if ($print eq "page") {
219
if (defined $print and $print eq "page") {
220
    my $accts = Koha::Account::Lines->search(
220
    my $accts = Koha::Account::Lines->search(
221
        { borrowernumber => $patron->borrowernumber, amountoutstanding => { '>' => 0 } },
221
        { borrowernumber => $patron->borrowernumber, amountoutstanding => { '>' => 0 } },
222
        { order_by       => { -desc => 'accountlines_id' } }
222
        { order_by       => { -desc => 'accountlines_id' } }
Lines 328-333 my $patron_messages = Koha::Patron::Messages->search( Link Here
328
    }
328
    }
329
);
329
);
330
330
331
if( $patron_messages->count > 0 ){
332
    $template->param( patron_messages => $patron_messages );
333
}
331
334
332
# Display the language description instead of the code
335
# Display the language description instead of the code
333
# Note that this is certainly wrong
336
# Note that this is certainly wrong
Lines 353-359 $template->param( Link Here
353
    PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20,
356
    PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20,
354
    relatives_issues_count => $relatives_issues_count,
357
    relatives_issues_count => $relatives_issues_count,
355
    relatives_borrowernumbers => \@relatives,
358
    relatives_borrowernumbers => \@relatives,
356
    patron_messages       => $patron_messages,
357
);
359
);
358
360
359
output_html_with_http_headers $input, $cookie, $template->output;
361
output_html_with_http_headers $input, $cookie, $template->output;
360
- 

Return to bug 20518