editor: move add button and repeat back button every 10 rows

This commit is contained in:
Laura Klünder 2016-11-28 16:45:43 +01:00
parent ac9c7043e1
commit a6f9ff098e

View file

@ -1,12 +1,17 @@
{% load bootstrap3 %}
<a class="btn btn-default btn-sm pull-right " href="{% url 'editor.mapitems.add' mapitem_type=mapitem_type %}">Add new</a>
<h3>{{ title }}{% if has_level %} <small>on level {{ level }}</small>{% endif %}</h3>
<p><a href="{% url 'editor.mapitemtypes' level='LEVEL' %}" data-insert-level>&laquo; Back</a><p>
<p><a href="{% url 'editor.mapitems.add' mapitem_type=mapitem_type %}">Add new</a><p>
<table class="table table-condensed itemtable" data-mapitem-type="{{ mapitem_type }}">
<tbody>
{% for item in items %}
{% if forloop.counter0|divisibleby:10 %}
<tr>
<td><a href="{% url 'editor.mapitemtypes' level='LEVEL' %}" data-insert-level>&laquo; Back</a></td>
<td></td>
</tr>
{% endif %}
<tr name="{{ item.name }}">
<td>{{ item.name }}</td>
<td><a href="{% url 'editor.mapitems.edit' mapitem_type=mapitem_type name=item.name %}">Edit</a></td>