Start front-end clean up and documentation.

This commit is contained in:
Tim 2015-06-25 01:03:44 +02:00
commit c0f487940f
19 changed files with 1320 additions and 896 deletions

View file

@ -1,36 +1,64 @@
% if recently_added != None:
<div class="dashboard-recent-media-row">
<ul class="dashboard-recent-media">
% for item in recently_added:
<div class="dashboard-recent-media-instance">
<li>
<div class="poster">
<div class="poster-face">
<a href="info?rating_key=${item['ratingKey']}">
% if item['thumb'] != '':
<img src="pms_image_proxy?img=${item['thumb']}&width=153&height=225" class="poster-face">
% else:
<img src="interfaces/default/images/poster.png" class="poster-face">
% endif
</a>
</div>
</div>
<div class="dashboard-recent-media-metacontainer">
% if item['type'] == 'season':
<h3>${item['title']}</h3>
% elif item['type'] == 'movie':
<h3>${item['title']} (${item['year']})</h3>
<%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: recently_added.html
Version: 0.1
Variable names: data [array]
data[array_index] :: Usable parameters
== Global keys ==
ratingKey Returns the unique identifier for the media item.
type Returns the type of media. Either 'movie' or 'season'.
thumb Returns the location of the item's thumbnail. Use with pms_image_proxy.
addedAt Returns the time when the media was added to the library.
title Returns the name of the movie or season.
== Only if 'type' is 'movie' ==
year Returns the movie release year.
DOCUMENTATION :: END
</%doc>
% if data != None:
<div class="dashboard-recent-media-row">
<ul class="dashboard-recent-media">
% for item in data:
<div class="dashboard-recent-media-instance">
<li>
<div class="poster">
<div class="poster-face">
<a href="info?rating_key=${item['ratingKey']}">
% if item['thumb'] != '':
<img src="pms_image_proxy?img=${item['thumb']}&width=153&height=225" class="poster-face">
% else:
<img src="interfaces/default/images/poster.png" class="poster-face">
% endif
<div class="muted" id="addedAt-${item['ratingKey']}">${item['addedAt']}</div>
</div>
</li>
</a>
</div>
</div>
<script>
$('#addedAt-${item['ratingKey']}').html('Added ' + moment(${item['addedAt']}, "X").fromNow())
</script>
% endfor
</ul>
</div>
<div class="dashboard-recent-media-metacontainer">
% if item['type'] == 'season':
<h3>${item['title']}</h3>
% elif item['type'] == 'movie':
<h3>${item['title']} (${item['year']})</h3>
% endif
<div class="muted" id="addedAt-${item['ratingKey']}">${item['addedAt']}</div>
</div>
</li>
</div>
<script>
$('#addedAt-${item['ratingKey']}').html('Added ' + moment(${item['addedAt']}, "X").fromNow())
</script>
% endfor
</ul>
</div>
% else:
<div class="muted">There was an error communicating with your Plex Server. Please check your <a href="config">settings</a>.</div><br>
<div class="muted">There was an error communicating with your Plex Server. Please check your <a
href="config">settings</a>.
</div><br>
% endif