FELIX-1988 Apply 5.main_template.patch by Valentin Valchev (thanks) with the following changes: (1) also externalize the footer as a template (for consistency), (2) create a readTemplateFile method to read the file, (3) return an empty string (instead of using null) of the file fails to be read
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@910864 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/resources/templates/main_footer.html b/webconsole/src/main/resources/templates/main_footer.html
new file mode 100644
index 0000000..afb7967
--- /dev/null
+++ b/webconsole/src/main/resources/templates/main_footer.html
@@ -0,0 +1,3 @@
+ </div>
+ </body>
+</html>
\ No newline at end of file
diff --git a/webconsole/src/main/resources/templates/main_header.html b/webconsole/src/main/resources/templates/main_header.html
new file mode 100644
index 0000000..aee2d16
--- /dev/null
+++ b/webconsole/src/main/resources/templates/main_header.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; utf-8" />
+ <link rel="icon" href="{4}" />
+ <title>{0} - {1}</title>
+
+ <link href="{2}/res/lib/reset-min.css" rel="stylesheet" type="text/css" />
+ <link href="{2}/res/lib/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
+ <link href="{5}" rel="stylesheet" type="text/css" />
+ {9}
+
+ <script type="text/javascript">
+ // <![CDATA[
+ appRoot = "{2}";
+ pluginRoot = "{2}/{3}";
+ // ]]>
+ </script>
+
+ <script src="{2}/res/lib/jquery-1.3.2.js" type="text/javascript"></script>
+ <script src="{2}/res/lib/jquery-ui-1.7.2.js" type="text/javascript"></script>
+ <script src="{2}/res/lib/jquery-ui-i18n-1.7.2.js" type="text/javascript"></script>
+ <script src="{2}/res/lib/jquery.cookies-2.2.0.js" type="text/javascript"></script>
+ <script src="{2}/res/lib/jquery.tablesorter-2.0.3.js" type="text/javascript"></script>
+ <script src="{2}/res/lib/support.js" type="text/javascript"></script>
+
+ <!-- temporary here - for compatibility untill all plugins are refactored -->
+ <script src="{2}/res/ui/admin.js" type="text/javascript"></script>
+</head>
+
+<body class="ui-widget">
+ <div id="main">
+ <div id="lead"><!-- header: title and logo -->
+ <h1>
+ {0}<br/>{1}
+ </h1>
+ <p>
+ <a rel="external" href="{6}" title="{7}"><img src="{8}" alt="Logo" /></a>
+ </p>
+ </div>
+ <div class="ui-helper-clearfix" style="height:0px"> </div>
+
\ No newline at end of file