{% extends "index.html" %}
{% block loot_active %}active{% endblock %}
{% block loot_selected %}selected{% endblock %}
{% block content %}
<p>
<h2>Loot
    <sup>
        <a href="#" title="What's this?" data-toggle="popover" data-html='true'
        data-trigger="focus" data-content="{{help.loot_main}}">
        <span data-feather="help-circle"></span></a>
    </sup>
</h2>
    {% if nonpersistent %}
      <div class="alert alert-danger" role="alert">
        Warning: Because you are missing a dependency (flask_sqlalchemy),
        you cannot use this functionality.
      </div>
    {% else %}
      <div class="col">
          {% if loot|length == 0 %}
          <div id="noloot-note">No loot received yet.</div>
          {% else %}
          <div class="row mb-3">
              <div class="col-sm text-right">
                <form action="/loot/del-all" method="post" class="col-sm">
                  <button type="submit"
                          class="btn btn-danger btn-sm">
                          Delete all
                  </button>
                  <a href="/loot/export" class="btn btn-secondary btn-sm flush-right">
                      <span class="align-baseline" data-feather="download"></span> Export
                  </a>
                 </form>
              </div>
          </div>
          <div id="accordion">
              {% for l in loot %} {% include "loot/entry.html" %} {% endfor %}
          </div>
          {% endif %}
      </div>
    {% endif %}
</p>
{% endblock %}

