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

(-)a/installer/data/mysql/atomicupdate/bug_30650.pl (-1 / +1 lines)
Lines 158-164 return { Link Here
158
        }
158
        }
159
        $dbh->do(
159
        $dbh->do(
160
            q{
160
            q{
161
                INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES ('reserves','NEW_CURBSIDE_PICKUP','',0,"You have schedule a curbside pickup for [% branch.branchname %]","[%- USE KohaDates -%]\n[%- SET cp = curbside_pickup -%]\n\nYou have a curbside pickup scheduled for [% cp.scheduled_pickup_datetime | $KohaDates with_hours => 1 %] at [% cp.library.branchname %].\n\nAny holds waiting for you at the pickup time will be included in this pickup. At this time, that list includes:\n[%- FOREACH h IN cp.patron.holds %]\n    [%- IF h.branchcode == cp.branchcode && h.found == 'W' %]\n* [% h.biblio.title %], [% h.biblio.author %] ([% h.item.barcode %])\n    [%- END %]\n[%- END %]\n\nOnce you have arrived, please call your library or log into your account and click the \"Alert staff of your arrival\" button to let them know you are there.",'email','default');
161
                INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES ('reserves','NEW_CURBSIDE_PICKUP','',0,"You have scheduled a curbside pickup for [% branch.branchname %]","[%- USE KohaDates -%]\n[%- SET cp = curbside_pickup -%]\n\nYou have a curbside pickup scheduled for [% cp.scheduled_pickup_datetime | $KohaDates with_hours => 1 %] at [% cp.library.branchname %].\n\nAny holds waiting for you at the pickup time will be included in this pickup. At this time, that list includes:\n[%- FOREACH h IN cp.patron.holds %]\n    [%- IF h.branchcode == cp.branchcode && h.found == 'W' %]\n* [% h.biblio.title %], [% h.biblio.author %] ([% h.item.barcode %])\n    [%- END %]\n[%- END %]\n\nOnce you have arrived, please call your library or log into your account and click the \"Alert staff of your arrival\" button to let them know you are there.",'email','default');
162
            }
162
            }
163
        );
163
        );
164
164
(-)a/installer/data/mysql/en/mandatory/sample_notices.yml (-1 / +1 lines)
Lines 1322-1328 tables: Link Here
1322
          branchcode: ""
1322
          branchcode: ""
1323
          name: "Curbside pickups"
1323
          name: "Curbside pickups"
1324
          is_html: 0
1324
          is_html: 0
1325
          title: "You have schedule a curbside pickup for [% branch.branchname %]."
1325
          title: "You have scheduled a curbside pickup for [% branch.branchname %]"
1326
          message_transport_type: email
1326
          message_transport_type: email
1327
          lang: default
1327
          lang: default
1328
          content:
1328
          content:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt (-1 / +1 lines)
Lines 85-91 Link Here
85
                    </li>
85
                    </li>
86
                    [% IF ( Koha.Preference('CurbsidePickup') && CAN_user_circulate_manage_curbside_pickups ) %]
86
                    [% IF ( Koha.Preference('CurbsidePickup') && CAN_user_circulate_manage_curbside_pickups ) %]
87
                    <li>
87
                    <li>
88
                        <a class="circ-button" href="/cgi-bin/koha/circ/curbside_pickups.pl"><i class="fa fa-refresh"></i> Curbside Pickups</a>
88
                        <a class="circ-button" href="/cgi-bin/koha/circ/curbside_pickups.pl"><i class="fa fa-refresh"></i> Curbside pickups</a>
89
                    </li>
89
                    </li>
90
                    [% END %]
90
                    [% END %]
91
                    <li>
91
                    <li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/curbside_pickups.tt (-9 / +9 lines)
Lines 60-66 Link Here
60
60
61
                [% UNLESS policy.enabled %]
61
                [% UNLESS policy.enabled %]
62
                    <div class="dialog alert">
62
                    <div class="dialog alert">
63
                        Curbside pickups are not enabled for your location.
63
                        Curbside pickups are not enabled for your library.
64
                    </div>
64
                    </div>
65
                    [% INCLUDE 'intranet-bottom.inc' %]
65
                    [% INCLUDE 'intranet-bottom.inc' %]
66
                    [% STOP %]
66
                    [% STOP %]
Lines 72-78 Link Here
72
                        [% CASE 'not_enabled' %]
72
                        [% CASE 'not_enabled' %]
73
                            <span>The curbside pickup feature is not enabled for this library.</span>
73
                            <span>The curbside pickup feature is not enabled for this library.</span>
74
                        [% CASE 'library_is_closed' %]
74
                        [% CASE 'library_is_closed' %]
75
                            <span>Cannot create a curbside pickup for this day, it is an holiday.</span>
75
                            <span>Cannot create a curbside pickup for this day, it is a holiday.</span>
76
                        [% CASE 'no_waiting_holds' %]
76
                        [% CASE 'no_waiting_holds' %]
77
                            <span>This patron does not have waiting holds.</span>
77
                            <span>This patron does not have waiting holds.</span>
78
                        [% CASE 'too_many_pickups' %]
78
                        [% CASE 'too_many_pickups' %]
Lines 150-156 Link Here
150
                                <table class="table table-striped">
150
                                <table class="table table-striped">
151
                                    <thead>
151
                                    <thead>
152
                                        <tr>
152
                                        <tr>
153
                                            <th>Pickup Date/Time</th>
153
                                            <th>Pickup date/time</th>
154
                                            <th>Patron</th>
154
                                            <th>Patron</th>
155
                                            <th>Items for pickup</th>
155
                                            <th>Items for pickup</th>
156
                                            <th>Action</th>
156
                                            <th>Action</th>
Lines 219-225 Link Here
219
                                <table class="table table-striped">
219
                                <table class="table table-striped">
220
                                    <thead>
220
                                    <thead>
221
                                        <tr>
221
                                        <tr>
222
                                            <th>Pickup Date/Time</th>
222
                                            <th>Pickup date/time</th>
223
                                            <th>Patron</th>
223
                                            <th>Patron</th>
224
                                            <th>Items for pickup</th>
224
                                            <th>Items for pickup</th>
225
                                            <th>Staged by</th>
225
                                            <th>Staged by</th>
Lines 301-307 Link Here
301
                                <table class="table table-striped">
301
                                <table class="table table-striped">
302
                                    <thead>
302
                                    <thead>
303
                                        <tr>
303
                                        <tr>
304
                                            <th>Pickup Date/Time</th>
304
                                            <th>Pickup date/time</th>
305
                                            <th>Patron</th>
305
                                            <th>Patron</th>
306
                                            <th>Items for pickup</th>
306
                                            <th>Items for pickup</th>
307
                                            <th>Staged by</th>
307
                                            <th>Staged by</th>
Lines 383-389 Link Here
383
                                <table class="table table-striped">
383
                                <table class="table table-striped">
384
                                    <thead>
384
                                    <thead>
385
                                        <tr>
385
                                        <tr>
386
                                            <th>Deliver Date/Time</th>
386
                                            <th>Deliver date/time</th>
387
                                            <th>Patron</th>
387
                                            <th>Patron</th>
388
                                            <th>Items checked out</th>
388
                                            <th>Items checked out</th>
389
                                        </tr>
389
                                        </tr>
Lines 466-472 Link Here
466
                                                            </p>
466
                                                            </p>
467
                                                        [% END %]
467
                                                        [% END %]
468
                                                    [% ELSE %]
468
                                                    [% ELSE %]
469
                                                        <span>There is no waiting holds for this patron at this location.</span>
469
                                                        <span>There are no waiting holds for this patron at this location.</span>
470
                                                    [% END %]
470
                                                    [% END %]
471
                                                </span>
471
                                                </span>
472
                                            </li>
472
                                            </li>
Lines 546-559 Link Here
546
                let available_count = 0;
546
                let available_count = 0;
547
                let dow = selectedDate.day(); // Sunday is 0 (at least for now)
547
                let dow = selectedDate.day(); // Sunday is 0 (at least for now)
548
                if (!slots_per_day[dow]){
548
                if (!slots_per_day[dow]){
549
                    $('#pickup-times').html("<div>"+_("No pickup time define for this day.")+"</div>");
549
                    $('#pickup-times').html("<div>"+_("No pickup time defined for this day.")+"</div>");
550
                    return;
550
                    return;
551
                }
551
                }
552
552
553
                slots_per_day[dow].forEach(function(slot){
553
                slots_per_day[dow].forEach(function(slot){
554
                    let pickup_interval = policy.pickup_interval;
554
                    let pickup_interval = policy.pickup_interval;
555
                    if (!pickup_interval) {
555
                    if (!pickup_interval) {
556
                        $('#pickup-times').html("<div>"+_("No pickup time define for this day.")+"</div>");
556
                        $('#pickup-times').html("<div>"+_("No pickup time defined for this day.")+"</div>");
557
                        return;
557
                        return;
558
                    }
558
                    }
559
559
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (-1 / +1 lines)
Lines 243-249 Link Here
243
243
244
                                [% IF new_curbside_pickups.count %]
244
                                [% IF new_curbside_pickups.count %]
245
                                    <div class="pending-info" id="new_curbside_pickups">
245
                                    <div class="pending-info" id="new_curbside_pickups">
246
                                        <a href="/cgi-bin/koha/circ/curbside_pickups.pl">New curbside pickups </a>
246
                                        <a href="/cgi-bin/koha/circ/curbside_pickups.pl">New curbside pickups</a>:
247
                                        <span class="pending-number-link">[% new_curbside_pickups.count | html %]</span>
247
                                        <span class="pending-number-link">[% new_curbside_pickups.count | html %]</span>
248
                                    </div>
248
                                    </div>
249
                                [% END %]
249
                                [% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt (-4 / +4 lines)
Lines 68-74 Link Here
68
                            [% CASE 'not_enabled' %]
68
                            [% CASE 'not_enabled' %]
69
                                <span>The curbside pickup feature is not enabled for this library.</span>
69
                                <span>The curbside pickup feature is not enabled for this library.</span>
70
                            [% CASE 'library_is_closed' %]
70
                            [% CASE 'library_is_closed' %]
71
                                <span>Cannot create a curbside pickup for this day, it is an holiday.</span>
71
                                <span>Cannot create a curbside pickup for this day, it is a holiday.</span>
72
                            [% CASE 'no_waiting_holds' %]
72
                            [% CASE 'no_waiting_holds' %]
73
                                <span>This patron does not have waiting holds.</span>
73
                                <span>This patron does not have waiting holds.</span>
74
                            [% CASE 'too_many_pickups' %]
74
                            [% CASE 'too_many_pickups' %]
Lines 268-274 Link Here
268
        $("#pickup-branch option").each(function(){
268
        $("#pickup-branch option").each(function(){
269
            if ( $(this).val() != "" && !policies[$(this).val()].enabled ) {
269
            if ( $(this).val() != "" && !policies[$(this).val()].enabled ) {
270
                $(this).prop("disabled", "disabled");
270
                $(this).prop("disabled", "disabled");
271
                $(this).attr("title", _("You don't have waiting holds at this location"));
271
                $(this).attr("title", _("You don't have waiting holds at this library"));
272
            }
272
            }
273
        });
273
        });
274
274
Lines 306-319 Link Here
306
            let available_count = 0;
306
            let available_count = 0;
307
            let dow = selectedDate.day(); // Sunday is 0 (at least for now)
307
            let dow = selectedDate.day(); // Sunday is 0 (at least for now)
308
            if (!policy.slots_per_day[dow]){
308
            if (!policy.slots_per_day[dow]){
309
                $('#pickup-times').html("<div>"+_("No pickup time define for this day.")+"</div>");
309
                $('#pickup-times').html("<div>"+_("No pickup time defined for this day.")+"</div>");
310
                return;
310
                return;
311
            }
311
            }
312
312
313
            policy.slots_per_day[dow].forEach(function(slot){
313
            policy.slots_per_day[dow].forEach(function(slot){
314
                let pickup_interval = policy.pickup_interval;
314
                let pickup_interval = policy.pickup_interval;
315
                if (!pickup_interval) {
315
                if (!pickup_interval) {
316
                    $('#pickup-times').html("<div>"+_("No pickup time define for this day.")+"</div>");
316
                    $('#pickup-times').html("<div>"+_("No pickup time defined for this day.")+"</div>");
317
                    return;
317
                    return;
318
                }
318
                }
319
319
(-)a/t/db_dependent/Koha/CurbsidePickups.t (-2 / +1 lines)
Lines 296-302 subtest 'notify_new_pickup' => sub { Link Here
296
        { borrowernumber => $patron->borrowernumber } );
296
        { borrowernumber => $patron->borrowernumber } );
297
    is(
297
    is(
298
        $messages->[0]->{subject},
298
        $messages->[0]->{subject},
299
        sprintf ("You have schedule a curbside pickup for %s.", $library->branchname),
299
        sprintf ("You have scheduled a curbside pickup for %s", $library->branchname),
300
        "Notice correctly generated"
300
        "Notice correctly generated"
301
    );
301
    );
302
    my $biblio_title = $item->biblio->title;
302
    my $biblio_title = $item->biblio->title;
303
- 

Return to bug 30650