2012-09-13 15:27:34 +00:00
< %inherit file="base.html"/>
< %!
import mylar
2013-05-04 04:40:32 +00:00
from mylar import db
from mylar.helpers import checked
2012-09-13 15:27:34 +00:00
%>
< %def name="headerIncludes()">
< div id = "subhead_container" >
2015-06-23 13:49:52 +00:00
< div id = "subhead_menu" >
2012-09-13 15:27:34 +00:00
< a id = "menu_link_refresh" href = "manualpull" > Refresh Pull-list< / a >
2015-06-23 13:49:52 +00:00
< a id = "menu_link_retry" href = "pullrecreate" > Recreate Pull-list< / a >
2014-11-03 18:18:15 +00:00
< a id = "menu_link_scan" class = "button" > Download< / a >
<!-- <a id="menu_link_scan" onclick="doAjaxCall('MassWeeklyDownload?pulldate=${pulldate}, $(this)),'table'" href="#" data - success="Now Downloading Comics to : ${mylar.GRABBAG_DIR}">Download.</a> -->
2012-09-13 15:27:34 +00:00
< / div >
2015-06-23 13:49:52 +00:00
< / div >
2012-09-13 15:27:34 +00:00
< a href = "home" class = "back" > « Back to overview< / a >
< /%def>
< %def name="body()">
2013-02-17 10:31:18 +00:00
< div class = "clearfix" >
2014-11-21 17:16:28 +00:00
%if wantedcount == 0:
< h1 > Weekly Pull list for : ${pulldate}< / h1 >
%else:
< h1 > Weekly Pull list for : ${pulldate} (${wantedcount})< / h1 >
2015-06-23 13:49:52 +00:00
%endif
2012-09-13 15:27:34 +00:00
< / div >
2013-05-04 04:40:32 +00:00
< div >
< form action = "MassWeeklyDownload" method = "GET" id = "MassDownload" >
< fieldset >
< div class = "row" >
2015-07-01 22:52:26 +00:00
< input type = "checkbox" name = "weekfolder" id = "weekfolder" value = "1" $ { checked ( mylar . WEEKFOLDER ) } / > < label > Store in Weekly Directory< / label >
< small > Create weekly folder (${weekfold})< / small >
2013-05-04 04:40:32 +00:00
< / div >
< input type = "hidden" name = "pulldate" value = ${pulldate} >
< input type = "submit" style = "display:none" / >
< / fieldset >
< / form >
< / div >
2013-01-28 20:31:43 +00:00
< div class = "table_wrapper" >
2012-09-13 15:27:34 +00:00
< table class = "display" id = "pull_table" >
< thead >
< tr >
< th id = "publisher" > Publisher< / th >
2013-02-17 10:31:18 +00:00
< th id = "comicname" > Comic< / th >
2012-09-13 15:27:34 +00:00
< th id = "comicnumber" > Number< / th >
< th id = "status" > Status< / th >
< / tr >
< / thead >
< tbody >
%for weekly in weeklyresults:
< %
if weekly['STATUS'] == 'Skipped':
2013-01-11 21:20:51 +00:00
grade = 'Z'
2012-09-13 15:27:34 +00:00
elif weekly['STATUS'] == 'Wanted':
2013-01-11 21:20:51 +00:00
grade = 'X'
2012-09-13 15:27:34 +00:00
elif weekly['STATUS'] == 'Snatched':
grade = 'C'
2015-02-09 18:44:10 +00:00
elif weekly['STATUS'] == 'Downloaded':
grade = 'D'
2012-09-13 15:27:34 +00:00
else:
2013-01-11 21:20:51 +00:00
grade = 'A'
2015-01-16 19:40:08 +00:00
if weekly['AUTOWANT'] == True:
grade = 'H'
2012-09-13 15:27:34 +00:00
%>
< tr class = "grade${grade}" >
%if pullfilter is True:
2013-01-28 20:31:43 +00:00
< td class = "publisher" > ${weekly['PUBLISHER']}< / td >
2015-04-28 02:15:53 +00:00
< td class = "comicname" >
%if weekly['COMICID'] == '' or weekly['COMICID'] is None:
${weekly['COMIC']}
%else:
< a href = "comicDetails?ComicID=${weekly['COMICID']}" > ${weekly['COMIC']}< / a >
%endif
< / td >
2013-01-28 20:31:43 +00:00
< td class = "comicnumber" > ${weekly['ISSUE']}< / td >
2015-01-16 19:40:08 +00:00
%if weekly['AUTOWANT']:
< td class = "status" > Auto-Want
%else:
< td class = "status" > ${weekly['STATUS']}
%if weekly['STATUS'] == 'Skipped':
%if weekly['ISSUE'] == '1' or weekly['ISSUE'] == '0':
< a href = "#" title = "Watch for this series" onclick = "doAjaxCall('add2futurewatchlist?ComicName=${weekly['COMIC'] |u}&Issue=${weekly['ISSUE']}&Publisher=${weekly['PUBLISHER']}&ShipDate=${pulldate}', $(this),'table')" data-success = "${weekly['COMIC']} is now on auto-watch/add." > < span class = "ui-icon ui-icon-plus" > < / span > Watch< / a >
%endif
< a href = "searchit?name=${weekly['COMIC'] | u}&issue=${weekly['ISSUE']}&mode=pullseries" > < span class = "ui-icon ui-icon-plus" > < / span > add series< / a >
< a href = "queueissue?ComicName=${weekly['COMIC'] | u}&ComicIssue=${weekly['ISSUE']}&mode=pullwant&Publisher=${weekly['PUBLISHER']}" > < span class = "ui-icon ui-icon-plus" > < / span > one off< / a >
%endif
2012-09-13 15:27:34 +00:00
%endif
< / td >
%endif
2015-06-23 13:49:52 +00:00
< / tr >
2012-09-13 15:27:34 +00:00
%endfor
< / tbody >
< / table >
2013-01-28 20:31:43 +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" >
< /%def>
< %def name="javascriptIncludes()">
< script src = "js/libs/jquery.dataTables.min.js" > < / script >
2013-05-04 04:40:32 +00:00
< script type = "text/javascript" >
2015-08-11 21:56:22 +00:00
function addAction() {
$('#weekfolder').append('< input type = "hidden" name = "filename" value = True / > ');
};
2013-05-04 04:40:32 +00:00
$("#menu_link_scan").click(function() {
2015-08-11 21:56:22 +00:00
addAction();
2013-05-04 04:40:32 +00:00
$('#MassDownload').submit();
return true;
});
2015-06-23 13:49:52 +00:00
< / script >
2013-05-04 04:40:32 +00:00
2012-09-13 15:27:34 +00:00
< script >
2013-01-28 20:31:43 +00:00
function initThisPage() {
2015-07-01 22:52:26 +00:00
$("#weekfolder").click(function(){
if ($("#weekfolder").is(":checked"))
{
$("#MassDownload").submit();
return true;
}
else
{
$("#MassDownload").submit();
return true;
}
});
2013-01-28 20:31:43 +00:00
initActions();
$('#pull_table').dataTable (
{
"bDestroy": true,
2013-02-17 10:31:18 +00:00
//"aoColumnDefs": [
// { 'bSortable': false, 'aTargets': [ 2,3 ] }
//],
2013-04-14 02:55:00 +00:00
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, 'All' ]],
2013-01-28 20:31:43 +00:00
"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": ""},
2013-04-14 02:55:00 +00:00
"bStateSave": true,
2013-01-28 20:31:43 +00:00
"iDisplayLength": 25,
"sPaginationType": "full_numbers",
2015-07-01 22:52:26 +00:00
"aaSorting": [[0, 'desc']]
2013-01-28 20:31:43 +00:00
});
resetFilters("weekly");
setTimeout(function(){
initFancybox();
},1500)
}
2012-09-13 15:27:34 +00:00
2013-01-28 20:31:43 +00:00
$(document).ready(function() {
initThisPage();
});
< / script >
2012-09-13 15:27:34 +00:00
< /%def>