Added settings and navi helpers
Change-Id: Id54fa79c67609abc98c9d363b49520135fa002ac
diff --git a/lib/Kalamar.pm b/lib/Kalamar.pm
index 51cb8f6..8470db6 100644
--- a/lib/Kalamar.pm
+++ b/lib/Kalamar.pm
@@ -217,12 +217,18 @@
my $doc_navi = Mojo::File->new($self->home->child('templates','doc','navigation.json'))->slurp;
$doc_navi = $doc_navi ? decode_json($doc_navi) : [];
+ # TODO:
+ # Use navi->add()
if ($conf->{navi_ext}) {
push @$doc_navi, @{$conf->{navi_ext}};
};
+ # TODO:
+ # Remove navi entry
$self->config(doc_navi => $doc_navi);
+ $self->navi->set(doc => $doc_navi);
+
$self->log->info('API expected at ' . $self->korap->api);
# Establish routes with authentification
@@ -241,6 +247,10 @@
$r->get('/doc')->to('documentation#page', page => 'korap')->name('doc_start');
$r->get('/doc/:scope/:page')->to('documentation#page', scope => undef)->name('doc');
+ # Settings routes (deactivated)
+ # $r->get('/settings')->to(cb => sub { shift->render('settings') })->name('settings_start');
+ # $r->get('/settings/:scope/:page')->to(scope => undef, page => undef)->name('settings');
+
# Contact route
$r->get('/contact')->to('documentation#contact');
$r->get('/contact')->mail_to_chiffre('documentation#contact');