changeset 483:28aa6ac933fb

sawmill: moved wald's table layout into common header and footer template include files.
author Sascha Teichmann <teichmann@intevation.de>
date Sat, 18 Sep 2010 09:46:22 +0000
parents a89f73f7c965
children 2e947f508553
files contrib/sawmill/web/details.py contrib/sawmill/web/index.py contrib/sawmill/web/templates/details.html contrib/sawmill/web/templates/footer.inc contrib/sawmill/web/templates/header.inc contrib/sawmill/web/templates/overview.html
diffstat 6 files changed, 123 insertions(+), 229 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/sawmill/web/details.py	Sat Sep 18 08:01:18 2010 +0000
+++ b/contrib/sawmill/web/details.py	Sat Sep 18 09:46:22 2010 +0000
@@ -157,8 +157,10 @@
     req.content_type = 'text/html;charset=utf-8'
     template = psp.PSP(req, filename='templates/details.html')
     template.run({
-        'base_dir':    BASE_DIR,
+        'page_title' : description,
+        'back_link'  : 'index.py',
+        'base_dir'   : BASE_DIR,
         'description': description,
-        'header':      header,
+        'header'     : header,
         'track_items': track_items
     })
--- a/contrib/sawmill/web/index.py	Sat Sep 18 08:01:18 2010 +0000
+++ b/contrib/sawmill/web/index.py	Sat Sep 18 09:46:22 2010 +0000
@@ -37,4 +37,8 @@
 
         descriptions.append((os.path.basename(d), description))
 
-    template.run({'descriptions': descriptions})
+    template.run({
+      'page_title'  : 'Free Software forestry',
+      'back_link'   : '/',
+      'descriptions': descriptions
+    })
--- a/contrib/sawmill/web/templates/details.html	Sat Sep 18 08:01:18 2010 +0000
+++ b/contrib/sawmill/web/templates/details.html	Sat Sep 18 09:46:22 2010 +0000
@@ -67,69 +67,9 @@
 }
 %>
 <html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-    <link rel="icon" href="img/favicon.ico" type="image/x-icon" />
-    <link rel="stylesheet" href="styles/style.css" type="text/css" media="screen" />
-    <title>S&auml;gewerk - <%= escape(description) %></title>
-  </head>
-
- <body>
-  <table border="0" width="100%" cellspacing="0" cellpadding="0">
-   <tr>
-    <td>
-     <a href="index.py"><img src="img/logo.jpg" border="0" alt="" width="533" height="94" /></a>
-    </td>
-   </tr>
-  </table>
-  <table border="0" width="100%" cellspacing="0" cellpadding="0">
-
-   <tr>
-        <td align="left" bgcolor="#E0E0E0" width="9">
-     <img src="img/topleft.png" height="9" width="9" alt="" />
-    </td>
-        <td bgcolor="#E0E0E0" width="30">
-     <img src="img/clear.png" width="30" height="1" alt="" />
-    </td>
-        <td bgcolor="#E0E0E0">
-     <img src="img/clear.png" width="1" height="1" alt="" />
+<%@include file="header.inc" %>
 
-    </td>
-        <td bgcolor="#E0E0E0" width="30">
-     <img src="img/clear.png" width="30" height="1" alt="" />
-    </td>
-        <td align="right" bgcolor="#E0E0E0" width="9">
-     <img src="img/topright.png" height="9" width="9" alt="" />
-    </td>
-     </tr>
-
-     <tr>
-    <!-- Outer body row -->
-    <td bgcolor="#E0E0E0">
-     <img src="img/clear.png" width="10" height="1" alt="" />
-    </td>
-        <td valign="top" width="99%" bgcolor="#E0E0E0" colspan="3">
-       <!-- Inner Tabs / Shell -->
-         <table border="0" width="100%" cellspacing="0" cellpadding="0">
-          <tr>
-
-             <td align="left" bgcolor="#ffffff" width="9">
-        <img src="img/topleft-inner.png" height="9" width="9" alt="" />
-       </td>
-             <td bgcolor="#ffffff">
-        <img src="img/clear.png" width="1" height="1" alt="" />
-       </td>
-             <td align="right" bgcolor="#ffffff" width="9">
-        <img src="img/topright-inner.png" height="9" width="9" alt="" />
-       </td>
-
-            </tr>
-            <tr>
-             <td bgcolor="#ffffff">
-        <img src="img/clear.png" width="10" height="1" alt="" />
-       </td>
-             <td valign="top" width="99%" bgcolor="white" class="css_prison">
-        <!-- end main body row -->
+<td valign="top" width="99%" bgcolor="white" class="css_prison">
 <h1><%= escape(description) %></h1>
 <%= header %>
 <table class="statustable">
@@ -194,56 +134,7 @@
 <hr>
 report generated at <%= pretty_time(datetime.now(), "%Y-%m-%d %H:%M:%S") %>, powered
 by <a href="http://treepkg.wald.intevation.org">Tree Packager</a>
-
-
-      <!-- end main body row -->
-             </td>
-             <td width="10" bgcolor="#ffffff">
-        <img src="img/clear.png" width="2" height="1" alt="" />
-       </td>
-            </tr>
-
-            <tr>
-             <td align="left" bgcolor="#E0E0E0" width="9">
-        <img src="img/bottomleft-inner.png" height="11" width="11" alt="" />
-        </td>
-                <td bgcolor="#ffffff">
-         <img src="img/clear.png" width="1" height="1" alt="" />
-        </td>
-                <td align="right" bgcolor="#E0E0E0" width="9">
-         <img src="img/bottomright-inner.png" height="11" width="11" alt="" />
-
-        </td>
-             </tr>
-            </table>
-
-          <!-- end inner body row -->
+</td>
 
-         </td>
-         <td width="10" bgcolor="#E0E0E0">
-      <img src="img/clear.png" width="2" height="1" alt="" />
-     </td>
-
-      </tr>
-      <tr>
-         <td align="left" bgcolor="#E0E0E0" width="9">
-      <img src="img/bottomleft.png" height="9" width="9" alt="" />
-     </td>
-         <td bgcolor="#E0E0E0" colspan="3">
-      <img src="img/clear.png" width="1" height="1" alt="" />
-     </td>
-         <td align="right" bgcolor="#E0E0E0" width="9">
-
-      <img src="img/bottomright.png" height="9" width="9" alt="" />
-     </td>
-      </tr>
-   </table>
-   <br />
-   <center>
-    <b style="color:white; font-size:13px;">
-     This site is hosted by the <a href="http://www.intevation.de">Intevation GmbH</a>
-    </b>
-   </center>
-
-    </body>
+<%@include file="footer.inc" %>
 </html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/sawmill/web/templates/footer.inc	Sat Sep 18 09:46:22 2010 +0000
@@ -0,0 +1,42 @@
+            <!-- end main body row -->
+            <td width="10" bgcolor="#ffffff">
+              <img src="img/clear.png" width="2" height="1" alt="" />
+            </td>
+          </tr>
+          <tr>
+            <td align="left" bgcolor="#E0E0E0" width="9">
+              <img src="img/bottomleft-inner.png" height="11" width="11" alt="" />
+            </td>
+            <td bgcolor="#ffffff">
+              <img src="img/clear.png" width="1" height="1" alt="" />
+            </td>
+            <td align="right" bgcolor="#E0E0E0" width="9">
+              <img src="img/bottomright-inner.png" height="11" width="11" alt="" />
+            </td>
+          </tr>
+        </table>
+        <!-- end inner body row -->
+      </td>
+      <td width="10" bgcolor="#E0E0E0">
+        <img src="img/clear.png" width="2" height="1" alt="" />
+      </td>
+    </tr>
+    <tr>
+      <td align="left" bgcolor="#E0E0E0" width="9">
+        <img src="img/bottomleft.png" height="9" width="9" alt="" />
+      </td>
+      <td bgcolor="#E0E0E0" colspan="3">
+        <img src="img/clear.png" width="1" height="1" alt="" />
+      </td>
+      <td align="right" bgcolor="#E0E0E0" width="9">
+         <img src="img/bottomright.png" height="9" width="9" alt="" />
+      </td>
+    </tr>
+  </table>
+  <br>
+  <center>
+    <b style="color:white; font-size:13px;">
+      This site is hosted by the <a href="http://www.intevation.de">Intevation GmbH</a>
+    </b>
+  </center>
+</body>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/sawmill/web/templates/header.inc	Sat Sep 18 09:46:22 2010 +0000
@@ -0,0 +1,61 @@
+<%
+from cgi import escape
+from xml.sax.saxutils import quoteattr
+%>
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <link rel="icon" href="img/favicon.ico" type="image/x-icon" />
+  <link rel="stylesheet" href="styles/style.css" type="text/css" media="screen" />
+  <title>S&auml;gewerk - <%= escape(page_title) %></title>
+</head>
+<body>
+  <table border="0" width="100%" cellspacing="0" cellpadding="0">
+    <tr>
+      <td>
+        <a href=<%= quoteattr(back_link) %>><img src="img/logo.jpg"
+           border="0" alt="" width="533" height="94" /></a>
+      </td>
+   </tr>
+  </table>
+  <table border="0" width="100%" cellspacing="0" cellpadding="0">
+    <tr>
+      <td align="left" bgcolor="#E0E0E0" width="9">
+        <img src="img/topleft.png" height="9" width="9" alt="" />
+      </td>
+      <td bgcolor="#E0E0E0" width="30">
+        <img src="img/clear.png" width="30" height="1" alt="" />
+      </td>
+      <td bgcolor="#E0E0E0">
+        <img src="img/clear.png" width="1" height="1" alt="" />
+      </td>
+      <td bgcolor="#E0E0E0" width="30">
+        <img src="img/clear.png" width="30" height="1" alt="" />
+      </td>
+      <td align="right" bgcolor="#E0E0E0" width="9">
+        <img src="img/topright.png" height="9" width="9" alt="" />
+      </td>
+    </tr>
+    <tr>
+      <!-- Outer body row -->
+      <td bgcolor="#E0E0E0">
+        <img src="img/clear.png" width="10" height="1" alt="" />
+      </td>
+      <td valign="top" width="99%" bgcolor="#E0E0E0" colspan="3">
+        <!-- Inner Tabs / Shell -->
+        <table border="0" width="100%" cellspacing="0" cellpadding="0">
+          <tr>
+            <td align="left" bgcolor="#ffffff" width="9">
+              <img src="img/topleft-inner.png" height="9" width="9" alt="" />
+            </td>
+            <td bgcolor="#ffffff">
+              <img src="img/clear.png" width="1" height="1" alt="" />
+            </td>
+            <td align="right" bgcolor="#ffffff" width="9">
+              <img src="img/topright-inner.png" height="9" width="9" alt="" />
+            </td>
+          </tr>
+          <tr>
+            <td bgcolor="#ffffff">
+              <img src="img/clear.png" width="10" height="1" alt="" />
+            </td>
+            <!-- begin main body row -->
--- a/contrib/sawmill/web/templates/overview.html	Sat Sep 18 08:01:18 2010 +0000
+++ b/contrib/sawmill/web/templates/overview.html	Sat Sep 18 09:46:22 2010 +0000
@@ -5,70 +5,12 @@
 from xml.sax.saxutils import quoteattr
 %>
 <html>
- <head>
-   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-   <link rel="icon" href="img/favicon.ico" type="image/x-icon" />
-   <link rel="stylesheet" href="styles/style.css" type="text/css" media="screen" />
-   <title>S&auml;gewerk - Free Software forestry</title>
- </head>
-
- <body>
-  <table border="0" width="100%" cellspacing="0" cellpadding="0">
-   <tr>
-    <td>
-     <a href="/"><img src="img/logo.jpg" border="0" alt="" width="533" height="94" /></a>
-    </td>
-   </tr>
-  </table>
-  <table border="0" width="100%" cellspacing="0" cellpadding="0">
-
-   <tr>
-        <td align="left" bgcolor="#E0E0E0" width="9">
-     <img src="img/topleft.png" height="9" width="9" alt="" />
-    </td>
-        <td bgcolor="#E0E0E0" width="30">
-     <img src="img/clear.png" width="30" height="1" alt="" />
-    </td>
-        <td bgcolor="#E0E0E0">
-     <img src="img/clear.png" width="1" height="1" alt="" />
+<%@include file="header.inc" %>
 
-    </td>
-        <td bgcolor="#E0E0E0" width="30">
-     <img src="img/clear.png" width="30" height="1" alt="" />
-    </td>
-        <td align="right" bgcolor="#E0E0E0" width="9">
-     <img src="img/topright.png" height="9" width="9" alt="" />
-    </td>
-     </tr>
-
-     <tr>
-    <!-- Outer body row -->
-    <td bgcolor="#E0E0E0">
-     <img src="img/clear.png" width="10" height="1" alt="" />
-    </td>
-        <td valign="top" width="99%" bgcolor="#E0E0E0" colspan="3">
-       <!-- Inner Tabs / Shell -->
-         <table border="0" width="100%" cellspacing="0" cellpadding="0">
-          <tr>
-
-             <td align="left" bgcolor="#ffffff" width="9">
-        <img src="img/topleft-inner.png" height="9" width="9" alt="" />
-       </td>
-             <td bgcolor="#ffffff">
-        <img src="img/clear.png" width="1" height="1" alt="" />
-       </td>
-             <td align="right" bgcolor="#ffffff" width="9">
-        <img src="img/topright-inner.png" height="9" width="9" alt="" />
-       </td>
-
-            </tr>
-            <tr>
-             <td bgcolor="#ffffff">
-        <img src="img/clear.png" width="10" height="1" alt="" />
-       </td>
-             <td valign="top" width="99%" bgcolor="white">
-        <!-- end main body row -->
-         <div style="text-align: right"><a href="http://wald.intevation.de/">...to WALD source code repository</a></div>
+<td valign="top" width="99%" bgcolor="white">
+<div style="text-align: right">
+  <a href="http://wald.intevation.de/">...to WALD source code repository</a>
+</div>
 
 <%
 for treepkg, description in sorted(descriptions, key=lambda x: x[1]):
@@ -80,55 +22,7 @@
 <%
 # for all descriptions
 %>
-              <!-- end main body row -->
-             </td>
-             <td width="10" bgcolor="#ffffff">
-        <img src="img/clear.png" width="2" height="1" alt="" />
-       </td>
-            </tr>
-
-            <tr>
-             <td align="left" bgcolor="#E0E0E0" width="9">
-        <img src="img/bottomleft-inner.png" height="11" width="11" alt="" />
-        </td>
-                <td bgcolor="#ffffff">
-         <img src="img/clear.png" width="1" height="1" alt="" />
-        </td>
-                <td align="right" bgcolor="#E0E0E0" width="9">
-         <img src="img/bottomright-inner.png" height="11" width="11" alt="" />
-
-        </td>
-             </tr>
-            </table>
-
-          <!-- end inner body row -->
+</td>
 
-         </td>
-         <td width="10" bgcolor="#E0E0E0">
-      <img src="img/clear.png" width="2" height="1" alt="" />
-     </td>
-
-      </tr>
-      <tr>
-         <td align="left" bgcolor="#E0E0E0" width="9">
-      <img src="img/bottomleft.png" height="9" width="9" alt="" />
-     </td>
-         <td bgcolor="#E0E0E0" colspan="3">
-      <img src="img/clear.png" width="1" height="1" alt="" />
-     </td>
-         <td align="right" bgcolor="#E0E0E0" width="9">
-
-      <img src="img/bottomright.png" height="9" width="9" alt="" />
-     </td>
-      </tr>
-   </table>
-   <br />
-   <center>
-    <b style="color:white; font-size:13px;">
-     This site is hosted by the <a href="http://www.intevation.de">Intevation GmbH</a>
-
-    </b>
-   </center>
-
-    </body>
+<%@include file="footer.inc" %>
 </html>
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)