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

(-)a/circ/del_message.pl (-2 / +7 lines)
Lines 43-47 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
print $input->redirect(
46
if ( $input->param('from') == "moremember" ) {
47
    "/cgi-bin/koha/circ/circulation.pl?borrowernumber=$borrowernumber");
47
    print $input->redirect(
48
        "/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber");
49
} else {
50
    print $input->redirect(
51
        "/cgi-bin/koha/circ/circulation.pl?borrowernumber=$borrowernumber");
52
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-2 / +26 lines)
Lines 41-46 var relatives_borrowernumbers = new Array(); Link Here
41
[% END %]
41
[% END %]
42
42
43
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
43
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
44
var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
44
45
45
columns_settings = [% ColumnsSettings.GetColumns( 'members', 'moremember', 'issues-table', 'json' ) %]
46
columns_settings = [% ColumnsSettings.GetColumns( 'members', 'moremember', 'issues-table', 'json' ) %]
46
47
Lines 190-195 function validate1(date) { Link Here
190
      </ul>
191
      </ul>
191
    </div>
192
    </div>
192
    [% END %]
193
    [% END %]
194
    <div id="messages" class="circmessage">
195
        <h4>Messages:</h4>
196
        <ul>
197
            [% FOREACH message IN messages %]
198
                <li>
199
                    [% IF(message.message_type == "L") %]
200
                        <span class="circ-hlt">
201
                    [% ELSE %]
202
                        <span>
203
                    [% END %]
204
                        [% message.message_date | $KohaDates %]
205
                        [% Branches.GetName( message.branchcode ) %]
206
                        [% IF 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> )
208
                        [% END %]
209
                        <i>"[% message.message | html %]"</i>
210
                    </span>
211
                    [% IF 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>
213
                    [% END %]
214
                </li>
215
            [% END %]
216
        </ul>
217
        <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>
218
    </div>
193
219
194
    [% IF ( flagged ) %]
220
    [% IF ( flagged ) %]
195
    <div id="circmessages" class="circmessage attention">
221
    <div id="circmessages" class="circmessage attention">
Lines 217-223 function validate1(date) { Link Here
217
        </ul>
243
        </ul>
218
    </div>
244
    </div>
219
    [% END %]
245
    [% END %]
220
221
<h3>[% UNLESS ( I ) %]
246
<h3>[% UNLESS ( I ) %]
222
   [% title | html %] [% firstname | html %] [% END %] [% surname | html %] ([% cardnumber | html %])</h3>
247
   [% title | html %] [% firstname | html %] [% END %] [% surname | html %] ([% cardnumber | html %])</h3>
223
 <div class="yui-u first">
248
 <div class="yui-u first">
Lines 500-506 function validate1(date) { Link Here
500
525
501
</div>
526
</div>
502
</div>
527
</div>
503
504
<div id="finesholdsissues" class="toptabs">
528
<div id="finesholdsissues" class="toptabs">
505
    <ul>
529
    <ul>
506
        <li><a href="#checkouts">[% issuecount %] Checkout(s)</a></li>
530
        <li><a href="#checkouts">[% issuecount %] Checkout(s)</a></li>
(-)a/members/moremember.pl (-1 / +14 lines)
Lines 55-60 use Koha::AuthorisedValues; Link Here
55
use Koha::CsvProfiles;
55
use Koha::CsvProfiles;
56
use Koha::Patron::Debarments qw(GetDebarments);
56
use Koha::Patron::Debarments qw(GetDebarments);
57
use Koha::Patron::Images;
57
use Koha::Patron::Images;
58
use Koha::Patron::Messages;
58
use Module::Load;
59
use Module::Load;
59
if ( C4::Context->preference('NorwegianPatronDBEnable') && C4::Context->preference('NorwegianPatronDBEnable') == 1 ) {
60
if ( C4::Context->preference('NorwegianPatronDBEnable') && C4::Context->preference('NorwegianPatronDBEnable') == 1 ) {
60
    load Koha::NorwegianPatronDB, qw( NLGetSyncDataFromBorrowernumber );
61
    load Koha::NorwegianPatronDB, qw( NLGetSyncDataFromBorrowernumber );
Lines 332-337 if ( C4::Context->preference("ExportCircHistory") ) { Link Here
332
    $template->param(csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc' }) ]);
333
    $template->param(csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc' }) ]);
333
}
334
}
334
335
336
my $messages = Koha::Patron::Messages->search(
337
    {
338
        'me.borrowernumber' => $borrowernumber,
339
    },
340
    {
341
       join => 'manager',
342
       '+select' => ['manager.surname', 'manager.firstname' ],
343
       '+as' => ['manager_surname', 'manager_firstname'],
344
    }
345
);
346
347
335
# Display the language description instead of the code
348
# Display the language description instead of the code
336
# Note that this is certainly wrong
349
# Note that this is certainly wrong
337
my ( $subtag, $region ) = split '-', $patron->lang;
350
my ( $subtag, $region ) = split '-', $patron->lang;
Lines 361-366 $template->param( Link Here
361
    PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20,
374
    PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20,
362
    relatives_issues_count => $relatives_issues_count,
375
    relatives_issues_count => $relatives_issues_count,
363
    relatives_borrowernumbers => \@relatives,
376
    relatives_borrowernumbers => \@relatives,
377
    messages       => $messages,
364
);
378
);
365
379
366
output_html_with_http_headers $input, $cookie, $template->output;
380
output_html_with_http_headers $input, $cookie, $template->output;
367
- 

Return to bug 19801