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

(-)a/installer/data/mysql/atomicupdate/Bug_15311-OpacMaintenanceNotice_syspref.sql (+1 lines)
Line 0 Link Here
1
NSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('OpacMaintenanceNotice','','','A user-defined block of HTML to appear on screen when OpacMaintenace is enabled','Textarea');
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 299-304 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
299
('OpacLocationBranchToDisplay','holding','holding|home|both','In the OPAC, under location show which branch for Location in the record details.','Choice'),
299
('OpacLocationBranchToDisplay','holding','holding|home|both','In the OPAC, under location show which branch for Location in the record details.','Choice'),
300
('OpacLocationBranchToDisplayShelving','holding','holding|home|both','In the OPAC, display the shelving location under which which column.',  'Choice'),
300
('OpacLocationBranchToDisplayShelving','holding','holding|home|both','In the OPAC, display the shelving location under which which column.',  'Choice'),
301
('OpacMaintenance','0','','If ON, enables maintenance warning in OPAC','YesNo'),
301
('OpacMaintenance','0','','If ON, enables maintenance warning in OPAC','YesNo'),
302
('OpacMaintenanceNotice','','','A user-defined block of HTML to appear on screen when OpacMaintenace is enabled','Textarea'),
302
('OpacMainUserBlock','Welcome to Koha...\r\n<hr>','70|10','A user-defined block of HTML  in the main content area of the opac main page','Textarea'),
303
('OpacMainUserBlock','Welcome to Koha...\r\n<hr>','70|10','A user-defined block of HTML  in the main content area of the opac main page','Textarea'),
303
('OpacMaxItemsToDisplay','50','','Max items to display at the OPAC on a biblio detail','Integer'),
304
('OpacMaxItemsToDisplay','50','','Max items to display at the OPAC on a biblio detail','Integer'),
304
('OPACMySummaryHTML','','70|10','Enter the HTML that will appear in a column on the \'my summary\' and \'my reading 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'),
305
('OPACMySummaryHTML','','70|10','Enter the HTML that will appear in a column on the \'my summary\' and \'my reading 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'),
(-)a/installer/data/mysql/updatedatabase.pl (+10 lines)
Lines 11721-11726 if ( CheckVersion($DBversion) ) { Link Here
11721
11721
11722
}
11722
}
11723
11723
11724
$DBversion = "3.23.00.XXX";
11725
if(CheckVersion($DBversion)) {
11726
    $dbh->do(q{
11727
        INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type)
11728
        VALUES ('OpacMaintenanceNotice','','','A user-defined block of HTML to appear on screen when OpacMaintenace is enabled','Textarea')
11729
    });
11730
    print "Upgrade to $DBversion done (Bug 15311: Let libraries set text to display when OpacMaintenance = on)\n";
11731
    SetVersion($DBversion);
11732
}
11733
11724
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
11734
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
11725
# SEE bug 13068
11735
# SEE bug 13068
11726
# if there is anything in the atomicupdate, read and execute it.
11736
# if there is anything in the atomicupdate, read and execute it.
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+6 lines)
Lines 54-59 OPAC: Link Here
54
                  no: "Don't show"
54
                  no: "Don't show"
55
            - "a warning that the OPAC is under maintenance, instead of the OPAC itself. Note: this shows the same warning as when the database needs to be upgraded, but unconditionally."
55
            - "a warning that the OPAC is under maintenance, instead of the OPAC itself. Note: this shows the same warning as when the database needs to be upgraded, but unconditionally."
56
        -
56
        -
57
        -
58
            - "Show the following HTML when OpacMaintenance is enabled:"
59
            - pref: OpacMaintenanceNotice
60
              type: htmlarea
61
              class: code
62
        -
57
            - By default, show bib records
63
            - By default, show bib records
58
            - pref: BiblioDefaultView
64
            - pref: BiblioDefaultView
59
              choices:
65
              choices:
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/maintenance.tt (-3 / +7 lines)
Lines 1-3 Link Here
1
[% USE Koha %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog</title>
3
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
Lines 26-33 Link Here
26
        <div class="row-fluid">
27
        <div class="row-fluid">
27
            <div class="span12">
28
            <div class="span12">
28
                <div id="opac-maintenance-message">
29
                <div id="opac-maintenance-message">
29
                    <h2>System maintenance</h2>
30
                    [% IF Koha.Preference( 'OpacMaintenanceNotice' ) %]
30
                        <p>The [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog is offline for system maintenance. We'll be back soon! If you have any questions, please contact the <a href="mailto:[% KohaAdminEmailAddress %]">site administrator</a></p>
31
                        [% Koha.Preference( 'OpacMaintenanceNotice' ) %]
32
                    [% ELSE %]
33
                        <h2>System Maintenance</h2>
34
                          <p>The [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog is offline for system maintenance. We'll be back soon! If you have any questions, please contact the <a href="mailto:[% KohaAdminEmailAddress %]">site administrator</a></p>
35
                    [% END %]
31
                </div>
36
                </div>
32
            </div>
37
            </div>
33
        </div>
38
        </div>
34
- 

Return to bug 15311