Files
recipes/cookbook/templates/generic/list_template.html
2018-05-15 20:59:52 +02:00

30 lines
841 B
HTML

{% extends "base.html" %}
{% load crispy_forms_tags %}
{% load i18n %}
{% load django_tables2 %}
{% load class_tag %}
{% block title %}{% trans 'List' %} - {{ title }}{% endblock %}
{% block content %}
<h3>{{ title }} {% trans 'List' %}
{% if table.Meta.model|get_class == 'Category' %}
<a href="{% url 'new_category' %}" ><i class="fal fa-plus-circle"></i></a>
{% elif table.Meta.model|get_class == 'Keyword' %}
<a href="{% url 'new_keyword' %}" ><i class="fal fa-plus-circle"></i></a>
{% endif %}
</h3>
<br/>
{% if table.Meta.model|get_class == 'RecipeImport' %}
<a href="{% url 'batch_import_all' %}" class="btn btn-warning">{% trans 'Import all' %}</a>
<br/>
<br/>
{% endif %}
{% if table %}
{% render_table table %}
{% endif %}
{% endblock %}