|
@@ -0,0 +1,78 @@
|
|
|
+{% extends "base_list.html" %}
|
|
|
+{% load mathfilters %}
|
|
|
+
|
|
|
+{% block title %}{{object.name}}{% endblock %}
|
|
|
+
|
|
|
+{% block lists %}
|
|
|
+
|
|
|
+<div class="row">
|
|
|
+
|
|
|
+ {% if object.cover_image %}
|
|
|
+ <p style="float:left; width:302px; padding:0; border: 1px solid #ccc">
|
|
|
+ <img src="{{object.cover_image.url}}" width=300 height=300 />
|
|
|
+ </p>
|
|
|
+ {% endif %}
|
|
|
+</div>
|
|
|
+<div class="row">
|
|
|
+ <p>{{object.scrobbles.count}} scrobbles</p>
|
|
|
+ {% if charts %}
|
|
|
+ <p>{% for chart in charts %}<em><a href="{{chart.link}}">{{chart}}</a></em>{% if forloop.last %}{% else %} | {% endif %}{% endfor %}</p>
|
|
|
+ {% endif %}
|
|
|
+ <div class="col-md">
|
|
|
+ <h3>Top tracks</h3>
|
|
|
+ <div class="table-responsive">
|
|
|
+ <table class="table table-striped table-sm">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th scope="col">Rank</th>
|
|
|
+ <th scope="col">Track</th>
|
|
|
+ <th scope="col">Artist</th>
|
|
|
+ <th scope="col">Count</th>
|
|
|
+ <th scope="col"></th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ {% for track in object.tracks %}
|
|
|
+ <tr>
|
|
|
+ <td>{{rank}}#1</td>
|
|
|
+ <td><a href="{{track.get_absolute_url}}">{{track.title}}</a></td>
|
|
|
+ <td><a href="{{track.artist.get_absolute_url}}">{{track.artist}}</a></td>
|
|
|
+ <td>{{track.scrobble_count}}</td>
|
|
|
+ <td>
|
|
|
+ <div class="progress-bar" style="margin-right:5px;">
|
|
|
+ <span class="progress-bar-fill" style="width: {{track.scrobble_count|mul:10}}%;"></span>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ {% endfor %}
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<div class="row">
|
|
|
+ <div class="col-md">
|
|
|
+ <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">Track</th>
|
|
|
+ <th scope="col">Artist</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ {% for scrobble in object.scrobbles %}
|
|
|
+ <tr>
|
|
|
+ <td>{{scrobble.timestamp}}</td>
|
|
|
+ <td><a href="{{scrobble.track.get_absolute_url}}">{{scrobble.track.title}}</a></td>
|
|
|
+ <td><a href="{{scrobble.track.artist.get_absolute_url}}">{{scrobble.track.artist.name}}</a></td>
|
|
|
+ </tr>
|
|
|
+ {% endfor %}
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+{% endblock %}
|