aboutsummaryrefslogtreecommitdiff
path: root/templates/world_info.tmpl
blob: 578a0f7d2c2659d68046c85d9c49e0ce2224bc0a (plain) (blame)
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
{{template "_header.tmpl" .Common}}
	<div class="box">
		<h1>World Information</h1>
		{{with .World}}
			<table class="info">
				<tr>
					<th>Name:</th>
					<td>{{.Name}}</td>
				</tr>
				<tr>
					<th>Type:</th>
					<td>{{.Type}}</td>
				</tr>
				<tr>
					<th>Players Online:</th>
					<td>{{.NumPlayers}}</td>
				</tr>
				<tr>
					<th>Online Record:</th>
					{{if .OnlineRecord}}
						<td>{{.OnlineRecord}} players (on {{.OnlineRecordTime}})</td>
					{{else}}
						<td>None</td>
					{{end}}
				</tr>
			</table>
			<a class="button" href="/killstatistics?world={{.Name}}">Kill Statistics</a>
		{{else}}
			<p>No information available.</p>
		{{end}}
	</div>

	<div class="box">
		<h1>Players Online</h1>
		{{if .OnlineCharacters}}
			<table>
				<tr>
					<th>Name</th>
					<th>Level</th>
					<th>Vocation</th>
				</tr>
				{{range .OnlineCharacters}}
					<tr>
						<td><a href="/character?name={{.Name}}">{{.Name}}</a></td>
						<td>{{or .Level 1}}</td>
						<td>{{or .Profession "None"}}</td>
					</tr>
				{{end}}
			</table>
		{{else}}
			<p>There are no players online.</p>
		{{end}}
	</div>
{{template "_footer.tmpl" .Common}}