Update info page to show music info

This commit is contained in:
Jonathan Wong 2015-09-13 13:32:44 -07:00
parent af131ce16d
commit 73664b6a03
2 changed files with 232 additions and 318 deletions

View file

@ -876,10 +876,12 @@ a .dashboard-activity-metadata-user-thumb:hover {
.summary-navbar-list { .summary-navbar-list {
padding: 0 25px; padding: 0 25px;
color: #999; color: #999;
white-space: nowrap;
overflow: hidden;
} }
.summary-navbar-list span { .summary-navbar-list span {
float: left; display: inline-block;
margin-right: 20px; margin-right: 15px;
} }
.summary-navbar-list span a { .summary-navbar-list span a {
color: #999; color: #999;
@ -904,6 +906,10 @@ a .dashboard-activity-metadata-user-thumb:hover {
line-height: 40px; line-height: 40px;
float: left; float: left;
clear: left; clear: left;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 100%;
} }
.summary-content-title h1 a { .summary-content-title h1 a {
color: #F9AA03; color: #F9AA03;
@ -920,6 +926,10 @@ a .dashboard-activity-metadata-user-thumb:hover {
line-height: 40px; line-height: 40px;
float: left; float: left;
clear: left; clear: left;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 100%;
} }
.summary-content-title h3 { .summary-content-title h3 {
margin-top: 0; margin-top: 0;
@ -927,7 +937,9 @@ a .dashboard-activity-metadata-user-thumb:hover {
color: #999; color: #999;
font-size: 28px; font-size: 28px;
line-height: 40px; line-height: 40px;
float: right; position: absolute;
bottom: 0;
right: 0;
} }
.summary-content-title h3 a:hover { .summary-content-title h3 a:hover {
text-decoration: underline; text-decoration: underline;
@ -973,6 +985,18 @@ a .dashboard-activity-metadata-user-thumb:hover {
overflow: hidden; overflow: hidden;
z-index: 1; z-index: 1;
} }
.summary-poster-face-track {
background-position: center;
background-size: cover;
height: 250px;
width: 250px;
position: relative;
webkit-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1);
-moz-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1);
box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1);
overflow: hidden;
z-index: 1;
}
.summary-poster-face-overlay { .summary-poster-face-overlay {
position: absolute; position: absolute;
left: 0; left: 0;
@ -1004,8 +1028,10 @@ a .dashboard-activity-metadata-user-thumb:hover {
} }
a:hover .summary-poster-face .summary-poster-face-overlay, a:hover .summary-poster-face .summary-poster-face-overlay,
a:hover .summary-poster-face-episode .summary-poster-face-overlay, a:hover .summary-poster-face-episode .summary-poster-face-overlay,
a:hover .summary-poster-face-track .summary-poster-face-overlay,
a:hover .summary-poster-face .summary-poster-face-overlay span, a:hover .summary-poster-face .summary-poster-face-overlay span,
a:hover .summary-poster-face-episode .summary-poster-face-overlay span { a:hover .summary-poster-face-episode .summary-poster-face-overlay span,
a:hover .summary-poster-face-track .summary-poster-face-overlay span {
opacity: 1; opacity: 1;
} }
.summary-content-padding { .summary-content-padding {
@ -1027,47 +1053,11 @@ a:hover .summary-poster-face-episode .summary-poster-face-overlay span {
position: relative; position: relative;
float: left; float: left;
} }
.summary-content-director { .summary-content-details-tag {
float: left; float: left;
line-height: 24px; line-height: 24px;
} }
.summary-content-director strong { .summary-content-details-tag strong {
color: #fff;
margin-left: 2px;
margin-right: 10px;
}
.summary-content-studio {
float: left;
line-height: 24px;
}
.summary-content-studio strong {
color: #fff;
margin-left: 2px;
margin-right: 10px;
}
.summary-content-airdate {
float: left;
line-height: 24px;
}
.summary-content-airdate strong {
color: #fff;
margin-left: 2px;
margin-right: 10px;
}
.summary-content-duration {
float: left;
line-height: 24px;
}
.summary-content-duration strong {
color: #fff;
margin-left: 2px;
margin-right: 10px;
}
.summary-content-content-rating {
float: left;
line-height: 24px;
}
.summary-content-content-rating strong {
color: #fff; color: #fff;
margin-left: 2px; margin-left: 2px;
margin-right: 10px; margin-right: 10px;
@ -1174,135 +1164,57 @@ a:hover .summary-poster-face-episode .summary-poster-face-overlay span {
background-size: contain; background-size: contain;
height: 16px; height: 16px;
} }
.show-seasons-wrapper { .item-children-wrapper {
} }
.show-seasons-instance { .item-children-instance {
list-style: none; list-style: none;
margin: 0; margin: 0;
} }
.show-seasons-instance li { .item-children-instance li {
float: left; float: left;
position: relative; position: relative;
left: 0px; left: 0px;
margin-right: 25px; margin-right: 25px;
margin-bottom: 25px; margin-bottom: 25px;
} }
a .show-seasons-card-overlay:hover { .item-children-instance li.item-children-list-item {
width: 100%;
height: 35px;
margin-right: 0;
margin-bottom: 0;
}
.item-children-poster {
float: left;
position: relative;
left: 0px;
}
a:hover .item-children-poster {
webkit-box-shadow: inset 0 0 0 2px #e9a049; webkit-box-shadow: inset 0 0 0 2px #e9a049;
-moz-box-shadow: inset 0 0 0 2px #e9a049; -moz-box-shadow: inset 0 0 0 2px #e9a049;
box-shadow: inset 0 0 0 2px #e9a049; box-shadow: inset 0 0 0 2px #e9a049;
} }
.show-seasons-poster { .item-children-poster-face {
float: left;
position: relative;
left: 0px;
}
.show-seasons-card-overlay {
position: absolute;
left: 0;
right: 0;
bottom: 0;
text-align: left;
background: -moz-linear-gradient(top, rgba(0,0,0,0) 30%, rgba(0,0,0,1) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(30%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,1)));
background: -webkit-linear-gradient(top, rgba(0,0,0,0) 30%,rgba(0,0,0,1) 100%);
background: -o-linear-gradient(top, rgba(0,0,0,0) 30%,rgba(0,0,0,1) 100%);
background: -ms-linear-gradient(top, rgba(0,0,0,0) 30%,rgba(0,0,0,1) 100%);
background: linear-gradient(to bottom, rgba(0,0,0,0) 30%,rgba(0,0,0,1) 100%);
height: 225px;
}
.show-seasons-overlay-text {
color: #aaa;
font-size: 12px;
float: left;
position: absolute;
left: 8px;
bottom: 5px;
}
.show-seasons-instance-text-wrapper {
width: 150px;
font-size: 13px;
margin-bottom: 20px;
clear: both;
}
.show-seasons-instance-text-wrapper h3 {
padding: 5px 3px 0 3px;
color: #fff;
text-overflow: ellipsis;
overflow: hidden;
position: relative;
font-size: 13px;
margin: 0;
line-height: 15px;
font-weight: normal;
width: 250px;
white-space: nowrap;
text-align: left;
clear: both;
}
.show-seasons-title a {
text-decoration: none;
font-size: 14px;
font-weight: normal;
color: #fff;
float: left;
text-overflow: ellipsis;
overflow: hidden;
position: relative;
white-space: nowrap;
width: 205px;
margin-top: 2px;
margin-left: 0px;
margin-bottom: 20px;
}
.show-seasons a:hover {
color: #F9AA03;
}
.season-episodes-wrapper {
}
.season-episodes-instance {
list-style: none;
margin: 0;
}
.season-episodes-instance li {
float: left;
position: relative;
left: 0px;
margin-right: 25px;
margin-bottom: 25px;
}
a .season-episodes-card-overlay:hover {
-webkit-box-shadow: inset 0 0 0 2px #e9a049;
-moz-box-shadow: inset 0 0 0 2px #e9a049;
box-shadow: inset 0 0 0 2px #e9a049;
}
.season-episodes-poster {
float: left;
position: relative;
left: 0px;
}
.season-episodes-poster-face {
background-position: center; background-position: center;
background-size: cover; background-size: cover;
height: 140px;
width: 250px;
position: relative; position: relative;
-webkit-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); -webkit-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1);
-moz-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); -moz-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1);
box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1);
z-index: -2;
} }
.season-episodes-poster-face img { .item-children-poster-face.season-poster {
bottom: 0; width: 150px;
overflow: hidden; height: 225px;
}
.item-children-poster-face.episode-poster {
width: 250px; width: 250px;
height: 140px; height: 140px;
} }
.season-episodes-poster-face img:hover { .item-children-poster-face.album-poster {
-webkit-box-shadow: 0 0 0 2px #F9AA03; width: 150px;
-moz-box-shadow: 0 0 0 2px #F9AA03; height: 150px;
box-shadow: 0 0 0 2px #F9AA03;
} }
.season-episodes-card-overlay { .item-children-card-overlay {
position: absolute; position: absolute;
left: 0; left: 0;
right: 0; right: 0;
@ -1314,14 +1226,10 @@ a .season-episodes-card-overlay:hover {
background: -o-linear-gradient(top, rgba(0,0,0,0) 30%,rgba(0,0,0,1) 100%); background: -o-linear-gradient(top, rgba(0,0,0,0) 30%,rgba(0,0,0,1) 100%);
background: -ms-linear-gradient(top, rgba(0,0,0,0) 30%,rgba(0,0,0,1) 100%); background: -ms-linear-gradient(top, rgba(0,0,0,0) 30%,rgba(0,0,0,1) 100%);
background: linear-gradient(to bottom, rgba(0,0,0,0) 30%,rgba(0,0,0,1) 100%); background: linear-gradient(to bottom, rgba(0,0,0,0) 30%,rgba(0,0,0,1) 100%);
height: 140px; height: 100%;
z-index: -1;
} }
.season-episodes-card-overlay-index { .item-children-overlay-text {
color: #fff;
font-size: 11px;
text-shadow: 0 1px 5px rgba(0,0,0,0.2);
}
.season-episodes-overlay-text {
color: #aaa; color: #aaa;
font-size: 12px; font-size: 12px;
float: left; float: left;
@ -1329,7 +1237,22 @@ a .season-episodes-card-overlay:hover {
left: 8px; left: 8px;
bottom: 5px; bottom: 5px;
} }
.season-episodes-instance-text-wrapper h3 { .item-children-instance-text-wrapper {
font-size: 13px;
margin-bottom: 20px;
clear: both;
}
.item-children-instance-text-wrapper.season-item {
width: 150px;
}
.item-children-instance-text-wrapper.episode-item {
width: 250px;
}
.item-children-instance-text-wrapper.album-item {
width: 150px;
}
.item-children-instance-text-wrapper h3 {
width: 100%;
padding: 5px 3px 0 3px; padding: 5px 3px 0 3px;
color: #fff; color: #fff;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -1339,36 +1262,52 @@ a .season-episodes-card-overlay:hover {
margin: 0; margin: 0;
line-height: 15px; line-height: 15px;
font-weight: normal; font-weight: normal;
width: 250px;
white-space: nowrap; white-space: nowrap;
text-align: left; text-align: left;
clear: both; clear: both;
} }
.season-episodes-title a { .item-children-list-item-odd {
text-decoration: none; border-top: 0px solid #343434;
font-size: 14px; border-bottom: 0px solid #343434;
font-weight: normal; background-color: rgba(255,255,255,0.010);
color: #fff; height: 100%;
font-size: 13px;
padding-top: 10px;
}
.item-children-list-item-even {
border-top: 0px solid #343434;
border-bottom: 0px solid #343434;
background-color: rgba(255,255,255,0.035);
height: 100%;
font-size: 13px;
padding-top: 10px;
}
.item-children-list-item-odd:hover,
.item-children-list-item-even:hover {
background-color: rgba(255,255,255,0.075);
}
.item-children-list-item-index {
float: left; float: left;
color: #777;
text-align: right;
display: inline-block;
width: 35px;
margin-right: 10px;
}
.item-children-list-item-title {
display: inline-block;
width: calc(100% - 110px);
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
position: relative;
white-space: nowrap; white-space: nowrap;
width: 205px;
margin-top: 2px;
margin-left: 0px;
margin-bottom: 20px;
} }
.season-episodes a:hover { .item-children-list-item-duration {
color: #F9AA03; float: right;
} color: #777;
.season-episodes-season { text-align: right;
color: #aaa; display: inline-block;
font-size: 12px; width: 40px;
float: left; margin-right: 20px;
position: absolute;
left: 8px;
bottom: 5px;
} }
.settings-alert { .settings-alert {
float: left; float: left;

View file

@ -61,19 +61,37 @@ DOCUMENTATION :: END
<span><i class="fa fa-chevron-right"></i></span> <span><i class="fa fa-chevron-right"></i></span>
<span><a href="#">${data['title']}</a></span> <span><a href="#">${data['title']}</a></span>
% elif data['type'] == 'season': % elif data['type'] == 'season':
<span>TV Shows</span> <span class="hidden-xs hidden-sm">TV Shows</span>
<span><i class="fa fa-chevron-right"></i></span> <span class="hidden-xs hidden-sm"><i class="fa fa-chevron-right"></i></span>
<span><a href="info?item_id=${data['parent_rating_key']}">${data['parent_title']}</a></span> <span><a href="info?item_id=${data['parent_rating_key']}">${data['parent_title']}</a></span>
<span><i class="fa fa-chevron-right"></i></span> <span><i class="fa fa-chevron-right"></i></span>
<span><a href="#">Season ${data['index']}</a></span> <span><a href="#">Season ${data['index']}</a></span>
% elif data['type'] == 'episode': % elif data['type'] == 'episode':
<span>TV Shows</span> <span class="hidden-xs hidden-sm">TV Shows</span>
<span><i class="fa fa-chevron-right"></i></span> <span class="hidden-xs hidden-sm"><i class="fa fa-chevron-right"></i></span>
<span><a href="info?item_id=${data['grandparent_rating_key']}">${data['grandparent_title']}</a></span> <span class="hidden-xs hidden-sm"><a href="info?item_id=${data['grandparent_rating_key']}">${data['grandparent_title']}</a></span>
<span><i class="fa fa-chevron-right"></i></span> <span class="hidden-xs hidden-sm"><i class="fa fa-chevron-right"></i></span>
<span><a href="info?item_id=${data['parent_rating_key']}">Season ${data['parent_index']}</a></span> <span><a href="info?item_id=${data['parent_rating_key']}">Season ${data['parent_index']}</a></span>
<span><i class="fa fa-chevron-right"></i></span> <span><i class="fa fa-chevron-right"></i></span>
<span><a href="#">Episode ${data['index']} - ${data['title']}</a></span> <span><a href="#">Episode ${data['index']} - ${data['title']}</a></span>
% elif data['type'] == 'artist':
<span>Music</span>
<span><i class="fa fa-chevron-right"></i></span>
<span><a href="#">${data['title']}</a></span>
% elif data['type'] == 'album':
<span class="hidden-xs hidden-sm">Music</span>
<span class="hidden-xs hidden-sm"><i class="fa fa-chevron-right"></i></span>
<span><a href="info?item_id=${data['parent_rating_key']}">${data['parent_title']}</a></span>
<span><i class="fa fa-chevron-right"></i></span>
<span><a href="#">${data['title']}</a></span>
% elif data['type'] == 'track':
<span class="hidden-xs hidden-sm">Music</span>
<span class="hidden-xs hidden-sm"><i class="fa fa-chevron-right"></i></span>
<span class="hidden-xs hidden-sm"><a href="info?item_id=${data['grandparent_rating_key']}">${data['grandparent_title']}</a></span>
<span class="hidden-xs hidden-sm"><i class="fa fa-chevron-right"></i></span>
<span><a href="info?item_id=${data['parent_rating_key']}">${data['parent_title']}</a></span>
<span><i class="fa fa-chevron-right"></i></span>
<span><a href="#">Track ${data['index']} - ${data['title']}</a></span>
% endif % endif
</div> </div>
</div> </div>
@ -81,13 +99,23 @@ DOCUMENTATION :: END
<div class="summary-content-title-wrapper"> <div class="summary-content-title-wrapper">
<div class="col-md-9"> <div class="col-md-9">
<div class="summary-content-poster hidden-xs hidden-sm"> <div class="summary-content-poster hidden-xs hidden-sm">
% if data['type'] == 'track':
<a href="http://app.plex.tv/web/app#!/server/${config['pms_identifier']}/details/%2Flibrary%2Fmetadata%2F${data['parent_rating_key']}" target="Plex/Web" title="View in Plex/Web">
% else:
<a href="http://app.plex.tv/web/app#!/server/${config['pms_identifier']}/details/%2Flibrary%2Fmetadata%2F${data['rating_key']}" target="Plex/Web" title="View in Plex/Web"> <a href="http://app.plex.tv/web/app#!/server/${config['pms_identifier']}/details/%2Flibrary%2Fmetadata%2F${data['rating_key']}" target="Plex/Web" title="View in Plex/Web">
% endif
% if data['type'] == 'episode': % if data['type'] == 'episode':
<div class="summary-poster-face-episode" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=500&height=280&fallback=poster);"> <div class="summary-poster-face-episode" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=500&height=280&fallback=poster);">
<div class="summary-poster-face-overlay"> <div class="summary-poster-face-overlay">
<span></span> <span></span>
</div> </div>
</div> </div>
% elif data['type'] == 'artist' or data['type'] == 'album' or data['type'] == 'track':
<div class="summary-poster-face-track" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=500&height=500&fallback=poster);">
<div class="summary-poster-face-overlay">
<span></span>
</div>
</div>
% else: % else:
<div class="summary-poster-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=450&fallback=poster);"> <div class="summary-poster-face" style="background-image: url(pms_image_proxy?img=${data['thumb']}&width=300&height=450&fallback=poster);">
<div class="summary-poster-face-overlay"> <div class="summary-poster-face-overlay">
@ -98,7 +126,7 @@ DOCUMENTATION :: END
</a> </a>
</div> </div>
<div class="summary-content-title"> <div class="summary-content-title">
% if data['type'] == 'movie' or data['type'] == 'show': % if data['type'] == 'movie' or data['type'] == 'show' or data['type'] == 'artist':
<h1>&nbsp;</h1><h1>${data['title']}</h1> <h1>&nbsp;</h1><h1>${data['title']}</h1>
% elif data['type'] == 'season': % elif data['type'] == 'season':
<h1>&nbsp;</h1><h1><a href="info?item_id=${data['parent_rating_key']}">${data['parent_title']}</a></h1> <h1>&nbsp;</h1><h1><a href="info?item_id=${data['parent_rating_key']}">${data['parent_title']}</a></h1>
@ -107,6 +135,13 @@ DOCUMENTATION :: END
<h1><a href="info?item_id=${data['grandparent_rating_key']}">${data['grandparent_title']}</a></h1> <h1><a href="info?item_id=${data['grandparent_rating_key']}">${data['grandparent_title']}</a></h1>
<h2>${data['title']}</h2> <h2>${data['title']}</h2>
<h3 class="hidden-xs">S${data['parent_index']} &middot; E${data['index']}</h3> <h3 class="hidden-xs">S${data['parent_index']} &middot; E${data['index']}</h3>
% elif data['type'] == 'album':
<h1><a href="info?item_id=${data['parent_rating_key']}">${data['parent_title']}</a></h1>
<h2>${data['title']}</h2>
% elif data['type'] == 'track':
<h1><a href="info?item_id=${data['grandparent_rating_key']}">${data['grandparent_title']}</a></h1>
<h2><a href="info?item_id=${data['parent_rating_key']}">${data['parent_title']}</a> - ${data['title']}</h2>
<h3 class="hidden-xs">T${data['index']}</h3>
% endif % endif
</div> </div>
</div> </div>
@ -115,44 +150,52 @@ DOCUMENTATION :: END
<div class="col-md-9"> <div class="col-md-9">
% if data['type'] == 'movie' or data['type'] == 'show' or data['type'] == 'season': % if data['type'] == 'movie' or data['type'] == 'show' or data['type'] == 'season':
<div class="summary-content-padding hidden-xs hidden-sm" style="height: 275px;"></div> <div class="summary-content-padding hidden-xs hidden-sm" style="height: 275px;"></div>
% elif data['type'] == 'episode':
<div class="summary-content-padding hidden-xs hidden-sm" style="height: 40px;"></div>
% elif data['type'] == 'artist' or data['type'] == 'album' or data['type'] == 'track':
<div class="summary-content-padding hidden-xs hidden-sm" style="height: 150px;"></div>
% else: % else:
<div class="summary-content-padding hidden-xs hidden-sm"></div> <div class="summary-content-padding hidden-xs hidden-sm"></div>
% endif % endif
<div class="summary-content"> <div class="summary-content">
<div class="summary-content-details-wrapper"> <div class="summary-content-details-wrapper">
% if (data['type'] == 'movie' or data['type'] == 'show' or data['type'] == 'episode') and data['rating']: % if data['rating']:
<div id="stars" class="rateit hidden-xs hidden-sm" data-rateit-value="" <div id="stars" class="rateit hidden-xs hidden-sm" data-rateit-value=""
data-rateit-ispreset="true" data-rateit-readonly="true"></div> data-rateit-ispreset="true" data-rateit-readonly="true"></div>
% endif % endif
<div class="summary-content-director"> <div class="summary-content-details-tag">
% if (data['type'] == 'episode' or data['type'] == 'movie') and data['directors']: % if data['directors']:
Directed by <strong> ${data['directors'][0]}</strong> Directed by <strong> ${data['directors'][0]}</strong>
% endif % endif
</div> </div>
<div class="summary-content-studio"> <div class="summary-content-details-tag">
% if (data['type'] == 'show' or data['type'] == 'movie') and data['studio']: % if data['studio']:
Studio <strong> ${data['studio']}</strong> Studio <strong> ${data['studio']}</strong>
% endif % endif
</div> </div>
<div class="summary-content-airdate"> <div class="summary-content-details-tag">
% if data['type'] == 'movie': % if data['type'] == 'movie':
Year <strong> ${data['year']}</strong> Year <strong> ${data['year']}</strong>
% elif data['type'] == 'show': % elif data['type'] == 'show':
Aired <strong> ${data['year']}</strong> Aired <strong> ${data['year']}</strong>
% elif data['type'] == 'episode': % elif data['type'] == 'episode':
Aired <strong> <span id="airdate">${data['originally_available_at']}</span></strong> Aired <strong> <span id="airdate">${data['originally_available_at']}</span></strong>
% elif data['type'] == 'album' or data['type'] == 'track':
Released <strong> ${data['year']}</strong>
% endif % endif
</div> </div>
<div class="summary-content-duration"> <div class="summary-content-details-tag">
% if data['duration']:
Runtime <strong> <span id="runtime">${data['duration']}</span> mins</strong> Runtime <strong> <span id="runtime">${data['duration']}</span> mins</strong>
% endif
</div> </div>
<div class="summary-content-content-rating"> <div class="summary-content-details-tag">
% if (data['type'] == 'episode' or data['type'] == 'movie' or data['type'] == 'show') and data['content_rating']: % if data['content_rating']:
Rated <strong> ${data['content_rating']} </strong> Rated <strong> ${data['content_rating']} </strong>
% endif % endif
</div> </div>
</div> </div>
% if data['type'] == 'movie' and data['tagline']: % if data['tagline']:
<div class="summary-content-summary"> <div class="summary-content-summary">
<p><strong> ${data['tagline']} </strong></p> <p><strong> ${data['tagline']} </strong></p>
</div> </div>
@ -164,7 +207,7 @@ DOCUMENTATION :: END
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<div class="summary-content-people-wrapper hidden-xs hidden-sm"> <div class="summary-content-people-wrapper hidden-xs hidden-sm">
% if (data['type'] == 'episode' or data['type'] == 'movie') and data['writers']: % if data['writers']:
<div class="summary-content-writers"> <div class="summary-content-writers">
<strong>Written by</strong> <strong>Written by</strong>
<ul> <ul>
@ -178,7 +221,7 @@ DOCUMENTATION :: END
</ul> </ul>
</div> </div>
% endif % endif
% if (data['type'] == 'movie' or data['type'] == 'show') and data['actors']: % if data['actors']:
<div class="summary-content-actors"> <div class="summary-content-actors">
<strong>Starring</strong> <strong>Starring</strong>
<ul> <ul>
@ -194,7 +237,7 @@ DOCUMENTATION :: END
% endif % endif
</div> </div>
<div class="summary-content-people-wrapper hidden-xs hidden-sm"> <div class="summary-content-people-wrapper hidden-xs hidden-sm">
% if (data['type'] == 'movie' or data['type'] == 'show') and data['genres']: % if data['genres']:
<div class="summary-content-genres"> <div class="summary-content-genres">
<strong>Genres</strong> <strong>Genres</strong>
<ul> <ul>
@ -218,7 +261,7 @@ DOCUMENTATION :: END
</div> </div>
</div> </div>
<div class='table-card-back'> <div class='table-card-back'>
<div id="season-list"></div> <div id="children-list"></div>
</div> </div>
</div> </div>
% elif data['type'] == 'season': % elif data['type'] == 'season':
@ -229,11 +272,32 @@ DOCUMENTATION :: END
</div> </div>
</div> </div>
<div class='table-card-back'> <div class='table-card-back'>
<div id="episode-list"></div> <div id="children-list"></div>
</div>
</div>
% elif data['type'] == 'artist':
<div class='col-md-12'>
<div class='table-card-header'>
<div class="header-bar">
<span>Album List for <strong>${data['title']}</strong></span>
</div>
</div>
<div class='table-card-back'>
<div id="children-list"></div>
</div>
</div>
% elif data['type'] == 'album':
<div class='col-md-12'>
<div class='table-card-header'>
<div class="header-bar">
<span>Track List for <strong>${data['title']}</strong></span>
</div>
</div>
<div class='table-card-back'>
<div id="children-list"></div>
</div> </div>
</div> </div>
% endif % endif
% if data['type'] == 'movie' or data['type'] == 'episode' or data['type'] == 'show' or data['type'] == 'season':
<div class='col-md-12'> <div class='col-md-12'>
<div class='table-card-header'> <div class='table-card-header'>
<div class="header-bar"> <div class="header-bar">
@ -290,7 +354,6 @@ DOCUMENTATION :: END
</div> </div>
</div> </div>
</div> </div>
% endif
</div> </div>
</div> </div>
</div> </div>
@ -321,70 +384,14 @@ DOCUMENTATION :: END
% if data['type'] == 'movie' or data['type'] == 'show' or data['type'] == 'episode': % if data['type'] == 'movie' or data['type'] == 'show' or data['type'] == 'episode':
<script> <script>
// Convert rating to 5 star rating type // Convert rating to 5 star rating type
var starRating = Math.round(${data['rating']} / 2) var starRating = Math.round(${data['rating']} / 2);
$('#stars').attr('data-rateit-value', starRating) $('#stars').attr('data-rateit-value', starRating);
</script> </script>
% endif % endif
% if data['type'] == 'movie' or data['type'] == 'episode':
<script src="interfaces/default/js/tables/history_table.js"></script> <script src="interfaces/default/js/tables/history_table.js"></script>
% if data['type'] == 'show' or data['type'] == 'artist':
<script> <script>
$(document).ready(function () { function get_history() {
history_table_options.ajax = {
"url": "get_history",
type: 'post',
data: function ( d ) {
return { 'json_data': JSON.stringify( d ),
'rating_key': ${data['rating_key']} };
}
}
history_table = $('#history_table').DataTable(history_table_options);
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 10] });
$(colvis.button()).appendTo('div.colvis-button-bar');
clearSearchButton('history_table', history_table);
$('#row-edit-mode').on('click', function() {
$('#row-edit-mode-alert').fadeIn(200);
if ($(this).hasClass('active')) {
if (history_to_delete.length > 0) {
$('#deleteCount').text(history_to_delete.length);
$('#confirm-modal').modal();
$('#confirm-modal').one('click', '#confirm-delete', function () {
for (var i = 0; i < history_to_delete.length; i++) {
$.ajax({
url: 'delete_history_rows',
data: { row_id: history_to_delete[i] },
async: true,
success: function (data) {
var msg = "History deleted";
showMsg(msg, false, true, 2000);
}
});
}
history_table.draw();
});
}
$('.delete-control').each(function () {
$(this).addClass('hidden');
$('#row-edit-mode-alert').fadeOut(200);
});
} else {
history_to_delete = [];
$('.delete-control').each(function() {
$(this).find('button.btn-danger').toggleClass('btn-warning').toggleClass('btn-danger');
$(this).removeClass('hidden');
});
}
});
});
</script>
% elif data['type'] == 'show':
<script src="interfaces/default/js/tables/history_table.js"></script>
<script>
$(document).ready(function () {
history_table_options.ajax = { history_table_options.ajax = {
"url": "get_history", "url": "get_history",
type: 'post', type: 'post',
@ -393,64 +400,11 @@ DOCUMENTATION :: END
'grandparent_rating_key': ${data['rating_key']} }; 'grandparent_rating_key': ${data['rating_key']} };
} }
} }
history_table = $('#history_table').DataTable(history_table_options); }
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 10] });
$(colvis.button()).appendTo('div.colvis-button-bar');
clearSearchButton('history_table', history_table);
$('#row-edit-mode').on('click', function() {
$('#row-edit-mode-alert').fadeIn(200);
if ($(this).hasClass('active')) {
if (history_to_delete.length > 0) {
$('#deleteCount').text(history_to_delete.length);
$('#confirm-modal').modal();
$('#confirm-modal').one('click', '#confirm-delete', function () {
for (var i = 0; i < history_to_delete.length; i++) {
$.ajax({
url: 'delete_history_rows',
data: { row_id: history_to_delete[i] },
async: true,
success: function (data) {
var msg = "History deleted";
showMsg(msg, false, true, 2000);
}
});
}
history_table.draw();
});
}
$('.delete-control').each(function () {
$(this).addClass('hidden');
$('#row-edit-mode-alert').fadeOut(200);
});
} else {
history_to_delete = [];
$('.delete-control').each(function() {
$(this).find('button.btn-danger').toggleClass('btn-warning').toggleClass('btn-danger');
$(this).removeClass('hidden');
});
}
});
});
$.ajax({
url: 'get_show_children',
type: "GET",
async: true,
data: { rating_key : ${data['rating_key']} },
complete: function(xhr, status) {
$("#season-list").html(xhr.responseText); }
});
</script> </script>
% endif % elif data['type'] == 'season' or data['type'] == 'album':
% if data['type'] == 'season':
<script src="interfaces/default/js/tables/history_table.js"></script>
<script> <script>
$(document).ready(function () { function get_history() {
history_table_options.ajax = { history_table_options.ajax = {
"url": "get_history", "url": "get_history",
type: 'post', type: 'post',
@ -459,6 +413,25 @@ DOCUMENTATION :: END
'parent_rating_key': ${data['rating_key']} }; 'parent_rating_key': ${data['rating_key']} };
} }
} }
}
</script>
% elif data['type'] == 'episode' or data['type'] == 'track' or data['type'] == 'movie':
<script>
function get_history() {
history_table_options.ajax = {
"url": "get_history",
type: 'post',
data: function ( d ) {
return { 'json_data': JSON.stringify( d ),
'rating_key': ${data['rating_key']} };
}
}
}
</script>
% endif
<script>
$(document).ready(function () {
get_history();
history_table = $('#history_table').DataTable(history_table_options); history_table = $('#history_table').DataTable(history_table_options);
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 10] }); var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 10] });
$(colvis.button()).appendTo('div.colvis-button-bar'); $(colvis.button()).appendTo('div.colvis-button-bar');
@ -502,14 +475,16 @@ DOCUMENTATION :: END
} }
}); });
}); });
</script>
% if data['type'] == 'show' or data['type'] == 'season' or data['type'] == 'artist' or data['type'] == 'album':
<script>
$.ajax({ $.ajax({
url: 'get_season_children', url: 'get_item_children',
type: "GET", type: "GET",
async: true, async: true,
data: { rating_key : ${data['rating_key']} }, data: { rating_key : ${data['rating_key']} },
complete: function(xhr, status) { complete: function(xhr, status) {
$("#episode-list").html(xhr.responseText); } $("#children-list").html(xhr.responseText); }
}); });
</script> </script>
% endif % endif