Browse Source

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

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Martin Renvoize 2 years ago
parent
commit
e94ea221df
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 5
      admin/searchengine/elasticsearch/mappings.pl
  2. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt

5
admin/searchengine/elasticsearch/mappings.pl

@ -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;

2
koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt

@ -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 %]

Loading…
Cancel
Save