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

(-)a/C4/Auth.pm (-1 lines)
Lines 597-603 sub get_template_and_user { Link Here
597
            OPACPrivacy                           => C4::Context->preference("OPACPrivacy"),
597
            OPACPrivacy                           => C4::Context->preference("OPACPrivacy"),
598
            OPACFinesTab                          => C4::Context->preference("OPACFinesTab"),
598
            OPACFinesTab                          => C4::Context->preference("OPACFinesTab"),
599
            OpacTopissue                          => C4::Context->preference("OpacTopissue"),
599
            OpacTopissue                          => C4::Context->preference("OpacTopissue"),
600
            RequestOnOpac                         => C4::Context->preference("RequestOnOpac"),
601
            'Version'                             => C4::Context->preference('Version'),
600
            'Version'                             => C4::Context->preference('Version'),
602
            hidelostitems                         => C4::Context->preference("hidelostitems"),
601
            hidelostitems                         => C4::Context->preference("hidelostitems"),
603
            mylibraryfirst                        => ( C4::Context->preference("SearchMyLibraryFirst") && C4::Context->userenv ) ? C4::Context->userenv->{'branch'} : '',
602
            mylibraryfirst                        => ( C4::Context->preference("SearchMyLibraryFirst") && C4::Context->userenv ) ? C4::Context->userenv->{'branch'} : '',
(-)a/C4/UsageStats.pm (-1 / +1 lines)
Lines 305-311 sub _shared_preferences { Link Here
305
        OpacTopissue
305
        OpacTopissue
306
        opacuserlogin
306
        opacuserlogin
307
        QuoteOfTheDay
307
        QuoteOfTheDay
308
        RequestOnOpac
308
        OPACHoldRequests
309
        OPACComments
309
        OPACComments
310
        ShowReviewer
310
        ShowReviewer
311
        ShowReviewerPhoto
311
        ShowReviewerPhoto
(-)a/installer/data/mysql/atomicupdate/bug_29180.pl (+15 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "29180",
5
    description => "Rename system preference RequestOnOpac with OPACHoldRequests",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        $dbh->do(q{
10
            UPDATE systempreferences
11
            SET variable="OPACHoldRequests"
12
            WHERE variable="RequestOnOpac"
13
        });
14
    },
15
}
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 564-570 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
564
('RentalsInNoissuesCharge','1',NULL,'Rental charges block checkouts (added to noissuescharge).','YesNo'),
564
('RentalsInNoissuesCharge','1',NULL,'Rental charges block checkouts (added to noissuescharge).','YesNo'),
565
('ReplyToDefault','',NULL,'Use this email address as the replyto in emails','Free'),
565
('ReplyToDefault','',NULL,'Use this email address as the replyto in emails','Free'),
566
('ReportsLog','0',NULL,'If ON, log information about reports.','YesNo'),
566
('ReportsLog','0',NULL,'If ON, log information about reports.','YesNo'),
567
('RequestOnOpac','1',NULL,'If ON, globally enables patron holds on OPAC','YesNo'),
567
('OPACHoldRequests','1',NULL,'If ON, globally enables patron holds on OPAC','YesNo'),
568
('RequireStrongPassword','1','','Require a strong login password for staff and patrons','YesNo'),
568
('RequireStrongPassword','1','','Require a strong login password for staff and patrons','YesNo'),
569
('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'),
569
('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'),
570
('ReservesMaxPickUpDelay','7','','Define the Maximum delay to pick up an item on hold','Integer'),
570
('ReservesMaxPickUpDelay','7','','Define the Maximum delay to pick up an item on hold','Integer'),
(-)a/installer/data/mysql/update22to30.pl (-1 / +1 lines)
Lines 414-420 my $DBversion = "3.00.00.000"; Link Here
414
            },
414
            },
415
        {
415
        {
416
                uniquefieldrequired => 'variable',
416
                uniquefieldrequired => 'variable',
417
                variable            => 'RequestOnOpac',
417
                variable            => 'OPACHoldRequests',
418
                value               => '1',
418
                value               => '1',
419
                forceupdate         => { 'explanation' => 1,
419
                forceupdate         => { 'explanation' => 1,
420
                                        'type' => 1},
420
                                        'type' => 1},
(-)a/installer/html-template-to-template-toolkit.pl (-1 / +1 lines)
Lines 27-33 my $tmpl_out_dir = 'koha-tt'; Link Here
27
# template toolkit variables NOT to scope, in other words, variables that need to remain global (case sensitive)
27
# template toolkit variables NOT to scope, in other words, variables that need to remain global (case sensitive)
28
my @globals = ( "themelang","JacketImages","OPACAmazonCoverImages","GoogleJackets","BakerTaylorEnabled",
28
my @globals = ( "themelang","JacketImages","OPACAmazonCoverImages","GoogleJackets","BakerTaylorEnabled",
29
    "SyndeticsEnabled", "OpacRenewalAllowed", "item_level_itypes","noItemTypeImages",
29
    "SyndeticsEnabled", "OpacRenewalAllowed", "item_level_itypes","noItemTypeImages",
30
    "virtualshelves", "RequestOnOpac", "COinSinOPACResults", "OPACXSLTResultsDisplay",
30
    "virtualshelves", "OPACHoldRequests", "COinSinOPACResults", "OPACXSLTResultsDisplay",
31
    "OPACItemsResultsDisplay", "LibraryThingForLibrariesID", "opacuserlogin", "TagsEnabled",
31
    "OPACItemsResultsDisplay", "LibraryThingForLibrariesID", "opacuserlogin", "TagsEnabled",
32
    "TagsShowOnList", "TagsInputOnList","loggedinusername","opacbookbag",
32
    "TagsShowOnList", "TagsInputOnList","loggedinusername","opacbookbag",
33
    "OPACAmazonEnabled", "SyndeticsCoverImages" );
33
    "OPACAmazonEnabled", "SyndeticsCoverImages" );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-1 / +1 lines)
Lines 474-480 OPAC: Link Here
474
                  0: Hide
474
                  0: Hide
475
            - reviewer's avatar beside comments in OPAC. The avatar will be searched on <a href="https://www.libravatar.org" target="_blank">Libravatar</a> using the patron's e-mail address.
475
            - reviewer's avatar beside comments in OPAC. The avatar will be searched on <a href="https://www.libravatar.org" target="_blank">Libravatar</a> using the patron's e-mail address.
476
        -
476
        -
477
            - pref: RequestOnOpac
477
            - pref: OPACHoldRequests
478
              choices:
478
              choices:
479
                  1: Allow
479
                  1: Allow
480
                  0: "Don't allow"
480
                  0: "Don't allow"
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc (-1 / +1 lines)
Lines 3-9 Link Here
3
<ul id="action">
3
<ul id="action">
4
    [% UNLESS ( norequests ) %]
4
    [% UNLESS ( norequests ) %]
5
        [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
5
        [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
6
            [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
6
            [% IF Koha.Preference( 'OPACHoldRequests' ) == 1 %]
7
                [% IF ( ReservableItems ) %]
7
                [% IF ( ReservableItems ) %]
8
                    <li><a class="reserve btn btn-link btn-lg" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblio.biblionumber | html %]"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a></li>
8
                    <li><a class="reserve btn btn-link btn-lg" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% biblio.biblionumber | html %]"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a></li>
9
                [% END %]
9
                [% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/title-actions-menu.inc (-2 / +2 lines)
Lines 1-5 Link Here
1
<div class="actions-menu noprint">
1
<div class="actions-menu noprint">
2
    [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
2
    [% IF Koha.Preference( 'OPACHoldRequests' ) == 1 %]
3
        [% UNLESS ( items.norequests ) %]
3
        [% UNLESS ( items.norequests ) %]
4
            [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
4
            [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
5
                [% IF ( shelf AND op == 'view' ) # Lists view has more granular checking of hold availability %]
5
                [% IF ( shelf AND op == 'view' ) # Lists view has more granular checking of hold availability %]
Lines 15-21 Link Here
15
                [% END %]
15
                [% END %]
16
            [% END # / IF opacuserlogin %]
16
            [% END # / IF opacuserlogin %]
17
        [% END # / UNLESS items.norequests %]
17
        [% END # / UNLESS items.norequests %]
18
    [% END # / RequestOnOpac %]
18
    [% END # / OPACHoldRequests %]
19
19
20
    [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) %]
20
    [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) %]
21
        [% IF items.artreqpossible %]
21
        [% IF items.artreqpossible %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt (-1 / +1 lines)
Lines 60-66 Link Here
60
                                        [% IF ( ( Koha.Preference( 'virtualshelves' ) == 1 ) && loggedinusername ) %]
60
                                        [% IF ( ( Koha.Preference( 'virtualshelves' ) == 1 ) && loggedinusername ) %]
61
                                            <a href="#" class="btn btn-link btn-sm newshelf disabled" aria-disabled="true"><i class="fa fa-fw fa-list" aria-hidden="true"></i> Add to a list</a>
61
                                            <a href="#" class="btn btn-link btn-sm newshelf disabled" aria-disabled="true"><i class="fa fa-fw fa-list" aria-hidden="true"></i> Add to a list</a>
62
                                        [% END %]
62
                                        [% END %]
63
                                        [% IF ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %]
63
                                        [% IF ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) %]
64
                                            <a href="#" class="btn btn-link btn-sm hold disabled" aria-disabled="true"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
64
                                            <a href="#" class="btn btn-link btn-sm hold disabled" aria-disabled="true"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
65
                                        [% END %]
65
                                        [% END %]
66
                                        [% IF ( TagsInputEnabled && loggedinusername ) %]
66
                                        [% IF ( TagsInputEnabled && loggedinusername ) %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt (-1 / +1 lines)
Lines 75-81 Link Here
75
                        [% IF ( SEARCH_RESULT.size ) %] [% SEARCH_RESULT.size | html %]. [% END %]
75
                        [% IF ( SEARCH_RESULT.size ) %] [% SEARCH_RESULT.size | html %]. [% END %]
76
                        [% IF ( SEARCH_RESULT.isbn ) %] [% SEARCH_RESULT.isbn | html %][% END %]
76
                        [% IF ( SEARCH_RESULT.isbn ) %] [% SEARCH_RESULT.isbn | html %][% END %]
77
       </p>
77
       </p>
78
[% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
78
[% IF Koha.Preference( 'OPACHoldRequests' ) == 1 %]
79
<p><a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-reserve.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]">Place hold on <em>[% SEARCH_RESULT.title | html %]</em></a></p>
79
<p><a href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-reserve.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]">Place hold on <em>[% SEARCH_RESULT.title | html %]</em></a></p>
80
[% END %]
80
[% END %]
81
						]]></description>
81
						]]></description>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-5 / +5 lines)
Lines 272-278 Link Here
272
                                                </span>
272
                                                </span>
273
                                            [% END # /IF opacbookbag || virtualshelves %]
273
                                            [% END # /IF opacbookbag || virtualshelves %]
274
274
275
                                            [% IF ( ( Koha.Preference( 'RequestOnOpac' ) == 1 ) && ( Koha.Preference( 'opacuserlogin' ) == 1 ) && DisplayMultiPlaceHold ) %]
275
                                            [% IF ( ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) && ( Koha.Preference( 'opacuserlogin' ) == 1 ) && DisplayMultiPlaceHold ) %]
276
                                                <button class="btn btn-link btn-sm hold disabled" type="button">
276
                                                <button class="btn btn-link btn-sm hold disabled" type="button">
277
                                                    <i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold
277
                                                    <i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold
278
                                                </button>
278
                                                </button>
Lines 318-329 Link Here
318
                                                    [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
318
                                                    [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
319
                                                        <input type="checkbox" class="cb" id="bib[% SEARCH_RESULT.biblionumber | html %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber | html %]" aria-label="Select search result: [% check_title | html %]"/> <label for="bib[% SEARCH_RESULT.biblionumber | html %]"></label>
319
                                                        <input type="checkbox" class="cb" id="bib[% SEARCH_RESULT.biblionumber | html %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber | html %]" aria-label="Select search result: [% check_title | html %]"/> <label for="bib[% SEARCH_RESULT.biblionumber | html %]"></label>
320
                                                    [% ELSE %]
320
                                                    [% ELSE %]
321
                                                        [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
321
                                                        [% IF Koha.Preference( 'OPACHoldRequests' ) == 1 %]
322
                                                            [% UNLESS ( SEARCH_RESULT.norequests ) %]
322
                                                            [% UNLESS ( SEARCH_RESULT.norequests ) %]
323
                                                                [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]<input type="checkbox" class="cb" id="bib[% SEARCH_RESULT.biblionumber | html %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber | html %]" aria-label="Select search result: [% check_title | html %]"/> <label for="bib[% SEARCH_RESULT.biblionumber | html %]"></label>
323
                                                                [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]<input type="checkbox" class="cb" id="bib[% SEARCH_RESULT.biblionumber | html %]" name="biblionumber" value="[% SEARCH_RESULT.biblionumber | html %]" aria-label="Select search result: [% check_title | html %]"/> <label for="bib[% SEARCH_RESULT.biblionumber | html %]"></label>
324
                                                                [% END %]
324
                                                                [% END %]
325
                                                            [% END %]
325
                                                            [% END %]
326
                                                        [% END # IF RequestOnOpac %]
326
                                                        [% END # IF OPACHoldRequests %]
327
                                                    [% END # IF virtualshelves %]
327
                                                    [% END # IF virtualshelves %]
328
                                                [% END # IF opacbookbag%]
328
                                                [% END # IF opacbookbag%]
329
                                            </td>
329
                                            </td>
Lines 597-603 Link Here
597
    [% END %]
597
    [% END %]
598
598
599
    <script>
599
    <script>
600
        [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %]
600
        [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) %]
601
            function holdMultiple() {
601
            function holdMultiple() {
602
                var checkedBiblioNums = ""; // Separated by "/"
602
                var checkedBiblioNums = ""; // Separated by "/"
603
                var checkedCount = 0;
603
                var checkedCount = 0;
Lines 622-628 Link Here
622
                $("#hold_form_biblios").attr("value", numList);
622
                $("#hold_form_biblios").attr("value", numList);
623
                $("#hold_form").submit();
623
                $("#hold_form").submit();
624
            }
624
            }
625
        [% END # /IF opacuserlogin && RequestOnOpac %]
625
        [% END # /IF opacuserlogin && OPACHoldRequests %]
626
626
627
        [% IF ( TagsInputEnabled && loggedinusername ) %]
627
        [% IF ( TagsInputEnabled && loggedinusername ) %]
628
            function tagSelected() {
628
            function tagSelected() {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendbasketform.tt (-1 / +1 lines)
Lines 37-43 Link Here
37
                                    <input type="hidden" name="bib_list" value="[% bib_list | html %]" />
37
                                    <input type="hidden" name="bib_list" value="[% bib_list | html %]" />
38
                                    <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
38
                                    <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
39
                                </fieldset>
39
                                </fieldset>
40
                                [% IF Koha.Preference('RequestOnOpac') || Koha.Preference('OpacRenewalAllowed') %]<p id="donotrequestbymail">Please do not use this mail to request or renew books.</p>[% END %]
40
                                [% IF Koha.Preference('OPACHoldRequests') || Koha.Preference('OpacRenewalAllowed') %]<p id="donotrequestbymail">Please do not use this mail to request or renew books.</p>[% END %]
41
                                <fieldset class="action">
41
                                <fieldset class="action">
42
                                    <input type="submit" class="btn btn-primary" value="Send" />
42
                                    <input type="submit" class="btn btn-primary" value="Send" />
43
                                    <a class="cancel close" href="#">Cancel</a>
43
                                    <a class="cancel close" href="#">Cancel</a>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendshelfform.tt (-1 / +1 lines)
Lines 41-47 Link Here
41
41
42
                                        <input type="hidden" name="shelfid" value="[% shelfid | html %]" />
42
                                        <input type="hidden" name="shelfid" value="[% shelfid | html %]" />
43
                                    </fieldset>
43
                                    </fieldset>
44
                                    [% IF Koha.Preference('RequestOnOpac') || Koha.Preference('OpacRenewalAllowed') %]<p id="donotrequestbymail">Please do not use this mail to request or renew books.</p>[% END %]
44
                                    [% IF Koha.Preference('OPACHoldRequests') || Koha.Preference('OpacRenewalAllowed') %]<p id="donotrequestbymail">Please do not use this mail to request or renew books.</p>[% END %]
45
                                    <fieldset class="action">
45
                                    <fieldset class="action">
46
                                        <input type="submit" value="Send" class="btn btn-primary" />
46
                                        <input type="submit" value="Send" class="btn btn-primary" />
47
                                        <a class="cancel close" href="/cgi-bin/koha/opac-shelves.pl?op=view&amp;shelfnumber=[% shelfid | html %]">Cancel</a>
47
                                        <a class="cancel close" href="/cgi-bin/koha/opac-shelves.pl?op=view&amp;shelfnumber=[% shelfid | html %]">Cancel</a>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt (-3 / +3 lines)
Lines 337-343 Link Here
337
                                    </div>
337
                                    </div>
338
                                    <div class="links">
338
                                    <div class="links">
339
                                        <span class="selections">Select titles to: </span>
339
                                        <span class="selections">Select titles to: </span>
340
                                        [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
340
                                        [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) ) %]
341
                                            <span id="placehold">
341
                                            <span id="placehold">
342
                                                <a href="#" class="btn btn-link hold tag_hides disabled"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
342
                                                <a href="#" class="btn btn-link hold tag_hides disabled"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
343
                                            </span>
343
                                            </span>
Lines 765-771 var MSG_REMOVE_ONE_FROM_LIST = _("Are you sure you want to remove this item from Link Here
765
var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
765
var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?");
766
var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
766
var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
767
767
768
[% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
768
[% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) ) %]
769
    function holdSelections() {
769
    function holdSelections() {
770
        var checkedBoxes = $("input:checkbox:checked");
770
        var checkedBoxes = $("input:checkbox:checked");
771
        if ($(checkedBoxes).size() == 0) {
771
        if ($(checkedBoxes).size() == 0) {
Lines 838-844 function enableCheckboxActions(){ Link Here
838
$(function() {
838
$(function() {
839
    [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
839
    [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
840
840
841
    [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
841
    [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'OPACHoldRequests' ) == 1 ) ) %]
842
        $(".selections-toolbar a.hold").click(function(e){
842
        $(".selections-toolbar a.hold").click(function(e){
843
            e.preventDefault();
843
            e.preventDefault();
844
            holdSelections();
844
            holdSelections();
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt (-1 / +1 lines)
Lines 121-127 Link Here
121
                                            </td>
121
                                            </td>
122
                                            [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
122
                                            [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
123
                                                <td>
123
                                                <td>
124
                                                    [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
124
                                                    [% IF Koha.Preference( 'OPACHoldRequests' ) == 1 %]
125
                                                        [% UNLESS ( result.norequests ) %]
125
                                                        [% UNLESS ( result.norequests ) %]
126
                                                            <a class="btn btn-link btn-sm hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% result.biblionumber | uri %]"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
126
                                                            <a class="btn btn-link btn-sm hold" href="/cgi-bin/koha/opac-reserve.pl?biblionumber=[% result.biblionumber | uri %]"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
127
                                                        [% END %]
127
                                                        [% END %]
(-)a/opac/opac-ISBDdetail.pl (-1 lines)
Lines 188-194 if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->has_item Link Here
188
my $norequests = ! $items->filter_by_for_hold->count;
188
my $norequests = ! $items->filter_by_for_hold->count;
189
189
190
$template->param(
190
$template->param(
191
    RequestOnOpac       => C4::Context->preference("RequestOnOpac"),
192
    norequests   => $norequests,
191
    norequests   => $norequests,
193
    ISBD         => $res,
192
    ISBD         => $res,
194
    biblio       => $biblio,
193
    biblio       => $biblio,
(-)a/opac/opac-MARCdetail.pl (-6 lines)
Lines 155-166 if( $allow_onshelf_holds || CountItemsIssued($biblionumber) || $biblio->has_item Link Here
155
    $template->param( ReservableItems => 1 );
155
    $template->param( ReservableItems => 1 );
156
}
156
}
157
157
158
# adding the $RequestOnOpac param
159
my $RequestOnOpac;
160
if (C4::Context->preference("RequestOnOpac")) {
161
	$RequestOnOpac = 1;
162
}
163
164
# fill arrays
158
# fill arrays
165
my @loop_data = ();
159
my @loop_data = ();
166
160
(-)a/opac/opac-detail.pl (-1 lines)
Lines 800-806 my $norequests = ! $biblio->items->filter_by_for_hold->count; Link Here
800
    $template->param(
800
    $template->param(
801
                     MARCNOTES               => $marcnotesarray,
801
                     MARCNOTES               => $marcnotesarray,
802
                     norequests              => $norequests,
802
                     norequests              => $norequests,
803
                     RequestOnOpac           => C4::Context->preference("RequestOnOpac"),
804
                     itemdata_ccode          => $itemfields{ccode},
803
                     itemdata_ccode          => $itemfields{ccode},
805
                     itemdata_materials      => $itemfields{materials},
804
                     itemdata_materials      => $itemfields{materials},
806
                     itemdata_enumchron      => $itemfields{enumchron},
805
                     itemdata_enumchron      => $itemfields{enumchron},
(-)a/opac/opac-reserve.pl (-3 / +2 lines)
Lines 47-54 my $maxreserves = C4::Context->preference("maxreserves"); Link Here
47
47
48
my $query = CGI->new;
48
my $query = CGI->new;
49
49
50
# if RequestOnOpac (for placing holds) is disabled, leave immediately
50
# if OPACHoldRequests (for placing holds) is disabled, leave immediately
51
if ( ! C4::Context->preference('RequestOnOpac') ) {
51
if ( ! C4::Context->preference('OPACHoldRequests') ) {
52
    print $query->redirect("/cgi-bin/koha/errors/404.pl");
52
    print $query->redirect("/cgi-bin/koha/errors/404.pl");
53
    exit;
53
    exit;
54
}
54
}
55
- 

Return to bug 29180