{% extends "base_detail.html" %}

{% block title %}{{object.title}}{% endblock %}

{% block details %}
<h2>{{object.league}} {{object.get_event_type_display}}</h2>

<div class="row">
    <div class="col-md">
        {% for team in object.teams.all %}
            <img src="{{team.logo.url}}" width=150 />
        {% endfor %}
        <hr />
        <h3>Last scrobbles</h3>
        <div class="table-responsive">
            <table class="table table-striped table-sm">
                <thead>
                    <tr>
                        <th scope="col">Date</th>
                        <th scope="col">Season</th>
                        <th scope="col">League</th>
                    </tr>
                </thead>
                <tbody>
                    {% for scrobble in scrobbles.all %}
                    <tr>
                        <td><a href={{scrobble.get_absolute_url}}>{{scrobble.local_timestamp}}</a></td>
                        <td>{{scrobble.media_obj.round.season.name}}</td>
                        <td>{{scrobble.media_obj.round.season.league}}</td>
                    </tr>
                    {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
</div>
{% endblock %}
