]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/blobdiff - wradmin/templates/bericht_view.html
bericht_view.html now uses jinja2.
[philipp/winterrodeln/wradmin.git] / wradmin / templates / bericht_view.html
index a4ac5eceee6dae150ba1a5350fd8dbdf95be68a0..47845b3374060af8eb2427ad5c5c8226dba8dec9 100644 (file)
-<?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">
-<xi:include href="master.html" />
+{% extends "master.html" %}
+{% block title %}Rodelbahnbericht #{{wrreport.id}}{% endblock %}
 
-<head>
-       <title>Rodelbahnbericht</title>
-</head>
+{% block content %}
+<h2>Rodelbahnbericht #{{wrreport.id}}</h2>
 
-<body>
-<h2>Rodelbahnbericht #${c.wrreport.id}</h2>
-
-Der Bericht wurde am ${c.wrreport.date_report} abgegeben.
+Der Bericht wurde am {{wrreport.date_report}} abgegeben.
 
 <table>
        <tr>
                <th>Eintrag ID</th>
-               <td>${c.wrreport.id}</td>
+               <td>{{wrreport.id}}</td>
        </tr>
        <tr>
                <th>Seite (Rodelbahn)</th>
-               <td>${c.wrreport.page_title}</td>
+               <td>{{wrreport.page_title}}</td>
        </tr>
     <tr>
                <th>Seiten-ID (Rodelbahn-ID)</th>
-               <td><a href="${h.url(controller='rodelbahn', action='view', id=c.wrreport.page_id)}">${c.wrreport.page_id}</a></td>
+               <td><a href="{{url_for('rodelbahn_view', id=wrreport.page_id)}}">{{wrreport.page_id}}</a></td>
     </tr>
        <tr>
-               <th>Datum für Bericht</th>
-               <td>${c.wrreport.date_report}</td>
+               <th>Datum für Bericht</th>
+               <td>{{wrreport.date_report}}</td>
        </tr>
        <tr>
                <th>Datum Eintrag</th>
-               <td>${c.wrreport.date_entry}</td>
+               <td>{{wrreport.date_entry}}</td>
        </tr>
        <tr>
-               <th>Datum Ungültig</th>
-               <td>${c.wrreport.date_invalid}</td>
+               <th>Datum Ungültig</th>
+               <td>{{wrreport.date_invalid}}</td>
        </tr>
        <tr>
                <th>Zustand (1 bis 5)</th>
-               <td>${c.wrreport.condition}</td>
+               <td>{{wrreport.condition}}</td>
        </tr>
        <tr>
                <th>Beschreibung (WikiText)</th>
-               <td>${c.wrreport.description}</td>
+               <td>{{wrreport.description}}</td>
        </tr>
        <tr>
                <th>Autor-Name</th>
-               <td>${c.wrreport.author_name}</td>
+               <td>{{wrreport.author_name}}</td>
        </tr>
        <tr>
                <th>Autor-IP</th>
-               <td>${c.wrreport.author_ip}</td>
+               <td>{{wrreport.author_ip}}</td>
        </tr>
        <tr>
                <th>Autor-Benutzer-ID</th>
-               <td>${c.wrreport.author_userid}</td>
+               <td>{{wrreport.author_userid}}</td>
        </tr>
        <tr>
                <th>Autor-Benutzername</th>
-               <td>${c.wrreport.author_username}</td>
+               <td>{{wrreport.author_username}}</td>
        </tr>
-    <py:if test="c.wrreport.delete_date">
+    {% if wrreport.delete_date %}
        <tr>
-               <th>Gelöscht am</th>
-               <td>${c.wrreport.delete_date}</td>
+               <th>Gelöscht am</th>
+               <td>{{wrreport.delete_date}}</td>
        </tr>
        <tr>
-               <th>Gelöscht von</th>
-               <td>${c.wrreport.delete_person_name}</td>
+               <th>Gelöscht von</th>
+               <td>{{wrreport.delete_person_name}}</td>
        </tr>
        <tr>
-               <th>Gelöscht von IP</th>
-               <td>${c.wrreport.delete_person_ip}</td>
+               <th>Gelöscht von IP</th>
+               <td>{{wrreport.delete_person_ip}}</td>
        </tr>
        <tr>
-               <th>Gelöscht von</th>
-               <td>${c.wrreport.delete_person_userid}</td>
+               <th>Gelöscht von</th>
+               <td>{{wrreport.delete_person_userid}}</td>
        </tr>
        <tr>
-               <th>Gelöscht von</th>
-               <td>${c.wrreport.delete_person_username}</td>
+               <th>Gelöscht von</th>
+               <td>{{wrreport.delete_person_username}}</td>
        </tr>
        <tr>
-               <th>Löschgrund</th>
-               <td>${c.wrreport.delete_reason_public}</td>
+               <th>Löschgrund</th>
+               <td>{{wrreport.delete_reason_public}}</td>
        </tr>
-    </py:if>
-    <py:if test="not c.wrreport.delete_date">
+    {% else %}
        <tr>
-               <th>Gelöscht</th>
+               <th>Gelöscht</th>
                <td>Nein</td>
        </tr>
-    </py:if>
+    {% endif %}
 </table>
 
-<h3>Anzeigedauer des Rodelbahnberichts ändern</h3>
-<form action="${h.url(controller='bericht', action='change_date_invalid', id=c.wrreport.id)}" method="post">
+<h3>Anzeigedauer des Rodelbahnberichts ändern</h3>
+<form action="{{url_for('bericht_change_date_invalid', id=wrreport.id)}}" method="post">
 <table>
        <tr>
                <th>Enddatum</th>
-               <td><input type="radio" name="date_invalid" value="no_change" checked="true" />Unverändert</td>
-               <td>${c.date_no_change.strftime('%Y-%m-%d %H:%M')}</td>
+               <td><input type="radio" name="date_invalid" value="no_change" checked="true" />Unverändert</td>
+               <td>{{date_no_change.strftime('%Y-%m-%d %H:%M')}}</td>
        </tr><tr>
                <th></th>
                <td><input type="radio" name="date_invalid" value="tomorrow" />Morgen</td>
-               <td>${c.date_tomorrow.strftime('%Y-%m-%d %H:%M')}</td>
+               <td>{{date_tomorrow.strftime('%Y-%m-%d %H:%M')}}</td>
        </tr><tr>
                <th></th>
                <td><input type="radio" name="date_invalid" value="one_week" />In einer Woche</td>
-               <td>${c.date_one_week.strftime('%Y-%m-%d %H:%M')}</td>
+               <td>{{date_one_week.strftime('%Y-%m-%d %H:%M')}}</td>
        </tr><tr>
                <th></th>
                <td><input type="radio" name="date_invalid" value="two_weeks" />In zwei Wochen</td>
-               <td>${c.date_two_weeks.strftime('%Y-%m-%d %H:%M')}</td>
+               <td>{{date_two_weeks.strftime('%Y-%m-%d %H:%M')}}</td>
        </tr><tr>
                <th></th>
-               <td><input type="radio" name="date_invalid" value="one_week_more" />Einer Woche länger</td>
-               <td>${c.date_one_week_more.strftime('%Y-%m-%d %H:%M')}</td>
+               <td><input type="radio" name="date_invalid" value="one_week_more" />Einer Woche länger</td>
+               <td>{{date_one_week_more.strftime('%Y-%m-%d %H:%M')}}</td>
        </tr><tr>
                <th></th>
                <td><input type="radio" name="date_invalid" value="end_of_saison" />Saisonende</td>
-               <td>${c.date_end_of_saison.strftime('%Y-%m-%d %H:%M')}</td>
+               <td>{{date_end_of_saison.strftime('%Y-%m-%d %H:%M')}}</td>
        </tr><tr>
                <th></th>
-               <td><input type="radio" name="date_invalid" value="now" />Jetzt (entspricht ohne Meldung löschen)</td>
-               <td>${c.date_now.strftime('%Y-%m-%d %H:%M')}</td>
+               <td><input type="radio" name="date_invalid" value="now" />Jetzt (entspricht ohne Meldung löschen)</td>
+               <td>{{date_now.strftime('%Y-%m-%d %H:%M')}}</td>
        </tr>
        <tr>
                <th></th>
                <td><input type="radio" name="date_invalid" value="userdefined" />Selbst festlegen: </td>
-               <td><input type="text" name="date_userdefined" value="${c.date_no_change.strftime('%Y-%m-%d %H:%M')}"/></td>
+               <td><input type="text" name="date_userdefined" value="{{date_no_change.strftime('%Y-%m-%d %H:%M')}}"/></td>
        </tr>
-       <tr><th>Durchführen</th><td><input type="submit" value="OK"/></td><td></td></tr>
+       <tr><th>Durchführen</th><td><input type="submit" value="OK"/></td><td></td></tr>
 </table>
 </form>
 
-
-</body>
-</html>
-
+{% endblock %}
\ No newline at end of file