mirror of https://github.com/evilhero/mylar
100 lines
2.9 KiB
HTML
100 lines
2.9 KiB
HTML
|
<%inherit file="base.html"/>
|
||
|
<%!
|
||
|
from mylar import helpers
|
||
|
%>
|
||
|
|
||
|
<%def name="body()">
|
||
|
<table class="display" id="artist_table">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th id="publisher">Publisher</th>
|
||
|
<th id="name">Comic</th>
|
||
|
<th id="year">Year</th>
|
||
|
<th id="status">Status</th>
|
||
|
<th id="issue">Latest Issue</th>
|
||
|
<th id="have">Have</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
%for comic in comics:
|
||
|
<%
|
||
|
totaltracks = comic['Total']
|
||
|
havetracks = comic['Have']
|
||
|
if not havetracks:
|
||
|
havetracks = 0
|
||
|
try:
|
||
|
percent = (havetracks*100.0)/totaltracks
|
||
|
if percent > 100:
|
||
|
percent = 100
|
||
|
except (ZeroDivisionError, TypeError):
|
||
|
percent = 0
|
||
|
totaltracks = '?'
|
||
|
|
||
|
if comic['Status'] == 'Paused':
|
||
|
grade = 'X'
|
||
|
if comic['Status'] == 'Loading':
|
||
|
grade = 'L'
|
||
|
else:
|
||
|
grade = 'A'
|
||
|
|
||
|
%>
|
||
|
<tr class="grade${grade}">
|
||
|
<td id="publisher">${comic['ComicPublisher']}</td>
|
||
|
<td id="name"><span title="${comic['ComicSortName']}"></span><a href="artistPage?ComicID=${comic['ComicID']}">${comic['ComicName']}</a></td>
|
||
|
<td id="year"><span title="${comic['ComicYear']}"></span>${comic['ComicYear']}</td>
|
||
|
<td id="status">${comic['Status']}</td>
|
||
|
<td id="issue"><span title="${comic['LatestIssue']}"></span># ${comic['LatestIssue']} (${comic['LatestDate']})</td>
|
||
|
<td id="have"><span title="${percent}"></span><div class="progress-container"><div style="width:${percent}%"><div class="havetracks">${havetracks}/${totaltracks}</div></div></div></td>
|
||
|
</tr>
|
||
|
%endfor
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</%def>
|
||
|
|
||
|
<%def name="headIncludes()">
|
||
|
<link rel="stylesheet" href="interfaces/default/css/data_table.css">
|
||
|
</%def>
|
||
|
|
||
|
<%def name="javascriptIncludes()">
|
||
|
<script src="js/libs/jquery.dataTables.min.js"></script>
|
||
|
<script>
|
||
|
|
||
|
function initThisPage()
|
||
|
{
|
||
|
$('#artist_table').dataTable({
|
||
|
"bDestroy": true,
|
||
|
"aoColumnDefs": [
|
||
|
{ 'bSortable': false, 'aTargets': [ 0 ] }
|
||
|
],
|
||
|
"aoColumns": [
|
||
|
null,
|
||
|
{ "sType": "title-string"},
|
||
|
null,
|
||
|
{ "sType": "title-string"},
|
||
|
{ "sType": "title-numeric"}
|
||
|
],
|
||
|
"oLanguage": {
|
||
|
"sLengthMenu":"Show _MENU_ results per page",
|
||
|
"sEmptyTable": "No results",
|
||
|
"sInfo":"Showing _START_ to _END_ of _TOTAL_ results",
|
||
|
"sInfoEmpty":"Showing 0 to 0 of 0 results",
|
||
|
"sInfoFiltered":"(filtered from _MAX_ total results)",
|
||
|
"sSearch" : ""},
|
||
|
"bStateSave": true,
|
||
|
"iDisplayLength": 25,
|
||
|
"sPaginationType": "full_numbers"
|
||
|
});
|
||
|
resetFilters("comic");
|
||
|
}
|
||
|
|
||
|
$(document).ready(function() {
|
||
|
initThisPage();
|
||
|
});
|
||
|
$(window).load(function(){
|
||
|
initFancybox();
|
||
|
refreshLoadArtist();
|
||
|
});
|
||
|
</script>
|
||
|
|
||
|
</%def>
|