mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 11:31:08 +00:00
Valid template markup
This commit is contained in:
parent
eb8b9fdaed
commit
84ef214ca1
1 changed files with 88 additions and 53 deletions
|
@ -33,11 +33,58 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="block table-container">
|
<div class="block content">
|
||||||
<table class="table is-striped">
|
<h2 class="title is-4">{% trans "Add Rule" %}</h2>
|
||||||
|
<div class="box">
|
||||||
<form action="{% url 'settings-automod' %}" method="POST">
|
<form action="{% url 'settings-automod' %}" method="POST">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" value="{{ request.user.id }}" name="created_by">
|
<input type="hidden" value="{{ request.user.id }}" name="created_by">
|
||||||
|
|
||||||
|
<div class="columns">
|
||||||
|
<div class="column">
|
||||||
|
<div class="field">
|
||||||
|
<label class="label" for="id_string_match">{% trans "String match" %}</label>
|
||||||
|
{{ form.string_match }}
|
||||||
|
{% include 'snippets/form_errors.html' with errors_list=form.string_match.errors id="desc_string_match" %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="column">
|
||||||
|
<div class="field">
|
||||||
|
<label class="label" for="id_flag_users">
|
||||||
|
{{ form.flag_users }}
|
||||||
|
{% trans "Flag users" %}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field">
|
||||||
|
<label class="label" for="id_flag_statuses">
|
||||||
|
{{ form.flag_statuses }}
|
||||||
|
{% trans "Flag statuses" %}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field">
|
||||||
|
<button type="submit" class="button is-primary">{% trans "Add rule" %}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="block content">
|
||||||
|
<h2 class="title is-4">{% trans "Current Rules" %}</h2>
|
||||||
|
<details class="details-panel">
|
||||||
|
<summary>
|
||||||
|
<span class="title is-5" role="heading" aria-level="3">
|
||||||
|
{% trans "Show rules" %} ({{ rules.count }})
|
||||||
|
</span>
|
||||||
|
<span class="details-close icon icon-x" aria-hidden="true"></span>
|
||||||
|
</summary>
|
||||||
|
|
||||||
|
<div class="table-container">
|
||||||
|
<table class="table is-striped">
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
<label for="id_string_match">{% trans "String match" %}</label>
|
<label for="id_string_match">{% trans "String match" %}</label>
|
||||||
|
@ -51,22 +98,6 @@
|
||||||
<th>
|
<th>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
{{ form.string_match }}
|
|
||||||
{% include 'snippets/form_errors.html' with errors_list=form.string_match.errors id="desc_string_match" %}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{{ form.flag_users }}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{{ form.flag_statuses }}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<button type="submit" class="button is-primary">{% trans "Add rule" %}</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</form>
|
|
||||||
{% for rule in rules %}
|
{% for rule in rules %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
@ -81,15 +112,19 @@
|
||||||
<td>
|
<td>
|
||||||
<form action="{% url 'settings-automod-delete' rule.id %}" method="POST">
|
<form action="{% url 'settings-automod-delete' rule.id %}" method="POST">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button type="submit" class="button is-danger is-light">
|
<div class="control">
|
||||||
|
<button type="submit" class="button is-danger is-light is-small">
|
||||||
<span class="icon icon-x m-0-mobile" aria-hidden="true"></span>
|
<span class="icon icon-x m-0-mobile" aria-hidden="true"></span>
|
||||||
<span class="is-sr-only-mobile">{% trans "Remove rule" %}</span>
|
<span class="is-sr-only-mobile">{% trans "Remove rule" %}</span>
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</details>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue