- Upgrade to Bootstrap 5.1.3 - Move RSS settings and tag mappings to web log settings (#25) - Fix parameters in 2 SQLite queries
46 lines
2.0 KiB
Plaintext
46 lines
2.0 KiB
Plaintext
<div id="tagList" class="container">
|
|
<div class="row">
|
|
<div class="col">
|
|
{%- assign map_count = mappings | size -%}
|
|
{% if map_count > 0 -%}
|
|
<div class="container">
|
|
<div class="row mwl-table-heading">
|
|
<div class="col">Tag</div>
|
|
<div class="col">URL Value</div>
|
|
</div>
|
|
</div>
|
|
<form method="post" class="container" hx-target="#tagList" hx-swap="outerHTML">
|
|
<input type="hidden" name="{{ csrf.form_field_name }}" value="{{ csrf.request_token }}">
|
|
<div class="row mwl-table-detail" id="tag_new"></div>
|
|
{% for map in mappings -%}
|
|
{%- assign map_id = mapping_ids | value: map.tag -%}
|
|
<div class="row mwl-table-detail" id="tag_{{ map_id }}">
|
|
<div class="col no-wrap">
|
|
{{ map.tag }}<br>
|
|
<small>
|
|
{%- assign map_url = "admin/settings/tag-mapping/" | append: map_id -%}
|
|
<a href="{{ map_url | append: "/edit" | relative_link }}" hx-target="#tag_{{ map_id }}"
|
|
hx-swap="innerHTML show:#tag_{{ map_id }}:top">
|
|
Edit
|
|
</a>
|
|
<span class="text-muted"> • </span>
|
|
{%- assign map_del_link = map_url | append: "/delete" | relative_link -%}
|
|
<a href="{{ map_del_link }}" hx-post="{{ map_del_link }}" class="text-danger"
|
|
hx-confirm="Are you sure you want to delete the mapping for “{{ map.tag }}”? This action cannot be undone.">
|
|
Delete
|
|
</a>
|
|
</small>
|
|
</div>
|
|
<div class="col">{{ map.url_value }}</div>
|
|
</div>
|
|
{%- endfor %}
|
|
</form>
|
|
{%- else -%}
|
|
<div id="tag_new">
|
|
<p class="text-muted text-center fst-italic">This web log has no tag mappings</p>
|
|
</div>
|
|
{%- endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|