Files
modoboa/extensions/stats/templates/index.html
T

83 lines
1.7 KiB
HTML

{% extends "layout.html" %}
{% load i18n %}
{% block html_head %}
<script src="/static/js/mootools-more.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="/static/stylesheets/box.css" />
<style type="text/css">
form {
margin: 0 auto;
width: 98%;
}
td {
font-size: smaller;
height: 40px;
}
errors {
text-align: center;
width: 100%;
margin: 20px 20px;
color: red;
}
#graphcontent {
margin:60px auto 10px;
width:90%;
}
</style>
<script type="text/javascript">
</script>
{% endblock %}
{% block menu %}
{% if domain %}
{% load admin_extras %}
{% domain_menu domain.id "stats" perms %}
{% endif %}
{% endblock %}
{% block middletitle %}
{% if domain %}
{% trans "Statistics for" %} {{ domain.name }}
{% else %}
{% trans "Global statistics" %}
{% endif %}
{% endblock %}
{% block content %}
<div id="graphcontent">
<table>
{% if domain %}
{% for p in periods %}
<tr>
<td>
<img src="/static/graphs/{{ domain.name }}_AVERAGE_{{ p }}.png" alt="No statistics available" />
</td>
</tr>
{% endfor %}
{% else %}
{% if domains %}
<tr>
<th width="50px">{% trans "Graph type" %}</th>
<th width="80px">{% trans "Domain name" %}</th>
</tr>
{% for dom in domains %}
<tr class="{% cycle 'odd' 'even' %}">
<td>
{% for t in types %}
{% url extensions.stats.main.graph_display dom.id,t as graphurl %}
<a name="loadGraph" href="{{ graphurl }}">{{ t|lower }} </a>
{% endfor %}
</td>
{% url extensions.stats.main.domain dom.id as domurl %}
<td><a name="loadDom" href="{{ domurl }}">{{ dom.name }}</a></td>
</tr>
{% endfor %}
{% endif %}
{% endif %}
</table>
</div>
{% endblock %}