From 0e4a0aa34f9c1a4c472fc4da3e62bc28c6c340ca Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Thu, 23 Jun 2016 17:16:04 +0200 Subject: [PATCH] Adding support for css and some nice infoboxes --- lib/Thruk/Controller/hello.pm | 7 +++++-- templates/hello.tt | 37 ++++++++++++++++++++++++++++------- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/lib/Thruk/Controller/hello.pm b/lib/Thruk/Controller/hello.pm index 42a6223..caeee2d 100644 --- a/lib/Thruk/Controller/hello.pm +++ b/lib/Thruk/Controller/hello.pm @@ -13,16 +13,19 @@ Hello World!. =head1 METHODS -=cut - =head2 index +This is the entry point for thruk to start the plugin + =cut sub index { my ( $c ) = @_; $c->stash->{title} = 'Hello World!'; + $c->stash->{'subtitle'} = 'Hello World!'; + $c->stash->{'infoBoxTitle'} = 'Hello World!'; + $c->stash->{'no_auto_reload'} = 1; $c->stash->{template} = 'hello.tt'; $c->stash->{hello_var} = 'Hello World!'; # This is our magic variable } diff --git a/templates/hello.tt b/templates/hello.tt index 53d3bd1..fec0a8b 100644 --- a/templates/hello.tt +++ b/templates/hello.tt @@ -1,12 +1,35 @@ - - [% title_prefix %][% title %] - - - - - + + + [% title_prefix %][% title %] + + + + [% IF thruk_debug %] + + [% ELSE %] + + + + + [% END %] +[% PROCESS _common_css.tt use_frames=1 %] +[% PROCESS _header.tt overlib=1 + css=["plugins/conf/conf.css","plugins/conf/linedtextarea/jquery-linedtextarea.css", "javascript/jstree-3.0.9/themes/default/style.min.css"] + js=["plugins/conf/conf.js", "javascript/jstree-3.0.9/jstree.min.js"] +%] + + +[% PROCESS _message.tt %] +[% PROCESS _overdiv.tt %] +[% PROCESS _infobox.tt %]

[% hello_var %]