mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
make the connectors form be able to display all types for connectors
This commit is contained in:
@@ -336,7 +336,7 @@
|
||||
class="fas fa-server fa-fw"></i> {% trans 'Space Settings' %}</a>
|
||||
{% endif %}
|
||||
{% if request.user == request.space.created_by or user.is_superuser %}
|
||||
<a class="dropdown-item" href="{% url 'list_home_assistant_config' %}"><i
|
||||
<a class="dropdown-item" href="{% url 'list_connectors' %}"><i
|
||||
class="fas fa-sync-alt fa-fw"></i> {% trans 'External Connectors' %}</a>
|
||||
{% endif %}
|
||||
{% if user.is_superuser %}
|
||||
|
||||
55
cookbook/templates/list_connectors.html
Normal file
55
cookbook/templates/list_connectors.html
Normal file
@@ -0,0 +1,55 @@
|
||||
{% 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 %}
|
||||
Reference in New Issue
Block a user