]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/blobdiff - wradmin/templates/master.html
Mention charset and language in HTML metadata.
[philipp/winterrodeln/wradmin.git] / wradmin / templates / master.html
index 16854f965c87fc2b4416cde2bef39cd0ebf77134..9d8275dcef27d31ed6ce3b93a2e76d1bf298365c 100644 (file)
@@ -1,37 +1,45 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
-    xmlns:py="http://genshi.edgewall.org/"
-    xmlns:xi="http://www.w3.org/2001/XInclude"
-    py:strip="True">
-
-<head py:match="head" py:attrs="select('@*')">
+<!doctype html>
+<html lang="de">
+
+<head>
+    {% block head %}
+    <meta charset="utf-8" />
+    <title>{% block title %}{% endblock %}</title>
     <meta content="text/html; charset=UTF-8" http-equiv="content-type" />
     <meta name="robots" content="noindex, nofollow" />
-    <link rel="stylesheet" type="text/css" media="screen" href="${h.url('/style.css')}" />
-    <link rel="shortcut icon" href="${h.url('/favicon.png')}" />
-    <meta py:replace="select('*|text()')" />
+    <link rel="stylesheet" type="text/css" media="screen" href="{{url_for('static', filename='style.css')}}" />
+    <link rel="shortcut icon" href="{{url_for('static', filename='favicon.png')}}" />
+    {% endblock %}
 </head>
 
 
-<body py:match="body" py:attrs="select('@*')">
-<h1 id="header"><img src="${h.url('/titlebanner.png')}" alt="Winterrodeln Administration"/></h1>
+<body>
+<h1 id="header"><img src="{{url_for('static', filename='titlebanner.png')}}" alt="Winterrodeln Administration"/></h1>
 
 <ul id="mainmenu">
-    <li><a href="${h.url(controller='rodelbahn', action='index')}">Übersicht</a></li>
-    <li><a href="${h.url(controller='rodelbahn', action='list')}">Rodelbahnen</a></li>
-    <li><a href="${h.url(controller='bericht', action='list')}">Rodelbahnberichte</a></li>
-    <li><a href="${h.url(controller='gasthaus', action='list')}">Gasthäuser</a></li>
+    <li><a href="{{url_for('index')}}">Übersicht</a></li>
+    <li><a href="{{url_for('rodelbahn_list')}}">Rodelbahnen</a></li>
+    <li><a href="{{url_for('bericht_list')}}">Rodelbahnberichte</a></li>
+    <li><a href="{{url_for('gasthaus_list')}}">Gasthäuser</a></li>
+    {% if current_user.is_authenticated %}
+    <li><a href="{{url_for('logout')}}">Logout</a></li>
+    {% else %}
+    <li><a href="{{url_for('login')}}">Login</a></li>
+    {% endif %}
 </ul>
 
-<div py:if="session.has_key('flash')" class="${session.pop('flashclass', 'flash')}">${session.pop('flash')}<?python session.save() ?></div>
+{% with messages = get_flashed_messages() %}
+{% for message in messages %}
+<div class="flash">{{message}}</div>
+{% endfor %}
+{% endwith %}
 
 <div id="content">
-${select('*|text()')}
+{% block content %}
+{% endblock %}
 </div>
 
-<div id="footer"><img src="${h.url('/philipp_spitzer.png')}" alt="Philipp Spitzer"/></div>
+<div id="footer"><img src="{{url_for('static', filename='philipp_spitzer.png')}}" alt="Philipp Spitzer"/></div>
 </body>
 
 </html>