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

(-)a/koha-tmpl/intranet-tmpl/js/browser.js (-6 / +6 lines)
Lines 1-4 Link Here
1
/* global BROWSER_PREVIOUS BROWSER_NEXT BROWSER_RETURN_TO_SEARCH */
1
/* global __ */
2
2
3
if ( KOHA === undefined ) var KOHA = {};
3
if ( KOHA === undefined ) var KOHA = {};
4
4
Lines 81-96 KOHA.browser = function (searchid, biblionumber) { Link Here
81
                    var prevbutton;
81
                    var prevbutton;
82
                    var nextbutton;
82
                    var nextbutton;
83
                    if (me.curPos === 0 && current_search.offset === 1) {
83
                    if (me.curPos === 0 && current_search.offset === 1) {
84
                        prevbutton = '<span id="browse-previous" class="browse-button" title="' + BROWSER_PREVIOUS + '"><i class="fa fa-arrow-left"></i></span>';
84
                        prevbutton = '<span id="browse-previous" class="browse-button" title="' + __("Previous") + '"><i class="fa fa-arrow-left"></i></span>';
85
                    } else {
85
                    } else {
86
                        prevbutton = '<a href="#" id="browse-previous" class="browse-button" title="' + BROWSER_PREVIOUS + '"><i class="fa fa-arrow-left"></i></a>';
86
                        prevbutton = '<a href="#" id="browse-previous" class="browse-button" title="' + __("Previous") + '"><i class="fa fa-arrow-left"></i></a>';
87
                    }
87
                    }
88
                    if (current_search.offset + me.curPos == current_search.total) {
88
                    if (current_search.offset + me.curPos == current_search.total) {
89
                        nextbutton = '<span id="browse-next" class="browse-button" title="' + BROWSER_NEXT + '"><i class="fa fa-arrow-right"></i></span>';
89
                        nextbutton = '<span id="browse-next" class="browse-button" title="' + __("Next") + '"><i class="fa fa-arrow-right"></i></span>';
90
                    } else {
90
                    } else {
91
                        nextbutton = '<a href="#" id="browse-next" class="browse-button" title="' + BROWSER_NEXT + '"><i class="fa fa-arrow-right"></i></a>';
91
                        nextbutton = '<a href="#" id="browse-next" class="browse-button" title="' + __("Next") + '"><i class="fa fa-arrow-right"></i></a>';
92
                    }
92
                    }
93
                    $('#menu').before('<div class="browse-controls"><div class="browse-controls-inner"><div class="browse-label"><a href="' + searchURL + '" id="browse-return-to-results" class="searchwithcontext"><i class="fa fa-list"></i> ' + BROWSER_RETURN_TO_SEARCH + '</a></div><div class="browse-prev-next">' + prevbutton + nextbutton + '</div></div></div>');
93
                    $('#menu').before('<div class="browse-controls"><div class="browse-controls-inner"><div class="browse-label"><a href="' + searchURL + '" id="browse-return-to-results" class="searchwithcontext"><i class="fa fa-list"></i> ' + __("Results") + '</a></div><div class="browse-prev-next">' + prevbutton + nextbutton + '</div></div></div>');
94
                    $('a#browse-previous').click(function (ev) {
94
                    $('a#browse-previous').click(function (ev) {
95
                        ev.preventDefault();
95
                        ev.preventDefault();
96
                        browseRecords(-1);
96
                        browseRecords(-1);
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc (-61 lines)
Lines 1-61 Link Here
1
<!-- strings.inc -->
2
<script>
3
    var CIRCULATION_RETURNED = _("Checked in");
4
    var CIRCULATION_NOT_RETURNED = _("Unable to check in");
5
    var NOT_RENEWABLE_OVERDUE = _("Not allowed: overdue");
6
    var NOT_RENEWABLE_RESTRICTION = _("Not allowed: patron restricted");
7
    var CIRCULATION_RENEWED_DUE = _("Renewed, due:");
8
    var CIRCULATION_RENEW_FAILED = _("Renew failed:");
9
    var RETURN_CLAIMED = _("Return claimed");
10
    var RETURN_CLAIMED_FAILURE = _("Unable to claim as returned");
11
    var RETURN_CLAIMED_MAKE = _("Claim returned");
12
    var RETURN_CLAIMED_NOTES = _("Notes about return claim");
13
    var NOT_CHECKED_OUT = _("not checked out");
14
    var TOO_MANY_RENEWALS = _("too many renewals");
15
    var ON_RESERVE = _("on hold");
16
    var REASON_UNKNOWN = _("reason unknown");
17
    var TODAYS_CHECKOUTS = _("Today's checkouts");
18
    var PREVIOUS_CHECKOUTS = _("Previous checkouts");
19
    var BY = _("by _AUTHOR_");
20
    var ON_HOLD = _("On hold");
21
    var PLACE_HOLD = _("Place hold");
22
    var NOT_RENEWABLE = _("Not renewable");
23
    var NOT_RENEWABLE_TOO_SOON = _("No renewal before %s");
24
    var NOT_RENEWABLE_AUTO_TOO_SOON = _("Scheduled for automatic renewal");
25
    var NOT_RENEWABLE_AUTO_TOO_LATE = _("Can no longer be auto-renewed - number of checkout days exceeded");
26
    var NOT_RENEWABLE_AUTO_TOO_MUCH_OWEING = _("Automatic renewal failed, patron has unpaid fines");
27
    var NOT_RENEWABLE_AUTO_ACCOUNT_EXPIRED = _("Automatic renewal failed, account expired");
28
    var NOT_RENEWABLE_AUTO_RENEW = _("Scheduled for automatic renewal");
29
    var NOT_RENEWABLE_DENIED = _("Renewal denied by syspref");
30
    var RENEWALS_REMAINING = _("%s of %s renewals remaining");
31
    var HOLD_IS_SUSPENDED = _("Hold is <strong>suspended</strong>");
32
    var UNTIL = _("until %s");
33
    var NEXT_AVAILABLE_ITYPE = _("Next available %s item");
34
    var ITEM_IS_WAITING = _("Item is <strong>waiting</strong>");
35
    var ITEM_IS_WAITING_HERE = _("Item is <strong>waiting here</strong>");
36
    var AT = _("at %s");
37
    var ITEM_IS_IN_TRANSIT = _("Item is <strong>in transit</strong> from %s since %s");
38
    var FROM = _("from");
39
    var NOT_TRANSFERRED_YET = _("Item hasn't been transferred yet from %s");
40
    var NO = _("No");
41
    var YES = _("Yes");
42
    var INHOUSE_USE = _("On-site checkout");
43
    var CANCEL = _("Cancel");
44
    var RESUME = _("Resume");
45
    var SUSPEND = _("Suspend");
46
    var SUSPEND_UNTIL = _("Suspend until:");
47
    var SUSPEND_HOLD_ON = _("Suspend hold on");
48
    var CLEAR_DATE_TO_SUSPEND_INDEFINITELY = _("Clear date to suspend indefinitely");
49
    var SUSPEND_HOLD_ERROR_DATE = _("Unable to suspend hold, invalid date");
50
    var SUSPEND_HOLD_ERROR_NOT_FOUND = _("Unable to suspend hold, hold not found");
51
    var RESUME_HOLD_ERROR_NOT_FOUND = _("Unable to resume, hold not found");
52
    var CURRENT = _(" (current) ");
53
    var MSG_NO_ITEMTYPE = _("No itemtype");
54
    var MSG_CHECKOUTS_BY_ITEMTYPE = _("Number of checkouts by item type");
55
    var PATRON_NOTE = _("Patron note");
56
    var CONFIRM_DELETE_RETURN_CLAIM = _("Are you sure you want to delete this return claim?");
57
    var BROWSER_RETURN_TO_SEARCH = _("Results");
58
    var BROWSER_PREVIOUS = _("Previous");
59
    var BROWSER_NEXT = _("Next");
60
</script>
61
<!-- / strings.inc -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt (-1 lines)
Lines 56-62 Link Here
56
[% MACRO jsinclude BLOCK %]
56
[% MACRO jsinclude BLOCK %]
57
    [% INCLUDE 'catalog-strings.inc' %]
57
    [% INCLUDE 'catalog-strings.inc' %]
58
    [% Asset.js("js/catalog.js") | $raw %]
58
    [% Asset.js("js/catalog.js") | $raw %]
59
    [% INCLUDE 'strings.inc' %]
60
    [% Asset.js("js/browser.js") | $raw %]
59
    [% Asset.js("js/browser.js") | $raw %]
61
    <script>
60
    <script>
62
        var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10));
61
        var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10));
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt (-1 lines)
Lines 186-192 Link Here
186
[% MACRO jsinclude BLOCK %]
186
[% MACRO jsinclude BLOCK %]
187
    [% INCLUDE 'catalog-strings.inc' %]
187
    [% INCLUDE 'catalog-strings.inc' %]
188
    [% Asset.js("js/catalog.js") | $raw %]
188
    [% Asset.js("js/catalog.js") | $raw %]
189
    [% INCLUDE 'strings.inc' %]
190
    [% Asset.js("js/browser.js") | $raw %]
189
    [% Asset.js("js/browser.js") | $raw %]
191
    <script>
190
    <script>
192
        var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10));
191
        var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10));
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-1 lines)
Lines 1226-1232 Note that permanent location is a code, and location may be an authval. Link Here
1226
    [% END %]
1226
    [% END %]
1227
    [% INCLUDE 'datatables.inc' %]
1227
    [% INCLUDE 'datatables.inc' %]
1228
    [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
1228
    [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
1229
    [% INCLUDE 'strings.inc' %]
1230
    [% INCLUDE 'columns_settings.inc' %]
1229
    [% INCLUDE 'columns_settings.inc' %]
1231
    [% Asset.js("js/browser.js") | $raw %]
1230
    [% Asset.js("js/browser.js") | $raw %]
1232
    [% Asset.js("js/table_filters.js") | $raw %]
1231
    [% Asset.js("js/table_filters.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/labeledMARCdetail.tt (-1 lines)
Lines 79-85 Link Here
79
[% MACRO jsinclude BLOCK %]
79
[% MACRO jsinclude BLOCK %]
80
    [% INCLUDE 'catalog-strings.inc' %]
80
    [% INCLUDE 'catalog-strings.inc' %]
81
    [% Asset.js("js/catalog.js") | $raw %]
81
    [% Asset.js("js/catalog.js") | $raw %]
82
    [% INCLUDE 'strings.inc' %]
83
    [% Asset.js("js/browser.js") | $raw %]
82
    [% Asset.js("js/browser.js") | $raw %]
84
    <script>
83
    <script>
85
    //<![CDATA[
84
    //<![CDATA[
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt (-1 lines)
Lines 348-354 Link Here
348
[% MACRO jsinclude BLOCK %]
348
[% MACRO jsinclude BLOCK %]
349
    [% INCLUDE 'catalog-strings.inc' %]
349
    [% INCLUDE 'catalog-strings.inc' %]
350
    [% Asset.js("js/catalog.js") | $raw %]
350
    [% Asset.js("js/catalog.js") | $raw %]
351
    [% INCLUDE 'strings.inc' %]
352
    [% Asset.js("js/browser.js") | $raw %]
351
    [% Asset.js("js/browser.js") | $raw %]
353
    <script>
352
    <script>
354
        var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10));
353
        var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10));
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (-1 lines)
Lines 704-710 Link Here
704
     </div> <!-- /.row -->
704
     </div> <!-- /.row -->
705
705
706
[% MACRO jsinclude BLOCK %]
706
[% MACRO jsinclude BLOCK %]
707
    [% INCLUDE 'strings.inc' %]
708
    [% Asset.js("js/browser.js") | $raw %]
707
    [% Asset.js("js/browser.js") | $raw %]
709
    [% Asset.js("lib/hc-sticky.js") | $raw %]
708
    [% Asset.js("lib/hc-sticky.js") | $raw %]
710
    [% Asset.js("js/coce.js") | $raw %]
709
    [% Asset.js("js/coce.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/stockrotation.tt (-1 lines)
Lines 167-173 Link Here
167
    </div> <!-- /.row -->
167
    </div> <!-- /.row -->
168
168
169
[% MACRO jsinclude BLOCK %]
169
[% MACRO jsinclude BLOCK %]
170
    [% INCLUDE 'strings.inc' %]
171
    [% Asset.js("js/browser.js") | $raw %]
170
    [% Asset.js("js/browser.js") | $raw %]
172
    <script>
171
    <script>
173
        var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10));
172
        var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10));
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-1 lines)
Lines 1045-1051 Link Here
1045
</div> <!-- /#barcodeSubmittedModal -->
1045
</div> <!-- /#barcodeSubmittedModal -->
1046
1046
1047
[% MACRO jsinclude BLOCK %]
1047
[% MACRO jsinclude BLOCK %]
1048
    [% INCLUDE 'strings.inc' %]
1049
    [% INCLUDE 'calendar.inc' %]
1048
    [% INCLUDE 'calendar.inc' %]
1050
    [% INCLUDE 'datatables.inc' %]
1049
    [% INCLUDE 'datatables.inc' %]
1051
    [% INCLUDE 'columns_settings.inc' %]
1050
    [% INCLUDE 'columns_settings.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-1 lines)
Lines 914-920 Link Here
914
    [% INCLUDE 'datatables.inc' %]
914
    [% INCLUDE 'datatables.inc' %]
915
    [% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %]
915
    [% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %]
916
    [% INCLUDE 'columns_settings.inc' %]
916
    [% INCLUDE 'columns_settings.inc' %]
917
    [% INCLUDE 'strings.inc' %]
918
    [% INCLUDE 'calendar.inc' %]
917
    [% INCLUDE 'calendar.inc' %]
919
    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
918
    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
920
    [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %]
919
    [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js (-39 / +39 lines)
Lines 1-4 Link Here
1
/* global PATRON_NOTE */
1
/* global __ */
2
2
3
$(document).ready(function() {
3
$(document).ready(function() {
4
    $.ajaxSetup ({ cache: false });
4
    $.ajaxSetup ({ cache: false });
Lines 115-128 $(document).ready(function() { Link Here
115
115
116
                content = "";
116
                content = "";
117
                if ( data.returned ) {
117
                if ( data.returned ) {
118
                    content = CIRCULATION_RETURNED;
118
                    content = __("Checked in");
119
                    $(id).parent().parent().addClass('ok');
119
                    $(id).parent().parent().addClass('ok');
120
                    $('#date_due_' + data.itemnumber).html(CIRCULATION_RETURNED);
120
                    $('#date_due_' + data.itemnumber).html( __("Checked in") );
121
                    if ( data.patronnote != null ) {
121
                    if ( data.patronnote != null ) {
122
                        $('.patron_note_' + data.itemnumber).html( PATRON_NOTE + ": " + data.patronnote);
122
                        $('.patron_note_' + data.itemnumber).html( __("Patron note") + ": " + data.patronnote);
123
                    }
123
                    }
124
                } else {
124
                } else {
125
                    content = CIRCULATION_NOT_RETURNED;
125
                    content = __("Unable to check in");
126
                    $(id).parent().parent().addClass('warn');
126
                    $(id).parent().parent().addClass('warn');
127
                }
127
                }
128
128
Lines 160-183 $(document).ready(function() { Link Here
160
160
161
                var content = "";
161
                var content = "";
162
                if ( data.renew_okay ) {
162
                if ( data.renew_okay ) {
163
                    content = CIRCULATION_RENEWED_DUE + " " + data.date_due;
163
                    content = __("Renewed, due:") + " " + data.date_due;
164
                    $('#date_due_' + data.itemnumber).replaceWith( data.date_due );
164
                    $('#date_due_' + data.itemnumber).replaceWith( data.date_due );
165
                } else {
165
                } else {
166
                    content = CIRCULATION_RENEW_FAILED + " ";
166
                    content = __("Renew failed:") + " ";
167
                    if ( data.error == "no_checkout" ) {
167
                    if ( data.error == "no_checkout" ) {
168
                        content += NOT_CHECKED_OUT;
168
                        content += __("not checked out");
169
                    } else if ( data.error == "too_many" ) {
169
                    } else if ( data.error == "too_many" ) {
170
                        content += TOO_MANY_RENEWALS;
170
                        content += __("too many renewals");
171
                    } else if ( data.error == "on_reserve" ) {
171
                    } else if ( data.error == "on_reserve" ) {
172
                        content += ON_RESERVE;
172
                        content += __("on hold");
173
                    } else if ( data.error == "restriction" ) {
173
                    } else if ( data.error == "restriction" ) {
174
                        content += NOT_RENEWABLE_RESTRICTION;
174
                        content += __("Not allowed: patron restricted");
175
                    } else if ( data.error == "overdue" ) {
175
                    } else if ( data.error == "overdue" ) {
176
                        content += NOT_RENEWABLE_OVERDUE;
176
                        content += __("Not allowed: overdue");
177
                    } else if ( data.error ) {
177
                    } else if ( data.error ) {
178
                        content += data.error;
178
                        content += data.error;
179
                    } else {
179
                    } else {
180
                        content += REASON_UNKNOWN;
180
                        content += __("reason unknown");
181
                    }
181
                    }
182
                }
182
                }
183
183
Lines 250-258 $(document).ready(function() { Link Here
250
                {
250
                {
251
                    "mDataProp": function( oObj ) {
251
                    "mDataProp": function( oObj ) {
252
                        if ( oObj.issued_today ) {
252
                        if ( oObj.issued_today ) {
253
                            return "<strong>" + TODAYS_CHECKOUTS + "</strong>";
253
                            return "<strong>" + __("Today's checkouts") + "</strong>";
254
                        } else {
254
                        } else {
255
                            return "<strong>" + PREVIOUS_CHECKOUTS + "</strong>";
255
                            return "<strong>" + __("Previous checkouts") + "</strong>";
256
                        }
256
                        }
257
                    }
257
                    }
258
                },
258
                },
Lines 307-313 $(document).ready(function() { Link Here
307
                        title += "</a></span>";
307
                        title += "</a></span>";
308
308
309
                        if ( oObj.author ) {
309
                        if ( oObj.author ) {
310
                            title += " " + BY.replace( "_AUTHOR_",  " " + oObj.author.escapeHtml() );
310
                            title += " " + __("by _AUTHOR_").replace( "_AUTHOR_",  " " + oObj.author.escapeHtml() );
311
                        }
311
                        }
312
312
313
                        if ( oObj.itemnotes ) {
313
                        if ( oObj.itemnotes ) {
Lines 328-334 $(document).ready(function() { Link Here
328
328
329
                        var onsite_checkout = '';
329
                        var onsite_checkout = '';
330
                        if ( oObj.onsite_checkout == 1 ) {
330
                        if ( oObj.onsite_checkout == 1 ) {
331
                            onsite_checkout += " <span class='onsite_checkout'>(" + INHOUSE_USE + ")</span>";
331
                            onsite_checkout += " <span class='onsite_checkout'>(" + __("On-site checkout") + ")</span>";
332
                        }
332
                        }
333
333
334
                        title += " "
334
                        title += " "
Lines 421-490 $(document).ready(function() { Link Here
421
                            // Do nothing
421
                            // Do nothing
422
                        } else if ( oObj.can_renew_error == "on_reserve" ) {
422
                        } else if ( oObj.can_renew_error == "on_reserve" ) {
423
                            msg += "<span>"
423
                            msg += "<span>"
424
                                    + "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + ON_HOLD + "</a>"
424
                                    +"<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + __("On hold") + "</a>"
425
                                    + "</span>";
425
                                    + "</span>";
426
426
427
                            span_style = "display: none";
427
                            span_style = "display: none";
428
                            span_class = "renewals-allowed-on_reserve";
428
                            span_class = "renewals-allowed-on_reserve";
429
                        } else if ( oObj.can_renew_error == "too_many" ) {
429
                        } else if ( oObj.can_renew_error == "too_many" ) {
430
                            msg += "<span class='renewals-disabled'>"
430
                            msg += "<span class='renewals-disabled'>"
431
                                    + NOT_RENEWABLE
431
                                    + __("Not renewable")
432
                                    + "</span>";
432
                                    + "</span>";
433
433
434
                            span_style = "display: none";
434
                            span_style = "display: none";
435
                            span_class = "renewals-allowed";
435
                            span_class = "renewals-allowed";
436
                        } else if ( oObj.can_renew_error == "restriction" ) {
436
                        } else if ( oObj.can_renew_error == "restriction" ) {
437
                            msg += "<span class='renewals-disabled'>"
437
                            msg += "<span class='renewals-disabled'>"
438
                                    + NOT_RENEWABLE_RESTRICTION
438
                                    + __("Not allowed: patron restricted")
439
                                    + "</span>";
439
                                    + "</span>";
440
440
441
                            span_style = "display: none";
441
                            span_style = "display: none";
442
                            span_class = "renewals-allowed";
442
                            span_class = "renewals-allowed";
443
                        } else if ( oObj.can_renew_error == "overdue" ) {
443
                        } else if ( oObj.can_renew_error == "overdue" ) {
444
                            msg += "<span class='renewals-disabled'>"
444
                            msg += "<span class='renewals-disabled'>"
445
                                    + NOT_RENEWABLE_OVERDUE
445
                                    + __("Not allowed: overdue")
446
                                    + "</span>";
446
                                    + "</span>";
447
447
448
                            span_style = "display: none";
448
                            span_style = "display: none";
449
                            span_class = "renewals-allowed";
449
                            span_class = "renewals-allowed";
450
                        } else if ( oObj.can_renew_error == "too_soon" ) {
450
                        } else if ( oObj.can_renew_error == "too_soon" ) {
451
                            msg += "<span class='renewals-disabled'>"
451
                            msg += "<span class='renewals-disabled'>"
452
                                    + NOT_RENEWABLE_TOO_SOON.format( oObj.can_renew_date )
452
                                    + __("No renewal before %s").format(oObj.can_renew_date)
453
                                    + "</span>";
453
                                    + "</span>";
454
454
455
                            span_style = "display: none";
455
                            span_style = "display: none";
456
                            span_class = "renewals-allowed";
456
                            span_class = "renewals-allowed";
457
                        } else if ( oObj.can_renew_error == "auto_too_soon" ) {
457
                        } else if ( oObj.can_renew_error == "auto_too_soon" ) {
458
                            msg += "<span class='renewals-disabled'>"
458
                            msg += "<span class='renewals-disabled'>"
459
                                    + NOT_RENEWABLE_AUTO_TOO_SOON
459
                                    + __("Scheduled for automatic renewal")
460
                                    + "</span>";
460
                                    + "</span>";
461
461
462
                            span_style = "display: none";
462
                            span_style = "display: none";
463
                            span_class = "renewals-allowed";
463
                            span_class = "renewals-allowed";
464
                        } else if ( oObj.can_renew_error == "auto_too_late" ) {
464
                        } else if ( oObj.can_renew_error == "auto_too_late" ) {
465
                            msg += "<span class='renewals-disabled'>"
465
                            msg += "<span class='renewals-disabled'>"
466
                                    + NOT_RENEWABLE_AUTO_TOO_LATE
466
                                    + __("Can no longer be auto-renewed - number of checkout days exceeded")
467
                                    + "</span>";
467
                                    + "</span>";
468
468
469
                            span_style = "display: none";
469
                            span_style = "display: none";
470
                            span_class = "renewals-allowed";
470
                            span_class = "renewals-allowed";
471
                        } else if ( oObj.can_renew_error == "auto_too_much_oweing" ) {
471
                        } else if ( oObj.can_renew_error == "auto_too_much_oweing" ) {
472
                            msg += "<span class='renewals-disabled'>"
472
                            msg += "<span class='renewals-disabled'>"
473
                                    + NOT_RENEWABLE_AUTO_TOO_MUCH_OWEING
473
                                    + __("Automatic renewal failed, patron has unpaid fines")
474
                                    + "</span>";
474
                                    + "</span>";
475
475
476
                            span_style = "display: none";
476
                            span_style = "display: none";
477
                            span_class = "renewals-allowed";
477
                            span_class = "renewals-allowed";
478
                        } else if ( oObj.can_renew_error == "auto_account_expired" ) {
478
                        } else if ( oObj.can_renew_error == "auto_account_expired" ) {
479
                            msg += "<span class='renewals-disabled'>"
479
                            msg += "<span class='renewals-disabled'>"
480
                                    + NOT_RENEWABLE_AUTO_ACCOUNT_EXPIRED
480
                                    + __("Automatic renewal failed, account expired")
481
                                    + "</span>";
481
                                    + "</span>";
482
482
483
                            span_style = "display: none";
483
                            span_style = "display: none";
484
                            span_class = "renewals-allowed";
484
                            span_class = "renewals-allowed";
485
                        } else if ( oObj.can_renew_error == "auto_renew" ) {
485
                        } else if ( oObj.can_renew_error == "auto_renew" ) {
486
                            msg += "<span class='renewals-disabled'>"
486
                            msg += "<span class='renewals-disabled'>"
487
                                    + NOT_RENEWABLE_AUTO_RENEW
487
                                    + __("Scheduled for automatic renewal")
488
                                    + "</span>";
488
                                    + "</span>";
489
489
490
                            span_style = "display: none";
490
                            span_style = "display: none";
Lines 493-499 $(document).ready(function() { Link Here
493
                            // Don't display something if it's an onsite checkout
493
                            // Don't display something if it's an onsite checkout
494
                        } else if ( oObj.can_renew_error == "item_denied_renewal" ) {
494
                        } else if ( oObj.can_renew_error == "item_denied_renewal" ) {
495
                            content += "<span class='renewals-disabled'>"
495
                            content += "<span class='renewals-disabled'>"
496
                                    + NOT_RENEWABLE_DENIED
496
                                    + __("Renewal denied by syspref")
497
                                    + "</span>";
497
                                    + "</span>";
498
498
499
                            span_style = "display: none";
499
                            span_style = "display: none";
Lines 528-534 $(document).ready(function() { Link Here
528
                        content += msg;
528
                        content += msg;
529
                        if ( can_renew || can_force_renew ) {
529
                        if ( can_renew || can_force_renew ) {
530
                            content += "<span class='renewals'>("
530
                            content += "<span class='renewals'>("
531
                                    + RENEWALS_REMAINING.format( oObj.renewals_remaining, oObj.renewals_allowed )
531
                                    + __("%s of %s renewals remaining").format(oObj.renewals_remaining, oObj.renewals_allowed)
532
                                    + ")</span>";
532
                                    + ")</span>";
533
                        }
533
                        }
534
534
Lines 542-548 $(document).ready(function() { Link Here
542
                    "bVisible": AllowCirculate ? true : false,
542
                    "bVisible": AllowCirculate ? true : false,
543
                    "mDataProp": function ( oObj ) {
543
                    "mDataProp": function ( oObj ) {
544
                        if ( oObj.can_renew_error == "on_reserve" ) {
544
                        if ( oObj.can_renew_error == "on_reserve" ) {
545
                            return "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + ON_HOLD + "</a>";
545
                            return "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + __("On hold") + "</a>";
546
                        } else {
546
                        } else {
547
                            return "<input type='checkbox' class='checkin' id='checkin_" + oObj.itemnumber + "' name='checkin' value='" + oObj.itemnumber +"'></input>";
547
                            return "<input type='checkbox' class='checkin' id='checkin_" + oObj.itemnumber + "' name='checkin' value='" + oObj.itemnumber +"'></input>";
548
                        }
548
                        }
Lines 557-563 $(document).ready(function() { Link Here
557
                        if ( oObj.return_claim_id ) {
557
                        if ( oObj.return_claim_id ) {
558
                          content = '<span class="badge">' + oObj.return_claim_created_on_formatted + '</span>';
558
                          content = '<span class="badge">' + oObj.return_claim_created_on_formatted + '</span>';
559
                        } else {
559
                        } else {
560
                          content = '<a class="btn btn-default btn-xs claim-returned-btn" data-itemnumber="' + oObj.itemnumber + '"><i class="fa fa-exclamation-circle"></i> ' + RETURN_CLAIMED_MAKE + '</a>';
560
                          content = '<a class="btn btn-default btn-xs claim-returned-btn" data-itemnumber="' + oObj.itemnumber + '"><i class="fa fa-exclamation-circle"></i> ' + __("Claim returned") + '</a>';
561
                        }
561
                        }
562
                        return content;
562
                        return content;
563
                    }
563
                    }
Lines 601-609 $(document).ready(function() { Link Here
601
                "dataSrc": "issued_today",
601
                "dataSrc": "issued_today",
602
                "startRender": function ( rows, group ) {
602
                "startRender": function ( rows, group ) {
603
                    if ( group ) {
603
                    if ( group ) {
604
                        return TODAYS_CHECKOUTS;
604
                        return __("Today's checkouts");
605
                    } else {
605
                    } else {
606
                        return PREVIOUS_CHECKOUTS;
606
                        return __("Previous checkouts");
607
                    }
607
                    }
608
                }
608
                }
609
            },
609
            },
Lines 616-628 $(document).ready(function() { Link Here
616
                var ul = $('<ul>');
616
                var ul = $('<ul>');
617
                Object.keys(checkoutsByItype).sort().forEach(function (itype) {
617
                Object.keys(checkoutsByItype).sort().forEach(function (itype) {
618
                    var li = $('<li>')
618
                    var li = $('<li>')
619
                        .append($('<strong>').html(itype || MSG_NO_ITEMTYPE))
619
                        .append($('<strong>').html(itype || __("No itemtype")))
620
                        .append(': ' + checkoutsByItype[itype]);
620
                        .append(': ' + checkoutsByItype[itype]);
621
                    ul.append(li);
621
                    ul.append(li);
622
                })
622
                })
623
                $('<details>')
623
                $('<details>')
624
                    .addClass('checkouts-by-itemtype')
624
                    .addClass('checkouts-by-itemtype')
625
                    .append($('<summary>').html(MSG_CHECKOUTS_BY_ITEMTYPE))
625
                    .append($('<summary>').html( __("Number of checkouts by item type") ))
626
                    .append(ul)
626
                    .append(ul)
627
                    .insertBefore(oSettings.nTableWrapper)
627
                    .insertBefore(oSettings.nTableWrapper)
628
            },
628
            },
Lines 681-687 $(document).ready(function() { Link Here
681
                            title += "</a></span>";
681
                            title += "</a></span>";
682
682
683
                            if ( oObj.author ) {
683
                            if ( oObj.author ) {
684
                                title += " " + BY.replace( "_AUTHOR_", " " + oObj.author.escapeHtml() );
684
                                title += " " + __("by _AUTHOR_").replace( "_AUTHOR_", " " + oObj.author.escapeHtml() );
685
                            }
685
                            }
686
686
687
                            if ( oObj.itemnotes ) {
687
                            if ( oObj.itemnotes ) {
Lines 702-708 $(document).ready(function() { Link Here
702
702
703
                            var onsite_checkout = '';
703
                            var onsite_checkout = '';
704
                            if ( oObj.onsite_checkout == 1 ) {
704
                            if ( oObj.onsite_checkout == 1 ) {
705
                                onsite_checkout += " <span class='onsite_checkout'>(" + INHOUSE_USE + ")</span>";
705
                                onsite_checkout += " <span class='onsite_checkout'>(" + __("On-site checkout") + ")</span>";
706
                            }
706
                            }
707
707
708
                            title += " "
708
                            title += " "
Lines 866-872 $(document).ready(function() { Link Here
866
                content = '<span class="badge">' + created_on.toLocaleDateString() + '</span>';
866
                content = '<span class="badge">' + created_on.toLocaleDateString() + '</span>';
867
                $(id).parent().parent().addClass('ok');
867
                $(id).parent().parent().addClass('ok');
868
            } else {
868
            } else {
869
                content = RETURN_CLAIMED_FAILURE;
869
                content = __("Unable to claim as returned");
870
                $(id).parent().parent().addClass('warn');
870
                $(id).parent().parent().addClass('warn');
871
            }
871
            }
872
872
Lines 1065-1071 $(document).ready(function() { Link Here
1065
1065
1066
    // Hanld return claim deletion
1066
    // Hanld return claim deletion
1067
    $('body').on('click', '.return-claim-tools-delete', function() {
1067
    $('body').on('click', '.return-claim-tools-delete', function() {
1068
        let confirmed = confirm(CONFIRM_DELETE_RETURN_CLAIM);
1068
        let confirmed = confirm(__("Are you sure you want to delete this return claim?"));
1069
        if ( confirmed ) {
1069
        if ( confirmed ) {
1070
            let id = $(this).data('return-claim-id');
1070
            let id = $(this).data('return-claim-id');
1071
1071
(-)a/koha-tmpl/intranet-tmpl/prog/js/holds.js (-24 / +26 lines)
Lines 1-3 Link Here
1
/* global __ dataTablesDefaults borrowernumber SuspendHoldsIntranet */
1
$(document).ready(function() {
2
$(document).ready(function() {
2
    var holdsTable;
3
    var holdsTable;
3
4
Lines 10-15 $(document).ready(function() { Link Here
10
    function load_holds_table() {
11
    function load_holds_table() {
11
        var holds = new Array();
12
        var holds = new Array();
12
        if ( ! holdsTable ) {
13
        if ( ! holdsTable ) {
14
            var title;
13
            holdsTable = $("#holds-table").dataTable($.extend(true, {}, dataTablesDefaults, {
15
            holdsTable = $("#holds-table").dataTable($.extend(true, {}, dataTablesDefaults, {
14
                "bAutoWidth": false,
16
                "bAutoWidth": false,
15
                "sDom": "rt",
17
                "sDom": "rt",
Lines 25-31 $(document).ready(function() { Link Here
25
                                  + oObj.title.escapeHtml();
27
                                  + oObj.title.escapeHtml();
26
28
27
                            $.each(oObj.subtitle, function( index, value ) {
29
                            $.each(oObj.subtitle, function( index, value ) {
28
                                      title += " " + value.escapeHtml();
30
                                title += " " + value.escapeHtml();
29
                            });
31
                            });
30
32
31
                            title += " " + oObj.part_number + " " + oObj.part_name;
33
                            title += " " + oObj.part_number + " " + oObj.part_name;
Lines 37-43 $(document).ready(function() { Link Here
37
                            title += "</a>";
39
                            title += "</a>";
38
40
39
                            if ( oObj.author ) {
41
                            if ( oObj.author ) {
40
                                title += " " + BY.replace( "_AUTHOR_",  oObj.author.escapeHtml() );
42
                                title += " " + __("by _AUTHOR_").replace("_AUTHOR_", oObj.author.escapeHtml());
41
                            }
43
                            }
42
44
43
                            if ( oObj.itemnotes ) {
45
                            if ( oObj.itemnotes ) {
Lines 83-89 $(document).ready(function() { Link Here
83
                                    if( oObj.branches[i].selected ){
85
                                    if( oObj.branches[i].selected ){
84
86
85
                                        selectedbranch = " selected='selected' ";
87
                                        selectedbranch = " selected='selected' ";
86
                                        setbranch = CURRENT;
88
                                        setbranch = __(" (current) ");
87
                                    } else if ( oObj.branches[i].pickup_location == 0 ) {
89
                                    } else if ( oObj.branches[i].pickup_location == 0 ) {
88
                                        continue;
90
                                        continue;
89
                                    } else{
91
                                    } else{
Lines 112-119 $(document).ready(function() { Link Here
112
                        "bSortable": false,
114
                        "bSortable": false,
113
                        "mDataProp": function( oObj ) {
115
                        "mDataProp": function( oObj ) {
114
                            return "<select name='rank-request'>"
116
                            return "<select name='rank-request'>"
115
                                 + "<option value='n'>" + NO + "</option>"
117
                                 +"<option value='n'>" + __("No") + "</option>"
116
                                 + "<option value='del'>" + YES  + "</option>"
118
                                 +"<option value='del'>" + __("Yes") + "</option>"
117
                                 + "</select>"
119
                                 + "</select>"
118
                                 + "<input type='hidden' name='biblionumber' value='" + oObj.biblionumber + "'>"
120
                                 + "<input type='hidden' name='biblionumber' value='" + oObj.biblionumber + "'>"
119
                                 + "<input type='hidden' name='borrowernumber' value='" + borrowernumber + "'>"
121
                                 + "<input type='hidden' name='borrowernumber' value='" + borrowernumber + "'>"
Lines 130-139 $(document).ready(function() { Link Here
130
                                return "";
132
                                return "";
131
                            } else if ( oObj.suspend == 1 ) {
133
                            } else if ( oObj.suspend == 1 ) {
132
                                return "<a class='hold-resume btn btn-default btn-xs' id='resume" + oObj.reserve_id + "'>"
134
                                return "<a class='hold-resume btn btn-default btn-xs' id='resume" + oObj.reserve_id + "'>"
133
                                     + "<i class='fa fa-play'></i> " + RESUME + "</a>";
135
                                     +"<i class='fa fa-play'></i> " + __("Resume") + "</a>";
134
                            } else {
136
                            } else {
135
                                return "<a class='hold-suspend btn btn-default btn-xs' id='suspend" + oObj.reserve_id + "'>"
137
                                return "<a class='hold-suspend btn btn-default btn-xs' id='suspend" + oObj.reserve_id + "'>"
136
                                     + "<i class='fa fa-pause'></i> " + SUSPEND + "</a>";
138
                                     +"<i class='fa fa-pause'></i> " + __("Suspend") + "</a>";
137
                            }
139
                            }
138
                        }
140
                        }
139
                    },
141
                    },
Lines 142-156 $(document).ready(function() { Link Here
142
                            var data = "";
144
                            var data = "";
143
145
144
                            if ( oObj.suspend == 1 ) {
146
                            if ( oObj.suspend == 1 ) {
145
                                data += "<p>" + HOLD_IS_SUSPENDED;
147
                                data += "<p>" + __("Hold is <strong>suspended</strong>");
146
                                if ( oObj.suspend_until ) {
148
                                if ( oObj.suspend_until ) {
147
                                    data += " " + UNTIL.format( oObj.suspend_until_formatted );
149
                                    data += " " + __("until %s").format(oObj.suspend_until_formatted);
148
                                }
150
                                }
149
                                data += "</p>";
151
                                data += "</p>";
150
                            }
152
                            }
151
153
152
                            if ( oObj.itemtype_limit ) {
154
                            if ( oObj.itemtype_limit ) {
153
                                data += NEXT_AVAILABLE_ITYPE.format( oObj.itemtype_limit );
155
                                data += __("Next available %s item").format(oObj.itemtype_limit);
154
                            }
156
                            }
155
157
156
                            if ( oObj.barcode ) {
158
                            if ( oObj.barcode ) {
Lines 158-179 $(document).ready(function() { Link Here
158
                                if ( oObj.found == "W" ) {
160
                                if ( oObj.found == "W" ) {
159
161
160
                                    if ( oObj.waiting_here ) {
162
                                    if ( oObj.waiting_here ) {
161
                                        data += ITEM_IS_WAITING_HERE;
163
                                        data += __("Item is <strong>waiting here</strong>");
162
                                    } else {
164
                                    } else {
163
                                        data += ITEM_IS_WAITING;
165
                                        data += __("Item is <strong>waiting</strong>");
164
                                        data += " " + AT.format( oObj.waiting_at );
166
                                        data += " " + __("at %s").format(oObj.waiting_at);
165
                                    }
167
                                    }
166
168
167
                                } else if ( oObj.transferred ) {
169
                                } else if ( oObj.transferred ) {
168
                                    data += ITEM_IS_IN_TRANSIT.format( oObj.from_branch, oObj.date_sent );
170
                                    data += __("Item is <strong>in transit</strong> from %s since %s").format(oObj.from_branch, oObj.date_sent);
169
                                } else if ( oObj.not_transferred ) {
171
                                } else if ( oObj.not_transferred ) {
170
                                    data += NOT_TRANSFERRED_YET.format( oObj.not_transferred_by );
172
                                    data += __("Item hasn't been transferred yet from %s").format(oObj.not_transferred_by);
171
                                }
173
                                }
172
                                data += "</em>";
174
                                data += "</em>";
173
                            }
175
                            }
174
                            return data;
176
                            return data;
175
                        }
177
                        }
176
                   }
178
                    }
177
                ],
179
                ],
178
                "bPaginate": false,
180
                "bPaginate": false,
179
                "bProcessing": true,
181
                "bProcessing": true,
Lines 203-209 $(document).ready(function() { Link Here
203
                          holdsTable.api().ajax.reload();
205
                          holdsTable.api().ajax.reload();
204
                      } else {
206
                      } else {
205
                        if ( data.error == "HOLD_NOT_FOUND" ) {
207
                        if ( data.error == "HOLD_NOT_FOUND" ) {
206
                            alert ( RESUME_HOLD_ERROR_NOT_FOUND );
208
                            alert( __("Unable to resume, hold not found") );
207
                            holdsTable.api().ajax.reload();
209
                            holdsTable.api().ajax.reload();
208
                        }
210
                        }
209
                      }
211
                      }
Lines 249-270 $(document).ready(function() { Link Here
249
            <form id='suspend-modal-form' class='form-inline'>\
251
            <form id='suspend-modal-form' class='form-inline'>\
250
                <div class='modal-header'>\
252
                <div class='modal-header'>\
251
                    <button type='button' class='closebtn' data-dismiss='modal' aria-hidden='true'>×</button>\
253
                    <button type='button' class='closebtn' data-dismiss='modal' aria-hidden='true'>×</button>\
252
                    <h3 id='suspend-modal-label'>" + SUSPEND_HOLD_ON + " <i><span id='suspend-modal-title'></span></i></h3>\
254
                    <h3 id='suspend-modal-label'>" + __("Suspend hold on") + " <i><span id='suspend-modal-title'></span></i></h3>\
253
                </div>\
255
                </div>\
254
\
256
\
255
                <div class='modal-body'>\
257
                <div class='modal-body'>\
256
                    <input type='hidden' id='suspend-modal-reserve_id' name='reserve_id' />\
258
                    <input type='hidden' id='suspend-modal-reserve_id' name='reserve_id' />\
257
\
259
\
258
                    <label for='suspend-modal-until'>" + SUSPEND_UNTIL + "</label>\
260
                    <label for='suspend-modal-until'>" + __("Suspend until:") + "</label>\
259
                    <input name='suspend_until' id='suspend-modal-until' class='suspend-until' size='10' />\
261
                    <input name='suspend_until' id='suspend-modal-until' class='suspend-until' size='10' />\
260
\
262
\
261
                    <p/><a class='btn btn-link' id='suspend-modal-clear-date' >" + CLEAR_DATE_TO_SUSPEND_INDEFINITELY + "</a></p>\
263
                    <p/><a class='btn btn-link' id='suspend-modal-clear-date' >" + __("Clear date to suspend indefinitely") + "</a></p>\
262
\
264
\
263
                </div>\
265
                </div>\
264
\
266
\
265
                <div class='modal-footer'>\
267
                <div class='modal-footer'>\
266
                    <button id='suspend-modal-submit' class='btn btn-primary' type='submit' name='submit'>" + SUSPEND + "</button>\
268
                    <button id='suspend-modal-submit' class='btn btn-primary' type='submit' name='submit'>" + __("Suspend") + "</button>\
267
                    <a href='#' data-dismiss='modal' aria-hidden='true' class='cancel'>" + CANCEL + "</a>\
269
                    <a href='#' data-dismiss='modal' aria-hidden='true' class='cancel'>" + __("Cancel") + "</a>\
268
                </div>\
270
                </div>\
269
            </form>\
271
            </form>\
270
            </div>\
272
            </div>\
Lines 283-292 $(document).ready(function() { Link Here
283
              holdsTable.api().ajax.reload();
285
              holdsTable.api().ajax.reload();
284
          } else {
286
          } else {
285
            if ( data.error == "INVALID_DATE" ) {
287
            if ( data.error == "INVALID_DATE" ) {
286
                alert( SUSPEND_HOLD_ERROR_DATE );
288
                alert( __("Unable to suspend hold, invalid date") );
287
            }
289
            }
288
            else if ( data.error == "HOLD_NOT_FOUND" ) {
290
            else if ( data.error == "HOLD_NOT_FOUND" ) {
289
                alert ( SUSPEND_HOLD_ERROR_NOT_FOUND );
291
                alert( __("Unable to suspend hold, hold not found") );
290
                holdsTable.api().ajax.reload();
292
                holdsTable.api().ajax.reload();
291
            }
293
            }
292
          }
294
          }
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/results.js (-2 / +1 lines)
Lines 249-255 function forgetPatronAndClub(){ Link Here
249
    $.removeCookie("holdfor", { path: '/' });
249
    $.removeCookie("holdfor", { path: '/' });
250
    $.removeCookie("holdforclub", { path: '/' });
250
    $.removeCookie("holdforclub", { path: '/' });
251
    $(".holdforlink").remove();
251
    $(".holdforlink").remove();
252
    $("#placeholdc").html("<a class=\"btn btn-default btn-xs placehold\" href=\"#\"><i class=\"fa fa-sticky-note-o\"></i> " + PLACE_HOLD + "</a>");
252
    $("#placeholdc").html("<a class=\"btn btn-default btn-xs placehold\" href=\"#\"><i class=\"fa fa-sticky-note-o\"></i> " + __("Place hold") + "</a>");
253
}
253
}
254
254
255
function browse_selection () {
255
function browse_selection () {
256
- 

Return to bug 25321