Make the petition system a bit more usable and visible

This commit is contained in:
Trever Fischer
2012-06-07 16:54:59 -04:00
parent d776b7bd1c
commit 7f710bd049
8 changed files with 59 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
{% extends 'base.html' %}
{% load markup %}
{% block title%}Petitions{%endblock%}
{% block content %}
<div class="item">
<h2>Open Petitions</h2>
<a href="{% url petition.views.create %}">Create Petition</a>
<ul class="petition-list">
{% for petition in openPetitions %}
<li><div class="petition-title"><a href="{{petition.get_absolute_url}}">{{petition.id}} - {{petition.body|truncatewords:8}}</a></div>
<div class="petition-summary">Filed by {{petition.author}}</div></li>
{% endfor %}
</ul>
<h2>Closed Petitions</h2>
<ul class="petition-list">
{% for petition in closedPetitions %}
<li><div class="petition-title"><a href="{{petition.get_absolute_url}}">{{petition.id}} - {{petition.body|truncatewords:8}}</a></div>
<div class="petition-summary">Filed by {{petition.author}}</div></li>
{% endfor %}
</ul>
</div>
{% endblock %}

View File

@@ -4,9 +4,12 @@
{% block title %}Petition #{{petition.id}}{% endblock %}
{% block content %}
<div class="item">
<p>Created by {{petition.author}}</p>
{{petition.body|markdown:"safe"}}
</div>
<div class="item">
{% for comment in petition.comment_set.all %}
<p>By {{comment.author}}</p>
{{comment.body|markdown:"safe"}}
@@ -17,4 +20,5 @@
{{form.as_p}}
<input type="submit" value="Submit"/>
</form>
</div>
{% endblock %}