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

(-)a/installer/data/mysql/atomicupdate/bug_18472-Add_system_preference_CustomOnlineHelpStaff.perl (-2 / +3 lines)
Lines 1-7 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
2
if( CheckVersion( $DBversion ) ) {
3
    # you can use $dbh here like:
3
    # you can use $dbh here like:
4
    $dbh->do("INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES  ('CustomOnlineHelpStaff', 'filebased', 'none|filebased', 'Select custom online help system for staff client.', 'Choice')" );
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')" );
5
6
6
    # or perform some test and warn
7
    # or perform some test and warn
7
    # if( !column_exists( 'biblio', 'biblionumber' ) ) {
8
    # if( !column_exists( 'biblio', 'biblionumber' ) ) {
Lines 10-14 if( CheckVersion( $DBversion ) ) { Link Here
10
11
11
    # Always end with this (adjust the bug info)
12
    # Always end with this (adjust the bug info)
12
    SetVersion( $DBversion );
13
    SetVersion( $DBversion );
13
    print "Upgrade to $DBversion done (Bug XXXXX - description)\n";
14
    print "Upgrade to $DBversion done (Bug 18472 - Add system preference CustomOnlineHelpStaff to hide / select custom online help system)\n";
14
}
15
}
(-)a/installer/data/mysql/sysprefs.sql (-1 / +2 lines)
Lines 114-120 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
('CustomOnlineHelpStaff', 'filebased', 'none|filebased', 'Select custom online help system for staff client.', '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')" ),
118
('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'),
119
('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'),
120
('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 / +4 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
    [% IF Koha.Preference('CustomOnlineHelpStaff') == 'filebased' %]
5
        <input type="hidden" name="referer" value="[% referer %]" />
6
        <input type="submit" class="submit" value="Edit help" /></fieldset>
6
        <input type="submit" class="submit" value="Edit help" /></fieldset>
7
    [% END %]
7
    [% END %]
8
</form>
8
</form>
(-)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/admin/preferences/staff_client.pref (-7 lines)
Lines 150-162 Staff Client: Link Here
150
                 no: "Don't enable"
150
                 no: "Don't enable"
151
            - audio alerts for events defined in the audio alerts section of administration.
151
            - audio alerts for events defined in the audio alerts section of administration.
152
        -
152
        -
153
            - "Custom online help system for staff client: "
154
            - pref: CustomOnlineHelpStaff
155
              default: filebased
156
              choices:
157
                  none: "None"
158
                  filebased: "File based"
159
        -
160
            - pref: IntranetCatalogSearchPulldown
153
            - pref: IntranetCatalogSearchPulldown
161
              choices:
154
              choices:
162
                  yes: Show
155
                  yes: Show
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/help/mainpage.tt (-2 / +2 lines)
Lines 18-24 Link Here
18
<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>
19
</ul>
19
</ul>
20
20
21
[% IF Koha.Preference('CustomOnlineHelpStaff') == 'filebased'  %]
21
[% IF ( Koha.Preference('HelpSystem') == 'filebased' ) %]
22
    <h2>Can I edit the online help?</h2>
22
    <h2>Can I edit the online help?</h2>
23
23
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>
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>
Lines 26-31 Link Here
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>
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>
27
27
28
    <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>
29
[% END %]
30
[% END %]
30
31
31
<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>
32
- 

Return to bug 18472