mirror of
https://github.com/evilhero/mylar
synced 2024-12-23 00:02:38 +00:00
220 lines
12 KiB
HTML
Executable file
220 lines
12 KiB
HTML
Executable file
<%inherit file="base.html"/>
|
|
<%!
|
|
import os
|
|
import mylar
|
|
from mylar import db
|
|
from mylar.helpers import checked
|
|
%>
|
|
|
|
<%def name="headerIncludes()">
|
|
<div id="subhead_container">
|
|
<div id="subhead_menu">
|
|
%if mylar.TAB_ENABLE:
|
|
<a id="menu_link_delete" href="#" onclick="doAjaxCall('syncfiles',$(this),'table')" data-success="Syncing complete.">Sync</a>
|
|
%endif
|
|
<a id="menu_link_delete" href="#" onclick="doAjaxCall('removefromreadlist?AllRead=1',$(this),'table')" data-success="All Read Records Removed">Remove Read</a>
|
|
<a id="menu_link_delete" href="#">Force New Check</a>
|
|
<a id="menu_link_refresh" href="#">Clear File Cache</a>
|
|
</div>
|
|
</div>
|
|
</%def>
|
|
|
|
<%def name="body()">
|
|
<div id="paddingheader">
|
|
<h1 class="clearfix"><img src="interfaces/default/images/ReadingList-icon.png" height="26" width="26" alt="Reading List"/>Reading List Management</h1>
|
|
</div>
|
|
<div id="tabs">
|
|
<ul>
|
|
<li><a href="#tabs-1">General</a></li>
|
|
<li><a href="#tabs-2">Readlist options</a></li>
|
|
</ul>
|
|
<div id="tabs-1">
|
|
<table class="comictable" summary="Comic Details">
|
|
<tr>
|
|
<td>
|
|
<fieldset>
|
|
<center><legend>Individual Reading Lists</legend>
|
|
<p>Your watchlisted series' that you have issues marked as wanting to add
|
|
to the Reading List go here.<br/></p></center>
|
|
</fieldset>
|
|
</td>
|
|
<td>
|
|
<fieldset>
|
|
<legend>Reading List Statistics</legend>
|
|
<div>
|
|
<label><strong># of Issues Added: </strong>${counts['added']}</br></label>
|
|
<label><strong># of Issues Sent to device: </strong>${counts['sent']}</br></label>
|
|
<label><strong># of Issues Read: </strong>${counts['read']}</br></label>
|
|
<label><strong> ... total in Readlist Management: </strong>${counts['total']}</br></label>
|
|
</div>
|
|
<div id="actions">
|
|
<small><a href="#" id="helpout"><span class="ui-button-icon-primary ui-icon ui-icon-help"></span>Help.</a></small>
|
|
<div id="dialog" title="Help with Reading Lists" style="display:none" class="configtable">
|
|
<p>Status definitions:</br>
|
|
Added: Issue has been added to your RL.</br>
|
|
Downloaded: Issue has been downloaded to your device.</br>
|
|
Read: Issue has been marked as Read.</br>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="tabs-2">
|
|
<table class="configtable">
|
|
<td>
|
|
<form action="readlistOptions" id="chkoptions" method="GET">
|
|
<fieldset>
|
|
<legend>ReadList Options</legend>
|
|
<div class="row checkbox left clearfix">
|
|
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="send2read" id="send2read" value="1" ${checked(mylar.SEND2READ)} /><label>Automatically send new pulls to Readlist (Added)</label></br>
|
|
</div>
|
|
</fieldset>
|
|
</td>
|
|
<td width="100%">
|
|
<img src="interfaces/default/images/android.png" style="float:right" height="50" width="50" />
|
|
<fieldset>
|
|
<div>
|
|
<legend>Tablet Device</legend>
|
|
<small class="heading"><span style="float: left; margin-right: .3em; margin-top: 4px;" class="ui-icon ui-icon-info"></span>Requires SFTP Server running on tablet</small>
|
|
</div>
|
|
<div class="row checkbox left clearfix">
|
|
<input id="tabenable" type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" onclick="initConfigCheckbox($this);" name="tab_enable" id="tab_enable" value="1" ${checked(mylar.TAB_ENABLE)} /><label>Enable Tablet (Android)</label>
|
|
</div>
|
|
<div class="config">
|
|
<div class="row">
|
|
<label>IP:PORT</label>
|
|
<input type="text" placeholder="IP Address of tablet" name="tab_host" value="${mylar.TAB_HOST}" size="30">
|
|
</div>
|
|
<div class="row">
|
|
<label>Username</label>
|
|
<input type="text" name="tab_user" value="${mylar.TAB_USER}" size="20">
|
|
</div>
|
|
<div class="row">
|
|
<label>Password:</label>
|
|
<input type="password" name="tab_pass" value="${mylar.TAB_PASS}" size="20">
|
|
</div>
|
|
<div class="row">
|
|
<label>Download Location:</label>
|
|
<input type="text" placeholder="Full path (or jailed path)" name="tab_directory" value="${mylar.TAB_DIRECTORY}" size="36" /></br>
|
|
</div>
|
|
<div class="row checkbox left clearfix">
|
|
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="maintainseriesfolder" id="maintainseriesfolder" value="1" ${checked(mylar.MAINTAINSERIESFOLDER)} /><label for="maintainseriesfolder">Maintain Comic Folder Structure when Syncing to Tablet</label></br>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</td>
|
|
<div>
|
|
<input type="submit" value="Update"/>
|
|
</div>
|
|
</form>
|
|
</td>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<form action="markreads" method="get" id="markreads">
|
|
<div id="markissue" style="top:0;">
|
|
Mark selected issues as
|
|
<select name="action" onChange="doAjaxCall('markreads',$(this),'table',true);" data-error="You didn't select any issues" data-success="selected issues marked">
|
|
<option disabled="disabled" selected="selected">Choose...</option>
|
|
<option value="Added">Added</option>
|
|
<option value="Downloaded">Downloaded</option>
|
|
<option value="Read">Read</option>
|
|
<option value="Remove">Remove</option>
|
|
<option value="Send">Send</option>
|
|
</select>
|
|
<input type="hidden" value="Go">
|
|
</div>
|
|
|
|
|
|
<div class="table_wrapper">
|
|
|
|
<table class="display" id="read_detail">
|
|
|
|
<thead>
|
|
<tr>
|
|
<th id="select"><input type="checkbox" onClick="toggle(this)" /></th>
|
|
<th id="comicname">ComicName</th>
|
|
<th id="issue">Issue</th>
|
|
<th id="issueyear">Pub Date</th>
|
|
<th id="status">Status</th>
|
|
<th id="statuschange">Change</th>
|
|
<th id="options">Options</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
%for issue in issuelist:
|
|
<%
|
|
if issue['Status'] == 'Read':
|
|
grade = 'A'
|
|
elif issue['Status'] == 'Added':
|
|
grade = 'X'
|
|
elif issue['Status'] == 'Downloaded':
|
|
grade = 'C'
|
|
else:
|
|
grade = 'Z'
|
|
|
|
%>
|
|
<tr class="grade${grade}">
|
|
<td id="select"><input type="checkbox" name="${issue['IssueID']}" value="${issue['IssueID']}" class="checkbox" /></td>
|
|
<td id="comicname"><a href="comicDetails?ComicID=${issue['ComicID']}">${issue['ComicName']} (${issue['SeriesYear']})</td>
|
|
<td id="issue">${issue['Issue_Number']}</td>
|
|
<td id="issueyear">${issue['IssueDate']}</td>
|
|
<td id="status">${issue['Status']}</td>
|
|
<td id="statuschange">${issue['StatusChange']}</td>
|
|
<td id="options">
|
|
<a onclick="doAjaxCall('removefromreadlist?IssueID=${issue['IssueID']}',$(this),'table')" data-success="Sucessfully removed ${issue['ComicName']} #${issue['Issue_Number']} from Reading List"><img src="interfaces/default/images/skipped_icon.png" height="25" width="25" title="Remove from Reading List" /></a>
|
|
<a onclick="doAjaxCall('markasRead?IssueID=${issue['IssueID']}', $(this),'table')" data-success="Marked ${issue['ComicName']} ${issue['Issue_Number']} as Read."><img src="interfaces/default/images/wanted_icon.png" height="25" width="25" title="Mark as Read" /></a>
|
|
|
|
%if issue['Location'] is not None:
|
|
<a href="downloadthis?pathfile=${issue['Location'] |u}"><img src="interfaces/default/images/download_icon.png" height="25" width="25" title="Download the Issue" class="highqual" /></a>
|
|
%endif
|
|
</td>
|
|
</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>
|
|
function openHelp() {
|
|
$("#dialog").dialog();
|
|
};
|
|
function initThisPage(){
|
|
|
|
$(function() {
|
|
$( "#tabs" ).tabs();
|
|
});
|
|
$("#helpout").click(openHelp);
|
|
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("issuelist");
|
|
}
|
|
$(document).ready(function() {
|
|
initThisPage();
|
|
initActions();
|
|
initConfigCheckbox("#tabenable");
|
|
});
|
|
</script>
|
|
</%def>
|