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 "osqaadmin/base.html" %}
{% load i18n %}
{% load user_tags %}
{% block subtitle %}
{% trans "Dashboard" %}
{% endblock %}
{% block description %}
{% trans "Welcome to the OSQA administration area." %}
{% endblock %}
{% block admincontent %}
<table width="100%">
<tr>
<td width="50%" valign="top">
<h3>{%trans "Site statistics" %}</h3>
<table>
<tr>
<td>
{{ statistics.total_questions }} {% trans "question" %}{{ statistics.total_questions|pluralize }} ({{ statistics.questions_last_24 }} {% trans "in the last 24 hours" %})
</td>
</tr>
<tr>
<td>
{{ statistics.total_answers }} {% trans "answer" %}{{ statistics.total_answers|pluralize }} ({{ statistics.answers_last_24 }} {% trans "in the last 24 hours" %})
</td>
</tr>
<tr>
<td>
{{ statistics.total_users }} {% trans "user" %}{{ statistics.total_users|pluralize }} ({{ statistics.users_last_24 }} {% trans "joined in the last 24 hours" %})
</td>
</tr>
</table>
</td>
<td valign="top">
<h3>{%trans "Site status" %}</h3>
<table>
<tr>
<td>
{% ifequal settings_pack "bootstrap" %}
{% trans "Your site is running in bootstrap mode, click the button below to revert to defaults." %}<br />
{% else %}
{% ifequal settings_pack "default" %}
{% trans "Your site is running in standard mode, click the button below to run in bootstrap mode." %}<br />
{% else %}
{% trans "Your site is running with some customized settings, click the buttons below to run with defaults or in bootstrap mode" %}
{% endifequal %}
{% endifequal %}
{% ifnotequal settings_pack "default" %}
<button onclick="if (window.confirm('{% trans "Are you sure you want to revert to the defaults?" %}')) window.location='{% url admin_go_defaults %}';">{% trans "revert to defaults" %}</button>
{% endifnotequal %}
{% ifnotequal settings_pack "bootstrap" %}
<button onclick="if (window.confirm('{% trans "Are you sure you want to run bootstrap mode?" %}')) window.location='{% url admin_go_bootstrap %}';">{% trans "go bootstrap" %}</button>
{% endifnotequal %}
</td>
</tr>
<tr>
<td>
<em>"Bootstrap mode" relaxes the minimum required reputation to perform actions like voting and commenting.
This is useful to help new communities get started.</em>
</td>
</tr>
</table>
<h3>{%trans "Recalculate scores and reputation" %}</h3>
<button onclick="if (window.confirm('{% trans "This is a heavy operation, are you sure?" %}')) window.location='{% url admin_denormalize %}';">{% trans "Recalculate" %}</button>
</td>
</tr>
<tr>
<td colspan="2">
<h3>{% trans "Recent activity" %}</h3>
<table width="100%">
{% for activity in recent_activity %}
{% activity_item activity request.user %}
{% endfor %}
</table>
</td>
</tr>
</table>
{% endblock %}