{% extends 'admin/model/list.html' %}
{% block body %}
  {% if data %}
    {% set record = data[0].record %}
  {% else %}
    {% set record = current_record() %}
  {% endif %}
  {% if record %}
    {% set task = record.task %}
    <h1>{{record.filename}}</h1>
    <table class="table table-hover table-bordered searchable">
      <tbody>
        <tr>
          <td>
            <b>Title</b>
          </td>
          <td>
            {{record.title}}
          </td>
        </tr>
        <tr>
          <td>
            <b>Type</b>
          </td>
          <td>
            {{record.type}}
          </td>
        </tr>
        <tr>
          <td>
            <b>Task Filename</b>
          </td>
          <td>
            <a href="{{ request.args.get('url') }}">{{record.task.filename}}</a>
          </td>
        </tr>
      </tbody>
    </table>
  {% endif %}
  <span class="pull-right">
    <a role="button" class="btn btn-primary" href="{{ request.args.get('url') }}">Back</a>
  </span>
  {{ super() }}
{% endblock %}
