added changing of polls
This commit is contained in:
parent
f2ef35b429
commit
81df603ba2
6 changed files with 217 additions and 18 deletions
36
wortschlucker/templates/poll_admin.html
Normal file
36
wortschlucker/templates/poll_admin.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xmlns:py="http://genshi.edgewall.org/">
|
||||
<xi:include href="layout.html" />
|
||||
|
||||
<head>
|
||||
<title>Poll settings</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Poll properties</h1>
|
||||
<form action="" method="post">
|
||||
<p>
|
||||
<label for="author">Your name:</label>
|
||||
<input type="text" id="author" name="author" />
|
||||
<span py:if="'author' in errors" class="error">${errors.author}</span>
|
||||
</p>
|
||||
<p>
|
||||
<label for="title">Poll name:</label>
|
||||
<input type="text" id="title" name="title" />
|
||||
<span py:if="'title' in errors" class="error">${errors.title}</span>
|
||||
</p>
|
||||
<p>
|
||||
<label for="description">Description:</label>
|
||||
<input type="text" id="description" name="description" />
|
||||
<span py:if="'description' in errors" class="error">${errors.description}</span>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" name="submit" value="Save poll" />
|
||||
<input type="submit" name="cancel" value="Cancel" />
|
||||
</p>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
25
wortschlucker/templates/poll_admin_details.html
Normal file
25
wortschlucker/templates/poll_admin_details.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xmlns:py="http://genshi.edgewall.org/">
|
||||
<xi:include href="layout.html" />
|
||||
|
||||
<head>
|
||||
<title>Poll details</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Poll: ${poll.title}</h1>
|
||||
<ul>
|
||||
<li>Author: ${poll.author}</li>
|
||||
<li>Created: ${poll.get_creation_time_string()}</li>
|
||||
<li>Description: ${poll.description}</li>
|
||||
<li>User URL: <a href="${poll.get_url()}" title="link of this poll">${poll.get_url()}</a></li>
|
||||
<li>Administrative URL: <a href="${poll.get_admin_url()}" title="link for managing this poll">${poll.get_admin_url()}</a></li>
|
||||
<li py:if="poll.get_settings()">Settings:<ul>
|
||||
<li py:for="key, value in poll.get_settings().items()">${key}: ${value}</li>
|
||||
</ul></li>
|
||||
<li><a href="${poll.get_edit_url()}" title="edit this poll">Edit this poll</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
<span py:if="'description' in errors" class="error">${errors.description}</span>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Create poll" />
|
||||
<input type="submit" name="submit" value="Create poll" />
|
||||
<input type="submit" name="cancel" value="Cancel" />
|
||||
</p>
|
||||
</form>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<p><a href="${base_url}polls/new" title="Create a new poll">Create a new poll</a></p>
|
||||
<ul py:if="polls">
|
||||
<li py:for="poll in polls">
|
||||
<a href="${poll.get_url()}" title="Details of poll ${poll.title}">
|
||||
<a href="${poll.get_admin_url()}" title="Details of poll ${poll.title}">
|
||||
Poll: ${poll.title} (${poll.get_num_of_submissions()}/${poll.get_num_of_submitters()})
|
||||
</a>
|
||||
</li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue