summaryrefslogtreecommitdiff
path: root/templates/mod/dashboard.html
blob: e54b3cd3313220f56fca9234d7c60ff66f7a8839 (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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<fieldset>
	<legend>{% trans 'Boards' %}</legend>
	
	<ul>
		{% for board in boards %}
			<li>
				<a href="?/{{ config.board_path|sprintf(board.uri) }}{{ config.file_index }}">{{ config.board_abbreviation|sprintf(board.uri) }}</a>
					 - 
				{{ board.title|e }}
				{% if board.subtitle %}
					 <small>&mdash; {{ board.subtitle|e }}</small>
				{% endif %}
				{% if mod|hasPermission(config.mod.manageboards) %}
					 <a href="?/edit/{{ board.uri }}"><small>[{% trans 'edit' %}]</small></a>
				{% endif %}
			</li>
		{% endfor %}
		
		{% if mod|hasPermission(config.mod.newboard) %}
			<li style="margin-top:15px"><a href="?/new-board"><strong>{% trans 'Create new board' %}</strong></a></li>
		{% endif %}
	</ul>
</fieldset>

<fieldset>
	<legend>{% trans 'Messages' %}</legend>
	<ul>
		{% if mod|hasPermission(config.mod.noticeboard) %}
			{% if noticeboard|count > 0 %}
				<li>
					{% trans 'Noticeboard' %}:
					<ul>
						{% for post in noticeboard %}
							<li>
								<a href="?/noticeboard#{{ post.id }}">
									{% if post.subject %}
										{{ post.subject|e }}
									{% else %}
										<em>{% trans 'no subject' %}</em>
									{% endif %}
								</a> 
								<small class="unimportant">
									&mdash; by 
									{% if post.username %}
										{{ post.username|e }}
									{% else %}
										<em>deleted?</em>
									{% endif %} 
									at 
									{{ post.time|date(config.post_date) }} 
								</small>
							</li>
						{% endfor %}
					</ul>
				</li>
			{% endif %}
			<li><a href="?/noticeboard">{% trans 'View all noticeboard entries' %}</a></li>
		{% endif %}
		<li><a href="?/news">{% trans 'News' %}</a></li>
		<li>
			<a href="?/inbox">
				{% trans 'PM inbox' %} 
				{% if unread_pms > 0 %}<strong>{%endif %}({{ unread_pms }} unread){% if unread_pms > 0 %}</strong>{%endif %}
			</a>
		</li>
	</ul>
</fieldset>

<fieldset>
	<legend>{% trans 'Administration' %}</legend>
	
	<ul>
		{% if mod|hasPermission(config.mod.reports) %}
			<li>
				{% if reports > 0 %}<strong>{% endif %}
					<a href="?/reports">{% trans 'Report queue' %} ({{ reports }})</a>
				{% if reports > 0 %}</strong>{% endif %}
			</li>
		{% endif %}
		{% if mod|hasPermission(config.mod.view_banlist) %}
			<li><a href="?/bans">{% trans 'Ban list' %}</a></li>
		{% endif %}
		{% if mod|hasPermission(config.mod.manageusers) %}
			<li><a href="?/users">{% trans 'Manage users' %}</a></li>
		{% elseif mod|hasPermission(config.mod.change_password) %}
			<li><a href="?/users/{{ mod.id }}">{% trans 'Change password' %}</a></li>
		{% endif %}
		{% if mod|hasPermission(config.mod.themes) %}
			<li><a href="?/themes">{% trans 'Manage themes' %}</a></li>
		{% endif %}
		{% if mod|hasPermission(config.mod.modlog) %}
			<li><a href="?/log">{% trans 'Moderation log' %}</a></li>
		{% endif %}
		{% if mod|hasPermission(config.mod.rebuild) %}
			<li><a href="?/rebuild">{% trans 'Rebuild' %}</a></li>
		{% endif %}
		{% if mod|hasPermission(config.mod.show_config) %}
			<li><a href="?/config">{% trans 'Configuration' %}</a></li>
		{% endif %}
		
	</ul>
</fieldset>

{#
<fieldset>
	<legend>{% trans 'Search' %}</legend>
	
	<ul>
		<li>
			<form style="display:inline" action="?/search" method="post">
				<label style="display:inline" for="search">{% trans 'Phrase:' %}</label> 
				<input id="search" name="search" type="text" size="35">
				<input type="submit" value="{% trans 'Search' %}">
			</form>
			<p class="unimportant">{% trans '(Search is case-insensitive, and based on keywords. To match exact phrases, use "quotes". Use an asterisk (*) for wildcard.)' %}</p>
		</li>
	</ul>
</fieldset>
#}

{% if config.debug %}
	<fieldset>
		<legend>{% trans 'Debug' %}</legend>
		<ul>
			<li><a href="?/debug/antispam">{% trans 'Anti-spam' %}</a></li>
			<li><a href="?/debug/recent">{% trans 'Recent posts' %}</a></li>
			{% if mod|hasPermission(config.mod.debug_sql) %}
				<li><a href="?/debug/sql">{% trans 'SQL' %}</a></li>
			{% endif %}
		</ul>
	</fieldset>
{% endif %}

{% if newer_release %}
	<fieldset>
		<legend>Update</legend>
		<ul>
			<li>
				A newer version of Tinyboard 
				(<strong>v{{ newer_release.massive }}.{{ newer_release.major }}.{{ newer_release.minor }}</strong>) is available! 
				See <a href="http://tinyboard.org">http://tinyboard.org/</a> for upgrade instructions.
			</li>
		</ul>
	</fieldset>
{% endif %}

<fieldset>
	<legend>{% trans 'User account' %}</legend>
	
	<ul>
		<li><a href="?/logout">{% trans 'Logout' %}</a></li>
	</ul>
</fieldset>