🔥 Remove stat and log views
➖ Remove djangorestframework
This commit is contained in:
1 parent
d7513f389e
commit
7ba3ead688
13 files changed
+67
-609
No files matched your search
+2
-2
@@ -28,8 +28,8 @@
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="{% block active_register %}{% endblock %}"><a href="{% url "home" %}"><i class="glyphicon glyphicon-home white"></i> Kjøp drikke</a></li>
|
||||
<li class="{% block active_deposit %}{% endblock %}"><a href="{% url "deposit" %}">Sett inn penger</a></li>
|
||||
<li class="{% block active_log %}{% endblock %}"><a href="/log"><i class="glyphicon glyphicon-list-alt"></i> Logg</a></li>
|
||||
<li class="{% block active_stats %}{% endblock %}"><a href="/stats"><i class="glyphicon glyphicon-stats"></i> Statistikk</a></li>
|
||||
<li class="{% block active_log %}{% endblock %}"><a href="{% url "log" %}"><i class="glyphicon glyphicon-list-alt"></i> Logg</a></li>
|
||||
<li class="{% block active_stats %}{% endblock %}"><a href="{% url "stats" %}"><i class="glyphicon glyphicon-stats"></i> Statistikk</a></li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{% if not user.is_authenticated %}
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
{% block active_log %}active{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section id="log" class="row">
|
||||
{% if messages %}
|
||||
<section class="row">
|
||||
<div class="col-xs-4">
|
||||
{% for message in messages %}
|
||||
<div {% if message.tags %}class="alert alert-{{ message.tags }}"{% endif %}>{{ message }}<a class="close" data-dismiss="alert">×</a></div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<section id="orders">
|
||||
{% if not limit %}
|
||||
<h2 title="Alle registrerte ordre">Alle ordre</h2><br />
|
||||
<a href="{% url 'log' %}">Vis kun siste</a>
|
||||
{% else %}
|
||||
<h2 title="Ordre fra de siste 2 dagene eller de 5 siste ordrene.">Siste ordre</h2><br />
|
||||
<a href="{% url 'log-all' %}">Vis alle</a>
|
||||
{%endif %}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Når</th>
|
||||
<th>Hvem</th>
|
||||
<th>Hva</th>
|
||||
<th>Sum</th>
|
||||
<!--<th>Handling</th>-->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for order in orders %}
|
||||
<tr>
|
||||
<td>{{ order.created }}</td>
|
||||
<td>{% if order.customer %}{% if order.customer.profile.image %}<img src="{{ order.customer.profile.image }}" class="customer" title="{{ order.customer.first_name }} {{ order.customer.last_name|slice:":1"}}" />{% else %}{{ order.customer.first_name }} {{ order.customer.last_name|slice:":1"}}{% endif %}{% else %}Ekstern{% endif %}</td>
|
||||
<td>{% for line in order.orderlines.all %}
|
||||
<span class="amount">{{ line.amount}}</span> <a href="#" class="product" title="{{ line.unit_price}} per">{{ line.product }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</td>
|
||||
<td>{{ order.order_sum }}</td>
|
||||
<!--<td><{% include "modal-delete-order.html" with order=order %}<a class="btn btn-danger" data-toggle="modal" href="#modal-order-{{order.id}}"><i class="icon-trash icon-white"></i> Slett</a></td>-->
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<section id="transactions">
|
||||
{% if not limit %}
|
||||
<h2 title="Alle registrerte transaksjoner">Alle transaksjoner</h2>
|
||||
<br /><a href="{% url 'log' %}#transactions">Vis kun siste</a>
|
||||
{% else %}
|
||||
<h2 title="Transaksjoner fra de siste 2 dagene eller de 5 siste transaksjonene.">Siste transaksjoner</h2><br />
|
||||
<a href="{% url 'log-all' %}#transactions">Vis alle</a>
|
||||
{%endif %}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Når</th>
|
||||
<th>Hvem</th>
|
||||
<th>Innskudd</th>
|
||||
<!--<th>Handling</th>-->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for t in transactions %}
|
||||
<tr>
|
||||
<td>{{ t.created }}</td>
|
||||
<td>{% if t.user.profile.image %}<img src="{{ t.user.profile.image }}" class="customer" title="{{ t.user.first_name }} {{ t.user.last_name|slice:":1"}}" />{% else %}{{ t.user.first_name }} {{ t.user.last_name|slice:":1"}}{% endif %}</td>
|
||||
<td>{{ t.amount }}</td>
|
||||
<!--<td>{% include "modal-delete-transaction.html" with t=t %}<a class="btn btn-danger" data-toggle="modal" href="#modal-trans-{{t.id}}"><i class="icon-trash icon-white"></i> Slett</a></td>-->
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@@ -1,36 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
{% block active_stats %}active{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section id="stats" class="row">
|
||||
<section id="products_realtime" class="row">
|
||||
<div class="col-xs-12">
|
||||
<h2>Realtime produkter</h2>
|
||||
<div id="products_realtime_chart"></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="product" class="row">
|
||||
<h2>Produkter</h2>
|
||||
{% for product in products %}
|
||||
<section id="product_{{ product.id }}">
|
||||
<div class="col-xs-6">
|
||||
<div id="product_chart{{ product.id }}"></div>
|
||||
</div>
|
||||
</section>
|
||||
{% endfor %}
|
||||
</section>
|
||||
<section id="order">
|
||||
{% for group in order_groups %}
|
||||
<section id="order_{{ group }}" class="row" data-group="{{ group }}">
|
||||
<h2>{{ group|capfirst }}</h2>
|
||||
<div class="col-xs-12">
|
||||
<div id="order_chart_{{ group }}"></div>
|
||||
</div>
|
||||
</section>
|
||||
{% endfor %}
|
||||
</section>
|
||||
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
Reference in new issue
Block a user