Bug 19817: Make the location of the manual configurable - KohaManualBaseURL

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2017-12-18 16:21:25 -03:00 committed by Nick Clemens
parent 206ba82a46
commit d9a8ac0489
4 changed files with 16 additions and 2 deletions

View File

@ -36,9 +36,12 @@ if ( $help_version =~ m|^(\d+)\.(\d{2}).*$| ) {
$help_version = "$version.$major"; $help_version = "$version.$major";
} }
# FIXME remote url must be a pref
# FIXME /en/ must be configurable (or guessed) # FIXME /en/ must be configurable (or guessed)
our $base_url = 'http://koha-community.org/manual/' . $help_version . '/en/html'; my $KohaManualBaseURL = C4::Context->preference('KohaManualBaseURL') || 'http://koha-community.org/manual';
if ( $KohaManualBaseURL =~ m|^/| ) {
$KohaManualBaseURL = C4::Context->preference('staffClientBaseURL') . $KohaManualBaseURL;
}
our $base_url = $KohaManualBaseURL . '/' . $help_version . '/en/html';
our $mapping = { our $mapping = {
'about' => '/14_plugins.html#about-koha', 'about' => '/14_plugins.html#about-koha',
'acqui/acqui-home' => '/09_acquisitions.html', 'acqui/acqui-home' => '/09_acquisitions.html',

View File

@ -0,0 +1,2 @@
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` )
VALUES ('KohaManualBaseURL','http://koha-community.org/manual/','','Where is the Koha manual/documentation located?','Free');

View File

@ -242,6 +242,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('itemBarcodeInputFilter','','whitespace|T-prefix|cuecat|libsuite8|EAN13','If set, allows specification of a item barcode input filter','Choice'), ('itemBarcodeInputFilter','','whitespace|T-prefix|cuecat|libsuite8|EAN13','If set, allows specification of a item barcode input filter','Choice'),
('itemcallnumber','082ab',NULL,'The MARC field/subfield that is used to calculate the itemcallnumber (Dewey would be 082ab or 092ab; LOC would be 050ab or 090ab) could be 852hi from an item record','free'), ('itemcallnumber','082ab',NULL,'The MARC field/subfield that is used to calculate the itemcallnumber (Dewey would be 082ab or 092ab; LOC would be 050ab or 090ab) could be 852hi from an item record','free'),
('KohaAdminEmailAddress','root@localhost','','Define the email address where patron modification requests are sent','free'), ('KohaAdminEmailAddress','root@localhost','','Define the email address where patron modification requests are sent','free'),
('KohaManualBaseURL','http://koha-community.org/manual/','','Where is the Koha manual/documentation located?','Free'),
('LabelMARCView','standard','standard|economical','Define how a MARC record will display','Choice'), ('LabelMARCView','standard','standard|economical','Define how a MARC record will display','Choice'),
('language','en',NULL,'Set the default language in the staff client.','Languages'), ('language','en',NULL,'Set the default language in the staff client.','Languages'),
('LetterLog','1',NULL,'If ON, log all notices sent','YesNo'), ('LetterLog','1',NULL,'If ON, log all notices sent','YesNo'),

View File

@ -380,3 +380,11 @@ Enhanced Content:
aws: Amazon Web Services aws: Amazon Web Services
gb: Google Books gb: Google Books
ol: Open Library ol: Open Library
Manual:
-
- Location of the Koha manual
- pref: KohaManualBaseURL
- You can specify the location of the Koha manual to use. By default it is http://koha-community.org/manual/
- If starts with '/', the value of staffClientBaseURL will be used as a prefix.
- Note that it will be suffixed by the version / the language / the format (/17.11/en/html)