2013-02-06 19:55:23 +00:00
|
|
|
<%inherit file="base.html" />
|
|
|
|
<%!
|
2013-01-28 20:31:43 +00:00
|
|
|
import mylar
|
2013-02-06 19:55:23 +00:00
|
|
|
from mylar import db
|
2013-01-28 20:31:43 +00:00
|
|
|
from mylar.helpers import checked
|
|
|
|
%>
|
|
|
|
<%def name="headerIncludes()">
|
|
|
|
<div id="subhead_container">
|
|
|
|
<div id="subhead_menu">
|
2013-05-19 05:21:32 +00:00
|
|
|
<a id="menu_link_refresh" onclick="doAjaxCall('flushImports', $(this),'table')" data-success="Import Results Flushed">Flush all Imports</a>
|
2013-01-28 20:31:43 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</%def>
|
|
|
|
|
|
|
|
<%def name="body()">
|
2013-02-13 01:27:24 +00:00
|
|
|
|
2013-01-28 20:31:43 +00:00
|
|
|
<div id="paddingheader">
|
|
|
|
<h1 class="clearfix">Borg Importing Results</h1>
|
|
|
|
</div>
|
|
|
|
<div id="tabs">
|
|
|
|
<ul>
|
|
|
|
<li><a href="#tabs-1">Import Results</a></li>
|
|
|
|
</ul>
|
|
|
|
<div id="tabs-1" class="configtable">
|
|
|
|
|
|
|
|
<table>
|
|
|
|
<tr>
|
2013-02-06 19:55:23 +00:00
|
|
|
<fieldset>
|
|
|
|
<div class="row checkbox">
|
|
|
|
<input type="checkbox" name="autoadd" style="vertical-align: middle; margin: 3px; margin-top: -1px;" id="autoadd" value="1" ${checked(mylar.ADD_COMICS)}><label>Auto-add new series</label>
|
|
|
|
</div>
|
|
|
|
<div class="row checkbox">
|
|
|
|
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="imp_move" id="imp_move" value="1" ${checked(mylar.IMP_MOVE)}><label>Move files</label>
|
|
|
|
</div>
|
|
|
|
<div class="row checkbox">
|
|
|
|
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="imp_rename" id="imp_rename" value="1" ${checked(mylar.IMP_RENAME)}><label>Rename Files </label>
|
2013-05-19 05:21:32 +00:00
|
|
|
<small>(After importing, Rename the files to configuration settings)</small>
|
|
|
|
<label>${mylar.FOLDER_FORMAT}/${mylar.FILE_FORMAT}</label>
|
2013-02-06 19:55:23 +00:00
|
|
|
</div>
|
|
|
|
<div class="row checkbox">
|
|
|
|
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="imp_metadata" id="imp_metadata" value="1" ${checked(mylar.IMP_METADATA)}><label>Use Existing Metadata</label>
|
|
|
|
<small>(Use existing Metadata to better locate series for import)</small>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</fieldset>
|
2013-01-28 20:31:43 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
2013-02-06 19:55:23 +00:00
|
|
|
</div>
|
2013-05-19 05:21:32 +00:00
|
|
|
<form action="markImports" method="get" id="markImports">
|
2013-02-06 19:55:23 +00:00
|
|
|
<div id="markcomic">
|
2013-05-19 05:21:32 +00:00
|
|
|
<select name="action" onChange="doAjaxCall('markImports',$(this),'table',true);" data-error="You didn't select any comics">
|
2013-02-06 19:55:23 +00:00
|
|
|
<option disabled="disabled" selected="selected">Choose...</option>
|
2013-05-19 05:21:32 +00:00
|
|
|
<option value="massimport">Start Import</option>
|
|
|
|
<option value="removeimport">Remove</option>
|
2013-02-06 19:55:23 +00:00
|
|
|
</select>
|
|
|
|
<input type="hidden" value="Go">
|
|
|
|
</div>
|
|
|
|
<table class="display" id="impresults_table">
|
2013-02-13 01:27:24 +00:00
|
|
|
<tr />
|
|
|
|
<tr><center><h3>To be Imported</h3></center></tr>
|
|
|
|
<tr><center><small>(green indicates confirmed on watchlist)</tr>
|
2013-01-28 20:31:43 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2013-02-06 19:55:23 +00:00
|
|
|
<th id="select"></th>
|
2013-01-28 20:31:43 +00:00
|
|
|
<th id="comicname">Comic Name</th>
|
2013-02-06 19:55:23 +00:00
|
|
|
<th id="comicyear">Year</th>
|
2013-02-25 15:36:43 +00:00
|
|
|
<th id="issues">Issues</th>
|
2013-02-06 19:55:23 +00:00
|
|
|
<th id="status">Status</th>
|
2013-01-28 20:31:43 +00:00
|
|
|
<th id="importdate">Import Date</th>
|
|
|
|
<th id="addcomic">Options</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2013-02-06 19:55:23 +00:00
|
|
|
%if results:
|
|
|
|
%for result in results:
|
2013-02-13 01:27:24 +00:00
|
|
|
<tr>
|
2013-05-19 05:21:32 +00:00
|
|
|
<td id="select"><input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="${result['ComicName']}" value="${result['ComicName']}" class="checkbox" />
|
2013-01-28 20:31:43 +00:00
|
|
|
<td id="comicname"><a href="${result['ComicName']}" title="${result['ComicName']}" target="_blank">${result['ComicName']}</td>
|
2013-02-25 15:36:43 +00:00
|
|
|
<td id="comicyear"><title="${result['ComicYear']}">${result['ComicYear']}</td>
|
|
|
|
<td id="comicissues"><title="${result['IssueCount']}">${result['IssueCount']}</td>
|
2013-02-13 01:27:24 +00:00
|
|
|
<td id="status">${result['Status']}
|
|
|
|
%if result['WatchMatch'] is not None:
|
|
|
|
<img src="interfaces/default/images/green-circle.png" height="10" width="10"/>
|
|
|
|
%endif
|
|
|
|
</td>
|
2013-01-28 20:31:43 +00:00
|
|
|
<td id="importdate">${result['ImportDate']}</td>
|
2013-02-13 01:27:24 +00:00
|
|
|
<td id="addcomic">[<a href="preSearchit?ComicName=${result['ComicName']}">Import</a>]
|
|
|
|
[<a href="deleteimport?ComicName=${result['ComicName']}">Remove</a>]
|
2013-05-19 05:21:32 +00:00
|
|
|
<!-- [<a href="#">Rename</a>]
|
|
|
|
[<a href="#">Log</a> -->
|
2013-02-06 19:55:23 +00:00
|
|
|
</td>
|
2013-02-13 01:27:24 +00:00
|
|
|
</tr>
|
2013-02-06 19:55:23 +00:00
|
|
|
<%
|
|
|
|
myDB = db.DBConnection()
|
|
|
|
files = myDB.action("SELECT * FROM importresults WHERE ComicName=?", [result['ComicName']])
|
|
|
|
|
|
|
|
%>
|
|
|
|
%endfor
|
2013-01-28 20:31:43 +00:00
|
|
|
%else:
|
|
|
|
<tr>
|
2013-02-13 01:27:24 +00:00
|
|
|
<td colspan="6"><center><legend>There are no results to display</legend></center></td></tr>
|
2013-02-06 19:55:23 +00:00
|
|
|
%endif
|
2013-01-28 20:31:43 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2013-05-19 05:21:32 +00:00
|
|
|
</form>
|
2013-02-13 01:27:24 +00:00
|
|
|
<table class="display" id="impresults_table">
|
|
|
|
<tr><br /></tr>
|
|
|
|
<tr><center><h3>Already on Watchlist</h3></center></tr>
|
|
|
|
<tr><center>(you need to CONFIRM the match before doing an import!)
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th id="select"></th>
|
|
|
|
<th id="comicname">Comic Name</th>
|
|
|
|
<th id="comicyear">Year</th>
|
|
|
|
<th id="status">Status</th>
|
|
|
|
<th id="importdate">Import Date</th>
|
|
|
|
<th id="confirmed">Confirmed</th>
|
|
|
|
<th id="addcomic">Options</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
%if watchresults:
|
|
|
|
%for wresult in watchresults:
|
|
|
|
<tr>
|
|
|
|
<td id="select"><input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="${wresult['ComicName']}" class="checkbox" /></td>
|
|
|
|
<td id="comicname"><a href="http://www.comicvine.com/volume/49-${wresult['WatchMatch']} title="${wresult['ComicName']}" target="_blank">${wresult['ComicName']}</td>
|
|
|
|
<td id="comicissues"><title="${wresult['ComicYear']}">${wresult['ComicYear']}</td>
|
|
|
|
<td id="status">${wresult['Status']}</td>
|
|
|
|
<td id="importdate">${wresult['ImportDate']}</td>
|
|
|
|
<td id="confirmed">
|
|
|
|
<input type="text" name="confirmed" id="confirmed" size="5">
|
|
|
|
%if wresult['WatchMatch']:
|
|
|
|
<a href="confirmResult?comicname=${wresult['ComicName']}&comicid=${wresult['WatchMatch']}">Confirm</a>
|
|
|
|
%else:
|
|
|
|
No
|
|
|
|
%endif
|
|
|
|
</td>
|
|
|
|
[<a href="deleteimport?ComicName=${wresult['ComicName']}">Remove</a>]
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<%
|
|
|
|
myDB = db.DBConnection()
|
|
|
|
files = myDB.action("SELECT * FROM importresults WHERE ComicName=?", [wresult['ComicName']])
|
|
|
|
|
|
|
|
%>
|
|
|
|
%endfor
|
|
|
|
%else:
|
|
|
|
<tr>
|
|
|
|
<td colspan="100%"><center><legend>There are no results to display</legend></center></td></tr>
|
|
|
|
%endif
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
2013-02-06 19:55:23 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
2013-01-28 20:31:43 +00:00
|
|
|
</div>
|
|
|
|
</%def>
|
|
|
|
<%def name="javascriptIncludes()">
|
2013-02-13 01:27:24 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
function initThisPage() {
|
|
|
|
jQuery( "#tabs" ).tabs();
|
|
|
|
initActions();
|
|
|
|
};
|
|
|
|
$(document).ready(function() {
|
|
|
|
initThisPage();
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2013-01-28 20:31:43 +00:00
|
|
|
</%def>
|
|
|
|
|