2013-07-01 05:19:15 +00:00
< %inherit file="base.html"/>
< %!
import os
import mylar
2014-11-21 17:16:28 +00:00
from mylar import db
from mylar.helpers import checked
2013-07-01 05:19:15 +00:00
%>
< %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 = "#" 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 >
< a id = "menu_link_refresh" href = "#" > Import Story Arc File< / 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" > Issue Reading List< / a > < / li >
< li > < a href = "#tabs-2" > Story Arcs< / a > < / li >
< / ul >
< div id = "tabs-1" >
< table class = "configtable" id = "read_detail" >
< fieldset >
< center > < legend > Individual Reading Lists< / legend >
< strong > (Watchlist)< / strong >
< p > Your watchlisted series' that you have issues marked as wanting to add
to the Reading List go here.< br / > < / p > < / center >
< / fieldset >
< thead >
< tr >
< th id = "comicname" > ComicName< / th >
< th id = "issue" > Issue< / th >
< th id = "issueyear" > Issue Date< / th >
< th id = "status" > Status< / th >
< th id = "options" > Options< / th >
< / tr >
< / thead >
< tbody >
%for issue in issuelist:
< tr >
2014-03-19 18:54:39 +00:00
< td id = "comicname" > < a href = "comicDetails?ComicID=${issue['ComicID']}" > ${issue['ComicName']} (${issue['SeriesYear']})< / td >
2013-07-01 05:19:15 +00:00
< td id = "issue" > ${issue['Issue_Number']}< / td >
< td id = "issueyear" > ${issue['IssueDate']}< / td >
< td id = "status" > ${issue['Status']}< / td >
< td id = "options" >
%if issue['inCacheDIR']:
< %
try:
with open(os.path.join(mylar.CACHE_DIR,issue['Location'])) as f:
linky = issue['Location']
except IOError as e:
linky = None
%>
%if linky:
< a href = "cache/${linky}" > < img src = "interfaces/default/images/download_icon.png" height = "25" width = "25" title = "Download the Issue" / > < / a >
%endif
%else:
< a onclick = "doAjaxCall('downloadLocal?IssueID=${issue['IssueID']}', $(this), 'table')" > < img src = "interfaces/default/images/copy_icon.png" height = "25" width = "25" title = "Copy issue to local cache (ready for download)" / > < / a >
%endif
< 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 >
< / td >
< / tr >
%endfor
< / tbody >
< / table >
< / div >
< div id = "tabs-2" >
< table class = "configtable" >
< tr >
< form action = "searchit" method = "get" >
FIX: undefined on filter box on startup, IMP: Added Meta-Tagging options on a series / issue basis on comic details screen, IMP: Issue Information is now available per issue and is extracted currently from the cbz file to display (if no cbz is present, the option isn't available), IMP: Failed Download handling is implemented and available in GUI - required to replace existing autoProcessComics.py and ComicRN.py scripts, IMP: Added ability to specify post-processing script instead of ComicRN.py, IMP: Added abilty to edit the issue date for a given issue by simply clicking on it - this will help to avoid dates that have incorrect or 0000-00-00, IMP: Story Arc searching is working (not adding yet), IMP: Added Archived/Ignored options to Upcoming/Wanted tab, IMP: Fixed some alignment and display issues on the Upcoming section, IMP: Added better directory handling for Updating Comic Location when it needs to get changed for all existing series (locmove in config.ini), IMP: Added better handling for unicode characters in series titles when searching / filechecking, IMP: When adding a new series with no data, Mylar would error out (now will add and just retain 0 issues), FIX: When year was fuzzied, search would still attempt to do a date-check comparison and say everything failed, IMP: Better handling of nzb names when retaining for post-processing comparisons, IMP: Future Upcoming now will use actual shipping date of issue if available in order to see if issue is available, FIX: If annuals were enabled, refreshing a series would put some issues into an Archived status because the actual counts would be off, IMP: When file checking, Alternate Naming would be searched last which resulted in matching incorrectly to the series title or other alternate naming for the given series, now will check the Alternate Naming first for a match, then drop back down to the series name itself otherwise, IMP: Improved Annual detection when integrated with a given series, IMP: Improved the checking of the future Upcoming list for issues marked as Wanted but not available yet and then auto-adding, IMP: Improved upon story arc checking for missing issues / searching for wanted, IMP: Enabling Annuals support now within Configuration GUI, bunch of other things....
2014-07-28 19:28:09 +00:00
< input type = "hidden" name = "type" value = "story_arc" >
2013-07-01 05:19:15 +00:00
< input type = "text" value = "" placeholder = "Search" onfocus = "if(this.value==this.defaultValue) this.value='';" name = "name" / >
< span class = "mini-icon" > < / span >
< input type = "submit" value = "Search" / >
< / form >
< tr >
< form action = "importReadlist" method = "get" >
< div class = "row" style = "float:right" >
< label for = "" > File to import< / label >
2014-11-21 17:16:28 +00:00
< input type = "text" runat = "server" value = "Enter a filename to import" onfocus = "if
2013-07-01 05:19:15 +00:00
(this.value==this.defaultValue) this.value='';" name="filename" size="70" />
< input type = "submit" value = "Import" >
< / div >
< / form >
< / tr >
< tr >
2014-11-21 17:16:28 +00:00
< form action = "readOptions" id = "chkoptions" method = "GET" >
IMP: (#844)Annuals now deleted from table on a Delete Series command, IMP: (#837)Better volume detection when searching for issues, IMP: (#842)(#808) Added some handling for issue titles when searching (it's not perfect, but it works for most), IMP: (#836)Added .cb7 for filechecking purposes only, IMP: (#830)issue numbers that are -1 can now be renamed, FIX: 'bi-annual' now fixed along with some other improvements for annual handling, IMP: Added version check for autoProcessComics and ComicRN - in order to help warn users of changes and the need to update these files since they are usually outside of the mylar git directory when being used, FIX:(#840) Boxcar2 should be working again, FIX: (#845) If search returned a filename that had no distinction between issue number and issue title and/or extra information, would error out if any of the words contained NOW, IMP: (#823) Added some better detection for NZBGet parameters when using ComicRN.py
2014-10-06 18:10:36 +00:00
< fieldset >
< legend > Options< / legend >
< div class = "row checkbox left clearfix" >
< input type = "checkbox" style = "vertical-align: middle; margin: 3px; margin-top: -1px;" / > < label > Arcs in Grabbag Directory?< / label > < br / >
2014-11-21 17:16:28 +00:00
< input type = "checkbox" style = "vertical-align: middle; margin: 3px; margin-top: -1px;" name = "storyarcdir" id = "storyarcdir" value = "1" $ { checked ( mylar . STORYARCDIR ) } / > < label > Arcs in StoryArc Directory (off of ComicLocationRoot)?< / label > < br / >
IMP: (#844)Annuals now deleted from table on a Delete Series command, IMP: (#837)Better volume detection when searching for issues, IMP: (#842)(#808) Added some handling for issue titles when searching (it's not perfect, but it works for most), IMP: (#836)Added .cb7 for filechecking purposes only, IMP: (#830)issue numbers that are -1 can now be renamed, FIX: 'bi-annual' now fixed along with some other improvements for annual handling, IMP: Added version check for autoProcessComics and ComicRN - in order to help warn users of changes and the need to update these files since they are usually outside of the mylar git directory when being used, FIX:(#840) Boxcar2 should be working again, FIX: (#845) If search returned a filename that had no distinction between issue number and issue title and/or extra information, would error out if any of the words contained NOW, IMP: (#823) Added some better detection for NZBGet parameters when using ComicRN.py
2014-10-06 18:10:36 +00:00
< input type = "checkbox" style = "vertical-align: middle; margin: 3px; margin-top: -1px;" / > < label > Show Downloaded Story Arc Issues on ReadingList tab< / label > < br / >
2014-11-21 17:16:28 +00:00
< 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 >
2013-07-01 05:19:15 +00:00
< / div >
IMP: (#844)Annuals now deleted from table on a Delete Series command, IMP: (#837)Better volume detection when searching for issues, IMP: (#842)(#808) Added some handling for issue titles when searching (it's not perfect, but it works for most), IMP: (#836)Added .cb7 for filechecking purposes only, IMP: (#830)issue numbers that are -1 can now be renamed, FIX: 'bi-annual' now fixed along with some other improvements for annual handling, IMP: Added version check for autoProcessComics and ComicRN - in order to help warn users of changes and the need to update these files since they are usually outside of the mylar git directory when being used, FIX:(#840) Boxcar2 should be working again, FIX: (#845) If search returned a filename that had no distinction between issue number and issue title and/or extra information, would error out if any of the words contained NOW, IMP: (#823) Added some better detection for NZBGet parameters when using ComicRN.py
2014-10-06 18:10:36 +00:00
< / fieldset >
2014-11-21 17:16:28 +00:00
< div >
< input type = "submit" value = "Update" / >
< / div >
2013-07-01 05:19:15 +00:00
< / form >
< / tr >
< / tr >
< / table >
< table class = "configtable" id = "artist_table" >
< thead >
< tr >
< th id = "storyarc" > Story Arc< / th >
< th id = "issue" > Issues< / th >
< th id = "have" > Status< / th >
< th id = "action" > Options< / th >
< / tr >
< / thead >
< tbody >
%for item in readlist:
< %
myDB = db.DBConnection()
totalcnt = myDB.action("SELECT COUNT(*) as count FROM readinglist WHERE StoryArcID=?", [item['StoryArcID']]).fetchall()
totalarc = totalcnt[0][0]
2014-11-21 17:16:28 +00:00
havecnt = myDB.action("SELECT COUNT(*) as count FROM readinglist WHERE StoryArcID=? AND (Status='Downloaded' or Status='Archived')", [item['StoryArcID']]).fetchall()
2013-07-01 05:19:15 +00:00
havearc = havecnt[0][0]
if not havearc:
havearc = 0
try:
percent = (havearc *100.0)/totalarc
if percent > 100:
percent = 100
except (ZeroDivisionError, TypeError):
percent = 0
totalarc = '?'
%>
< tr >
< td id = "storyarc" > < a href = "detailReadlist?StoryArcID=${item['StoryArcID']}&StoryArcName=${item['StoryArc']}" > ${item['StoryArc']}< / a > < / td >
< td id = "issue" > ${item['TotalIssues']}< / td >
< td id = "have" > < span title = "${percent}" > < / span > < div class = "progress-container" > < div style = "background-color:#a3e532; height:14px; width:${percent}%" > < div class = "havetracks" > ${havearc}/${totalarc}< / div > < / div > < / div > < / td >
< td id = "action" >
< a title = "Remove from Reading List" onclick = "doAjaxCall('removefromreadlist?StoryArcID=${item['StoryArcID']}',$(this),'table')" data-success = "Sucessfully removed ${item['StoryArc']} from list." > < img src = "interfaces/default/images/skipped_icon.png" height = "25" width = "25" / > < / a >
< / td >
< / tr >
%endfor
< / tbody >
< / table >
< / div >
< / 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 >
2014-11-21 17:16:28 +00:00
< script type = "text/javascript" >
$("#menu_link_scan").click(function() {
$('#chkoptions').submit();
return true;
});
< / script >
2013-07-01 05:19:15 +00:00
< script >
function initThisPage() {
jQuery( "#tabs" ).tabs();
}
$(document).ready(function() {
initThisPage();
initActions();
});
$(window).load(function(){
initFancybox();
});
< / script >
< /%def>