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 602-608 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
602
('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'),
602
('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'),
603
('UseKohaPlugins','0','','Enable or disable the ability to use Koha Plugins.','YesNo'),
603
('UseKohaPlugins','0','','Enable or disable the ability to use Koha Plugins.','YesNo'),
604
('UseQueryParser','0',NULL,'If enabled, try to use QueryParser for queries.','YesNo'),
604
('UseQueryParser','0',NULL,'If enabled, try to use QueryParser for queries.','YesNo'),
605
('UseRecalls', '1', NULL, 'Enable or disable recalls', 'YesNo'),
605
('UseRecalls', '0', NULL, 'Enable or disable recalls', 'YesNo'),
606
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
606
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
607
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
607
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
608
('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'),
608
('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 323-328 Link Here
323
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
323
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
324
    <li class="NovelistSelect" style="display:none;"><a href="#NovelistSelect">NoveList Select</a></li>
324
    <li class="NovelistSelect" style="display:none;"><a href="#NovelistSelect">NoveList Select</a></li>
325
[% END %]
325
[% END %]
326
[% IF ( Koha.Preference('UseRecalls') && recalls.count ) %]<li><a href="#recalls">Recalls</a></li>[% END %]
326
</ul>
327
</ul>
327
328
328
[% items_table_block_iter = 0 %]
329
[% items_table_block_iter = 0 %]
Lines 465-471 Link Here
465
                                [% INCLUDE 'patron-title.inc' patron=item.ReservedFor hide_patron_infos_if_needed=1 %]
466
                                [% INCLUDE 'patron-title.inc' patron=item.ReservedFor hide_patron_infos_if_needed=1 %]
466
                            [% END %]
467
                            [% END %]
467
                        [% END %]
468
                        [% END %]
468
                        [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || item.reservedate ) %]
469
                        [% IF ( item.recalled ) %]
470
                            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>
471
                            [% END %]
472
                            [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || item.reservedate || item.recalled ) %]
469
                            Available
473
                            Available
470
                        [% END %]
474
                        [% END %]
471
475
Lines 841-846 Link Here
841
    </div>
845
    </div>
842
[% END %]
846
[% END %]
843
847
848
[% IF ( Koha.Preference('UseRecalls') && recalls.count ) %]
849
    <div id="recalls">
850
        [% INCLUDE 'recalls-reports.inc' %]
851
    </div>
852
[% END %]
853
844
</div><!-- /bibliodetails -->
854
</div><!-- /bibliodetails -->
845
855
846
<div class="yui-g" id="export" style="margin-top: 1em;">
856
<div class="yui-g" id="export" style="margin-top: 1em;">
Lines 890-895 Link Here
890
[% MACRO jsinclude BLOCK %]
900
[% MACRO jsinclude BLOCK %]
891
    [% INCLUDE 'catalog-strings.inc' %]
901
    [% INCLUDE 'catalog-strings.inc' %]
892
    [% Asset.js("js/catalog.js") | $raw %]
902
    [% Asset.js("js/catalog.js") | $raw %]
903
    [% Asset.js("js/recalls.js") | $raw %]
893
    [% INCLUDE 'greybox.inc' %]
904
    [% INCLUDE 'greybox.inc' %]
894
    <script type="text/javascript">
905
    <script type="text/javascript">
895
        // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
906
        // 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 37-42 Link Here
37
                                        <th class="title-string">Expires on</th>
37
                                        <th class="title-string">Expires on</th>
38
                                        <th>Pickup location</th>
38
                                        <th>Pickup location</th>
39
                                        <th>Status</th>
39
                                        <th>Status</th>
40
                                        <th>Due date</th>
40
                                        <th class="nosort">Cancel</th>
41
                                        <th class="nosort">Cancel</th>
41
                                    </tr>
42
                                    </tr>
42
                                </thead>
43
                                </thead>
Lines 72-78 Link Here
72
                                                            Never expires
73
                                                            Never expires
73
                                                        </span>
74
                                                        </span>
74
                                                    [% END %]
75
                                                    [% END %]
75
                                                [% ELSIF ( RECALL.has_expired && RECALL.expirationdate ) %]
76
                                                [% ELSIF ( RECALL.expirationdate ) %]
76
                                                    <span title="[% RECALL.expirationdate %]" class="overdue">
77
                                                    <span title="[% RECALL.expirationdate %]" class="overdue">
77
                                                        <span class="tdlabel">Expiration:</span>
78
                                                        <span class="tdlabel">Expiration:</span>
78
                                                        [% RECALL.expirationdate | $KohaDates %]
79
                                                        [% RECALL.expirationdate | $KohaDates %]
Lines 97-102 Link Here
97
                                                    Cancelled
98
                                                    Cancelled
98
                                                [% END %]
99
                                                [% END %]
99
                                            </td>
100
                                            </td>
101
                                            <td class="due_date">
102
                                                <span class="tdlabel">Due date</span>
103
                                                [% IF ( RECALL.is_requested ) %]
104
                                                    Due to be returned by [% RECALL.checkout.date_due | $KohaDates %]
105
                                                [% ELSIF ( RECALL.is_waiting && RECALL.expirationdate ) %]
106
                                                    Pick up by [% RECALL.expirationdate | $KohaDates %]
107
                                                [% ELSE %]
108
                                                    -
109
                                                [% END %]
110
                                            </td>
111
100
                                            <td class="cancelrecall">
112
                                            <td class="cancelrecall">
101
                                                [% IF ( !RECALL.cancellationdate && ( RECALL.is_requested || RECALL.is_overdue ) ) %]
113
                                                [% IF ( !RECALL.cancellationdate && ( RECALL.is_requested || RECALL.is_overdue ) ) %]
102
                                                    <form action="/cgi-bin/koha/opac-recall.pl" method="post">
114
                                                    <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 863-869 Link Here
863
                                            [% END %]
863
                                            [% END %]
864
                                        </tr>
864
                                        </tr>
865
                                    </tbody>
865
                                    </tbody>
866
                                <table>
866
                                </table>
867
                            </div>
867
                            </div>
868
                        [% END # / # RECALLS.count %]
868
                        [% END # / # RECALLS.count %]
869
869
(-)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