mirror of
https://github.com/rembo10/headphones.git
synced 2026-03-21 12:19:27 +00:00
148 lines
4.3 KiB
HTML
148 lines
4.3 KiB
HTML
<%inherit file="base.html" />
|
|
<%def name="body()">
|
|
<div class="table_wrapper">
|
|
<h1><span>O</span>Upcoming Albums</h1>
|
|
<table class="display" id="upcoming_table">
|
|
<thead>
|
|
<tr>
|
|
<th id="albumart"></th>
|
|
<th id="name">Artist</th>
|
|
<th id="albumname">Album Name</th>
|
|
<th id="reldate">Release Date</th>
|
|
<th id="type">Type</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
%for album in upcoming:
|
|
<tr class="gradeZ">
|
|
<td id="albumart">
|
|
<div class="album-art-small">
|
|
<a href="albumPage?AlbumID=${album['AlbumID']}">
|
|
<img />
|
|
</a>
|
|
</div>
|
|
</td>
|
|
|
|
<td id="artistname">
|
|
<a href="artistPage?ArtistID=${album['ArtistID']}">
|
|
${album['ArtistName']}
|
|
</a>
|
|
</td>
|
|
<td id="albumname"><a href="albumPage?AlbumID=${album['AlbumID']}">${album['AlbumTitle']}</a></td>
|
|
<td id="reldate">${album['ReleaseDate']}</td>
|
|
<td id="type">${album['Type']}</td>
|
|
</tr>
|
|
%endfor
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<form action="markAlbums" method="get">
|
|
<div class="dataTables_mark">
|
|
<p class="indented">Mark selected albums as
|
|
<select class="styled" name="action">
|
|
<option value="Skipped">Skipped</option>
|
|
<option value="Downloaded">Downloaded</option>
|
|
</select>
|
|
<input type="submit" value="Go">
|
|
</p>
|
|
</div>
|
|
<div class="table_wrapper">
|
|
<h1><span>N</span>Wanted Albums</h1>
|
|
<table class="display" id="wanted_table">
|
|
<thead>
|
|
<tr>
|
|
<th id="select"><input class="styled" type="checkbox" onClick="toggle(this)" /></th>
|
|
<th id="albumart"></th>
|
|
<th id="artistname">Artist</th>
|
|
<th id="albumname">Album Name</th>
|
|
<th id="reldate">Release Date</th>
|
|
<th id="type">Type</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
%for album in wanted:
|
|
<tr class="gradeZ">
|
|
<td id="select"><input class="styled" type="checkbox" name="${album['AlbumID']}" class="checkbox" /></th>
|
|
<td id="albumart">
|
|
<div class="album-art-small">
|
|
<div class="status ${album['Status']}">
|
|
<div>
|
|
%if album['Status'] == 'Skipped':
|
|
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Get this album"><span>N</span></a>
|
|
%elif album['Status'] == 'Wanted':
|
|
<a class="web-symbol" href="#" title="Mark downloaded"><span>/</span></a>
|
|
<a class="web-symbol" href="unqueueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Unmark"><span>×</span></a>
|
|
%else:
|
|
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}" title="Retry the same nbz"><span>*</span></a>
|
|
<a class="web-symbol" href="queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}&new=True" title="Try a new download, skipping all previously tried nzbs">J</a>
|
|
%endif
|
|
</div>
|
|
</div>
|
|
<img />
|
|
</div>
|
|
</td>
|
|
<td id="artistname">
|
|
<a href="">
|
|
${album['ArtistName']}
|
|
</a></td>
|
|
<td id="albumname"><a href="albumPage?AlbumID=${album['AlbumID']}">${album['AlbumTitle']}</a></td>
|
|
<td id="reldate">${album['ReleaseDate']}</td>
|
|
<td id="type">${album['Type']}</td>
|
|
</tr>
|
|
%endfor
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</%def>
|
|
|
|
<%def name="headIncludes()">
|
|
|
|
</%def>
|
|
|
|
<%def name="javascriptIncludes()">
|
|
<script src="interfaces/brink/JS/libs/jquery.dataTables.min.js"></script>
|
|
<script>
|
|
function getArtistArt() {
|
|
$("table#upcoming_table tr td#artistname").each(function(){
|
|
var id = $(this).parent().find("td#select input").attr('name');
|
|
var artist = $(this).children('a').text();
|
|
var image = $(this).parent().find("td#albumart img");
|
|
if ( !image.hasClass('done') ) {
|
|
image.addClass('done');
|
|
getArtistInfo(artist,image,1,id);
|
|
}
|
|
});
|
|
$("table#wanted_table tr td#artistname").each(function(){
|
|
var id = $(this).parent().find("td#select input").attr('name');
|
|
var artist = $(this).children('a').text();
|
|
var image = $(this).parent().find("td#albumart img");
|
|
if ( !image.hasClass('done') ) {
|
|
image.addClass('done');
|
|
getArtistInfo(artist,image,1,id);
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
$(document).ready(function()
|
|
{
|
|
getArtistArt();
|
|
$('#wanted_table').dataTable(
|
|
{
|
|
"aoColumns": [
|
|
{ "bSortable": false},
|
|
{ "bSortable": false},
|
|
null,
|
|
null,
|
|
null,
|
|
null
|
|
],
|
|
"bFilter": false,
|
|
"bInfo": false,
|
|
"bPaginate": false
|
|
});
|
|
});
|
|
</script>
|
|
</%def> |