~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
{% extends "wlmaps/base.html" %}
{% comment %}
   vim:ft=htmldjango
{% endcomment %}

{% load custom_date %}
{% load wlprofile_extras %}
{% load wlmaps_extra %}
{% load threadedcommentstags %}
{% load pagination_tags %}

{% block content %}
<a href="{% url 'wlmaps_upload' %}" class="posRight invertedColor small">Upload a new map</a>
<h1>Maps</h1>
<div class="blogEntry">
	<p>
	The map files have to be placed in the Widelands map directory to be found by the game. Check the <a href="/wiki/Technical%20FAQ/#where_are_my_maps_and_savegames_stored">Technical FAQ</a> to find the map directory.
	</p>
	{% autopaginate maps maps_per_page %}
	{% paginate %}
	<br />
	<table class="maps">
		{% for map in maps %}
		<tr class="{% cycle "odd" "even" %}">
			<td class="first-column"><a href="{{ map.get_absolute_url }}"><img class="minimap" src="{{ MEDIA_URL }}{{ map.minimap.url }}" alt="{{ map.name }}" /></a></td>
			<td>
				<h3><a class="invertedColor" href="{{ map.get_absolute_url }}">{{ map.name }}</a></h3>
				<table>
					<tr>
						<td class="grey">Author:</td><td>{{ map.author }}</td>
						<td class="spacer"></td>
						<td class="grey">Dimensions:</td><td>{{ map.w }} x {{ map.h }}</td>
					</tr>
					<tr>
						<td class="grey">World:</td>
						<td>
						{% if map.world_name %}
						{{ map.world_name|title }}
						{% else %}
						One World
						{% endif %}
						</td>
						<td class="spacer"></td>
						<td class="grey">Max. Players:</td><td>{{ map.nr_players }}</td>
					</tr>
					<tr>
						<td class="grey">Rating:</td>
						<td>{{ map.rating|average_rating }} ({{ map.rating.votes }} Votes)</td>
						<td class="spacer"></td>
						{% get_comment_count for map as ccount %}
						<td class="grey">Comments:</td><td>{{ ccount }}</td>
					</tr>
					<tr>
						<td class="grey">Upload:</td>
						<td colspan="4">by {{ map.uploader|user_link }} at {{ map.pub_date|custom_date:user }}</td>
					</tr>
					{% if not map.world_name %}
					<tr>
						<td colspan="5"><strong>This map requires a version of Widelands newer than build18!</strong></td>
					</tr>
					{% endif %}
					<tr>
						<td class="grey">Downloads:</td><td>{{ map.nr_downloads }}</td>
						<td class="spacer"></td>
						<td colspan="2">
							<a class="button" href="{% url 'wlmaps_download' map.slug %}">
								<img src="{{ MEDIA_URL }}img/download.png" alt ="" class="middle" />
								<span class="middle">Direct Download</span>
							</a>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		{% endfor %}
	</table>
	<br />
	{% paginate %}
</div>
{% endblock %}