summaryrefslogtreecommitdiffstats
path: root/templates/agenda/wishlist.html
blob: 26f6e505426c03557aea5e4c364b53aac54f720f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{% 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">
		 <h2>{% trans 'Wishlist' %}</h2>
{% if wishlist %}
		 <ul>
	{% for object in wishlist %}
               	<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 %}
	
		{% 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 %}
            </ul>
{% else %}
<p>{% trans 'There are no items on the wishlist! Do you want to add one?' %}<a href="/admin/agenda/wish/add" class="actionlink">{% trans ' Click here.' %}</a>
	</div>
{% endif %}
{% endblock %}
{% block sidebar %}
	{{ block.super }}
{% endblock %}
{% block info %}
template: "agenda/wishlist.html"
{% endblock %}