clean some kfet templates

This commit is contained in:
Aurélien Delobelle 2017-04-02 05:17:26 +02:00
parent 55116f7179
commit 96597aa146
3 changed files with 43 additions and 39 deletions

View file

@ -13,12 +13,17 @@
{% if account.user == request.user %} {% if account.user == request.user %}
<script type="text/javascript" src="{% static 'kfet/js/Chart.bundle.js' %}"></script> <script type="text/javascript" src="{% static 'kfet/js/Chart.bundle.js' %}"></script>
<script type="text/javascript" src="{% static 'kfet/js/statistic.js' %}"></script> <script type="text/javascript" src="{% static 'kfet/js/statistic.js' %}"></script>
<script>
jQuery(document).ready(function() { <script type="text/javascript">
var stat_last = new StatsGroup("{% url 'kfet.account.stat.last' trigramme=account.trigramme %}", $(document).ready(function() {
$("#stat_last")); var stat_last = new StatsGroup(
var stat_balance = new StatsGroup("{% url 'kfet.account.stat.balance' trigramme=account.trigramme %}", "{% url 'kfet.account.stat.last' trigramme=account.trigramme %}",
$("#stat_balance")); $("#stat_last"),
);
var stat_balance = new StatsGroup(
"{% url 'kfet.account.stat.balance' trigramme=account.trigramme %}",
$("#stat_balance"),
);
}); });
</script> </script>
{% endif %} {% endif %}

View file

@ -1,5 +0,0 @@
{% if account.user == request.user %}
Mon compte
{% else %}
Informations du compte {{ account.trigramme }}
{% endif %}

View file

@ -1,6 +1,11 @@
{% extends 'kfet/base.html' %} {% extends 'kfet/base.html' %}
{% load staticfiles %} {% load staticfiles %}
{% block extra_head %}
<script type="text/javascript" src="{% static 'kfet/js/Chart.bundle.js' %}"></script>
<script type="text/javascript" src="{% static 'kfet/js/statistic.js' %}"></script>
{% endblock %}
{% block title %}Informations sur l'article {{ article }}{% endblock %} {% block title %}Informations sur l'article {{ article }}{% endblock %}
{% block content-header-title %}Article - {{ article.name }}{% endblock %} {% block content-header-title %}Article - {{ article.name }}{% endblock %}
@ -96,13 +101,12 @@
</div> </div>
{% endblock %} {% endblock %}
{% block extra_head %} <script type="text/javascript">
<script type="text/javascript" src="{% static 'kfet/js/Chart.bundle.js' %}"></script> $(document).ready(function() {
<script type="text/javascript" src="{% static 'kfet/js/statistic.js' %}"></script> var stat_last = new StatsGroup(
<script> "{% url 'kfet.article.stat.last' article.id %}",
jQuery(document).ready(function() { $("#stat_last"),
var stat_last = new StatsGroup("{% url 'kfet.article.stat.last' article.id %}", );
$("#stat_last"));
}); });
</script> </script>
{% endblock %} {% endblock %}