mirror of
https://github.com/evilhero/mylar
synced 2024-12-23 16:22:45 +00:00
159 lines
7.9 KiB
HTML
Executable file
159 lines
7.9 KiB
HTML
Executable file
<%inherit file="base.html"/>
|
|
<%!
|
|
import os
|
|
import mylar
|
|
from mylar.helpers import checked
|
|
%>
|
|
|
|
<%def name="headerIncludes()">
|
|
<div id="subhead_container">
|
|
<div id="subhead_menu">
|
|
<a id="menu_link_delete" href="#">Sync</a>
|
|
<a id="menu_link_delete" href="#">Remove Read</a>
|
|
<a id="menu_link_delete" href="#">Clear File Cache</a>
|
|
<a id="menu_link_refresh" onclick="doAjaxCall('ReadGetWanted?StoryArcID=${storyarcid}',$(this),'table')" data-success="Searching for Missing StoryArc Issues">Search for Missing</a>
|
|
<a id="menu_link_refresh" onclick="doAjaxCall('ArcWatchlist?StoryArcID=${storyarcid}',$(this),'table')" data-success="Searching for matches on Watchlist">Search for Watchlist matches</a>
|
|
</div>
|
|
</div>
|
|
</%def>
|
|
|
|
<%def name="body()">
|
|
<div id="paddingheader">
|
|
<h1 class="clearfix"><a href="readlist"><img src="interfaces/default/images/ReadingList-icon.png" height="26" width="26" alt="Reading List"/>Reading List Management</a></h1>
|
|
</div>
|
|
<center><h1>${storyarcname}</h1></center>
|
|
<table class="configtable">
|
|
<tr>
|
|
<form action="readOptions" id="chkoptions" method="GET">
|
|
<fieldset>
|
|
<legend>Options</legend>
|
|
<div class="row checkbox left clearfix">
|
|
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="storyarcdir" id="storyarcdir" value="1" ${checked(mylar.STORYARCDIR)} /><label>Should I create a Story-Arc Directory?</label><br/>
|
|
<small>Arcs in StoryArc Directory: <% sdir = os.path.join(mylar.DESTINATION_DIR, "StoryArcs") %>${sdir}</small><br/>
|
|
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" /><label>Show Downloaded Story Arc Issues on ReadingList tab</label><br/>
|
|
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="read2filename" id="read2filename" value="1" ${checked(mylar.READ2FILENAME)} /><label>Append Reading# to filename</label><br/>
|
|
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" /><label>Enforce Renaming/MetaTagging options (if enabled)</label><br/>
|
|
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" /><label>Copy watchlisted issues to StoryArc Directory</label>
|
|
<input type="hidden" name="StoryArcID" value="${storyarcid}">
|
|
<input type="hidden" name="StoryArcName" value="${storyarcname}">
|
|
|
|
</div>
|
|
</fieldset>
|
|
<div>
|
|
<input type="submit" value="Update"/>
|
|
</div>
|
|
</form>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
<table class="display" id="read_detail">
|
|
<thead>
|
|
<tr>
|
|
<th id="readingorder"></th>
|
|
<th id="comicname">ComicName</th>
|
|
<th id="issue">Issue</th>
|
|
<th id="issueyear">Pub Year</th>
|
|
<th id="status">Status</th>
|
|
<th id="action">Options</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
%for item in readlist:
|
|
<%
|
|
if item['Status'] == 'Downloaded':
|
|
grade = 'A'
|
|
elif item['Status'] == 'Read':
|
|
grade = 'C'
|
|
elif item['Status'] == 'Not Watched':
|
|
grade = 'X'
|
|
elif item['Status'] == 'Wanted':
|
|
grade = 'Y'
|
|
else:
|
|
grade = 'U'
|
|
|
|
%>
|
|
|
|
<tr id="${item['ReadingOrder']}" class="grade${grade}">
|
|
<td id="readingorder">${item['ReadingOrder']}</td>
|
|
<td id="comicname" title="${item['IssueName']}">${item['ComicName']} (${item['SeriesYear']})</td>
|
|
<td id="issue">${item['IssueNumber']}</td>
|
|
<%
|
|
try:
|
|
if item['IssueDate'] != '0000-00-00' and item['IssueDate'] is not None:
|
|
issueyear = item['IssueDate'][:4]
|
|
else:
|
|
if item['StoreDate'] != '0000-00-00' and item['StoreDate'] is not None:
|
|
issueyear = item['IssueDate'][:4]
|
|
else:
|
|
# this is needed for imported cbl's
|
|
try:
|
|
issueyear = item['issueYEAR']
|
|
except:
|
|
issueyear = '0000'
|
|
except:
|
|
issueyear = '0000'
|
|
%>
|
|
<td id="issueyear">${issueyear}</td>
|
|
<td id="status">${item['Status']}</td>
|
|
<td id="action">
|
|
%if item['Status'] is None or item['Status'] == None:
|
|
<a href="queueissue?ComicName=${item['ComicName'] | u}&ComicIssue=${item['IssueNumber']}&ComicYear=${item['IssueYear']}&mode=readlist&SARC=${item['StoryArc']}&IssueArcID=${item['IssueArcID']}"><span class="ui-icon ui-icon-plus"></span>Grab it</a>
|
|
%elif item['Status'] == 'Snatched':
|
|
<a href="#" onclick="doAjaxCall('queueissue?ComicName=${item['ComicName'] | u}&ComicIssue=${item['IssueNumber']}&ComicYear=${item['IssueYEAR']}&mode=readlist&SARC=${item['StoryArc']}&IssueArcID=${item['IssueArcID']}',$(this),'table')" data-success="Trying to Retry"><span class="ui-icon ui-icon-plus"></span>Retry</a>
|
|
%endif
|
|
</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 src="js/libs/jquery.dataTables.rowReordering.js"></script>
|
|
-->
|
|
<script type="text/javascript">
|
|
$("#menu_link_scan").click(function() {
|
|
$('#chkoptions').submit();
|
|
return true;
|
|
});
|
|
</script>
|
|
<script>
|
|
|
|
function initThisPage() {
|
|
$('#read_detail').dataTable(
|
|
{
|
|
"bDestroy": true,
|
|
"oLanguage": {
|
|
"sLengthMenu":"Show _MENU_ items per page",
|
|
"sEmptyTable": "<em>No History to Display</em>",
|
|
"sInfo":"Showing _START_ to _END_ of _TOTAL_ items",
|
|
"sInfoEmpty":"Showing 0 to 0 of 0 items",
|
|
"sInfoFiltered":"(filtered from _MAX_ total items)"},
|
|
"iDisplayLength": 25,
|
|
"sPaginationType": "full_numbers",
|
|
"aaSorting": []
|
|
});
|
|
//
|
|
// }).rowReordering({
|
|
// sAjax: "reOrder",
|
|
// fnAlert: function(text){
|
|
// alert("Order cannot be changed.\n" + text);
|
|
// }
|
|
// });
|
|
//
|
|
resetFilters("item");
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
initThisPage();
|
|
initActions();
|
|
});
|
|
</script>
|
|
</%def>
|