{% extends "passerelle/manage.html" %}
{% load i18n passerelle %}

{% block breadcrumb %}
  {{ block.super }}
  <a href="{{object.get_absolute_url}}">{{ object.title }}</a>
  <a href="#">{% trans "Logs" %}</a>
{% endblock %}

{% block appbar %}
  <h2>{% trans "Logs" %}</h2>
{% endblock %}

{% block content %}

  <div id="logs">

    <form>
      <p>
        {{ form.log_level }} <input name="q" type="search" value="{{ form.cleaned_data.q }}"> <button>{% trans 'Search' %}</button>
        <span class="help_text">{% trans "(supports text search in messages, or dates)" %}</span>
      </p>
    </form>

    {% include "passerelle/includes/resource-logs-table.html" with logrecords=page_obj %}
  </div>

  {% if log_target %}
    <script>
      $(function () {
        open_log_window($('table.main').data('log-base-url'), {{ log_target.id }});
      });
    </script>
  {% endif %}

{% endblock %}
