summaryrefslogtreecommitdiffstats
path: root/templates/agenda/user_page.html
blob: a5b490dad26cbf585fbb077e07adbbcce2bc8717 (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{% extends 'agenda/base.html' %}
{% load i18n  %}
{% load comments  %}
{% if name %}{% block content_title %}<h1>{{ name|escape }}</h1>{% endblock %}
{% endif %}
{% load calendartable %}
{% block sidebar %}{{ block.super }}
{% if missing_pixies.count %}
<div class="module">
	<h2>{% trans 'Events that need a pixie' %}:</h2>
	<ul class="actionlist">
		{% for event in missing_pixies %}
		<li><form action="{% url agenda.views.adoptevent event.id %}"  class="collapse"  method="POST">  <input type="hidden" name="event" value="{{ event.id }}" id="id_event" />
		<a href="{% url agenda.views.event event.id %}">{{ event.title }}</a>: <span class="mini quiet">{{ event.description }} -  {{ event.start_date|date }} 
		{% if event.groups.count %} {% trans 'Groups' %}: {{ event.network.iterator|join:" ," }} {% endif %}
		</span> 
		{% if user.is_authenticated %}<a href="/admin/agenda/event/{{ event.id }}/" class="changelink">edit</a> <input type="hidden" name="pixie" value="{{ user.id }}" id="id_pixie" /> <input type="submit" name="submit" class="close-post" value="{% trans 'I will do it' %}">{% endif %}
		</form></li>
		{% endfor %}
	</ul>
	</div>
	{% endif %}
{% endblock %}
{% block content %}
        <h1>{% trans 'Home page of' %}: {{ user.username }}</h1>
	<div class="module">
		<h2>{% trans 'User info' %}</h2>
		<ul class="actionlist">	
			<li>{% trans 'Date Joined' %}: {{ user.date_joined|date }}</li>
			{% if user.is_staff %}<li>{% trans 'User is staff' %}</li>{% endif %}
			{% if user.is_superuser %}<li><b>{% trans 'User is superuser' %}</b></li>{% endif %}
			<li>{% trans 'email' %} {{ user.email }}</li>
		</ul>
	</div>
	<div class="module">
		<h2>{% trans 'Your groups' %}</h2>
		<ul>
			{% for group in user.groups.all %}
			<li><a href="{% url agenda.views.justonegroup group.id %}">{{ group }}</a><br>
			Members: {{ group.user_set.count }} - Comments: {% get_comment_count for group as comment_count %}
			{% get_comment_list for group as comment_list %} {% if comment_list %}{% for comment in comment_list %} 
    {{ comment.comment }} - posted by {{ comment.user_name }} on {{ comment.submit_date|date }}

{% endfor %}
{% endif  %}
</li>
			{% endfor %}
		</ul>
	</div>
{% if group_todos.count %}
<div class="module">
	<h2>{% trans 'Pending ToDos on your groups' %}:</h2>
	<ul class="actionlist">
		{% for todo in group_todos %}
		<li><form action="{% url agenda.views.closealltodo todo.id %}"  class="collapse"  method="POST">  <input type="hidden" name="todo" value="{{ todo.id }}" id="id_todo" /><a href="/admin/agenda/todo/{{ todo.id }}/">{{ todo.title }}</a>: <span class="mini quiet">{{ todo.description }} Groups: {{ todo.network.iterator|join:" ," }}</span> {% if user.is_authenticated %}<a href="/admin/agenda/todo/{{ todo.id }}/" class="changelink">edit</a> <input type="hidden" name="done" value="True" id="id_done" /> <input type="submit" name="submit" class="close-post" value="close">{% endif %}
		</form></li>
		{% endfor %}
	</ul>
	</div>
	{% endif %}
<div class="module">
		<h2>{% trans 'Your events' %}</h2>
		{% if my_mentored_events %}
		<h3>{% trans 'Events you coordinate' %}</h3>
		<ul class="actionlist">
			{% for event in  my_mentored_events %}
				<li><a href="{% url agenda.views.event event.id %}">{{ event.title }}</a> - {{ event.start_date|date }}</li>
			{% endfor %}
		</ul>
		{% endif %}
		{% if  attending %}
		<h3>{% trans 'Events you are attending' %}</h3>
		<ul class="actionlist">
			{% for event in  attending %}
				<li><a href="{% url agenda.views.event event.id %}">{{ event.title }}</a> - {{ event.start_date|date }}</li>
			{% endfor %}
		</ul>
		{% endif %}
	</div>
		{% if user.userflag_set.count %}
	<div class="module">
		<h2>{% trans 'User flags' %}:</h2>
		{% for flag in  user.userflag_set.all %}
		{{ flag.comment }}<br>
		{% endfor %}</td></div>
{% endif %}

	{% if user.messages_set.count %}
	<div class="module">
		        <h2>{% trans 'Messages' %}:</h2>
			<ul class="actionlist">
				{% for logentry in  user.messages_set.all %} 
				<li>{{ logentry }}</li>
				{% endfor %}
		</ul></div>
	{% endif %}
	{% if user.comment_set.count %}<div class="module">
		<h2>{% trans 'Comments' %}:</h2>
		<ul class="actionlist">
			{% for comment in  user.comment_set.all  %}
			<li>{{ comment.headline }}</li>
			{% endfor %}</ul></div>
	{% endif %}
{{ calendartable  }}
</div>
{% endblock %}
{% block info %}
template: "agenda/user_page.html"
{% endblock %}