Make the petition system a bit more usable and visible
This commit is contained in:
24
templates/petition/index.html
Normal file
24
templates/petition/index.html
Normal 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 %}
|
||||
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user