mirror of
https://github.com/evilhero/mylar
synced 2024-12-27 01:57:01 +00:00
189 lines
9.7 KiB
HTML
Executable file
189 lines
9.7 KiB
HTML
Executable file
<%inherit file="base.html"/>
|
|
<%!
|
|
import os
|
|
import mylar
|
|
from mylar.helpers import checked, listLibrary
|
|
%>
|
|
|
|
<%def name="headerIncludes()">
|
|
<div id="subhead_container">
|
|
<div id="subhead_menu">
|
|
%if mylar.TAB_ENABLE:
|
|
<a id="menu_link_delete" onclick="doAjaxCall('syncfiles',$(this),'table')" data-success="Successfully sent issues to your device">Sync</a>
|
|
%endif
|
|
<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('SearchArcIssues?StoryArcID=${storyarcid}',$(this),'table')" data-success="Now searching for Missing StoryArc Issues">Search for Missing</a>
|
|
<a id="menu_link_refresh" onclick="doAjaxCall('ArcWatchlist?StoryArcID=${storyarcid}',$(this),'table')" data-success="Now searching for matches on Watchlist">Search for Watchlist matches</a>
|
|
%if cvarcid:
|
|
<a id="menu_link_refresh" onclick="doAjaxCall('addStoryArc_thread?arcid=${storyarcid}&cvarcid=${cvarcid}&storyarcname=${storyarcname}&arcrefresh=True',$(this),'table')" data-success="Refreshed Story Arc">Refresh Story Arc</a>
|
|
%endif
|
|
</div>
|
|
</div>
|
|
</%def>
|
|
|
|
<%def name="body()">
|
|
<div id="paddingheader">
|
|
<h1 class="clearfix"><a href="storyarc_main"><img src="interfaces/default/images/ReadingList-icon.png" height="26" width="26" alt="Story Arc Management"/>Story Arc Management</a></h1>
|
|
</div>
|
|
<center><h1>${storyarcname}</h1></center>
|
|
<div id="tabs">
|
|
<ul>
|
|
<li><a href="#tabs-1">Options</a></li>
|
|
</ul>
|
|
|
|
<div id="tabs-1">
|
|
|
|
<table class="configtable">
|
|
<tr>
|
|
<form action="readOptions" id="chkoptions" method="GET">
|
|
<fieldset>
|
|
<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;" name="copy2arcdir" id="copy2arcdir" value="1" ${checked(mylar.COPY2ARCDIR)} /><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>
|
|
</div>
|
|
</div>
|
|
<table class="display" id="read_detail">
|
|
<thead>
|
|
<tr>
|
|
<th id="readingorder"></th>
|
|
<th id="comicname">ComicName</th>
|
|
<th id="issue">Issue</th>
|
|
<th id="issuedate">Pub Date</th>
|
|
<th id="status">Status</th>
|
|
<th id="action">Options</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<%
|
|
cids = listLibrary()
|
|
%>
|
|
%for item in readlist:
|
|
<%
|
|
if item['Status'] == 'Skipped':
|
|
grade = 'Z'
|
|
elif item['Status'] == 'Wanted':
|
|
grade = 'X'
|
|
elif item['Status'] == 'Snatched':
|
|
grade = 'C'
|
|
elif item['Status'] == 'Downloaded':
|
|
grade = 'A'
|
|
elif item['Status'] == 'Archived':
|
|
grade = 'A'
|
|
elif item['Status'] == 'Ignored':
|
|
grade = 'A'
|
|
elif item['Status'] == 'Failed':
|
|
grade = 'C'
|
|
elif item['Status'] == 'Read':
|
|
grade = 'C'
|
|
elif item['Status'] == 'Not Watched':
|
|
grade = 'X'
|
|
else:
|
|
grade = 'Z'
|
|
|
|
if item['ComicID'] in cids:
|
|
haveit = cids[item['ComicID']]
|
|
else:
|
|
haveit = "No"
|
|
|
|
%>
|
|
|
|
<tr id="${item['ReadingOrder']}" class="grade${grade}">
|
|
<td id="readingorder">${item['ReadingOrder']}</td>
|
|
<td id="comicname" title="${item['IssueName']}">
|
|
%if haveit == "No":
|
|
${item['ComicName']} (${item['SeriesYear']})
|
|
%else:
|
|
<a href="comicDetails?ComicID=${haveit}">${item['ComicName']} (${item['SeriesYear']})</a>
|
|
|
|
%endif
|
|
</td>
|
|
|
|
<td id="issue">${item['IssueNumber']}</td>
|
|
<%
|
|
try:
|
|
if item['IssueDate'] != '0000-00-00' and item['IssueDate'] is not None:
|
|
issuedate = item['IssueDate']
|
|
else:
|
|
if item['StoreDate'] != '0000-00-00' and item['StoreDate'] is not None:
|
|
issuedate = item['IssueDate']
|
|
else:
|
|
# this is needed for imported cbl's
|
|
try:
|
|
issuedate = item['issueYEAR']
|
|
except:
|
|
issuedate = '0000-00-00'
|
|
except:
|
|
issuedate = '0000-00-00'
|
|
%>
|
|
<td id="issuedate">${issuedate}</td>
|
|
<td id="status">${item['Status']}</td>
|
|
<td id="action">
|
|
%if item['Status'] is None or item['Status'] == None:
|
|
<a href="#" onclick="doAjaxCall('queueit?ComicName=${item['ComicName'] | u}&ComicIssue=${item['IssueNumber']}&ComicYear=${issuedate}&mode=readlist&SARC=${item['StoryArc']}&IssueArcID=${item['IssueArcID']}&SeriesYear=${item['SeriesYear']}',$(this),'table')" data-success="Now searching for ${item['ComicName']} #${item['IssueNumber']}"><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=${issuedate}&mode=readlist&SARC=${item['StoryArc']}&IssueArcID=${item['IssueArcID']}&SeriesYear=${item['SeriesYear']}',$(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 type="text/javascript">
|
|
$("#menu_link_scan").click(function() {
|
|
$('#chkoptions').submit();
|
|
return true;
|
|
});
|
|
</script>
|
|
<script>
|
|
function initThisPage() {
|
|
$(function() {
|
|
$( "#tabs" ).tabs();
|
|
});
|
|
initActions();
|
|
$('#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": []
|
|
})
|
|
resetFilters("item");
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
initThisPage();
|
|
initActions();
|
|
});
|
|
</script>
|
|
</%def>
|