TandoorRecipes/cookbook/templates/list_connectors.html

55 lines
1.5 KiB
HTML

{% extends "base.html" %}
{% load crispy_forms_tags %}
{% load i18n %}
{% load django_tables2 %}
{% block title %}{% trans 'List' %}{% endblock %}
{% block content %}
{% if request.resolver_match.url_name in 'list_storage,list_recipe_import,list_sync_log' %}
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'data_sync' %}">{% trans 'External Recipes' %}</a></li>
<li class="breadcrumb-item active" aria-current="page">{{ title }}</li>
</ol>
</nav>
{% endif %}
<div class="table-container">
<span class="col col-md-9">
<h3 style="margin-bottom: 2vh">{{ title }} {% trans 'List' %}</h3>
</span>
{% if filter %}
<br/>
<br/>
<form action="." method="get">
{% csrf_token %}
{{ filter.form|crispy }}
<button type="submit" class="btn btn-success">{% trans 'Filter' %}</button>
</form>
{% endif %}
{% if import_btn %}
<a href="{% url 'data_batch_import' %}" class="btn btn-warning">{% trans 'Import all' %}</a>
<br/>
<br/>
{% endif %}
{% for table in tables %}
<span class="col col-md-9">
<h3 style="margin-bottom: 2vh">{{ table.attrs.table_name }} {% trans 'List' %}
{% if table.attrs.create_url %}
<a href="{% url table.attrs.create_url %}"> <i class="fas fa-plus-circle"></i> </a>
{% endif %}
</h3>
</span>
{% render_table table %}
{% endfor %}
</div>
{% endblock content %}