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 319-324 foreach my $item (@items) { Link Here
319
        }
320
        }
320
    }
321
    }
321
322
323
    my $recall = Koha::Recalls->find({ itemnumber => $item->{itemnumber} });
324
    if (defined $recall){
325
        $item->{recalled} = 1;
326
        $item->{recall} = $recall;
327
    }
328
322
    if ($currentbranch and $currentbranch ne "NO_LIBRARY_SET"
329
    if ($currentbranch and $currentbranch ne "NO_LIBRARY_SET"
323
    and C4::Context->preference('SeparateHoldings')) {
330
    and C4::Context->preference('SeparateHoldings')) {
324
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
331
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
Lines 396-401 foreach ( keys %{$dat} ) { Link Here
396
    $template->param( "$_" => defined $dat->{$_} ? $dat->{$_} : '' );
403
    $template->param( "$_" => defined $dat->{$_} ? $dat->{$_} : '' );
397
}
404
}
398
405
406
my $recalls = Koha::Recalls->search({ biblionumber => $biblionumber });
407
399
# does not work: my %views_enabled = map { $_ => 1 } $template->query(loop => 'EnableViews');
408
# does not work: my %views_enabled = map { $_ => 1 } $template->query(loop => 'EnableViews');
400
# method query not found?!?!
409
# method query not found?!?!
401
$template->param( AmazonTld => get_amazon_tld() ) if ( C4::Context->preference("AmazonCoverImages"));
410
$template->param( AmazonTld => get_amazon_tld() ) if ( C4::Context->preference("AmazonCoverImages"));
Lines 405-410 $template->param( Link Here
405
    biblionumber        => $biblionumber,
414
    biblionumber        => $biblionumber,
406
    ($analyze? 'analyze':'detailview') =>1,
415
    ($analyze? 'analyze':'detailview') =>1,
407
    subscriptions       => \@subs,
416
    subscriptions       => \@subs,
417
    recalls             => $recalls,
408
    subscriptionsnumber => $subscriptionsnumber,
418
    subscriptionsnumber => $subscriptionsnumber,
409
    subscriptiontitle   => $dat->{title},
419
    subscriptiontitle   => $dat->{title},
410
    searchid            => scalar $query->param('searchid'),
420
    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 586-592 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
586
('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'),
586
('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'),
587
('UseKohaPlugins','0','','Enable or disable the ability to use Koha Plugins.','YesNo'),
587
('UseKohaPlugins','0','','Enable or disable the ability to use Koha Plugins.','YesNo'),
588
('UseQueryParser','0',NULL,'If enabled, try to use QueryParser for queries.','YesNo'),
588
('UseQueryParser','0',NULL,'If enabled, try to use QueryParser for queries.','YesNo'),
589
('UseRecalls', '1', NULL, 'Enable or disable recalls', 'YesNo'),
589
('UseRecalls', '0', NULL, 'Enable or disable recalls', 'YesNo'),
590
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
590
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
591
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
591
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
592
('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'),
592
('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 439-445 Link Here
439
                                [% INCLUDE 'patron-title.inc' patron=item.ReservedFor hide_patron_infos_if_needed=1 %]
440
                                [% INCLUDE 'patron-title.inc' patron=item.ReservedFor hide_patron_infos_if_needed=1 %]
440
                            [% END %]
441
                            [% END %]
441
                        [% END %]
442
                        [% END %]
442
                        [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || item.reservedate ) %]
443
444
                        [% IF ( item.recalled ) %]
445
                            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>
446
                        [% END %]
447
448
                        [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || item.reservedate || item.recalled ) %]
443
                            Available
449
                            Available
444
                        [% END %]
450
                        [% END %]
445
451
Lines 783-795 Link Here
783
</div>
789
</div>
784
[% END %]
790
[% END %]
785
791
786
787
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
792
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
788
    <div id="NovelistSelect" class="novelistSelect">
793
    <div id="NovelistSelect" class="novelistSelect">
789
        <div data-novelist-novelistselect=[% normalized_isbn %]></div>
794
        <div data-novelist-novelistselect=[% normalized_isbn %]></div>
790
    </div>
795
    </div>
791
[% END %]
796
[% END %]
792
797
798
[% IF ( Koha.Preference('UseRecalls') && recalls.count ) %]
799
    <div id="recalls">
800
       [% INCLUDE 'recalls-reports.inc' %]
801
    </div>
802
[% END %]
803
793
</div><!-- /bibliodetails -->
804
</div><!-- /bibliodetails -->
794
805
795
<div class="yui-g" id="export" style="margin-top: 1em;">
806
<div class="yui-g" id="export" style="margin-top: 1em;">
Lines 839-844 Link Here
839
[% MACRO jsinclude BLOCK %]
850
[% MACRO jsinclude BLOCK %]
840
    [% INCLUDE 'catalog-strings.inc' %]
851
    [% INCLUDE 'catalog-strings.inc' %]
841
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/catalog_[% KOHA_VERSION %].js"></script>
852
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/catalog_[% KOHA_VERSION %].js"></script>
853
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/recalls_[% KOHA_VERSION %].js"></script>
842
    [% INCLUDE 'greybox.inc' %]
854
    [% INCLUDE 'greybox.inc' %]
843
    <script type="text/javascript">
855
    <script type="text/javascript">
844
        // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
856
        // 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 949-955 No patron matched <span class="ex">[% message | html %]</span> Link Here
949
    </li>
949
    </li>
950
950
951
    [% IF Koha.Preference('UseRecalls') && recalls.count %]
951
    [% IF Koha.Preference('UseRecalls') && recalls.count %]
952
        <li><a href="#recalls" id+"recalls-tab">[% recalls.count %] Recall(s)</a></li>
952
        <li><a href="#recalls" id="recalls-tab">[% recalls.count %] Recall(s)</a></li>
953
    [% END %]
953
    [% END %]
954
954
955
    [% IF Koha.Preference('ArticleRequests') %]
955
    [% 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