plexpy/data/interfaces/default/library_user_stats.html
2021-03-25 18:14:26 -07:00

50 lines
1.7 KiB
HTML

<%doc>
USAGE DOCUMENTATION :: PLEASE LEAVE THIS AT THE TOP OF THIS FILE
For Mako templating syntax documentation please visit: http://docs.makotemplates.org/en/latest/
Filename: library_user_stats.html
Version: 0.1
Variable names: data [array]
data[array_index] :: Usable parameters
== Global keys ==
friendly_name Returns the friendly name of the user.
user_id Returns the user id of the user.
user_thumb Returns the avatar of the user.
total_plays Returns the play count for the user.
DOCUMENTATION :: END
</%doc>
% if data:
<% from plexpy.helpers import page %>
% for a in data:
<ul class="list-unstyled">
<div class="user-player-instance">
<li>
% if a['user_id']:
<a href="${page('user', a['user_id'])}" title="${a['username']}">
<div class="library-user-instance-box" style="background-image: url(${page('pms_image_proxy', a['user_thumb'], None, 80, 80, fallback='user')});"></div>
</a>
<div class=" user-player-instance-name">
<a href="${page('user', a['user_id'])}" title="${a['username']}">${a['friendly_name']}</a>
</div>
% else:
<div class="library-user-instance-box" style="background-image: url(${page('pms_image_proxy', a['user_thumb'], None, 80, 80, fallback='user')});"></div>
<div class=" user-player-instance-name">
${a['friendly_name']}
</div>
% endif
<div class="user-player-instance-playcount">
<h3>${a['total_plays']}</h3>
<p> plays</p>
</div>
</li>
</div>
</ul>
% endfor
% else:
<div class="text-muted">No stats to show.</div><br>
% endif