| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- {% extends "asuzr/totals_table.html" %}
- {% load django_tables2 %}
- {% load i18n %}
- {% block table.tbody %}
- <tbody>
- {% for row in table.page.object_list|default:table.rows %} {# support pagination #}
- {% block table.tbody.row %}
- <tr class="{{ forloop.counter|divisibleby:2|yesno:"even,odd" }}"> {# avoid cycle for Django 1.2-1.6 compatibility #}
- {% for column, cell in row.items %}
- <td {{ column.attrs.td.as_html }}>{% if column.localize == None %}{{ cell }}{% else %}{% if column.localize %}{{ cell|localize }}{% else %}{{ cell|unlocalize }}{% endif %}{% endif %}</td>
- {% endfor %}
- </tr>
- {% endblock table.tbody.row %}
- {% empty %}
- {% if table.empty_text %}
- {% block table.tbody.empty_text %}
- <tr><td colspan="{{ table.columns|length }}">{{ table.empty_text }}</td></tr>
- {% endblock table.tbody.empty_text %}
- {% endif %}
- {% endfor %}
- {% if model_form %}
- <form action="{% url 'add-order' %}" method="POST" >
- {% csrf_token %}
- <tr>
- <td>{{model_form.product}}</td>
- <td>{{model_form.price}}</td>
- <td>{{model_form.paid}}</td>
- <td>{{model_form.address}}</td>
- <td></td>
- <td>{{model_form.deadline}}</td>
- <td>{{model_form.delivery}}</td>
- <td>{{model_form.lifting}}</td>
- </tr>
- <tr>
- <td></td><td></td><td></td><td></td><td></td><td></td><td></td>
- <td><input type="submit" text="Добавить заказ"></td>
- </tr>
- </form>
- {% endif %}
- </tbody>
- {% endblock table.tbody %}
|