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
{% extends basetemplate %}
{% load i18n %}
{% load user_tags %}
{% block subtitle %}
{% trans "Dashboard" %}
{% endblock %}
{% block description %}
{% trans "Welcome to the OSQA administration area." %}
{% endblock %}
{% block admincontent %}
<div class="module" style="width:49%; display: inline-block; vertical-align: top;">
<table style="width: 100%; height: 100%;">
<caption>{% trans "Quick statistics" %}</caption>
<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>
</div>
<div class="module" style="width:49%; display: inline-block;">
<table>
<caption>{%trans "Site status" %}</caption>
<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>
</div>
<div class="module" style="width:98%; display: inline-block;">
<table width="100%">
<caption>{% trans "Recent activity" %}</caption>
<tr>
<td colspan="2">
<table id="result_list" width="100%">
{% for activity in recent_activity.paginator.page %}
<tr class="{% cycle 'row1' 'row2' %}"><td>{% activity_item activity request.user %}</td></tr>
{% endfor %}
</table>
</td>
</tr>
</table>
<p class="paginator">
{{ recent_activity.paginator.page_numbers }}
</p>
</div>
{% endblock %}