Adding support for css and some nice infoboxes

master
Micke Nordin 8 years ago
parent 722d4e82cd
commit 0e4a0aa34f

@ -13,16 +13,19 @@ Hello World!.
=head1 METHODS =head1 METHODS
=cut
=head2 index =head2 index
This is the entry point for thruk to start the plugin
=cut =cut
sub index { sub index {
my ( $c ) = @_; my ( $c ) = @_;
$c->stash->{title} = 'Hello World!'; $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->{template} = 'hello.tt';
$c->stash->{hello_var} = 'Hello World!'; # This is our magic variable $c->stash->{hello_var} = 'Hello World!'; # This is our magic variable
} }

@ -1,12 +1,35 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>[% title_prefix %][% title %]</title> <script type="text/javascript">
<link rel="shortcut icon" href="[% url_prefix %]themes/[% theme %]/images/favicon.ico" type="image/ico" /> <!--
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> var url_prefix = '[% url_prefix %]';
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> -->
</head> </script>
<body> <title>[% title_prefix %][% title %]</title>
<link rel="shortcut icon" href="[% url_prefix %]themes/[% theme %]/images/favicon.ico" type="image/ico" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
[% IF thruk_debug %]
<script type="text/javascript" charset="UTF-8" src="[% url_prefix %]plugins/api_conf/ext-[% extjs_version %]/build/ext-all-debug.js"></script>
[% ELSE %]
<!--[IF IE]>
<script type="text/javascript" charset="UTF-8" src="[% url_prefix %]plugins/api_conf/ext-[% extjs_version %]/build/ext-all-debug.js"></script>
<![ENDIF]-->
<!--[IF !IE]> -->
<script type="text/javascript" charset="UTF-8" src="[% url_prefix %]plugins/api_conf/ext-[% extjs_version %]/build/ext-all.js"></script>
<!-- <![ENDIF]-->
[% 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"]
%]
</head>
<body>
[% PROCESS _message.tt %]
[% PROCESS _overdiv.tt %]
[% PROCESS _infobox.tt %]
<h1>[% hello_var %]</h1> <!-- This is where we access our variable --> <h1>[% hello_var %]</h1> <!-- This is where we access our variable -->
</body> </body>
</html> </html>

Loading…
Cancel
Save