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

(-)a/installer/data/mysql/atomicupdate/bug_30873.pl (+18 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "26205",
5
    description =>
6
        "Add new system preference OPACShowLibraries to control whether the libraries link appears in the OPAC",
7
    up => sub {
8
        my ($args) = @_;
9
        my $dbh = $args->{dbh};
10
11
        $dbh->do(
12
            q{
13
            INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type)
14
            VALUES ('OPACShowLibraries', '1', 'If enabled, a "Libraries" link appears in the OPAC pointing to a page with library information', '', 'YesNo')
15
        }
16
        );
17
    },
18
    }
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 544-549 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
544
('OPACShibOnly','0','','If ON enables shibboleth only authentication for the opac','YesNo'),
544
('OPACShibOnly','0','','If ON enables shibboleth only authentication for the opac','YesNo'),
545
('OPACShowCheckoutName','0','','Displays in the OPAC the name of patron who has checked out the material. WARNING: Most sites should leave this off. It is intended for corporate or special sites which need to track who has the item.','YesNo'),
545
('OPACShowCheckoutName','0','','Displays in the OPAC the name of patron who has checked out the material. WARNING: Most sites should leave this off. It is intended for corporate or special sites which need to track who has the item.','YesNo'),
546
('OPACShowHoldQueueDetails','none','none|priority|holds|holds_priority','Show holds details in OPAC','Choice'),
546
('OPACShowHoldQueueDetails','none','none|priority|holds|holds_priority','Show holds details in OPAC','Choice'),
547
('OPACShowLibraries', '1', 'If enabled, a link is shown in the OPAC pointing to a page with library information', '', 'YesNo'),
547
('OPACShowMusicalInscripts','0','','Display musical inscripts on the OPAC record details page when available.','YesNo'),
548
('OPACShowMusicalInscripts','0','','Display musical inscripts on the OPAC record details page when available.','YesNo'),
548
('OPACShowOpenURL', '0', NULL, 'Enable display of OpenURL links in OPAC search results and detail page', 'YesNo'),
549
('OPACShowOpenURL', '0', NULL, 'Enable display of OpenURL links in OPAC search results and detail page', 'YesNo'),
549
('OpacShowRecentComments','0',NULL,'If ON a link to recent comments will appear in the OPAC masthead','YesNo'),
550
('OpacShowRecentComments','0',NULL,'If ON a link to recent comments will appear in the OPAC masthead','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+6 lines)
Lines 42-47 OPAC: Link Here
42
                  0: Disable
42
                  0: Disable
43
            - "Koha OPAC as public. Private OPAC requires authentication before accessing the OPAC. "
43
            - "Koha OPAC as public. Private OPAC requires authentication before accessing the OPAC. "
44
            - 'Note: This does not affect the public API, see the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RESTPublicAnonymousRequests">RESTPublicAnonymousRequests</a> to control the API.'
44
            - 'Note: This does not affect the public API, see the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RESTPublicAnonymousRequests">RESTPublicAnonymousRequests</a> to control the API.'
45
        -
46
            - pref: OPACShowLibraries
47
              choices:
48
                  1: "Show"
49
                  0: "Don't show"
50
            - "a link to a page in the OPAC showing information about each library. "
45
        -
51
        -
46
            - "Show star-ratings on"
52
            - "Show star-ratings on"
47
            - pref: OpacStarRatings
53
            - pref: OpacStarRatings
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt (-2 / +4 lines)
Lines 164-171 Link Here
164
                                                        <tr>
164
                                                        <tr>
165
                                                            [% FOREACH text_field IN table_loo.text_fields %]
165
                                                            [% FOREACH text_field IN table_loo.text_fields %]
166
                                                                [% IF ( text_field.select_field ) %]
166
                                                                [% IF ( text_field.select_field ) %]
167
                                                                    <td>
167
                                                                    <td class="actions">
168
                                                                        <a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/labels/label-edit-batch.pl?op=remove&amp;batch_id=[% batch_id |url %]&amp;label_id=[% text_field.field_value |url %]"><i class="fa fa-trash-can"></i> Delete</a>
168
                                                                        <a class="btn btn-default btn-xs submit-form-link" id="deletebatch" href="#" data-op="cud-delete" data-batch_id="[% batch_id | html %]" data-label_id="[% text_field.field_value | html %]" data-method="post" data-action="/cgi-bin/koha/labels/label-edit-batch.pl" data-confirmation-msg="Are you sure you want to delete this?"><i class="fa fa-trash-can"></i> Delete</a>
169
169
                                                                        <a class="btn btn-default btn-xs export" href="#" data-batch-id="[% batch_id | html %]" data-label-id="[% text_field.field_value | html %]"><i class="fa-solid fa-share-from-square"></i> Export</a>
170
                                                                        <a class="btn btn-default btn-xs export" href="#" data-batch-id="[% batch_id | html %]" data-label-id="[% text_field.field_value | html %]"><i class="fa-solid fa-share-from-square"></i> Export</a>
170
                                                                    </td>
171
                                                                    </td>
171
                                                                    <td><input type="checkbox" name="action" value="[% text_field.field_value | html %]"></td>
172
                                                                    <td><input type="checkbox" name="action" value="[% text_field.field_value | html %]"></td>
Lines 206-211 Link Here
206
[% MACRO jsinclude BLOCK %]
207
[% MACRO jsinclude BLOCK %]
207
    [% INCLUDE 'greybox.inc' %]
208
    [% INCLUDE 'greybox.inc' %]
208
    [% INCLUDE 'datatables.inc' %]
209
    [% INCLUDE 'datatables.inc' %]
210
    [% Asset.js("js/form-submit.js") | $raw %]
209
    <script>
211
    <script>
210
        function DeleteConfirm() {
212
        function DeleteConfirm() {
211
            var msg = _("Are you sure you want to delete batch %s?").format("[% batch_id | html %]");
213
            var msg = _("Are you sure you want to delete batch %s?").format("[% batch_id | html %]");
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (-9 / +11 lines)
Lines 364-378 Link Here
364
                            </li>
364
                            </li>
365
                        [% END %]
365
                        [% END %]
366
                    [% END %]
366
                    [% END %]
367
                    <li class="nav-item">
367
                    [% IF ( Koha.Preference('OPACShowLibraries') ) %]
368
                        <a id="library_page" href="/cgi-bin/koha/opac-library.pl">
368
                        <li class="nav-item">
369
                            [% IF ( singleBranchMode ) %]
369
                            <a id="library_page" href="/cgi-bin/koha/opac-library.pl">
370
                                <span>Library</span>
370
                                [% IF ( singleBranchMode ) %]
371
                            [% ELSE %]
371
                                    <span>Library</span>
372
                                <span>Libraries</span>
372
                                [% ELSE %]
373
                            [% END %]
373
                                    <span>Libraries</span>
374
                        </a>
374
                                [% END %]
375
                    </li>
375
                            </a>
376
                        </li>
377
                    [% END %]
376
                    [% PROCESS koha_news_block news => OpacMoreSearches %]
378
                    [% PROCESS koha_news_block news => OpacMoreSearches %]
377
                </ul> <!-- /.nav#moresearches -->
379
                </ul> <!-- /.nav#moresearches -->
378
            </div> <!-- /.row -->
380
            </div> <!-- /.row -->
(-)a/labels/label-edit-batch.pl (-5 / +1 lines)
Lines 67-73 $number_list = $cgi->param('number_list') if $cgi->param('number_list'); Link Here
67
67
68
my $branch_code = C4::Context->userenv->{'branch'};
68
my $branch_code = C4::Context->userenv->{'branch'};
69
69
70
if ($op eq 'remove') {
70
if ($op eq 'cud-delete') {
71
    $batch = C4::Labels::Batch->retrieve(batch_id => $batch_id);
71
    $batch = C4::Labels::Batch->retrieve(batch_id => $batch_id);
72
    foreach my $label_id (@label_ids) {
72
    foreach my $label_id (@label_ids) {
73
    $err = $batch->remove_item($label_id);
73
    $err = $batch->remove_item($label_id);
Lines 77-86 if ($op eq 'remove') { Link Here
77
#    print $cgi->redirect("label-edit-batch.pl?op=edit&batch_id=$batch_id");
77
#    print $cgi->redirect("label-edit-batch.pl?op=edit&batch_id=$batch_id");
78
#    exit;
78
#    exit;
79
}
79
}
80
elsif ($op eq 'cud-delete') {
81
    $err = C4::Labels::Batch::delete(batch_id => $batch_id, branch_code => $branch_code);
82
    $errtype = 'BATCH_NOT_DELETED' if $err;
83
}
84
elsif ($op eq 'cud-add') {
80
elsif ($op eq 'cud-add') {
85
    if ($number_list) {
81
    if ($number_list) {
86
        my @numbers_list = split /\n/, $number_list; # Entries are effectively passed in as a <cr> separated list
82
        my @numbers_list = split /\n/, $number_list; # Entries are effectively passed in as a <cr> separated list
(-)a/opac/opac-library.pl (-1 / +6 lines)
Lines 29-34 my $query = CGI->new(); Link Here
29
29
30
my $branchcode = $query->param('branchcode');
30
my $branchcode = $query->param('branchcode');
31
31
32
# if OPACShowLibraries is disabled, leave immediately
33
if ( !C4::Context->preference('OPACShowLibraries') ) {
34
    print $query->redirect("/cgi-bin/koha/errors/404.pl");
35
    exit;
36
}
37
32
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
38
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
33
    {
39
    {
34
        template_name   => "opac-library.tt",
40
        template_name   => "opac-library.tt",
35
- 

Return to bug 30873