This repository has been archived on 2023-10-01. You can view files and clone it, but cannot push or open issues or pull requests.
PyNyaaTa/pynyaata/templates/admin/list.html

82 lines
3.1 KiB
HTML
Raw Normal View History

2019-12-07 22:11:14 +00:00
{% extends "layout.html" %}
2019-12-17 14:44:39 +00:00
{% block title %}- Admin List{% endblock %}
2019-12-12 21:55:16 +00:00
{% block add_button %}
<a class="navbar-item has-tooltip-bottom has-tooltip-hidden-desktop" data-tooltip="Add entry" href="{{ url_for('admin_edit') }}">
<i class="fa fa-plus"></i><i>&nbsp;</i>
<span class="is-hidden-mobile">Add entry</span>
2019-12-12 21:55:16 +00:00
</a>
{% endblock %}
2019-12-07 22:11:14 +00:00
{% block body %}
2019-12-15 17:34:20 +00:00
<div id="quick_scroll" class="level-right">
<span class="level-item">Quick Scroll :</span>
2019-12-07 22:11:14 +00:00
{% for folder in folders %}
2019-12-11 17:43:14 +00:00
{% if loop.index0 %}
2019-12-15 17:34:20 +00:00
<a class="level-item" href="#{{ folder.name }}">{{ folder.name }}</a>
2019-12-07 22:11:14 +00:00
{% endif %}
{% endfor %}
2019-12-15 17:34:20 +00:00
</div>
2019-12-07 22:11:14 +00:00
<table class="table is-bordered is-striped is-narrow is-fullwidth is-hoverable is-size-7">
<thead>
<tr>
<th>Name</th>
<th>Link</th>
<th>Season</th>
<th>Comment</th>
<th>Tools</th>
</tr>
</thead>
<tbody>
{% for folder in folders %}
2020-03-21 19:17:31 +00:00
{% if folder.titles|length > 0 %}
<th colspan="5" id="{{ folder.name }}">{{ folder.name }}</th>
2019-12-07 22:11:14 +00:00
2020-03-21 19:17:31 +00:00
{% for title in folder.titles %}
{% for link in title.links %}
<tr>
{% if not loop.index0 %}
<td rowspan="{{ title.links|length }}">
{{ title.name }}
</td>
{% endif %}
2019-12-07 22:11:14 +00:00
2020-03-21 19:17:31 +00:00
<td class="{{ link|colorify }}">
{{ link.vf|flagify }}
{{ link.link|urlize(30, target='_blank') }}
</td>
2019-12-07 22:11:14 +00:00
2020-03-21 19:17:31 +00:00
<td>
{{ link.season }}
</td>
2019-12-07 22:11:14 +00:00
2020-03-21 19:17:31 +00:00
<td>
{{ link.comment|urlize(target='_blank') }}
</td>
2019-12-07 22:11:14 +00:00
2020-03-21 19:17:31 +00:00
<td>
<a href="{{ url_for('search', q=link.title.keyword) }}" target="_blank">
<i class="fa fa-search"></i>
</a>
<i>&nbsp;</i>
<a href="{{ url_for('admin_edit', link_id=link.id) }}">
<i class="fa fa-pencil"></i>
</a>
<i>&nbsp;</i>
<form method="post">
{{ action_form.id(value=link.id) }}
<button class="fa fa-trash fa-button"
onclick="return confirm('Are you sure you want to delete this item ?')">
</button>
</form>
</td>
</tr>
{% endfor %}
2019-12-07 22:11:14 +00:00
{% endfor %}
2020-03-21 19:17:31 +00:00
{% endif %}
2019-12-07 22:11:14 +00:00
{% endfor %}
</tbody>
</table>
{% endblock %}