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') eq  "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 patron_message IN patron_messages %]
198
                <li>
199
                    [% IF(patron_message.message_type == "L") %]
200
                        <span class="circ-hlt">
201
                    [% ELSE %]
202
                        <span>
203
                    [% END %]
204
                        [% patron_message.message_date | $KohaDates %]
205
                        [% Branches.GetName( patron_message.branchcode ) %]
206
                        [% IF patron_message.manager_id %]
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 %]
209
                        <i>"[% patron_message.message | html %]"</i>
210
                    </span>
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=[% 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 %]
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 54-59 use Koha::AuthorisedValues; Link Here
54
use Koha::CsvProfiles;
54
use Koha::CsvProfiles;
55
use Koha::Patron::Debarments qw(GetDebarments);
55
use Koha::Patron::Debarments qw(GetDebarments);
56
use Koha::Patron::Images;
56
use Koha::Patron::Images;
57
use Koha::Patron::Messages;
57
use Module::Load;
58
use Module::Load;
58
if ( C4::Context->preference('NorwegianPatronDBEnable') && C4::Context->preference('NorwegianPatronDBEnable') == 1 ) {
59
if ( C4::Context->preference('NorwegianPatronDBEnable') && C4::Context->preference('NorwegianPatronDBEnable') == 1 ) {
59
    load Koha::NorwegianPatronDB, qw( NLGetSyncDataFromBorrowernumber );
60
    load Koha::NorwegianPatronDB, qw( NLGetSyncDataFromBorrowernumber );
Lines 331-336 if ( C4::Context->preference("ExportCircHistory") ) { Link Here
331
    $template->param(csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc' }) ]);
332
    $template->param(csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc' }) ]);
332
}
333
}
333
334
335
my $patron_messages = Koha::Patron::Messages->search(
336
    {
337
        'me.borrowernumber' => $borrowernumber,
338
    },
339
    {
340
        join => 'manager',
341
        '+select' => ['manager.surname', 'manager.firstname' ],
342
        '+as' => ['manager_surname', 'manager_firstname'],
343
    }
344
);
345
346
334
# Display the language description instead of the code
347
# Display the language description instead of the code
335
# Note that this is certainly wrong
348
# Note that this is certainly wrong
336
my ( $subtag, $region ) = split '-', $patron->lang;
349
my ( $subtag, $region ) = split '-', $patron->lang;
Lines 359-364 $template->param( Link Here
359
    PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20,
372
    PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20,
360
    relatives_issues_count => $relatives_issues_count,
373
    relatives_issues_count => $relatives_issues_count,
361
    relatives_borrowernumbers => \@relatives,
374
    relatives_borrowernumbers => \@relatives,
375
    patron_messages       => $patron_messages,
362
);
376
);
363
377
364
output_html_with_http_headers $input, $cookie, $template->output;
378
output_html_with_http_headers $input, $cookie, $template->output;
365
- 

Return to bug 19801