{% extends "layouts/default.html" %}
{% block title %}{_ "Feedback Admin Panel" _}{% endblock %}
{% block content %}
{% if is-admin %}
<form id="admin-form" name="admin-form" method="delete">
  {{ token | safe }}
</form>

<div class="tabs">
  <ul>
    <li><a href="/contact">Contact Panel</a></li>
  </ul>
</div>

<div id="feedback-results" class="content">
  {% include "contact/list.html" %}
</div>

<hr>
<div class="field">
  <div class="control">
    <button class="button has-text-danger"
            hx-delete="/contact"
            hx-include="[name='admin-form']"
            hx-target="#feedback-results"
            hx-trigger="click">
      Clear
    </button>
  </div>
</div>
{% else %}
<h1 class="title">{_ "Oops" _}</h1>
<p class="subtitle">
  {_ "Nothing to see here!" _}
</p>

{% endif %}
{% endblock %}
