mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 13:41:15 -07:00
86 lines
No EOL
4.1 KiB
HTML
86 lines
No EOL
4.1 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:
|
|
<%
|
|
types = ('movie', 'show', 'artist', 'photo')
|
|
headers = {'movie': ('Movie Libraries', ('Movies', '', '')),
|
|
'show': ('TV Show Libraries', ('Shows', 'Seasons', 'Episodes')),
|
|
'artist': ('Music Libraries', ('Artists', 'Albums', 'Tracks')),
|
|
'photo': ('Photo Libraries', ('Albums', 'Photos', 'Videos'))}
|
|
%>
|
|
% for section_type in types:
|
|
% if section_type in data:
|
|
<div class="dashboard-stats-instance" id="library-stats-instance-${section_type}" data-section_type="${section_type}">
|
|
<div class="dashboard-stats-container">
|
|
<div id="library-stats-background-${section_type}" class="dashboard-stats-background" style="background-image: url(pms_image_proxy?img=/:/resources/${section_type}-fanart.jpg&width=500&height=280&opacity=40&background=282828&blur=3&fallback=art);">
|
|
<div id="library-stats-thumb-${section_type}" class="dashboard-stats-flat svg-icon library-${section_type} hidden-xs"></div>
|
|
<div class="dashboard-stats-info-container">
|
|
<div id="library-stats-title-${section_type}" class="dashboard-stats-info-title">
|
|
<h4>${headers[section_type][0]}</h4>
|
|
<span class="dashboard-stats-stats-units">${' / '.join(u for u in headers[section_type][1] if u)}</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">
|
|
% for section in data[section_type]:
|
|
<li class="dashboard-stats-info-item ${'expanded' if loop.index == 0 else ''}">
|
|
<div class="sub-list">${loop.index + 1}</div>
|
|
<div class="sub-value">
|
|
<a href="library?section_id=${section['section_id']}" title="${section['section_name']}">
|
|
${section['section_name']}
|
|
</a>
|
|
</div>
|
|
% if headers[section_type][1][0]:
|
|
<div class="sub-count">
|
|
${section['count']}
|
|
</div>
|
|
% endif
|
|
% if headers[section_type][1][1]:
|
|
<div class="sub-divider"> / </div>
|
|
<div class="sub-count">
|
|
${section['child_count']}
|
|
</div>
|
|
% endif
|
|
% if headers[section_type][1][2]:
|
|
<div class="sub-divider"> / </div>
|
|
<div class="sub-count">
|
|
${section['grandchild_count']}
|
|
</div>
|
|
% endif
|
|
</li>
|
|
% endfor
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
% endif
|
|
% endfor
|
|
% else:
|
|
<div class="text-muted">No stats to show.</div><br>
|
|
% endif |