mirror of
https://github.com/evilhero/mylar
synced 2024-12-24 08:42:37 +00:00
130 lines
6 KiB
HTML
Executable file
130 lines
6 KiB
HTML
Executable file
<%inherit file="base.html"/>
|
|
<%!
|
|
import os
|
|
import mylar
|
|
from mylar import helpers
|
|
%>
|
|
|
|
<%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" method="get">
|
|
<fieldset>
|
|
<div class="row">
|
|
<label>Options</label><br/>
|
|
<input type="checkbox" name="storyarcdir" value="1" ${readConfig['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" /><label>Show Downloaded Story Arc Issues on ReadingList tab</label><br/>
|
|
<input type="checkbox" name="read2filename" value="1" ${readConfig['read2filename']} /><label>Append Reading# to filename</label><br/>
|
|
<label>Enforce Renaming/MetaTagging options (if enabled)</label>
|
|
<label>Copy watchlisted issues to StoryArc Directory</label>
|
|
</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="storyarc">Story Arc</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="storyarc">${item['StoryArc']}</td>
|
|
<td id="comicname">${item['ComicName']} (${item['SeriesYear']})</td>
|
|
<td id="issue">${item['IssueNumber']}</td>
|
|
<td id="issueyear">${item['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>
|
|
|
|
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>
|