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 323-328 foreach my $item (@items) { Link Here
323
        }
324
        }
324
    }
325
    }
325
326
327
    my $recall = Koha::Recalls->find({ itemnumber => $item->{itemnumber} });
328
    if (defined $recall){
329
        $item->{recalled} = 1;
330
        $item->{recall} = $recall;
331
    }
332
326
    if ($currentbranch and $currentbranch ne "NO_LIBRARY_SET"
333
    if ($currentbranch and $currentbranch ne "NO_LIBRARY_SET"
327
    and C4::Context->preference('SeparateHoldings')) {
334
    and C4::Context->preference('SeparateHoldings')) {
328
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
335
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
Lines 400-405 foreach ( keys %{$dat} ) { Link Here
400
    $template->param( "$_" => defined $dat->{$_} ? $dat->{$_} : '' );
407
    $template->param( "$_" => defined $dat->{$_} ? $dat->{$_} : '' );
401
}
408
}
402
409
410
my $recalls = Koha::Recalls->search({ biblionumber => $biblionumber });
411
403
# does not work: my %views_enabled = map { $_ => 1 } $template->query(loop => 'EnableViews');
412
# does not work: my %views_enabled = map { $_ => 1 } $template->query(loop => 'EnableViews');
404
# method query not found?!?!
413
# method query not found?!?!
405
$template->param( AmazonTld => get_amazon_tld() ) if ( C4::Context->preference("AmazonCoverImages"));
414
$template->param( AmazonTld => get_amazon_tld() ) if ( C4::Context->preference("AmazonCoverImages"));
Lines 409-414 $template->param( Link Here
409
    biblionumber        => $biblionumber,
418
    biblionumber        => $biblionumber,
410
    ($analyze? 'analyze':'detailview') =>1,
419
    ($analyze? 'analyze':'detailview') =>1,
411
    subscriptions       => \@subs,
420
    subscriptions       => \@subs,
421
    recalls             => $recalls,
412
    subscriptionsnumber => $subscriptionsnumber,
422
    subscriptionsnumber => $subscriptionsnumber,
413
    subscriptiontitle   => $dat->{title},
423
    subscriptiontitle   => $dat->{title},
414
    searchid            => scalar $query->param('searchid'),
424
    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 601-607 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
601
('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'),
601
('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'),
602
('UseKohaPlugins','0','','Enable or disable the ability to use Koha Plugins.','YesNo'),
602
('UseKohaPlugins','0','','Enable or disable the ability to use Koha Plugins.','YesNo'),
603
('UseQueryParser','0',NULL,'If enabled, try to use QueryParser for queries.','YesNo'),
603
('UseQueryParser','0',NULL,'If enabled, try to use QueryParser for queries.','YesNo'),
604
('UseRecalls', '1', NULL, 'Enable or disable recalls', 'YesNo'),
604
('UseRecalls', '0', NULL, 'Enable or disable recalls', 'YesNo'),
605
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
605
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
606
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
606
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
607
('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'),
607
('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 322-327 Link Here
322
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
322
[% IF ( Koha.Preference('NovelistSelectStaffEnabled') && Koha.Preference('NovelistSelectStaffProfile') && Koha.Preference('NovelistSelectStaffView') == 'tab' ) %]
323
    <li class="NovelistSelect" style="display:none;"><a href="#NovelistSelect">NoveList Select</a></li>
323
    <li class="NovelistSelect" style="display:none;"><a href="#NovelistSelect">NoveList Select</a></li>
324
[% END %]
324
[% END %]
325
[% IF ( Koha.Preference('UseRecalls') && recalls.count ) %]<li><a href="#recalls">Recalls</a></li>[% END %]
325
</ul>
326
</ul>
326
327
327
[% items_table_block_iter = 0 %]
328
[% items_table_block_iter = 0 %]
Lines 464-470 Link Here
464
                                [% INCLUDE 'patron-title.inc' patron=item.ReservedFor hide_patron_infos_if_needed=1 %]
465
                                [% INCLUDE 'patron-title.inc' patron=item.ReservedFor hide_patron_infos_if_needed=1 %]
465
                            [% END %]
466
                            [% END %]
466
                        [% END %]
467
                        [% END %]
467
                        [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || item.reservedate ) %]
468
                        [% IF ( item.recalled ) %]
469
                            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>
470
                            [% END %]
471
                            [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || item.reservedate || item.recalled ) %]
468
                            Available
472
                            Available
469
                        [% END %]
473
                        [% END %]
470
474
Lines 827-832 Link Here
827
    </div>
831
    </div>
828
[% END %]
832
[% END %]
829
833
834
[% IF ( Koha.Preference('UseRecalls') && recalls.count ) %]
835
    <div id="recalls">
836
        [% INCLUDE 'recalls-reports.inc' %]
837
    </div>
838
[% END %]
839
830
</div><!-- /bibliodetails -->
840
</div><!-- /bibliodetails -->
831
841
832
<div class="yui-g" id="export" style="margin-top: 1em;">
842
<div class="yui-g" id="export" style="margin-top: 1em;">
Lines 876-881 Link Here
876
[% MACRO jsinclude BLOCK %]
886
[% MACRO jsinclude BLOCK %]
877
    [% INCLUDE 'catalog-strings.inc' %]
887
    [% INCLUDE 'catalog-strings.inc' %]
878
    [% Asset.js("js/catalog.js") %]
888
    [% Asset.js("js/catalog.js") %]
889
    [% Asset.js("js/recalls.js") %]
879
    [% INCLUDE 'greybox.inc' %]
890
    [% INCLUDE 'greybox.inc' %]
880
    <script type="text/javascript">
891
    <script type="text/javascript">
881
        // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
892
        // 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 819-825 No patron matched <span class="ex">[% message | html %]</span> Link Here
819
    </li>
819
    </li>
820
820
821
    [% IF Koha.Preference('UseRecalls') && recalls.count %]
821
    [% IF Koha.Preference('UseRecalls') && recalls.count %]
822
        <li><a href="#recalls" id+"recalls-tab">[% recalls.count %] Recall(s)</a></li>
822
        <li><a href="#recalls" id="recalls-tab">[% recalls.count %] Recall(s)</a></li>
823
    [% END %]
823
    [% END %]
824
824
825
    [% IF Koha.Preference('ArticleRequests') %]
825
    [% 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 871-877 Link Here
871
                                            [% END %]
871
                                            [% END %]
872
                                        </tr>
872
                                        </tr>
873
                                    </tbody>
873
                                    </tbody>
874
                                <table>
874
                                </table>
875
                            </div>
875
                            </div>
876
                        [% END # / # RECALLS.count %]
876
                        [% END # / # RECALLS.count %]
877
877
(-)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