mirror of
https://github.com/evilhero/mylar
synced 2024-12-26 01:26:50 +00:00
235 lines
11 KiB
HTML
Executable file
235 lines
11 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.CONFIG.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="arcOptions" id="chkoptions" method="GET">
|
|
<fieldset>
|
|
<div class="row checkbox left clearfix">
|
|
%if mylar.CONFIG.STORYARCDIR:
|
|
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="storyarcdir" id="storyarcdir" value="1" ${checked(mylar.CONFIG.STORYARCDIR)} /><label>Should I create a Story-Arc Directory?</label><br/>
|
|
<small>Arcs in StoryArc Directory: ${sdir}</small><br/>
|
|
%endif
|
|
<!--
|
|
<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;" /><label>Enforce Renaming/MetaTagging options (if enabled)</label><br/>
|
|
-->
|
|
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="read2filename" id="read2filename" value="1" ${checked(mylar.CONFIG.READ2FILENAME)} /><label>Append Reading# to filename</label><br/>
|
|
<%
|
|
if mylar.CONFIG.STORYARCDIR:
|
|
carcdir = 'StoryArc'
|
|
else:
|
|
carcdir = 'GrabBag'
|
|
%>
|
|
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="copy2arcdir" id="copy2arcdir" value="1" ${checked(mylar.CONFIG.COPY2ARCDIR)} /><label>Copy watchlisted issues to ${carcdir} 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="arc_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="options">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"
|
|
|
|
if all([item['Volume'] is not None, item['Volume'] != 'None']):
|
|
volume = 'V' + item['Volume']
|
|
else:
|
|
volume = ''
|
|
|
|
%>
|
|
|
|
<tr id="${item['ReadingOrder']}" class="grade${grade}">
|
|
<td class="edit" title="Change the order (click to edit)" id="${storyarcid}.${item['IssueArcID']}">${item['ReadingOrder']}</td>
|
|
<td id="comicname" title="${item['IssueName']}">
|
|
%if haveit == "No":
|
|
${item['ComicName']} ${volume} (${item['SeriesYear']})
|
|
%else:
|
|
<a href="comicDetails?ComicID=${haveit}">${item['ComicName']} ${volume} (${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['StoreDate']
|
|
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']}
|
|
%if item['Status'] == 'Downloaded' or item['Status'] == 'Archived':
|
|
<a href="#" title="${item['Location']}"><img src="interfaces/default/images/info32.png" height="16" alt="" class="highqual" /></a>
|
|
%endif
|
|
</td>
|
|
<td id="options">
|
|
%if any([item['Status'] is None, item['Status'] == None, item['Status'] == 'Skipped']):
|
|
<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</a>
|
|
%elif item['Status'] == 'Snatched':
|
|
<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="Trying to search again for issue"><span class="ui-icon ui-icon-plus"></span>Retry</a>
|
|
%elif item['Status'] == 'Downloaded' and item['Location'] is not None:
|
|
<a href="downloadthis?pathfile=${item['Location'] |u}"><span class="ui-icon ui-icon-plus"></span>Download</a>
|
|
%endif
|
|
<a href="#" title="Remove Issue from Story Arc" onclick="doAjaxCall('removefromreadlist?IssueArcID=${item['IssueArcID']}&manual=${item['Manual']}',$(this),'table')" data-success='Successfully deleted ${item['IssueArcID']}'><span class="ui-icon ui-icon-minus"></span>Remove</a>
|
|
</td>
|
|
</tr>
|
|
%endfor
|
|
</tbody>
|
|
</table>
|
|
</br>
|
|
<div style="position:relative; width:960px; height:10px; margin:10px auto;">
|
|
<form action="manual_arc_add" method="GET">
|
|
<input type="hidden" name="storyarcid" value=${storyarcid}>
|
|
<div style="position:absolute; top:30px; right:10px;">
|
|
<center><label><strong><a href="#" title="Enter the IssueID of the issue you want to add to the arc"/>Issue ID</a></strong></label>
|
|
<input type="text" name="manual_issueid" size="10">
|
|
<label><strong><a href="#" title="Enter the Reading Order # for the given issue"/>Reading Order</a></strong></label>
|
|
<input type="text" name="manual_readingorder" size="2"><input type="image" src="interfaces/default/images/submit.png" height="25" width="25" class="highqual" /></center>
|
|
</div>
|
|
</form>
|
|
</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 src="js/libs/jquery.jeditable.js"></script>
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('.edit').editable('order_edit', {
|
|
callback : function(value, settings) {
|
|
console.log(this);
|
|
console.log(value);
|
|
console.log(settings);
|
|
return(value);
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
<script type="text/javascript">
|
|
$("#menu_link_scan").click(function() {
|
|
$('#chkoptions').submit();
|
|
return true;
|
|
});
|
|
</script>
|
|
<script>
|
|
function initThisPage() {
|
|
$(function() {
|
|
$( "#tabs" ).tabs();
|
|
});
|
|
initActions();
|
|
$('#arc_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>
|