]> git.openstreetmap.org Git - osqa.git/blob - forum/skins/default/templates/osqaadmin/dashboard.html
New optional admin interface, and closing OSQA 253.
[osqa.git] / forum / skins / default / templates / osqaadmin / dashboard.html
1 {% extends basetemplate %}
2
3 {% load i18n %}
4 {% load user_tags %}
5
6 {% block subtitle %}
7     {% trans "Dashboard" %}
8 {% endblock %}
9 {% block description %}
10     {% trans "Welcome to the OSQA administration area." %}
11 {% endblock %}
12
13 {% block admincontent %}
14     <div class="module" style="width:49%; display: inline-block; vertical-align: top;">
15         <table style="width: 100%; height: 100%;">
16             <caption>{% trans "Quick statistics"  %}</caption>
17             <tr>
18                 <td>
19                 {{ statistics.total_questions }} {% trans "question" %}{{ statistics.total_questions|pluralize }} ({{ statistics.questions_last_24 }} {% trans "in the last 24 hours" %})
20                 </td>
21             </tr>
22             <tr>
23                 <td>
24                 {{ statistics.total_answers }} {% trans "answer" %}{{ statistics.total_answers|pluralize }} ({{ statistics.answers_last_24 }} {% trans "in the last 24 hours" %})
25                 </td>
26             </tr>
27             <tr>
28                 <td>
29                 {{ statistics.total_users }} {% trans "user" %}{{ statistics.total_users|pluralize }} ({{ statistics.users_last_24 }} {% trans "joined in the last 24 hours" %})
30                 </td>
31             </tr>
32         </table>
33     </div>
34     <div class="module" style="width:49%; display: inline-block;">
35         <table>
36         <caption>{%trans "Site status" %}</caption>
37             <tr>
38                 <td>
39                     {% ifequal settings_pack "bootstrap" %}
40                         {% trans "Your site is running in bootstrap mode, click the button below to revert to defaults." %}<br />
41                     {% else %}
42                         {% ifequal settings_pack "default" %}
43                             {% trans "Your site is running in standard mode, click the button below to run in bootstrap mode." %}<br />
44                         {% else %}
45                             {% trans "Your site is running with some customized settings, click the buttons below to run with defaults or in bootstrap mode" %}
46                         {% endifequal %}
47                     {% endifequal %}
48                     {% ifnotequal settings_pack "default" %}
49                         <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>
50                     {% endifnotequal %}
51                     {% ifnotequal settings_pack "bootstrap" %}
52                         <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>
53                     {% endifnotequal %}
54                 </td>
55             </tr>
56             <tr>
57                 <td>
58                     <em>"Bootstrap mode" relaxes the minimum required reputation to perform actions like voting and commenting.
59                     This is useful to help new communities get started.</em>
60                 </td>
61             </tr>
62         </table>
63     </div>
64     <div class="module" style="width:98%; display: inline-block;">
65         <table width="100%">
66         <caption>{% trans "Recent activity" %}</caption>
67             <tr>
68                 <td colspan="2">
69                     <table width="100%">
70                     {% for activity in recent_activity %}
71                         <tr><td>{% activity_item activity request.user %}</td></tr>
72                     {% endfor %}
73                     </table>
74                 </td>
75             </tr>
76         </table>
77     </div>
78 {% endblock %}