~widelands-dev/widelands-website/trunk

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
110
111
112
113
114
115
{% comment %}
 vim:ft=htmldjango:

 This file is included by mainpage and contains all the left menu boxes
 on the site
{% endcomment %}


{% load inbox %}
{% load i18n %}
{% load wlprofile_extras wlpoll_extras wlevents_extras %}
{% load pybb_extras %}
{% load online_users %}

<!-- Donation Box -->
<div class="columnModule">
	<h3>Donation</h3>
	<div class="columnModuleBox center">
		<p>
		Help us to pay our server!
		<br />
		(: Consider a donation :)
		</p>
		<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
			<input type="hidden" name="cmd" value="_s-xclick" />
			<input type="hidden" name="lc" value="GB" />
			<input type="hidden" name="hosted_button_id" value="JH5R7YHSVRMRG" />
			<input type="image" class="donate" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" name="submit" alt="PayPal - The safer, easier way to pay online!" />
			<img alt="" src="https://www.paypal.com/de_DE/i/scr/pixel.gif" width="1" height="1" />
		</form>
		<br /><br />
	</div>
</div>


<!-- Social Media Box -->
<div class="columnModule">
	<h3>Social Media</h3>
	<div class="columnModuleBox center">
		<ul class="socialMediaList center">
			<li><a href="https://www.facebook.com/WidelandsOfficial" target="_blank"><img src="{{ MEDIA_URL }}img/socialmedia/facebook.png" alt="Facebook"></a></li>
			<li><a href="https://plus.google.com/108069355276040649622" target="_blank"><img src="{{ MEDIA_URL }}img/socialmedia/googleplus.png" alt="Google+"></a></li>
		</ul>
	</div>
</div>


<!-- Current polls if any -->
{% get_open_polls as polls %}
{% if polls %}
<div class="columnModule">
	<h3>Polls</h3>
	<div class="columnModuleBox">
	{% for p in polls %}
		<h4>{{p.name}}</h4>
		{% if not user.is_anonymous %}
			{% if p.user_has_voted %}
				<p class="small">You already voted on this!</p>
				<div class="center">
					<input type="button" value="Results" onclick="location='{% url 'wlpoll_detail' p.id %}'" />
				</div>
			{% else %}
				<form method="post" action="{% url 'wlpoll_vote' p.id %}">
					<ul class="poll">
					{% for c in p.choices.all %}
						<li><input id="{{ c.id }}" class="radio" type="radio" name="choice_id" value="{{ c.id }}" /><label for="{{ c.id }}">{{ c.choice }}</label></li>
					{% endfor %}
					</ul>
					<div class="center">
						<input type="submit" value="Vote" />
						<input type="button" value="Results" onclick="location='{% url 'wlpoll_detail' p.id %}'" />
					</div>
					{% csrf_token %}
				</form>
			{% endif %}
		{% else %}
			<p class="small"><a href="{% url 'auth_login' %}?next={{ request.path|iriencode }}">Log in</a> to vote!</p>
			<div class="center">
				<input type="button" value="Results" onclick="location='{% url 'wlpoll_detail' p.id %}'" />
			</div>
		{% endif %}
	{% endfor %}
		<div class="center">
			<p><a href="{% url 'wlpoll_archive' %}">Archive</a></p>
		</div>
	</div>
</div>
{% endif %}

<!-- Future Events if any -->
{% get_future_events as events %}
{% if events.count %}         
<div class="columnModule">
	<h3>Important Dates</h3>
	<div class="columnModuleBox">
		<ul>
			{% for e in events %}
				<li>
				{{e.start_date|date:"d M"}}
				{% ifnotequal e.start_date e.end_date %}
					 - {{e.end_date|date:"d M"}}
				{% endifnotequal %}
				- <a href="{{e.link}}">{{e.name}}</a></li>
			{% endfor %}
		</ul>
	</div>
</div>
{% endif %}


<!-- Logged in users -->
{% online_users 10 %}

<!-- Latest Post -->
{% pybb_last_posts %}