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

(-)a/catalogue/detail.pl (+10 lines)
Lines 45-50 use Koha::Items; Link Here
45
use Koha::ItemTypes;
45
use Koha::ItemTypes;
46
use Koha::Patrons;
46
use Koha::Patrons;
47
use Koha::Virtualshelves;
47
use Koha::Virtualshelves;
48
use Koha::Recalls;
48
49
49
my $query = CGI->new();
50
my $query = CGI->new();
50
51
Lines 333-338 foreach my $item (@items) { Link Here
333
        }
334
        }
334
    }
335
    }
335
336
337
    my $recall = Koha::Recalls->find({ itemnumber => $item->{itemnumber} });
338
    if (defined $recall){
339
        $item->{recalled} = 1;
340
        $item->{recall} = $recall;
341
    }
342
336
    if ($currentbranch and $currentbranch ne "NO_LIBRARY_SET"
343
    if ($currentbranch and $currentbranch ne "NO_LIBRARY_SET"
337
    and C4::Context->preference('SeparateHoldings')) {
344
    and C4::Context->preference('SeparateHoldings')) {
338
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
345
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
Lines 410-415 foreach ( keys %{$dat} ) { Link Here
410
    $template->param( "$_" => defined $dat->{$_} ? $dat->{$_} : '' );
417
    $template->param( "$_" => defined $dat->{$_} ? $dat->{$_} : '' );
411
}
418
}
412
419
420
my $recalls = Koha::Recalls->search({ biblionumber => $biblionumber });
421
413
# does not work: my %views_enabled = map { $_ => 1 } $template->query(loop => 'EnableViews');
422
# does not work: my %views_enabled = map { $_ => 1 } $template->query(loop => 'EnableViews');
414
# method query not found?!?!
423
# method query not found?!?!
415
$template->param( AmazonTld => get_amazon_tld() ) if ( C4::Context->preference("AmazonCoverImages"));
424
$template->param( AmazonTld => get_amazon_tld() ) if ( C4::Context->preference("AmazonCoverImages"));
Lines 419-424 $template->param( Link Here
419
    biblionumber        => $biblionumber,
428
    biblionumber        => $biblionumber,
420
    ($analyze? 'analyze':'detailview') =>1,
429
    ($analyze? 'analyze':'detailview') =>1,
421
    subscriptions       => \@subs,
430
    subscriptions       => \@subs,
431
    recalls             => $recalls,
422
    subscriptionsnumber => $subscriptionsnumber,
432
    subscriptionsnumber => $subscriptionsnumber,
423
    subscriptiontitle   => $dat->{title},
433
    subscriptiontitle   => $dat->{title},
424
    searchid            => scalar $query->param('searchid'),
434
    searchid            => scalar $query->param('searchid'),
(-)a/installer/data/mysql/atomicupdate/bug_19532_-_add_Recalls_syspref.sql (-1 / +1 lines)
Line 1 Link Here
1
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('UseRecalls','1',NULL,'Enable or disable recalls','YesNo');
1
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('UseRecalls','0',NULL,'Enable or disable recalls','YesNo');
(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 611-617 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
611
('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'),
611
('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'),
612
('UseKohaPlugins','0','','Enable or disable the ability to use Koha Plugins.','YesNo'),
612
('UseKohaPlugins','0','','Enable or disable the ability to use Koha Plugins.','YesNo'),
613
('UseQueryParser','0',NULL,'If enabled, try to use QueryParser for queries.','YesNo'),
613
('UseQueryParser','0',NULL,'If enabled, try to use QueryParser for queries.','YesNo'),
614
('UseRecalls', '1', NULL, 'Enable or disable recalls', 'YesNo'),
614
('UseRecalls', '0', NULL, 'Enable or disable recalls', 'YesNo'),
615
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
615
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
616
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
616
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
617
('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'),
617
('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/recalls-reports.inc (+18 lines)
Lines 6-15 Link Here
6
                <th class="nosort">&nbsp;</th>
6
                <th class="nosort">&nbsp;</th>
7
                <th class="recall-borrower anti-the">Requested by</th>
7
                <th class="recall-borrower anti-the">Requested by</th>
8
                <th class="recall-title anti-the">Title</th>
8
                <th class="recall-title anti-the">Title</th>
9
                <th class="recall-barcode">Barcode</th>
9
                <th class="recall-date psort title-string">Placed on</th>
10
                <th class="recall-date psort title-string">Placed on</th>
10
                <th class="recall-expiry title-string">Expires on</th>
11
                <th class="recall-expiry title-string">Expires on</th>
11
                <th class="recall-branch">Pickup location</th>
12
                <th class="recall-branch">Pickup location</th>
12
                <th class="recall-status">Status</th>
13
                <th class="recall-status">Status</th>
14
                <th class="recall-due-date title-string">Due date</th>
13
                <th class="recall-cancel nosort">Cancel</th>
15
                <th class="recall-cancel nosort">Cancel</th>
14
            </tr>
16
            </tr>
15
        </thead>
17
        </thead>
Lines 40-45 Link Here
40
                        [% recall.biblio.author %]
42
                        [% recall.biblio.author %]
41
                    </td>
43
                    </td>
42
44
45
                    <td class="recall-barcode">
46
                         <a class="recall-title" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% recall.biblionumber %]">
47
                         [% recall.item.barcode %]
48
                         </a>
49
                    </td>
50
43
                    <td class="recall-date">
51
                    <td class="recall-date">
44
                        [% recall.recalldate | $KohaDates %]
52
                        [% recall.recalldate | $KohaDates %]
45
                    </td>
53
                    </td>
Lines 76-81 Link Here
76
                        [% END %]
84
                        [% END %]
77
                    </td>
85
                    </td>
78
86
87
                    <td class="recall-due_date">
88
                        [% IF ( recall.is_requested ) %]
89
                            Due to be returned by [% recall.checkout.date_due | $KohaDates %]
90
                        [% ELSIF ( recall.is_waiting && recall.expirationdate ) %]
91
                            Pick up by [% recall.expirationdate | $KohaDates %]
92
                        [% ELSE %]
93
                            -
94
                        [% END %]
95
                    </td>
96
79
                    <td class="recall-cancel">
97
                    <td class="recall-cancel">
80
                        [% IF ( !recall.cancellationdate && ( recall.is_requested || recall.is_overdue ) ) %]
98
                        [% IF ( !recall.cancellationdate && ( recall.is_requested || recall.is_overdue ) ) %]
81
                            <a class="btn btn-xs btn-default" id="cancel_recall" data-id="[% recall.recall_id %]"><i class="fa fa-times"></i> Cancel</a>
99
                            <a class="btn btn-xs btn-default" id="cancel_recall" data-id="[% recall.recall_id %]"><i class="fa fa-times"></i> Cancel</a>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-1 / +12 lines)
Lines 324-329 Link Here
324
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
324
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
325
    <li class="NovelistSelect" style="display:none;"><a href="#NovelistSelect">NoveList Select</a></li>
325
    <li class="NovelistSelect" style="display:none;"><a href="#NovelistSelect">NoveList Select</a></li>
326
[% END %]
326
[% END %]
327
[% IF ( Koha.Preference('UseRecalls') && recalls.count ) %]<li><a href="#recalls">Recalls</a></li>[% END %]
327
</ul>
328
</ul>
328
329
329
[% items_table_block_iter = 0 %]
330
[% items_table_block_iter = 0 %]
Lines 467-473 Link Here
467
                                [% INCLUDE 'patron-title.inc' patron=item.ReservedFor hide_patron_infos_if_needed=1 %]
468
                                [% INCLUDE 'patron-title.inc' patron=item.ReservedFor hide_patron_infos_if_needed=1 %]
468
                            [% END %]
469
                            [% END %]
469
                        [% END %]
470
                        [% END %]
470
                        [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || item.reservedate ) %]
471
                        [% IF ( item.recalled ) %]
472
                            Item recalled (placed [% item.recall.recalldate | $KohaDates %]) by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.recall.borrowernumber %]">[% item.recall.patron.firstname %] [% item.recall.patron.surname %] ([% item.recall.patron.cardnumber %])</a>
473
                            [% END %]
474
                            [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || item.reservedate || item.recalled ) %]
471
                            Available
475
                            Available
472
                        [% END %]
476
                        [% END %]
473
477
Lines 844-849 Link Here
844
    </div>
848
    </div>
845
[% END %]
849
[% END %]
846
850
851
[% IF ( Koha.Preference('UseRecalls') && recalls.count ) %]
852
    <div id="recalls">
853
        [% INCLUDE 'recalls-reports.inc' %]
854
    </div>
855
[% END %]
856
847
</div><!-- /bibliodetails -->
857
</div><!-- /bibliodetails -->
848
858
849
<div class="yui-g" id="export" style="margin-top: 1em;">
859
<div class="yui-g" id="export" style="margin-top: 1em;">
Lines 893-898 Link Here
893
[% MACRO jsinclude BLOCK %]
903
[% MACRO jsinclude BLOCK %]
894
    [% INCLUDE 'catalog-strings.inc' %]
904
    [% INCLUDE 'catalog-strings.inc' %]
895
    [% Asset.js("js/catalog.js") | $raw %]
905
    [% Asset.js("js/catalog.js") | $raw %]
906
    [% Asset.js("js/recalls.js") | $raw %]
896
    [% INCLUDE 'greybox.inc' %]
907
    [% INCLUDE 'greybox.inc' %]
897
    <script type="text/javascript">
908
    <script type="text/javascript">
898
        // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
909
        // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-1 / +1 lines)
Lines 820-826 No patron matched <span class="ex">[% message | html %]</span> Link Here
820
    </li>
820
    </li>
821
821
822
    [% IF Koha.Preference('UseRecalls') && recalls.count %]
822
    [% IF Koha.Preference('UseRecalls') && recalls.count %]
823
        <li><a href="#recalls" id+"recalls-tab">[% recalls.count %] Recall(s)</a></li>
823
        <li><a href="#recalls" id="recalls-tab">[% recalls.count %] Recall(s)</a></li>
824
    [% END %]
824
    [% END %]
825
825
826
    [% IF Koha.Preference('ArticleRequests') %]
826
    [% IF Koha.Preference('ArticleRequests') %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recall.tt (-1 / +2 lines)
Lines 1-4 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE KohaDates %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Recall</title>
4
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Recall</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
Lines 38-44 Link Here
38
                    [% END %]
39
                    [% END %]
39
40
40
                    [% IF success %]
41
                    [% IF success %]
41
                        <p>Your recall has been placed. The user the item is currently checked out to has been asked to return the item within [% due_interval %] [% due_unit %].</p>
42
                        <p>Your recall has been placed. The user the item is currently checked out to has been asked to return the item within [% due_interval %] [% due_unit %], on [% due_date | $KohaDates %].</p>
42
                        <p>You will be notified when your item is waiting to be picked up at the library.</p>
43
                        <p>You will be notified when your item is waiting to be picked up at the library.</p>
43
                    [% ELSIF not error %]
44
                    [% ELSIF not error %]
44
                        <p>All borrowable material is subject to recall if checked out and needed by someone else. We will ask the person who has checked out this item to return it so you may use it.</p>
45
                        <p>All borrowable material is subject to recall if checked out and needed by someone else. We will ask the person who has checked out this item to return it so you may use it.</p>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt (-1 / +13 lines)
Lines 38-43 Link Here
38
                                        <th class="title-string">Expires on</th>
38
                                        <th class="title-string">Expires on</th>
39
                                        <th>Pickup location</th>
39
                                        <th>Pickup location</th>
40
                                        <th>Status</th>
40
                                        <th>Status</th>
41
                                        <th>Due date</th>
41
                                        <th class="nosort">Cancel</th>
42
                                        <th class="nosort">Cancel</th>
42
                                    </tr>
43
                                    </tr>
43
                                </thead>
44
                                </thead>
Lines 73-79 Link Here
73
                                                            Never expires
74
                                                            Never expires
74
                                                        </span>
75
                                                        </span>
75
                                                    [% END %]
76
                                                    [% END %]
76
                                                [% ELSIF ( RECALL.has_expired && RECALL.expirationdate ) %]
77
                                                [% ELSIF ( RECALL.expirationdate ) %]
77
                                                    <span title="[% RECALL.expirationdate %]" class="overdue">
78
                                                    <span title="[% RECALL.expirationdate %]" class="overdue">
78
                                                        <span class="tdlabel">Expiration:</span>
79
                                                        <span class="tdlabel">Expiration:</span>
79
                                                        [% RECALL.expirationdate | $KohaDates %]
80
                                                        [% RECALL.expirationdate | $KohaDates %]
Lines 98-103 Link Here
98
                                                    Cancelled
99
                                                    Cancelled
99
                                                [% END %]
100
                                                [% END %]
100
                                            </td>
101
                                            </td>
102
                                            <td class="due_date">
103
                                                <span class="tdlabel">Due date</span>
104
                                                [% IF ( RECALL.is_requested ) %]
105
                                                    Due to be returned by [% RECALL.checkout.date_due | $KohaDates %]
106
                                                [% ELSIF ( RECALL.is_waiting && RECALL.expirationdate ) %]
107
                                                    Pick up by [% RECALL.expirationdate | $KohaDates %]
108
                                                [% ELSE %]
109
                                                    -
110
                                                [% END %]
111
                                            </td>
112
101
                                            <td class="cancelrecall">
113
                                            <td class="cancelrecall">
102
                                                [% IF ( !RECALL.cancellationdate && ( RECALL.is_requested || RECALL.is_overdue ) ) %]
114
                                                [% IF ( !RECALL.cancellationdate && ( RECALL.is_requested || RECALL.is_overdue ) ) %]
103
                                                    <form action="/cgi-bin/koha/opac-recall.pl" method="post">
115
                                                    <form action="/cgi-bin/koha/opac-recall.pl" method="post">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-1 / +1 lines)
Lines 868-874 Link Here
868
                                            [% END %]
868
                                            [% END %]
869
                                        </tr>
869
                                        </tr>
870
                                    </tbody>
870
                                    </tbody>
871
                                <table>
871
                                </table>
872
                            </div>
872
                            </div>
873
                        [% END # / # RECALLS.count %]
873
                        [% END # / # RECALLS.count %]
874
874
(-)a/opac/opac-recall.pl (-2 / +2 lines)
Lines 95-101 if ($op eq 'request'){ Link Here
95
            $template->param(
95
            $template->param(
96
                success => 1,
96
                success => 1,
97
                due_interval => $issuing_rule->recall_due_date_interval,
97
                due_interval => $issuing_rule->recall_due_date_interval,
98
                due_unit => $issuing_rule->lengthunit
98
                due_unit => $issuing_rule->lengthunit,
99
                due_date => $checkout->date_due
99
            );
100
            );
100
        } else {
101
        } else {
101
            $error = 'failed';
102
            $error = 'failed';
102
- 

Return to bug 19532