2012-09-13 15:27:34 +00:00
< %inherit file="base.html"/>
< %!
from mylar import db
import mylar
%>
< %def name="headerIncludes()">
< div id = "subhead_container" >
< div id = "subhead_menu" >
< a id = "menu_link_refresh" onclick = "doAjaxCall('refreshArtist?ComicID=${comic['ComicID']}', $(this)),'table'" href = "#" data-success = "'${comic['ComicName']}' is being refreshed" > Refresh Comic< / a >
< a id = "menu_link_delete" href = "deleteArtist?ComicID=${comic['ComicID']}" > Delete Comic< / a >
< a id = "menu_link_refresh" onclick = "doAjaxCall('forceRescan?ComicID=${comic['ComicID']}', $(this)),'table'" href = "#" data-success = "'${comic['ComicName']}' is being refreshed" > Recheck Files< / a >
%if comic['Status'] == 'Paused':
< a id = "menu_link_resume" href = "#" onclick = "doAjaxCall('resumeArtist?ComicID=${comic['ComicID']}',$(this),true)" data-success = "${comic['ComicName']} resumed" > Resume Comic< / a >
%else:
< a id = "menu_link_pauze" href = "#" onclick = "doAjaxCall('pauseArtist?ComicID=${comic['ComicID']}',$(this),true)" data-success = "${comic['ComicName']} paused" > Pause Comic< / a >
%endif
< / div >
< / div >
< /%def>
< %def name="body()">
< div id = "paddingheader" >
< h1 >
%if comic['Status'] == 'Loading':
< img src = "interfaces/default/images/loader_black.gif" alt = "loading" style = "float:left; margin-right: 5px;" / >
%endif
< div class = "row" >
2012-10-16 08:16:29 +00:00
< a href = "http://comicvine.com/volume/49-${comic['ComicID']}" target = "_blank" > ${comic['ComicName']} (${comic['ComicYear']})< / a >
2012-09-13 15:27:34 +00:00
%if comic['Status'] == 'Loading':
< h3 > < i > (Comic information is currently being loaded)< / i > < / h3 >
%endif
< / div >
< / h1 >
< / div >
< div id = "tabs" >
< ul >
< li > < a href = "#tabs-1" > Comic Details< / a > < / li >
< li > < a href = "#tabs-2" > Download settings< / a > < / li >
< li > < a href = "#tabs-3" > Edit Settings< / a > < / li >
< / ul >
< div id = "tabs-1" >
< table class = "comictable" summary = "Comic Details" >
< tr >
< td id = "mainimg" >
< fieldset >
< div id = "artistImg" >
2012-10-30 10:43:01 +00:00
< img src = "${comic['ComicImage']}" alt = "" height = "400" width = "263" / >
2012-09-13 15:27:34 +00:00
< / div >
< / fieldset >
< / td >
2012-10-25 06:46:24 +00:00
< td width = "100%" padding = "10" >
2012-09-13 15:27:34 +00:00
%if comic['ComicPublisher'] == 'DC Comics':
< img src = "interfaces/default/images/logo-dccomics.png" align = "right" alt = "DC" height = "50" width = "50" / >
%elif comic['ComicPublisher'] == 'Marvel':
< img src = "interfaces/default/images/logo-marvel.jpg" align = "right" alt = "Marvel" height = "50" width = "100" / >
%elif comic['ComicPublisher'] == 'Image':
< img src = "interfaces/default/images/logo-imagecomics.gif" align = "right" alt = "Image" height = "100" width = "50" / >
2012-09-18 20:01:59 +00:00
%elif comic['ComicPublisher'] == 'Dark Horse Comics':
2012-09-13 15:27:34 +00:00
< img src = "interfaces/default/images/logo-darkhorse.jpg" align = "right" alt = "Darkhorse" height = "75" width = "50" / >
%elif comic['ComicPublisher'] == 'IDW Publishing':
< img src = "interfaces/default/images/logo-idwpublish.png" align = "right" alt = "IDW" height = "50" width = "100" / >
%endif
< fieldset >
< div >
< label > < big > Publication Date: < / big > < norm > ${comic['ComicPublished']}< / norm > < / label >
< / div >
< div >
< label > < big > Publisher: < / big > < norm > ${comic['ComicPublisher']}< / norm > < / label >
< / div >
< div >
< label > < big > Status: < / big > < norm > ${comic['Status']}< / norm > < / label >
< / div >
2012-10-07 16:20:06 +00:00
< div >
< label > < big > Last Updated: < / big >
%if comic['LastUpdated'] is None:
< norm > Never< / norm >
%else:
< norm > ${comic['LastUpdated']}< / norm >
%endif
< / label >
< / div >
2012-09-13 15:27:34 +00:00
< div >
< label > < big > Issues in Series: < / big > < norm > ${comic['Total']} issues< / norm > < / label >
< / div >
< div >
< label > < big > Directory< / big > < br / > < norm > ${comic['ComicLocation']}< / norm > < / label >
< / div > < / fieldset >
< / td >
< / tr >
< / table >
< / div >
< div id = "tabs-2" >
< table class = "comictable" summary = "Download Settings" >
< tr >
2012-09-24 05:51:05 +00:00
< td id = "mainimg" >
2012-09-13 15:27:34 +00:00
< fieldset >
< div id = "artistImg" >
2012-10-30 10:43:01 +00:00
< img src = "${comic['ComicImage']}" alt = "" height = "400" width = "263" / >
2012-09-13 15:27:34 +00:00
< / div >
< / fieldset >
< / td >
2012-10-25 06:46:24 +00:00
< td width = "100%" padding = "10" >
2012-09-13 15:27:34 +00:00
%if comic['ComicPublisher'] == 'DC Comics':
< img src = "interfaces/default/images/logo-dccomics.png" align = "right" alt = "DC" height = "50" width = "50" >
%elif comic['ComicPublisher'] == 'Marvel':
< img src = "interfaces/default/images/logo-marvel.jpg" align = "right" alt = "Marvel" height = "50" width = "100" >
%elif comic['ComicPublisher'] == 'Image':
< img src = "interfaces/default/images/logo-imagecomics.gif" align = "right" alt = "Image" height = "100" width = "50" / >
2012-09-18 20:01:59 +00:00
%elif comic['ComicPublisher'] == 'Dark Horse Comics':
2012-09-13 15:27:34 +00:00
< img src = "interfaces/default/images/logo-darkhorse.jpg" align = "right" alt = "Darkhorse" height = "75" width = "50" / >
%elif comic['ComicPublisher'] == 'IDW Publishing':
< img src = "interfaces/default/images/logo-idwpublish.png" align = "right" alt = "IDW" height = "50" width = "100" / >
%endif
< fieldset >
< div >
< label > < big > Alternate versions :< / big > < norm > ${comic['QUALalt_vers']}< / norm > < / label >
< / div >
< div >
< label > < big > Scanner :< / big > < norm > ${comic['QUALscanner']}< / norm > < / label >
< / div >
< div >
< label > < big > Type :< / big > < norm > ${comic['QUALtype']}< / norm > < / label >
< / div >
< div >
< label > < big > Quality :< / big > < norm > ${comic['QUALquality']}< / norm > < / label >
< / div >
2012-12-31 16:52:16 +00:00
< div >
< label > < big > Alternate Search Names :< / big > < norm > ${comic['AlternateSearch']}< / norm > < / label >
< / div >
2013-01-13 15:59:46 +00:00
< %
if comic['UseFuzzy'] == "0" or comic['UseFuzzy'] is None:
fuzzy = "None"
fuzzy_year = "0"
elif comic['UseFuzzy'] == "1":
fuzzy = "Remove Year"
fuzzy_year = "1"
elif comic['UseFuzzy'] == "2":
fuzzy = "Fuzzy Year"
fuzzy_year = "2"
2012-12-31 16:52:16 +00:00
2013-01-13 15:59:46 +00:00
%>
< div >
< label > < big > Fuzzy Year logic : < / big > < norm > ${fuzzy} < / norm > < / label >
< / div >
2012-12-31 16:52:16 +00:00
2012-09-13 15:27:34 +00:00
< / fieldset >
< / td >
< / tr >
< / table >
< / div >
2012-09-24 05:17:29 +00:00
< div id = "tabs-3" >
2012-09-13 15:27:34 +00:00
< table class = "comictable" summary = "Edit Settings" >
< tr >
2012-09-24 05:51:05 +00:00
< td id = "mainimg" >
2012-09-13 15:27:34 +00:00
< fieldset >
< div class = "row" id = "artistImg" >
2012-10-30 10:43:01 +00:00
< img src = "${comic['ComicImage']}" alt = "" height = "400" width = "263" / >
2012-09-13 15:27:34 +00:00
< / div >
< / fieldset >
< / td >
2012-10-25 06:46:24 +00:00
< td width = "100%" padding = "10" >
2012-09-28 15:39:44 +00:00
%if comic['ComicPublisher'] == 'DC Comics':
< img src = "interfaces/default/images/logo-dccomics.png" align = "right" alt = "DC" height = "50" width = "50" / >
%elif comic['ComicPublisher'] == 'Marvel':
< img src = "interfaces/default/images/logo-marvel.jpg" align = "right" alt = "Marvel" height = "50" width = "100" / >
%elif comic['ComicPublisher'] == 'Image':
< img src = "interfaces/default/images/logo-imagecomics.gif" align = "right" alt = "Image" height = "100" width = "50" / >
%elif comic['ComicPublisher'] == 'Dark Horse Comics':
< img src = "interfaces/default/images/logo-darkhorse.jpg" align = "right" alt = "Darkhorse" height = "75" width = "50" / >
%elif comic['ComicPublisher'] == 'IDW Publishing':
< img src = "interfaces/default/images/logo-idwpublish.png" align = "right" alt = "IDW" height = "50" width = "100" / >
%endif
< form action = "comic_config" method = "GET" >
< input type = "hidden" name = "ComicID" value = ${comic['ComicID']} >
2013-01-13 15:59:46 +00:00
< br / > < br / > < br / >
2012-09-13 15:27:34 +00:00
< fieldset >
2012-10-25 06:46:24 +00:00
< div >
2012-09-28 15:39:44 +00:00
< label > Directory Location< / label >
2012-10-30 10:43:01 +00:00
< input type = "text" name = "com_location" value = "${comic['ComicLocation']}" size = "60" > < br / >
2012-10-25 06:46:24 +00:00
< div class = "row" > < small > the directory where all the comics are located for this particular comic< / small > < / div >
2012-09-28 15:39:44 +00:00
< / div >
2012-12-31 16:52:16 +00:00
< div >
< label > Alternate Search Names< / label >
< input type = "text" name = "alt_search" value = "${comic['AlternateSearch']}" size = "60" > < br / >
2013-01-13 15:59:46 +00:00
< div class = "row" > < small > Alternate comic names to be searched in case naming is different (ie. Hack/Slash = hack-slash)< / small > < / div >
< / div >
< label > Year Options< / label >
< div class = "row radio left clearfix" >
2013-01-15 22:41:00 +00:00
< input type = "radio" style = "vertical-align: middle; margin: 3px; margin-top: -1px;" name = "fuzzy_year" value = "0" $ { comicConfig [ ' fuzzy_year0 ' ] } / > < label > Keep the Year as is< small > Default< / small > < / label >
< input type = "radio" style = "vertical-align: middle; margin: 3px; margin-top: -1px;" name = "fuzzy_year" value = "1" $ { comicConfig [ ' fuzzy_year1 ' ] } / > < label > Year Removal< small > Remove issue publication year from searches (dangerous)< / small > < / label >
< input type = "radio" style = "vertical-align: middle; margin: 3px; margin-top: -1px;" name = "fuzzy_year" value = "2" $ { comicConfig [ ' fuzzy_year2 ' ] } / > < label > Fuzzy the Year< small > Increase & Decrease the issue publication year by one< / small > < / label >
2012-12-31 16:52:16 +00:00
< / div >
2012-09-28 15:39:44 +00:00
< input type = "submit" value = "Update" / >
< / div >
< / fieldset >
< / form >
< / td >
< / tr >
2012-09-13 15:27:34 +00:00
< / table >
< / div >
< / div >
2012-10-16 08:16:29 +00:00
< div class = "table_wrapper" >
2012-09-13 15:27:34 +00:00
< form action = "markissues" method = "get" id = "markissues" >
< div id = "markissue" > Mark selected issues as
2012-10-16 15:53:46 +00:00
< select name = "action" onChange = "doAjaxCall('markissues',$(this),'table',true);" data-success = "selected issues marked" >
2012-09-13 15:27:34 +00:00
< option disabled = "disabled" selected = "selected" > Choose...< / option >
< option value = "Wanted" > Wanted< / option >
< option value = "Skipped" > Skipped< / option >
< option value = "Downloaded" > Downloaded< / option >
2012-10-30 10:43:01 +00:00
< option value = "Archived" > Archived< / option >
2012-09-13 15:27:34 +00:00
< / select >
2012-10-16 08:16:29 +00:00
selected issues
2012-09-13 15:27:34 +00:00
< input type = "hidden" value = "Go" >
2013-01-23 07:34:50 +00:00
< input type = "checkbox" name = "skipped2wanted" onclick = "doAjaxCall('skipped2wanted?comicid=${comic['ComicID']}',$(this),'table')" value = "1" data-success = "Skipped Issues Changed to Wanted" style = "float: right; vertical-align: middle; margin: 3px; margin-top: -1px;" / > < label style = "float: right; vertical-align: middle; margin: 3px; margin-top: -1px;" > Change All Skipped to Wanted < / label >
2012-09-13 15:27:34 +00:00
< / div >
< table class = "display" id = "issue_table" >
< thead >
< tr >
2013-01-23 07:34:50 +00:00
< th id = "select" align = "left" > < input type = "checkbox" onClick = "toggle(this)" class = "checkbox" / > < / th >
2012-09-13 15:27:34 +00:00
< th id = "issuenumber" > Number< / th >
< th id = "issuename" > Name< / th >
< th id = "reldate" > Date< / th >
< th id = "status" > Status< / th >
< / tr >
< / thead >
< tbody >
%for issue in issues:
< %
if issue['Status'] == 'Skipped':
grade = 'Z'
elif issue['Status'] == 'Wanted':
grade = 'X'
elif issue['Status'] == 'Snatched':
grade = 'C'
else:
grade = 'A'
%>
< tr class = "grade${grade}" >
< td id = "select" > < input type = "checkbox" name = "${issue['IssueID']}" class = "checkbox" / > < / td >
< td id = "issuenumber" > ${issue['Issue_Number']}< / td >
< td id = "issuename" > < a href = "issuePage?IssueID=${issue['IssueID']}" > ${issue['IssueName']}< / a > < / td >
< td id = "reldate" > ${issue['IssueDate']}< / td >
< td id = "status" > ${issue['Status']}
%if issue['Status'] == 'Skipped':
2012-10-01 15:01:21 +00:00
[< a href = "#" onclick = "doAjaxCall('queueissue?ComicID=${issue['ComicID']}&IssueID=${issue['IssueID']}&ComicIssue=${issue['Issue_Number']}&ComicYear=${issue['IssueDate']}&mode=want',$(this),'table')" > want< / a > ]
2012-09-13 15:27:34 +00:00
%elif (issue['Status'] == 'Wanted'):
[< a href = "#" onclick = "doAjaxCall('unqueueissue?IssueID=${issue['IssueID']}&ComicID=${issue['ComicID']}',$(this),'table')" data-success = "'${issue['Issue_Number']}' has been marked as skipped" > skip< / a > ]
%else:
2012-10-01 15:01:21 +00:00
[< a href = "#" onclick = "doAjaxCall('queueissue?ComicID=${issue['ComicID']}&IssueID=${issue['IssueID']}&ComicIssue=${issue['Issue_Number']}&mode=want', $(this),'table')" data-success = "Retrying the same version of '${issue['ComicName']}' '${issue['Issue_Number']}'" title = "Retry the same download again" > retry< / a > ][< a href = "#" onclick = "doAjaxCall('queueissue?IssueID=${issue['IssueID']}&ComicID=${issue['ComicID']}&ComicIssue=${issue['Issue_Number']}&new=True', $(this),'table')" title = "Try a new download, skipping all previously tried nzbs" data-success = "Downloading new version for '${issue['ComicName']}' '${issue['Issue_Number']}'" data-success = "Looking for a new version of '${issue['ComicName']}' '${issue['Issue_Number']}'" > new< / a > ]
2012-09-13 15:27:34 +00:00
%endif
< / td >
< / tr >
%endfor
< / tbody >
< / table >
< / form >
2012-10-16 08:16:29 +00:00
< / div >
2012-09-13 15:27:34 +00:00
< /%def>
< %def name="headIncludes()">
< link rel = "stylesheet" href = "interfaces/default/css/data_table.css" >
%if comic['Status'] == 'Loading':
< meta http-equiv = "refresh" content = "60" >
%endif
< /%def>
< %def name="javascriptIncludes()">
< script src = "js/libs/jquery.dataTables.min.js" > < / script >
< script >
hideServerDivs = function () {
$("#customoptions").slideUp();
$("#hpserveroptions").slideUp();
};
handleNewSelection = function () {
hideServerDivs();
switch ($(this).val()) {
case 'custom':
$("#customoptions").slideDown();
break;
case 'mylar':
$("#hpserveroptions").slideDown();
break;
}
};
function initThisPage()
{
$(function() {
$( "#tabs" ).tabs();
});
initActions();
$('#issue_table').dataTable({
"bDestroy": true,
"aoColumns": [
null,
null,
null,
null,
null
],
"aoColumnDefs": [
{ 'bSortable': false, 'aTargets': [ 0,1 ] }
],
"oLanguage": {
"sLengthMenu":"Show _MENU_ issues per page",
"sEmptyTable": "No issue information available",
"sInfo":"Showing _TOTAL_ issues",
"sInfoEmpty":"Showing 0 to 0 of 0 issues",
"sInfoFiltered":"(filtered from _MAX_ total issues)",
"sSearch": ""},
"bPaginate": false,
"aaSorting": [[1, 'desc'],[3,'desc']]
});
resetFilters("issues");
setTimeout(function(){
initFancybox();
},1500)
}
$(document).ready(function() {
initThisPage();
});
< / script >
< /%def>