summaryrefslogtreecommitdiffstats
path: root/templates/agenda/wishlist.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/agenda/wishlist.html')
-rwxr-xr-xtemplates/agenda/wishlist.html40
1 files changed, 38 insertions, 2 deletions
diff --git a/templates/agenda/wishlist.html b/templates/agenda/wishlist.html
index bb4f176..26f6e50 100755
--- a/templates/agenda/wishlist.html
+++ b/templates/agenda/wishlist.html
@@ -1,5 +1,15 @@
{% extends 'agenda/base.html' %}
+{% load adminmedia %}
{% load i18n %}
+{% load comments %}
+{% block head %}
+ <script type="text/javascript">
+ function toggleDisplay(divId) {
+ var div = document.getElementById(divId);
+ div.style.display = (div.style.display=="none" ? "block": "none");
+ }
+ </script>
+{% endblock %}
{% block content_title %}<h1>{% trans 'Wishlist' %}</h1>{% endblock %}
{% block content %}
<div class="module">
@@ -7,19 +17,45 @@
{% if wishlist %}
<ul>
{% for object in wishlist %}
- <li>{{ object.title|title }}
+ <li><h3>{{ object.title|title }}</h3>
<p>{{ object.description }}</p>
{% if object.due_date %}<p>Due date: {{ object.due_date|date }}</p>{% endif %}
{% if object.location.count %}{% trans 'Location' %}:
{% for location in object.location.all %}
<a href="{% url agenda.views.location location.id %}" class="location">{{ location.title }}</a>
+
{% endfor %}
{% endif %}
+ {% if user.is_staff %} - <a href="/admin/agenda/wish/{{ object.id }}" class="changelink">{% trans 'Modify' %}</a> - <a href="/admin/agenda/wish/{{ object.id }}/delete" class="deletelink">{% trans 'Delete' %}</a>
+ {% endif %}
{% if object.comment_set.all %}{% trans 'Comments' %}: {{ object.comment_set.count }}{% endif %}
-{% if user.is_staff %} - <a href="/admin/agenda/wish/{{ object.id }}" class="changelink">{% trans 'Modify' %}</a> - <a href="/admin/agenda/wish/{{ object.id }}/delete" class="deletelink">{% trans 'Delete' %}</a>
+
+ {% get_comment_list for object as comment_list %}
+{% if comment_list %}
+<div class="module">
+<h4>{% trans 'Comments about this item' %}:</h4>
+{% for comment in comment_list %}
+{% if comment.is_public %}
+<h3>{{ comment.headline }}</h3>
+<p>{{ comment.comment|linebreaks }}
+<p>{% trans 'Posted by' %} {{ comment.user }} on {{ comment.submit_date|date }}
+{% if user.is_authenticated %} <a href="/admin/comments/comment/{{ comment.id }}/delete" class="deletelink">{% trans 'Delete' %}</a>{% endif %}
{% endif %}
+{% endfor %}
+
+</div>
+{% endif %}
+<a href="#" onClick="toggleDisplay('comment-{{ object.id }}');return false;">
+Add a comment</a>
+<div id="comment-{{ object.id }}" class="invisible">
+<form action="{% comment_form_target %}" method="POST">
+{% render_comment_form for object %}
+</div>
+
+
+
</li>
{% endfor %}