{% extends "audiotracks/base.html" %}
{% load i18n %}

{% block body %}
<div class="audiotracks-detail">
  <img src="{{ track.image.url_200x200 }}" />
  <h1>
    {{ track.title }}
  </h1>
  <h2>
    {% if track.artist %}by {{ track.artist }}{% endif %}
    {% if track.date %}, {{ track.date }}{% endif %}
  </h2>
  {% if track.genre %}
  <h3>
     Genre: {{ track.genre }} 
  </h3>
  {% endif %}
  <div>
    <audio src="{{ track.audio_file.url }}" controls="controls">
      Your browser does not support the audio element.  Maybe you should
      consider using <a href="http://www.mozilla.com/firefox/">Firefox</a>, <a
        href="http://www.google.com/chrome">Chrome</a> or <a
        href="http://www.opera.com/browser/">Opera</a>.
    </audio>
  </div>
  <div class="audiotracks-description">
    {{ track.description }}
  </div>
  <div class="audiotracks-download">
    <a class="btn btn-large btn-success" href="{{ track.audio_file.url }}">{% trans 'Download Track' %}</a>
  </div>
{% if track.user == request.user %}
<p>
  <a class="btn btn-primary" href="{% url edit_track track.id %}">{% trans 'Edit' %}</a>
  <a class="btn btn-danger" href="{% url confirm_delete_track track.id %}">{% trans 'Delete' %}</a>
</p>
{% endif %}
</div>
{% endblock %}
