mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-21 06:18:45 +02:00
perms object is no longer passed to builtins or filters, we use user instead (it seems that perms content is different with Django 1.2) #48 : I think I've found a way to include templatetags dynamically, using add_to_builtins.
48 lines
1.3 KiB
HTML
48 lines
1.3 KiB
HTML
{% extends "admin/domain_header.html" %}
|
|
{% load i18n %}
|
|
{% block html_head %}
|
|
<link rel="stylesheet" type="text/css" href="/static/stylesheets/calendar.css" />
|
|
<style type="text/css">
|
|
#selectors {
|
|
float: none;
|
|
}
|
|
</style>
|
|
|
|
<script type="text/javascript">
|
|
window.addEvent("domready", function() {
|
|
$("period").addEvent("change", function(event) {
|
|
{% url extensions.stats.main.index domain.id as stats_url %}
|
|
location.href = "{{ stats_url }}" + "?period=" + $("period").value;
|
|
});
|
|
});
|
|
</script>
|
|
<script type="text/javascript" src="/static/js/calendar.js"></script>
|
|
{% endblock %}
|
|
|
|
{% block menu %}
|
|
{% if domain %}
|
|
{% load admin_extras %}
|
|
{% domain_menu domain.id "stats" user %}
|
|
{% endif %}
|
|
{% endblock %}
|
|
{% block domcontent %}
|
|
<div id="selectors">
|
|
<label for="period">{% trans "Period:" %}</label>
|
|
<select id="period" name="period">
|
|
{% for p in periods %}
|
|
<option value="{{ p }}" {% ifequal p period %}selected{% endifequal %}>{{ p }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
{% ifequal period "Custom" %}
|
|
{% include "stats/calendar.html" %}
|
|
{% endifequal %}
|
|
</div>
|
|
{% if start or end %}
|
|
<h3>{% trans "Custom period : from" %} {{ start }} {% trans "to" %} {{ end }}</h3>
|
|
{% endif %}
|
|
<div style="float:None;">
|
|
{% include "stats/graphs.html" %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|