Files
JellyPy/data/interfaces/default/library_stats.html
2017-12-10 20:33:14 -08:00

106 lines
5.0 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_stats.html
Version: 0.1
Variable names: data [array]
data[array_index] :: Usable parameters
data Returns an array containing stat data
data[array_index] :: Usable parameters
section_name Returns the title of the library.
section_type Returns the type of the library.
thumb Returns the thumb of the library.
count Returns the number of top level items in the library.
parent_count Returns the number of parent items in the library.
child_count Returns the number of child items in the library.
DOCUMENTATION :: END
</%doc>
% if data:
% for library in data:
<%
section_id = library['section_id']
%>
<div class="dashboard-stats-instance" id="library-stats-instance-${section_id}" data-section_id="${section_id}">
<div class="dashboard-stats-container">
<div class="dashboard-stats-background-overlay">
<div id="library-stats-background-${section_id}" class="dashboard-stats-background" style="background-image: url(pms_image_proxy?img=${library['art']}&width=500&height=280&fallback=art);"></div>
<a href="library?section_id=${library['section_id']}" title="${library['section_name']}">
% if library['thumb'].startswith("http"):
<div id="library-stats-thumb-${section_id}" class="dashboard-stats-library hidden-xs" style="background-image: url(${library['thumb']});"></div>
% else:
<div id="library-stats-thumb-${section_id}" class="dashboard-stats-library hidden-xs" style="background-image: url(pms_image_proxy?img=${library['thumb']}&width=300&height=300&fallback=cover);"></div>
% endif
</a>
<div class="dashboard-stats-info-container">
<div id="library-stats-title-${section_id}" class="dashboard-stats-info-title">
<h4>
<a href="library?section_id=${library['section_id']}" title="${library['section_name']}">${library['section_name']}</a>
</h4>
<span class="dashboard-stats-stats-units">items</span>
</div>
<div class="dashboard-stats-info-scroller scrollbar-macosx">
<div class="dashboard-stats-info scoller-content">
<ul class="list-unstyled dashboard-stats-info-list">
<%
h1 = h2 = h3 = ''
if library['section_type'] == 'movie':
h1 = 'Movies'
if library['section_type'] == 'show':
h1, h2, h3 = 'Shows', 'Seasons', 'Episodes'
elif library['section_type'] == 'artist':
h1, h2, h3 = 'Artists', 'Albums', 'Tracks'
elif library['section_type'] == 'photo':
h1, h3 = 'Albums', 'Photos'
%>
% if h1:
<li class="dashboard-stats-info-item expanded">
<div class="sub-heading">&bull;</div>
<div class="sub-value">
${h1}
</div>
<div class="sub-count">
${library['count']}
</div>
</li>
% endif
% if h2:
<li class="dashboard-stats-info-item expanded">
<div class="sub-heading">&bull;</div>
<div class="sub-value">
${h2}
</div>
<div class="sub-count">
${library['parent_count']}
</div>
</li>
% endif
% if h3:
<li class="dashboard-stats-info-item expanded">
<div class="sub-heading">&bull;</div>
<div class="sub-value">
${h3}
</div>
<div class="sub-count">
${library['child_count']}
</div>
</li>
% endif
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
% endfor
% else:
<div class="text-muted">No stats to show.</div><br>
% endif