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