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

(-)a/installer/data/mysql/atomicupdate/bug_24220_move-opacmoresearches-to-addtional-content.pl (+23 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "24220",
5
    description => "Move OpacMoreSearches to additional contents",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        # Get any existing value from the OpacMoreSearches system preference
10
        my ( $opacmoresearches ) = $dbh->selectrow_array( q|
11
            SELECT value FROM systempreferences WHERE variable='OpacMoreSearches';
12
        |);
13
        if( $opacmoresearches ){
14
            # Insert any values found from system preference into additional_contents
15
            foreach my $lang ( 'default' ) {
16
                $dbh->do( "INSERT INTO additional_contents ( category, code, location, branchcode, title, content, lang, published_on ) VALUES ('html_customizations', 'OpacMoreSearches', 'OpacMoreSearches', NULL, ?, ?, ?, CAST(NOW() AS date) )", undef, "OpacMoreSearches $lang", $opacmoresearches, $lang );
17
            }
18
            # Remove old system preference
19
            $dbh->do("DELETE FROM systempreferences WHERE variable='OpacMoreSearches'");
20
            say $out "Bug 24220 update done";
21
        }
22
    }
23
}
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 lines)
Lines 438-444 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
438
('OpacMaintenanceNotice','','','A user-defined block of HTML to appear on screen when OpacMaintenace is enabled','Textarea'),
438
('OpacMaintenanceNotice','','','A user-defined block of HTML to appear on screen when OpacMaintenace is enabled','Textarea'),
439
('OpacMaxItemsToDisplay','50','','Max items to display at the OPAC on a biblio detail','Integer'),
439
('OpacMaxItemsToDisplay','50','','Max items to display at the OPAC on a biblio detail','Integer'),
440
('OpacMetaDescription','','','This description will show in search engine results (160 characters).','Textarea'),
440
('OpacMetaDescription','','','This description will show in search engine results (160 characters).','Textarea'),
441
('OpacMoreSearches', '', NULL, 'Add additional elements to the OPAC more searches bar', 'Textarea'),
442
('OPACMySummaryHTML','','70|10','Enter the HTML that will appear in a column on the \'my summary\' and \'my checkout history\' tabs when a user is logged in to the OPAC. Enter {BIBLIONUMBER}, {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the HTML. Leave blank to disable.','Textarea'),
441
('OPACMySummaryHTML','','70|10','Enter the HTML that will appear in a column on the \'my summary\' and \'my checkout history\' tabs when a user is logged in to the OPAC. Enter {BIBLIONUMBER}, {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the HTML. Leave blank to disable.','Textarea'),
443
('OPACMySummaryNote','','','Note to display on the patron summary page. This note only appears if the patron is connected.','Free'),
442
('OPACMySummaryNote','','','Note to display on the patron summary page. This note only appears if the patron is connected.','Free'),
444
('OpacNewsLibrarySelect','0','','Show selector for branches on OPAC news page','YesNo'),
443
('OpacNewsLibrarySelect','0','','Show selector for branches on OPAC news page','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-5 lines)
Lines 232-242 OPAC: Link Here
232
              type: textarea
232
              type: textarea
233
              syntax: text/html
233
              syntax: text/html
234
              class: code
234
              class: code
235
        -
236
            - 'Add additional elements to the "More Searches" bar on the OPAC, with the following HTML (leave blank to disable):'
237
            - pref: OpacMoreSearches
238
              type: textarea
239
              class: code
240
        -
235
        -
241
            - 'Include a "Links" column on the "my summary" and "my checkout history" tabs when a patron is logged in to the OPAC, with the following HTML (leave blank to disable):'
236
            - 'Include a "Links" column on the "my summary" and "my checkout history" tabs when a patron is logged in to the OPAC, with the following HTML (leave blank to disable):'
242
            - '<br />Note: The placeholders {BIBLIONUMBER}, {TITLE}, {ISBN} and {AUTHOR} will be replaced with information from the displayed record.'
237
            - '<br />Note: The placeholders {BIBLIONUMBER}, {TITLE}, {ISBN} and {AUTHOR} will be replaced with information from the displayed record.'
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt (-1 / +1 lines)
Lines 424-430 Link Here
424
            <option value="slip">Slip</option>
424
            <option value="slip">Slip</option>
425
        [% END %]
425
        [% END %]
426
    [% ELSE %]
426
    [% ELSE %]
427
        [% FOREACH l IN [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText' ] %]
427
        [% FOREACH l IN [ 'OpacNavRight', 'opacheader', 'OpacCustomSearch', 'OpacMainUserBlock', 'opaccredits', 'OpacLoginInstructions', 'OpacNav', 'OpacNavBottom', 'OpacSuggestionInstructions', 'ArticleRequestsDisclaimerText', 'OpacMoreSearches' ] %]
428
            [% IF l == location %]
428
            [% IF l == location %]
429
                <option value="[% l | html %]" selected="selected">[% l | html %]</option>
429
                <option value="[% l | html %]" selected="selected">[% l | html %]</option>
430
            [% ELSE %]
430
            [% ELSE %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (-2 / +2 lines)
Lines 8-13 Link Here
8
[% SET OpacHeader = AdditionalContents.get( location => "opacheader", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %]
8
[% SET OpacHeader = AdditionalContents.get( location => "opacheader", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %]
9
[% SET OpacCustomSearch = AdditionalContents.get( location => "OpacCustomSearch", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %]
9
[% SET OpacCustomSearch = AdditionalContents.get( location => "OpacCustomSearch", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %]
10
[% SET OpacLoginInstructions = AdditionalContents.get( location => "OpacLoginInstructions", lang => lang, library => branchcode ) %]
10
[% SET OpacLoginInstructions = AdditionalContents.get( location => "OpacLoginInstructions", lang => lang, library => branchcode ) %]
11
[% SET OpacMoreSearches = AdditionalContents.get( location => "OpacMoreSearches", lang => lang, library => branchcode ) %]
11
12
12
<button id="scrolltocontent">Skip to main content</button>
13
<button id="scrolltocontent">Skip to main content</button>
13
<div id="wrapper">
14
<div id="wrapper">
Lines 352-358 Link Here
352
                            [% END %]
353
                            [% END %]
353
                        </a>
354
                        </a>
354
                    </li>
355
                    </li>
355
                    [% Koha.Preference('OpacMoreSearches') | $raw %]
356
                    [% PROCESS koha_news_block news => OpacMoreSearches %]
356
                </ul> <!-- /.nav#moresearches -->
357
                </ul> <!-- /.nav#moresearches -->
357
            </div> <!-- /.row -->
358
            </div> <!-- /.row -->
358
        </div> <!-- /.container-fluid -->
359
        </div> <!-- /.container-fluid -->
359
- 

Return to bug 24220