track_detail.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. {% extends "base_list.html" %}
  2. {% block title %}{{object.title}}{% endblock %}
  3. {% block lists %}
  4. <div class="row">
  5. {% if track.album.cover_image %}
  6. <p style="width:150px; float:left;"><img src="{{track.album.cover_image.url}}" width=150 height=150 /></p>
  7. {% endif %}
  8. </div>
  9. <div class="row">
  10. <p>{{object.scrobble_set.count}} scrobbles</p>
  11. {% if charts %}
  12. <p>{% for chart in charts %}<em><a href="{{chart.link}}">{{chart}}</a></em>{% if forloop.last %}{% else %} | {% endif %}{% endfor %}</p>
  13. {% endif %}
  14. <div class="col-md">
  15. <h3>Last scrobbles</h3>
  16. <div class="table-responsive">
  17. <table class="table table-striped table-sm">
  18. <thead>
  19. <tr>
  20. <th scope="col">Date</th>
  21. <th scope="col">Track</th>
  22. <th scope="col">Album</th>
  23. </tr>
  24. </thead>
  25. <tbody>
  26. {% for scrobble in object.scrobble_set.all %}
  27. <tr>
  28. <td>{{scrobble.timestamp}}</td>
  29. <td>{{scrobble.track.title}}</td>
  30. <td>{{scrobble.track.album.name}}</td>
  31. </tr>
  32. {% endfor %}
  33. </tbody>
  34. </table>
  35. </div>
  36. </div>
  37. </div>
  38. {% endblock %}