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

(-)a/catalogue/detail.pl (+10 lines)
Lines 46-51 use Koha::Items; Link Here
46
use Koha::ItemTypes;
46
use Koha::ItemTypes;
47
use Koha::Patrons;
47
use Koha::Patrons;
48
use Koha::Virtualshelves;
48
use Koha::Virtualshelves;
49
use Koha::Recalls;
49
50
50
my $query = CGI->new();
51
my $query = CGI->new();
51
52
Lines 324-329 foreach my $item (@items) { Link Here
324
        }
325
        }
325
    }
326
    }
326
327
328
    my $recall = Koha::Recalls->find({ itemnumber => $item->{itemnumber} });
329
    if (defined $recall){
330
        $item->{recalled} = 1;
331
        $item->{recall} = $recall;
332
    }
333
327
    if ($currentbranch and $currentbranch ne "NO_LIBRARY_SET"
334
    if ($currentbranch and $currentbranch ne "NO_LIBRARY_SET"
328
    and C4::Context->preference('SeparateHoldings')) {
335
    and C4::Context->preference('SeparateHoldings')) {
329
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
336
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
Lines 401-406 foreach ( keys %{$dat} ) { Link Here
401
    $template->param( "$_" => defined $dat->{$_} ? $dat->{$_} : '' );
408
    $template->param( "$_" => defined $dat->{$_} ? $dat->{$_} : '' );
402
}
409
}
403
410
411
my $recalls = Koha::Recalls->search({ biblionumber => $biblionumber });
412
404
# does not work: my %views_enabled = map { $_ => 1 } $template->query(loop => 'EnableViews');
413
# does not work: my %views_enabled = map { $_ => 1 } $template->query(loop => 'EnableViews');
405
# method query not found?!?!
414
# method query not found?!?!
406
$template->param( AmazonTld => get_amazon_tld() ) if ( C4::Context->preference("AmazonCoverImages"));
415
$template->param( AmazonTld => get_amazon_tld() ) if ( C4::Context->preference("AmazonCoverImages"));
Lines 410-415 $template->param( Link Here
410
    biblionumber        => $biblionumber,
419
    biblionumber        => $biblionumber,
411
    ($analyze? 'analyze':'detailview') =>1,
420
    ($analyze? 'analyze':'detailview') =>1,
412
    subscriptions       => \@subs,
421
    subscriptions       => \@subs,
422
    recalls             => $recalls,
413
    subscriptionsnumber => $subscriptionsnumber,
423
    subscriptionsnumber => $subscriptionsnumber,
414
    subscriptiontitle   => $dat->{title},
424
    subscriptiontitle   => $dat->{title},
415
    searchid            => scalar $query->param('searchid'),
425
    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 585-591 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
585
('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'),
585
('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'),
586
('UseKohaPlugins','0','','Enable or disable the ability to use Koha Plugins.','YesNo'),
586
('UseKohaPlugins','0','','Enable or disable the ability to use Koha Plugins.','YesNo'),
587
('UseQueryParser','0',NULL,'If enabled, try to use QueryParser for queries.','YesNo'),
587
('UseQueryParser','0',NULL,'If enabled, try to use QueryParser for queries.','YesNo'),
588
('UseRecalls', '1', NULL, 'Enable or disable recalls', 'YesNo'),
588
('UseRecalls', '0', NULL, 'Enable or disable recalls', 'YesNo'),
589
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
589
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
590
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
590
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
591
('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'),
591
('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 (-2 / +14 lines)
Lines 305-310 Link Here
305
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
305
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
306
    <li class="NovelistSelect" style="display:none;"><a href="#NovelistSelect">NoveList Select</a></li>
306
    <li class="NovelistSelect" style="display:none;"><a href="#NovelistSelect">NoveList Select</a></li>
307
[% END %]
307
[% END %]
308
[% IF ( Koha.Preference('UseRecalls') && recalls.count ) %]<li><a href="#recalls">Recalls</a></li>[% END %]
308
</ul>
309
</ul>
309
310
310
[% items_table_block_iter = 0 %]
311
[% items_table_block_iter = 0 %]
Lines 449-455 Link Here
449
                                </a>
450
                                </a>
450
                            [% END %]
451
                            [% END %]
451
                        [% END %]
452
                        [% END %]
452
                        [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || item.reservedate ) %]
453
454
                        [% IF ( item.recalled ) %]
455
                            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>
456
                        [% END %]
457
458
                        [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || item.reservedate || item.recalled ) %]
453
                            Available
459
                            Available
454
                        [% END %]
460
                        [% END %]
455
461
Lines 793-805 Link Here
793
</div>
799
</div>
794
[% END %]
800
[% END %]
795
801
796
797
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
802
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
798
    <div id="NovelistSelect" class="novelistSelect">
803
    <div id="NovelistSelect" class="novelistSelect">
799
        <div data-novelist-novelistselect=[% normalized_isbn %]></div>
804
        <div data-novelist-novelistselect=[% normalized_isbn %]></div>
800
    </div>
805
    </div>
801
[% END %]
806
[% END %]
802
807
808
[% IF ( Koha.Preference('UseRecalls') && recalls.count ) %]
809
    <div id="recalls">
810
       [% INCLUDE 'recalls-reports.inc' %]
811
    </div>
812
[% END %]
813
803
</div><!-- /bibliodetails -->
814
</div><!-- /bibliodetails -->
804
815
805
<div class="yui-g" id="export" style="margin-top: 1em;">
816
<div class="yui-g" id="export" style="margin-top: 1em;">
Lines 848-853 Link Here
848
859
849
[% MACRO jsinclude BLOCK %]
860
[% MACRO jsinclude BLOCK %]
850
    [% INCLUDE 'catalog-strings.inc' %]
861
    [% INCLUDE 'catalog-strings.inc' %]
862
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/recalls.js"></script>
851
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/catalog.js"></script>
863
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/catalog.js"></script>
852
    [% INCLUDE 'greybox.inc' %]
864
    [% INCLUDE 'greybox.inc' %]
853
    <script type="text/javascript">
865
    <script type="text/javascript">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-1 / +1 lines)
Lines 945-951 No patron matched <span class="ex">[% message | html %]</span> Link Here
945
    </li>
945
    </li>
946
946
947
    [% IF Koha.Preference('UseRecalls') && recalls.count %]
947
    [% IF Koha.Preference('UseRecalls') && recalls.count %]
948
        <li><a href="#recalls" id+"recalls-tab">[% recalls.count %] Recall(s)</a></li>
948
        <li><a href="#recalls" id="recalls-tab">[% recalls.count %] Recall(s)</a></li>
949
    [% END %]
949
    [% END %]
950
950
951
    [% IF Koha.Preference('ArticleRequests') %]
951
    [% 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 40-46 Link Here
40
                    [% END %]
41
                    [% END %]
41
42
42
                    [% IF success %]
43
                    [% IF success %]
43
                        <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>
44
                        <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>
44
                        <p>You will be notified when your item is waiting to be picked up at the library.</p>
45
                        <p>You will be notified when your item is waiting to be picked up at the library.</p>
45
                    [% ELSIF not error %]
46
                    [% ELSIF not error %]
46
                        <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>
47
                        <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 / +12 lines)
Lines 39-44 Link Here
39
                                        <th class="title-string">Expires on</th>
39
                                        <th class="title-string">Expires on</th>
40
                                        <th>Pickup location</th>
40
                                        <th>Pickup location</th>
41
                                        <th>Status</th>
41
                                        <th>Status</th>
42
                                        <th>Due date</th>
42
                                        <th class="nosort">Cancel</th>
43
                                        <th class="nosort">Cancel</th>
43
                                    </tr>
44
                                    </tr>
44
                                </thead>
45
                                </thead>
Lines 74-80 Link Here
74
                                                            Never expires
75
                                                            Never expires
75
                                                        </span>
76
                                                        </span>
76
                                                    [% END %]
77
                                                    [% END %]
77
                                                [% ELSIF ( RECALL.has_expired && RECALL.expirationdate ) %]
78
                                                [% ELSIF ( RECALL.expirationdate ) %]
78
                                                    <span title="[% RECALL.expirationdate %]" class="overdue">
79
                                                    <span title="[% RECALL.expirationdate %]" class="overdue">
79
                                                        <span class="tdlabel">Expiration:</span>
80
                                                        <span class="tdlabel">Expiration:</span>
80
                                                        [% RECALL.expirationdate | $KohaDates %]
81
                                                        [% RECALL.expirationdate | $KohaDates %]
Lines 99-104 Link Here
99
                                                    Cancelled
100
                                                    Cancelled
100
                                                [% END %]
101
                                                [% END %]
101
                                            </td>
102
                                            </td>
103
                                            <td class="due_date">
104
                                                <span class="tdlabel">Due date</span>
105
                                                [% IF ( RECALL.is_requested ) %]
106
                                                    Due to be returned by [% RECALL.checkout.date_due | $KohaDates %]
107
                                                [% ELSIF ( RECALL.is_waiting && RECALL.expirationdate ) %]
108
                                                    Pick up by [% RECALL.expirationdate | $KohaDates %]
109
                                                [% ELSE %]
110
                                                    -
111
                                                [% END %]
112
                                            </td>
102
                                            <td class="cancelrecall">
113
                                            <td class="cancelrecall">
103
                                                [% IF ( !RECALL.cancellationdate && ( RECALL.is_requested || RECALL.is_overdue ) ) %]
114
                                                [% IF ( !RECALL.cancellationdate && ( RECALL.is_requested || RECALL.is_overdue ) ) %]
104
                                                    <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 858-864 Using this account is not recommended because some parts of Koha will not functi Link Here
858
                                            [% END %]
858
                                            [% END %]
859
                                        </tr>
859
                                        </tr>
860
                                    </tbody>
860
                                    </tbody>
861
                                <table>
861
                                </table>
862
                            </div>
862
                            </div>
863
                        [% END # / # RECALLS.count %]
863
                        [% END # / # RECALLS.count %]
864
864
(-)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