Bug 20484: (RM follow-up) Highlight ES disablement

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2020-04-21 12:14:13 +01:00
parent 7de19f4e5c
commit e94ea221df
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
2 changed files with 6 additions and 1 deletions

View File

@ -34,7 +34,8 @@ use Module::Load::Conditional qw(can_load);
my $input = new CGI;
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
{ template_name => 'admin/searchengine/elasticsearch/mappings.tt',
{
template_name => 'admin/searchengine/elasticsearch/mappings.tt',
query => $input,
type => 'intranet',
authnotrequired => 0,
@ -50,6 +51,8 @@ unless ( can_load( modules => { 'Koha::SearchEngine::Elasticsearch::Indexer' =>
my $index = $input->param('index') || 'biblios';
my $op = $input->param('op') || 'list';
my @messages;
push @messages, { type => 'message', code => 'elasticsearch_disabled' }
if ( C4::Context->preference('SearchEngine') ne 'Elasticsearch' );
my $database = Koha::Database->new();
my $schema = $database->schema;

View File

@ -97,6 +97,8 @@ a.add, a.delete {
[% t("Mappings updated successfully.") | $raw %]
[% CASE 'success_on_reset' %]
[% t("Mappings have been reset successfully.") | $raw %]
[% CASE 'elasticsearch_disabled' %]
[% t("Elasticsearch is currently disabled.") | $raw %]
[% CASE %]
[% m.code | html %]
[% END %]