{% extends "shared/base.html" %}


{% block title %}
  <title>WorkType Detail</title>
{% endblock %}

{% block content %}
<div class="container">

  <div class="row">
      <table class="table table-striped table-hover">
        <tbody>
          <tr>
            <th scope="row">WorkType Name</th>
            <td colspan="2">{{worktype.name}}</td>
          </tr>
          <tr>
            <th scope="row">Works</th>
            <td colspan="2">
              {% for comic in worktype.get_artists() %}
                    <p>
                        {{comic}}:
                        <ul>
                          {% for artist in worktype.get_artists()[comic] %}
                            <li><a href="/comic/artists/{{artist.id}}">{{artist.name}}</a></li>
                          {% endfor %}
                        </ul>
                    </p>
                {% endfor %}
              </td>
          </tr>
          <tr>
            <th scope="row">ID</th>
            <td colspan="2">{{worktype.id}}</td>
          </tr>
          <tr>
            <th scope="row">Data Created</th>
            <td colspan="2">{{worktype.created_date}}</td>
          </tr>
          <tr>
            <th scope="row">Data Modified</th>
            <td colspan="2">{{worktype.last_modified_date}}</td>
          </tr>
          <tr>
            <th scope="row">Data Version</th>
            <td colspan="2">{{worktype.version}}</td>
          </tr>
        </tbody>
    </table>
  </div>
  <div class="row">
    <div>
      <a href="/comic/worktypes" class="btn btn-outline-primary btn-sm active" role="button" aria-pressed="true">Back to list</a>
      <a href="/comic/worktype/edit/{{worktype.id}}" class="btn btn-outline-primary btn-sm active" role="button" aria-pressed="true">Edit</a>
      <a href="/comic/worktype/delete/{{worktype.id}}" class="btn btn-outline-danger btn-sm active" role="button" aria-pressed="true">Delete</a>
    </div>
  </div>
</div>
{% endblock %}
