admin interface with tab layout
This commit is contained in:
parent
5d2a411f6a
commit
a2c83f1b05
6 changed files with 153 additions and 97 deletions
57
tycker/templates/admin_edit.html
Normal file
57
tycker/templates/admin_edit.html
Normal file
|
@ -0,0 +1,57 @@
|
|||
<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>
|
||||
<link href="../admin.css" type="text/css" rel="stylesheet" />
|
||||
<link href="../bootstrap/css/bootstrap.min.css" type="text/css" rel="stylesheet" media="all" />
|
||||
<link href="../bootstrap/css/bootstrap-theme.min.css" type="text/css" rel="stylesheet" media="all" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container theme-showcase" role="main">
|
||||
<h1 id="title">Tycker Administration</h1>
|
||||
|
||||
<?python
|
||||
import datetime
|
||||
now = datetime.datetime.now()
|
||||
?>
|
||||
|
||||
<div class="page-header"></div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation"><a href="../admin">New entry</a></li>
|
||||
<li role="presentation" class="active"><a href="#">All entries</a></li>
|
||||
<li role="presentation"><a href="../../${static_url}" title="static website" target="_blank">Ticker</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-8">
|
||||
<p> </p>
|
||||
<div class="well" py:for="entry in entries">
|
||||
<form action="submit" method="GET" >
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="date" value="${entry['timestamp'].strftime(date_format)}" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="title" value="${entry['title']}" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<textarea name="content" class="form-control" rows="8" cols="80">${entry['content']}</textarea>
|
||||
</div>
|
||||
<input type="hidden" name="entry_id" value="${entry.id}" /><button type="submit" class="btn btn-default">Update</button>
|
||||
</form>
|
||||
<br/>
|
||||
<form action="delete" method="GET">
|
||||
<input type="hidden" name="entry_id" value="${entry.id}" />
|
||||
<button type="submit" class="btn btn-default">Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<xi:include href="help.html" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue