Permalink
Browse files

replcae div tags in templates with tal:block, html is now all valid

  • Loading branch information...
1 parent 5e8ee4c commit 7abfa505e9781a8815da49e7ad0db24cedd59ca7 root committed Aug 24, 2012
View
20 src/webserver/templates/config.pt
@@ -1,6 +1,6 @@
<!DOCTYPE html>
-<div metal:use-macro="layout">
- <div metal:fill-slot="head_content">
+<tal:block metal:use-macro="layout">
+ <tal:block metal:fill-slot="head_content">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.js" type="text/javascript"></script>
<script type="text/javascript" src="/static/forms/numeric/jquery.numeric.js"></script>
@@ -75,23 +75,23 @@
});
</script>
- </div>
+ </tal:block>
<div metal:fill-slot="content">
<p>Main Ockle configuration file</p>
<div id="inputArea">
<form id="configINI">
<table>
- <div id="configForm" tal:repeat="section reversed(INIFileTemplate.keys())">
+ <tal:block tal:repeat="section reversed(INIFileTemplate.keys())">
<tr>
<td><b> <p tal:replace="repeat.section.number"></p>. <p tal:replace="section"></p></b></td>
</tr>
- <div tal:repeat="item reversed(INIFileTemplate[section].keys())">
+ <tal:block tal:repeat="item reversed(INIFileTemplate[section].keys())">
<tr>
<td><p tal:replace="item"></p></td>
<!-- Switch case for different datatypes -->
- <div tal:switch="INIFileTemplate[section][item][0]">
+ <tal:block tal:switch="INIFileTemplate[section][item][0]">
<td tal:case="'string'"><input type="text" value="${INIFileDict[section][item]}" name="${section}$${item}"></td>
@@ -107,10 +107,10 @@
</td>
- </div>
+ </tal:block>
</tr>
- </div>
- </div>
+ </tal:block>
+ </tal:block>
<tr><td>
<input type="submit" value="submit"><td><div id="formLoader"><img src="/static/ajax/ajax-send.gif"/></div><div id="formStatus">Saved</div></td>
</td></tr>
@@ -180,4 +180,4 @@
</div>
-</div>
+</tal:block>
View
6 src/webserver/templates/global_layout.pt
@@ -2,15 +2,13 @@
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:tal="http://xml.zope.org/namespaces/tal"
metal:define-macro="layout">
+<head>
<link rel="icon" type="image/png" href="/static/favicon.png" />
<link href="/static/mainmenu/layout.css" rel="stylesheet" type="text/css" />
<link href="/static/mainmenu/menu.css" rel="stylesheet" type="text/css" />
<link href="/static/color_palette.css" rel="stylesheet" type="text/css" />
-
-
-<head>
<title>Ockle - ${page_title}</title>
-<div metal:define-slot="head_content"></div>
+<tal:block metal:define-slot="head_content"></tal:block>
</head>
<body>
<div style="background-color: #1A1A1A; color: #7C7C7C; font-size: 45px; font-weight:bold;"><img src="/static/Logo.png" alt="Ockle" style="float:left; background-color: #1A1A1A;">Ockle</div>
View
8 src/webserver/templates/index.pt
@@ -1,6 +1,6 @@
<!DOCTYPE html>
-<div metal:use-macro="layout">
- <div metal:fill-slot="head_content" style="height: 100%;">
+<tal:block metal:use-macro="layout">
+ <tal:block metal:fill-slot="head_content">
<meta name="MSSmartTagsPreventParsing" content="true" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="/static/canviz/styles_inner.css" />
@@ -21,7 +21,7 @@
}
});
</script>
- </div>
+ </tal:block>
<div metal:fill-slot="content">
<h2>Server Network</h2>
<table>
@@ -36,4 +36,4 @@
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<div id="debug_output"></div>
</div>
-</div>
+</tal:block>
View
46 src/webserver/templates/server_edit.pt
@@ -1,26 +1,28 @@
<!DOCTYPE html>
-<div metal:use-macro="layout">
- <div metal:fill-slot="head_content">
- </div>
+<tal:block metal:use-macro="layout">
+ <tal:block metal:fill-slot="head_content">
+ </tal:block>
- <div metal:fill-slot="content" class="secondary-a-6">
- <p style="float: right;"><a href="/server/${server_dict['Name']}">View</a></p>
-
- <div id="configForm" tal:repeat="section INIFileDict.keys()">
- <p>${INIFileDict[section]}</p><br/>
- </div>
-
- <table>
- <tr>
- <p>Server data that would go in to a nice table:</p>
- </tr>
- <tr tal:repeat="serverVar server_dict">
- <td tal:content="repeat.serverVar.number"></td>
- <td><p tal:replace="serverVar"></p></td>
- <td><p tal:replace="server_dict[serverVar]"></p></td>
- </tr>
- </table>
- </div>
+ <tal:block metal:fill-slot="content">
+ <div class="secondary-a-6">
+ <p style="float: right;"><a href="/server/${server_dict['Name']}">View</a></p>
+
+ <div id="configForm" tal:repeat="section reversed(INIFileDict.keys())">
+ <p><b>${INIFileDict[section]}</b></p><br/>
+ </div>
+
+ <table>
+ <tr><td>
+ <p>Server data that would go in to a nice table:</p>
+ </td></tr>
+ <tr tal:repeat="serverVar reversed(server_dict.keys())">
+ <td tal:content="repeat.serverVar.number"></td>
+ <td><p tal:replace="serverVar"></p></td>
+ <td><p tal:replace="server_dict[serverVar]"></p></td>
+ </tr>
+ </table>
+ </div>
+ </tal:block>
-</div>
+</tal:block>
View
12 src/webserver/templates/server_info.pt
@@ -1,6 +1,6 @@
<!DOCTYPE html>
-<div metal:use-macro="layout">
- <div metal:fill-slot="head_content">
+<tal:block metal:use-macro="layout">
+ <tal:block metal:fill-slot="head_content">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.js" type="text/javascript"></script>
@@ -116,7 +116,7 @@
<script language="javascript" type="text/javascript" src="/static/jqplot/plugins/jqplot.canvasTextRenderer.js"></script>
<script language="javascript" type="text/javascript" src="/static/jqplot/plugins/jqplot.canvasAxisTickRenderer.js"></script>
<script language="javascript" type="text/javascript" src="/static/jqplot/plugins/jqplot.canvasAxisLabelRenderer.js"></script>
- </div>
+ </tal:block>
<div metal:fill-slot="content" class="secondary-a-6">
@@ -200,9 +200,9 @@
</table>
<table>
- <tr>
+ <tr><td>
<p>Server data that would go in to a nice table:</p>
- </tr>
+ </td></tr>
<tr tal:repeat="serverVar server_dict">
<td tal:content="repeat.serverVar.number"></td>
<td><p tal:replace="serverVar"></p></td>
@@ -211,4 +211,4 @@
</table>
</div>
-</div>
+</tal:block>

0 comments on commit 7abfa50

Please sign in to comment.