mylar/data/interfaces/default/weeklypull.html

167 lines
7.1 KiB
HTML
Raw Normal View History

<%inherit file="base.html"/>
<%!
import mylar
from mylar import db
from mylar.helpers import checked
%>
<%def name="headerIncludes()">
<div id="subhead_container">
<div id="subhead_menu">
<a id="menu_link_refresh" href="manualpull">Refresh Pull-list</a>
<a id="menu_link_retry" href="pullrecreate">Recreate Pull-list</a>
<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> -->
</div>
</div>
<a href="home" class="back">&laquo; Back to overview</a>
</%def>
<%def name="body()">
<div class="clearfix">
%if wantedcount == 0:
<h1>Weekly Pull list for : ${pulldate}</h1>
%else:
<h1>Weekly Pull list for : ${pulldate} (${wantedcount})</h1>
%endif
</div>
<div>
<form action="MassWeeklyDownload" method="GET" id="MassDownload">
<fieldset>
<div class="row">
<input type="checkbox" name="weekfolder" id="weekfolder" value="1" ${checked(mylar.WEEKFOLDER)} /><label>Store in Weekly Directory</label>
<small>Create weekly folder (${weekfold})</small>
</div>
<input type="hidden" name="pulldate" value=${pulldate}>
<input type="submit" style="display:none" />
</fieldset>
</form>
</div>
<div class="table_wrapper">
<table class="display" id="pull_table">
<thead>
<tr>
<th id="publisher">Publisher</th>
<th id="comicname">Comic</th>
<th id="comicnumber">Number</th>
<th id="status">Status</th>
</tr>
</thead>
<tbody>
%for weekly in weeklyresults:
<%
if weekly['STATUS'] == 'Skipped':
grade = 'Z'
elif weekly['STATUS'] == 'Wanted':
grade = 'X'
elif weekly['STATUS'] == 'Snatched':
grade = 'C'
elif weekly['STATUS'] == 'Downloaded':
grade = 'D'
else:
grade = 'A'
if weekly['AUTOWANT'] == True:
grade = 'H'
%>
<tr class="grade${grade}">
%if pullfilter is True:
<td class="publisher">${weekly['PUBLISHER']}</td>
<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>
<td class="comicnumber">${weekly['ISSUE']}</td>
%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
%endif
</td>
%endif
</tr>
%endfor
</tbody>
</table>
</div>
</%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 type="text/javascript">
function addAction() {
$('#weekfolder').append('<input type="hidden" name="filename" value=True />');
};
$("#menu_link_scan").click(function() {
addAction();
$('#MassDownload').submit();
return true;
});
</script>
<script>
function initThisPage() {
$("#weekfolder").click(function(){
if ($("#weekfolder").is(":checked"))
{
$("#MassDownload").submit();
return true;
}
else
{
$("#MassDownload").submit();
return true;
}
});
initActions();
$('#pull_table').dataTable (
{
"bDestroy": true,
//"aoColumnDefs": [
// { 'bSortable': false, 'aTargets': [ 2,3 ] }
//],
IMP: Ability to use 32P session cookies for Auth Login (thnx @btx), IMP: 32P Backlog support! (individual issues only), FIX: 32P will only do one search occurance, instead of issue-numbered padded searching, IMP: When post-processing, if series is in a Paused status or is in an Ended publishing state with 100% of issues completed - will ignore series for post-processing comparisons, IMP: Dynamic Name matching added as matching algorithims in Weekly Pull Lists, FIX: If series contained a '+', would not be able to scan in files for comparison checks (or during post-processing), FIX: File-checking/Post-Processing was taking the incorrect subdirectory path due to escaped slashes (windows only), FIX: If a series contained more than one/multiple special characters, dynamic naming would be slightly off and cause matching problems in some cases, FIX: When peforming a migration of paths in the db using the locmove option, invalid character references would occur on some machines when moving between OS', IMP: Added status checking of an issue prior to downloading (should fix duplicate downloading of same issue within a specific timeframe), FIX: Fixed some parsing issues when using the ALT_PULL=1 method of the weekly pull list, FIX: Fixed some 500 errors when using reverse proxy (flush Impors, Recheck Files, Manage), FIX: When selecting 'Clear Post-Processed items' from history tab, will now also clear 'Processed' items as well, FIX: When importing series that were successfully scanned for metadata and contained valid ComicID's, would fail to regenerate the dataset, IMP: Added exception catch for ComicVine API limit being reached when performing imports (graceful error), IMP: Added graphical icons to indicate Pause/Loading/Error/Active state in the Manage Comics section
2016-05-12 15:28:28 +00:00
"aLengthMenu": [[10, 15, 25, 50, -1], [10, 15, 25, 50, 'All' ]],
"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": ""},
"bStateSave": true,
"iDisplayLength": 25,
"sPaginationType": "full_numbers",
"aaSorting": [[0, 'desc']]
});
resetFilters("weekly");
setTimeout(function(){
initFancybox();
},1500)
}
$(document).ready(function() {
initThisPage();
});
</script>
</%def>