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

(-)a/installer/data/mysql/atomicupdate/bug_18472-Add_system_preference_CustomOnlineHelpStaff.perl (+15 lines)
Line 0 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    # you can use $dbh here like:
4
    $dbh->do("INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES  ('HelpSystem', 'filebased', 'filebased', 'Select online help system.', 'multiple')" );
5
    $dbh->do("INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES  ('EnableEditingFilebasedHelp', '1', '', 'Enable editing of file based Koha help.', 'yesno')" );
6
7
    # or perform some test and warn
8
    # if( !column_exists( 'biblio', 'biblionumber' ) ) {
9
    #    warn "There is something wrong";
10
    # }
11
12
    # Always end with this (adjust the bug info)
13
    SetVersion( $DBversion );
14
    print "Upgrade to $DBversion done (Bug 18472 - Add system preference CustomOnlineHelpStaff to hide / select custom online help system)\n";
15
}
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 114-119 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
114
('CronjobLog','0',NULL,'If ON, log information from cron jobs.','YesNo'),
114
('CronjobLog','0',NULL,'If ON, log information from cron jobs.','YesNo'),
115
('CumulativeRestrictionPeriods',0,NULL,'Cumulate the restriction periods instead of keeping the highest','YesNo'),
115
('CumulativeRestrictionPeriods',0,NULL,'Cumulate the restriction periods instead of keeping the highest','YesNo'),
116
('CurrencyFormat','US','US|FR|CH','Determines the display format of currencies. eg: \'36000\' is displayed as \'360 000,00\'  in \'FR\' or \'360,000.00\'  in \'US\'.','Choice'),
116
('CurrencyFormat','US','US|FR|CH','Determines the display format of currencies. eg: \'36000\' is displayed as \'360 000,00\'  in \'FR\' or \'360,000.00\'  in \'US\'.','Choice'),
117
('HelpSystem', 'filebased', 'filebased', 'Select online help system.', 'multiple'),
118
("INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES  ('EnableEditingFilebasedHelp', '1', '', 'Enable editing of file based Koha help.', 'yesno')" ),
117
('dateformat','us','metric|us|iso|dmydot','Define global date format (us mm/dd/yyyy, metric dd/mm/yyy, ISO yyyy-mm-dd, dmydot dd.mm.yyyy)','Choice'),
119
('dateformat','us','metric|us|iso|dmydot','Define global date format (us mm/dd/yyyy, metric dd/mm/yyy, ISO yyyy-mm-dd, dmydot dd.mm.yyyy)','Choice'),
118
('DebugLevel','2','0|1|2','Define the level of debugging information sent to the browser when errors are encountered (set to 0 in production). 0=none, 1=some, 2=most','Choice'),
120
('DebugLevel','2','0|1|2','Define the level of debugging information sent to the browser when errors are encountered (set to 0 in production). 0=none, 1=some, 2=most','Choice'),
119
('decreaseLoanHighHolds',NULL,'','Decreases the loan period for items with number of holds above the threshold specified in decreaseLoanHighHoldsValue','YesNo'),
121
('decreaseLoanHighHolds',NULL,'','Decreases the loan period for items with number of holds above the threshold specified in decreaseLoanHighHoldsValue','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc (-3 / +5 lines)
Lines 97-105 Link Here
97
                    </li>
97
                    </li>
98
                </ul>
98
                </ul>
99
            </li>
99
            </li>
100
            <li>
100
                [% IF Koha.Preference('HelpSystem') == 'filebased' %]
101
                <a class="toplinks" href="/cgi-bin/koha/help.pl" id="helper">Help</a>
101
                    <li>
102
            </li>
102
                        <a class="toplinks" href="/cgi-bin/koha/help.pl" id="helper">Help</a>
103
                    </li>
104
                [% END %]
103
            [% ELSE %]
105
            [% ELSE %]
104
            <li class="loggedout">
106
            <li class="loggedout">
105
                <span>
107
                <span>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/help-bottom.inc (-4 / +6 lines)
Lines 1-8 Link Here
1
<form action="/cgi-bin/koha/edithelp.pl" method="post">
1
<form action="/cgi-bin/koha/edithelp.pl" method="post">
2
  <fieldset class="action"><input type="button" class="close" value="Close help window" />
2
    <fieldset class="action"><input type="button" class="close" value="Close help window" />
3
  <input type="hidden" name="type" value="modify" />
3
    [% IF (Koha.Preference('HelpSystem') == 'filebased') && (Koha.Preference('EnableEditingFilebasedHelp') ) %]
4
  <input type="hidden" name="referer" value="[% referer %]" />
4
        <input type="hidden" name="type" value="modify" />
5
  <input type="submit" class="submit" value="Edit help" /></fieldset>
5
        <input type="hidden" name="referer" value="[% referer %]" />
6
        <input type="submit" class="submit" value="Edit help" /></fieldset>
7
    [% END %]
6
</form>
8
</form>
7
</body>
9
</body>
8
</html>
10
</html>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/help-top.inc (+1 lines)
Lines 1-3 Link Here
1
[% USE Koha %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Online help</title>
3
<title>Online help</title>
3
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref (+15 lines)
Lines 413-415 Administration: Link Here
413
              choices:
413
              choices:
414
                Zebra: Zebra
414
                Zebra: Zebra
415
                Elasticsearch: Elasticsearch
415
                Elasticsearch: Elasticsearch
416
    Help system:
417
        -
418
            - "Select online help system: "
419
            - pref: HelpSystem
420
              default: filebased
421
              multiple:
422
                  filebased: "File based (staff client)"
423
        -
424
            - "Enable editing of file based Koha help: "
425
            - pref: EnableEditingFilebasedHelp
426
              default: 1
427
              choices:
428
                  yes: "Yes"
429
                  no: "No"
430
            - "Used together with 'File based (staff client)' selection in preference 'HelpSystem'
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/help/mainpage.tt (-5 / +8 lines)
Lines 1-3 Link Here
1
[% USE Koha %]
1
[% INCLUDE 'help-top.inc' %]
2
[% INCLUDE 'help-top.inc' %]
2
3
3
<h2>Welcome to Koha</h2>
4
<h2>Welcome to Koha</h2>
Lines 17-29 Link Here
17
<li><a href="http://koha-community.org/get-involved/irc/">Chat with Koha users and developers</a></li>
18
<li><a href="http://koha-community.org/get-involved/irc/">Chat with Koha users and developers</a></li>
18
</ul>
19
</ul>
19
20
20
<h2>Can I edit the online help?</h2>
21
[% IF ( Koha.Preference('HelpSystem') == 'filebased' ) %]
22
    <h2>Can I edit the online help?</h2>
21
23
22
<p>You can edit the online help through the Koha Staff Client by clicking the &quot;Edit Help&quot; button. This feature has been designed so that library workflow and policies can be documented within Koha.</p>
24
    <p>You can edit the online help through the Koha Staff Client by clicking the &quot;Edit Help&quot; button. This feature has been designed so that library workflow and policies can be documented within Koha.</p>
23
25
24
<p><strong>IMPORTANT:</strong> Your online help will be overwritten by the new Help when there is an upgrade. If you want to keep a copy of your online help, you should instruct your System Administrator to upgrade the Online Help directory in the Koha file tree.</p>
26
    <p><strong>IMPORTANT:</strong> Your online help will be overwritten by the new Help when there is an upgrade. If you want to keep a copy of your online help, you should instruct your System Administrator to upgrade the Online Help directory in the Koha file tree.</p>
25
27
26
<p>The online help directory is: <pre>[% themelang %]/modules/help</pre></p>
28
    <p>The online help directory is: <pre>[% themelang %]/modules/help</pre></p>
29
    <p><strong>Note:</strong> Files in help directory must be writeable to make this feature work. Additionally, system preference 'EnableEditingFilebasedHelp' must be set to 'Yes'.</p>
30
[% END %]
27
31
28
<p><strong>See the full documentation for Koha in the <a href="http://manual.koha-community.org/[% helpVersion %]/en/">manual</a> (online).</strong></p>
32
<p><strong>See the full documentation for Koha in the <a href="http://manual.koha-community.org/[% helpVersion %]/en/">manual</a> (online).</strong></p>
29
33
30
- 

Return to bug 18472