codekasten/pycker/templates/admin_show_entries.html

43 lines
1.5 KiB
HTML
Raw Normal View History

2012-04-20 03:49:00 +02:00
<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="layout.html" />
<head>
<title>Admin Ticker</title>
</head>
<body>
<?python
import datetime
now = datetime.datetime.now()
?>
<p><form action="generate" method="GET">
<input type="submit" value="Generate" />
<i><a href="../../${static_url}" title="static website">static website</a></i>
</form></p>
<table border="1">
<tr><th>Timestamp</th><th>Title</th><th>Content</th></tr>
<tr><form action="submit" method="GET">
<td><input type="text" size="15" name="date" value="${now.strftime(date_format)}" /></td>
<td><input type="text" size="25" name="title" value="" autofocus="autofocus" /></td>
<td><textarea name="content" rows="8" cols="80" /></td>
<td><input type="submit" value="Create" /></td>
</form></tr>
<tr py:for="entry in entries"><form action="submit" method="GET">
<td><input type="text" size="15" name="date" value="${entry['timestamp'].strftime(date_format)}" /></td>
<td><input type="text" size="25" name="title" value="${entry['title']}" /></td>
<td><textarea name="content" rows="8" cols="80">${entry['content']}</textarea></td>
<td><input type="hidden" name="entry_id" value="${entry.id}" /><input type="submit" value="Update" /></td>
</form>
<td><form action="delete" method="GET">
<input type="hidden" name="entry_id" value="${entry.id}" />
<input type="submit" value="Delete" />
</form></td>
</tr>
</table>
</body>
</html>