the_works/the_works/templates/views/verlag.html

71 lines
2.5 KiB
HTML

{% extends 'base.html' %}
{% block title %}Verlage{% endblock title %}
{% block head %}
<link type="text/css" rel="stylesheet" href="{{ url_for('static', filename='css/datatables.css') }}">
{% endblock head %}
{% block heading %}Verlage{% endblock heading %}
{% block content %}
{% include "_icons.svg" %}
<table id="verlag-table">
<thead>
<tr>
<th>Verlag</th>
<th colspan="2">Aktionen</th>
</tr>
</thead>
<tbody>
{% for verlag in verlage %}
<tr id="verlag-{{ verlag['ID'] }}">
<td title="Verlag">{{ verlag["Verlag"] }}</td>
<td class="action action-update" data-id="{{ verlag['ID'] }}" data-verlag="{{verlag['Verlag'] }}"><a href="#" title="Verlag bearbeiten"><svg viewbox="0 0 24 24"><use href="#update" /></svg></a></td>
<td id="delete-{{ verlag['ID'] }}" class="action"><a onclick="return confirm('Eintrag wirklich löschen?');" href="{{ url_for('verlag.delete', id=verlag['ID']) }}" title="Verlag löschen"><svg viewbox="0 0 24 24"><use href="#delete" /></svg></a></td>
</tr>
{% endfor %}
</tbody>
</table>
<dialog aria-labelledby="dialog-heading" id="verlag-modal">
<article>
<form id="verlag_detail_form" method="dialog">
<header>
<button class="modal-close" aria-label="close" rel="prev" formnovalidate></button>
<h1 id="dialog-heading">#</h1>
</header>
<fieldset>
<article>
<label>
<span class="required">Name des Verlags</span>
<input id="form_Verlag" name="form_Verlag" aria-Label="Verlagsname" required autofocus />
</label>
</article>
</fieldset>
<footer class="grid">
<button id="form_submit" type="submit" formmethod="post" formaction="{{ url_for('verlag.create') }}">OK</button>
<button class="secondary" aria-label="close" formmethod="dialog" formnovalidate>Abbrechen</button>
</footer>
</form>
</article>
</dialog>
{% endblock content %}
{% block script %}
<script src="{{ url_for('static', filename='js/datatables.js') }}"></script>
<script src="{{ url_for('static', filename='js/init_dt.js') }}"></script>
<script src="{{ url_for('static', filename='js/modal.js') }}"></script>
<script>
window.onload = function () {
initDataTable("verlag-table");
initCreateButton("verlag-table", "Verlag hinzufügen …");
initModal("verlag-modal", "form_Verlag", ["Neuer Verlag", "Verlag bearbeiten"], ["{{ url_for('verlag.create') }}", "{{ url_for('verlag.update', id=-1) }}"]);
}
</script>
{% endblock script %}