Improve counters views

This commit is contained in:
Skia
2016-03-29 10:30:24 +02:00
parent 21f1393097
commit 5bcc94f992
10 changed files with 110 additions and 9 deletions

View File

@ -0,0 +1,13 @@
{% extends "core/base.jinja" %}
{% block content %}
<h2>Edit counter</h2>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p() }}
<p><input type="submit" value="Save!" /></p>
</form>
{% endblock %}

View File

@ -1,15 +1,18 @@
{% extends "core/base.jinja" %}
{% block title %}
Counter list
Counter admin list
{% endblock %}
{% block content %}
<p><a href="{{ url('counter:new') }}">New counter</a></p>
{% if counter_list %}
<h3>Counter list</h3>
<h3>Counter admin list</h3>
<ul>
{% for c in counter_list %}
<li><a href="{{ url('counter:details', counter_id=c.id) }}">{{ c }}</a></li>
<li><a href="{{ url('counter:details', counter_id=c.id) }}">{{ c }}</a> -
<a href="{{ url('counter:admin', counter_id=c.id) }}">Edit</a> -
<a href="{{ url('counter:delete', counter_id=c.id) }}">Delete</a></li>
{% endfor %}
</ul>
{% else %}