You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.9 KiB

{% extends 'cabinet/_internal_base.html' %}
{% block breadcrumbs %}
<li><span>Feed list</span></li>
{% endblock %}
{% block content %}
<section class="card">
<header class="card-header">
<div class="card-button-actions">
<div class="dropdown">
<button class="btn btn-primary btn-sm dropdown-toggle" type="button" data-toggle="dropdown">
Add new feed
</button>
<div class="dropdown-menu dropdown-menu-right">
{% for module in feed_modules %}
<a class="dropdown-item"
href="{% url 'cabinet:feeds:new' content_type=module.content_type.model %}">{{ module.MODULE_NAME }}</a>
{% endfor %}
</div>
</div>
</div>
<h2 class="card-title">Your feeds</h2>
</header>
<div class="card-body">
<table class="table table-hover table-responsive-md mb-0">
<thead>
<tr>
<th>Title</th>
<th>Module</th>
<th>Chat ID</th>
<th>Interval</th>
</tr>
</thead>
{% for feed in object_list %}
<tr class="clickable-row" data-href="{% url 'cabinet:feeds:edit' pk=feed.pk %}">
<td>{{ feed.title }}</td>
<td>{{ feed.config.MODULE_NAME }}</td>
<td>{{ feed.chat_id }}</td>
<td>{{ feed.check_interval }}</td>
</tr>
{% empty %}
<tfoot>
<tr>
<td colspan="4">No feeds added</td>
</tr>
</tfoot>
{% endfor %}
</table>
</div>
</section>
{% endblock %}