initial commit for the new interface. includes: html5 boilerplate with modernizr, datatables, base.html and index.html

This commit is contained in:
Remy
2011-08-04 14:53:31 -07:00
parent 7ee5e78bf4
commit dc53c38f27
34 changed files with 9999 additions and 1513 deletions
-6
View File
@@ -1,6 +0,0 @@
</div>
<div class="footer">
</div>
</div>
</body>
</html>
-30
View File
@@ -1,30 +0,0 @@
#attr title = ""
#attr rootPath = ""
#attr scripts = ""
#attr styles = ""
<html>
<head>
<title>Headphones $title</title>
<link rel="stylesheet" type="text/css" href="$rootPath/data/css/style.css" />
<link rel="icon" type="image/x-icon" href="$rootPath/data/images/favicon.ico" />
<link rel="apple-touch-icon" href="$rootPath/data/images/headphoneslogo.png" />
</head>
<body>
<div class="container">
<div class="logo"><a href="/">
<img src="$rootPath/data/images/headphoneslogo.png" border="0">headphones<a></div>
<div class="search"><form action="findArtist" method="GET">
<input type="text" value="Add an artist" onfocus="if
(this.value==this.defaultValue) this.value='';" name="name" />
<input type="submit" /></form></div>
</div>
<br />
<div class="nav">
<a href="/">HOME</a>
<a href="/upcoming">UPCOMING</a>
<a href="/manage">MANAGE</a>
<a href="/history">HISTORY</a>
<a href="/config">SETTINGS</a>
<a href="/shutdown"><font color="red">SHUTDOWN</font></a>
</div>
<div class="table">
-45
View File
@@ -1,45 +0,0 @@
#attr $albumASIN = ""
#attr $albumTitle = ""
#attr $albumID = ""
#attr $artitstID = ""
#attr $artistName = ""
#import os.path
#import time
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl")
<table border="0" cellpadding="3">
<tr>
<td colspan="4" align="center">
#if $albumASIN:
<img src="http://ec1.images-amazon.com/images/P/${albumASIN}.01.LZZZZZZZ.jpg" height="200" width="200">
<br />
#end if
<br />
<a href="artistPage?ArtistID=$artistID">${artistName}</a> -${albumTitle}<br />
<a href="queueAlbum?AlbumID=${albumID}&ArtistID=${artistID}">Download <br />
</td>
</tr>
<tr>
<th align="left" width="100">Track #</th>
<th align="left" width="100">Track Title</th>
<th align="center" width="300">Duration</th>
<th></th>
</tr>
#for $track in $tracks
<tr>
<td align="left" width="120">${track[7]}</td>
<td align="left" width="240">
${track[3]}(<a class="external" href="http://musicbrainz.org/recording/${track[5]}.html">link</a>)
</td>
<td align="center">
#try
#echo time.strftime("%M:%S", time.gmtime(int($track[4])/1000))
#except
n/a
#end try
</td>
</tr>
#end for
</table>
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl")
-13
View File
@@ -1,13 +0,0 @@
#attr $artistName = ""
#attr $artistUuid = ""
#attr $releaseGroups = []
#import os.path
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl")
Artist Name: $artistName <br />
Unique ID: $artistUuid <br />
<br />
Albums:<br />
#for $releaseGroup in $releaseGroups:
$releaseGroup <br />
#end for
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl")
-39
View File
@@ -1,39 +0,0 @@
#attr $artistName = ""
#attr $artistID = ""
#import os.path
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl")
<table border="0" cellpadding="3">
<tr>
<th colspan="4">
<p align="center">$artistName <br /></p>
</th>
</tr>
<tr>
<td align="left" width="50"></td>
<td align="left" width="120">Album Name</td>
<td align="center" width="100">Release Date</td>
<td align="center" width="300">Status</td>
</tr>
#for $album in $albums
<tr>
<td align="left">
<img src="http://ec1.images-amazon.com/images/P/$album[5].01.MZZZZZZZ.jpg" height="50" widtd="50">
</td>
<td align="left" width="240"><a href="albumPage?AlbumID=$album[2]">$album[0]</a>
(<A class="external" href="http://musicbrainz.org/release/${album[2]}.html">link</a>)</td>
<td align="center" widtd="160">$album[1]</td>
<td align="center">
#if $album[3] == 'Skipped':
<b>$album[3]</b>[<A class="external" href="queueAlbum?AlbumID=${album[2]}&ArtistID=$artistID">want</a>]
#elif $album[3] == 'Wanted':
<b>$album[3]</b>[<a class="external" href="unqueueAlbum?AlbumID=$album[2]&ArtistID=$artistID">skip</a>]
#elif $album[3] == 'Downloaded' or $album[3] == 'Snatched':
<b>$album[3]</b>[<a class="external" href="queueAlbum?AlbumID=$album[2]&ArtistID=$artistID">retry</a>]
#else:
$album[3]
#end if
</td>
</tr>
#end for
</table>
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl")
+76
View File
@@ -0,0 +1,76 @@
<%
import headphones
%>
<!doctype html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Headphones - ${title}</title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="images/favicon.ico">
<link rel="apple-touch-icon" href="images/headphoneslogo.png">
<link rel="stylesheet" href="css/style.css?v=2">
${next.headerIncludes()}
<script src="js/libs/modernizr-1.7.min.js"></script>
</head>
<body>
<div id="container">
<header>
<div id="logo">
<a href="home"><img src="images/headphoneslogo.png" alt="headphones"></a>
</div>
<div id="search">
</div>
<ul id="nav">
<li><a href="upcoming">upcoming</a></li>
<li><a href="extras">extras</a></li>
<li><a href="manage">manage</a></li>
<li><a href="history">history</a></li>
<li><a href="logs">logs</a></li>
<li><a href="config">settings</a></li>
</ul>
</header>
<div id="main" role="main">
${next.body()}
</div>
<footer>
<div class="version">Version: ${headphones.CURRENT_VERSION}</div>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="93FFC6WDV97QS">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</div>
</footer>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/libs/jquery-1.6.2.min.js"%3E%3C/script%3E'))</script>
${next.javascriptIncludes()}
<script src="js/plugins.js"></script>
<script src="js/script.js"></script>
<!--[if lt IE 7 ]>
<script src="js/libs/dd_belatedpng.js"></script>
<script> DD_belatedPNG.fix('img, .png_bg');</script>
<![endif]-->
</body>
</html>
<%def name="javascriptIncludes()"></%def>
<%def name="headerIncludes()"></%def>
-238
View File
@@ -1,238 +0,0 @@
#import os.path
#import config
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl")
<center>
<div class="smalltext">
<a href="#web_interface" >Web Interface</a> |
<a href="#download" class="smalltext">Download Settings</a> |
<a href="#providers" class="smalltext">Search Providers</a> |
<a href="#post_processing" class="smalltext">Quality &amp; Post Processing</a>
</div>
</center>
<div class="config">
<form action="configUpdate" method="post">
<a name="web_interface"><h1><u>Web Interface</u></h1></a>
<table class="configtable" summary="Web Interface">
<tr>
<td>
<p>
HTTP Host: <br><br>
<input type="text" name="http_host" value="${config.General['http_host']}" size="30" maxlength="40"><br>
<i class="smalltext">i.e. localhost or 0.0.0.0</i>
</p>
</td>
<td>
<p>
HTTP Username: <br><br>
<input type="text" name="http_username" value="${config.General['http_username']}" size="30" maxlength="40">
</p>
</td>
</tr>
<tr>
<td>
<p>
HTTP Port: <br><br>
<input type="text" name="http_port" value="${config.General['http_port']}" size="20" maxlength="40">
</p>
</td>
<td>
<p>
HTTP Password: <br><br>
<input type="password" name="http_password" value="${config.General['http_password']}" size="30" maxlength="40">
</p>
</td>
</tr>
<tr>
<td>
<p>Launch Browser on Startup:<input type="checkbox" name="launch_browser" value="1" #if (config.General['launch_browser'] == '1') then "CHECKED" else ""#/></p>
</td>
</tr>
</table>
<a name="download"><h1><u>Download Settings</u></h1></a>
<table class="configtable" summary="Download Settings">
<tr>
<td>
<p>SABnzbd Host:</p><input type="text" name="sab_host" value="${config.SABnzbd['sab_host']}" size="30" maxlength="40"><br>
<i class="smalltext">usually localhost:8080</i>
</td>
<td>
<p>SABnzbd Username:</p><input type="text" name="sab_username" value="${config.SABnzbd['sab_username']}" size="20" maxlength="40">
</td>
</tr>
<tr>
<td>
<br>
<p>SABnzbd API:</p><input type="text" name="sab_apikey" value="${config.SABnzbd['sab_apikey']}" size="46" maxlength="40">
</td>
<td>
<br>
<p>SABnzbd Password:</p><input type="password" name="sab_password" value="${config.SABnzbd['sab_password']}" size="20" maxlength="40">
</td>
</tr>
<tr>
<td>
<br>
<p>SABnzbd Category:</p><input type="text" name="sab_category" value="${config.SABnzbd['sab_category']}" size="20" maxlength="40">
</td>
<td>
<br>
<p>Music Download Directory:</p><input type="text" name="music_download_dir" value="${config.General['music_download_dir']}" size="60" maxlength="40"><br>
<i class="smalltext">Absolute or relative path to the dir where SAB downloads your music<br>
i.e. Downloads/music or /Users/name/Downloads/music</i>
</td>
</tr>
<tr>
<td>
<br>
<p>Usenet Retention:</p><input type="text" name="usenet_retention" value="${config.General['usenet_retention']}" size="20" maxlength="40">
</td>
</tr>
</table>
<a name="providers"><h1><u>Search Providers</u></h1></a>
<table class="configtable" summary="Search Providers">
<tr>
<td>
<p>NZBMatrix: <input type="checkbox" name="nzbmatrix" value="1" #if (config.NZBMatrix['nzbmatrix'] == '1') then "checked" else ""#/></p>
</td>
<td>
<p>
NZBMatrix Username: <br>
<input type="text" name="nzbmatrix_username" value="${config.NZBMatrix['nzbmatrix_username']}" size="30" maxlength="40">
</p>
</td>
<td>
<p>
NZBMatrix API: <br>
<input type="text" name="nzbmatrix_apikey" value="${config.NZBMatrix['nzbmatrix_apikey']}" size="46" maxlength="40">
</p>
</td>
</tr>
<tr>
<td>
<br>
<p>Newznab: <input type="checkbox" name="newznab" value="1" #if (config.Newznab['newznab'] == '1') then "checked" else ""# /></p>
</td>
<td>
<br>
<p>
Newznab Host:<br>
<input type="text" name="newznab_host" value="${config.Newznab['newznab_host']}" size="30" maxlength="40"><br>
<i class="smalltext">i.e. http://nzb.su</i>
</p>
</td>
<td>
<br>
<p>
Newznab API:<br>
<input type="text" name="newznab_apikey" value="${config.Newznab['newznab_apikey']}" size="46" maxlength="40">
</p>
</td>
</tr>
<tr>
<td>
<br>
<p>NZBs.org:<input type="checkbox" name="nzbsorg" value="1" #if (config.NZBsorg['nzbsorg'] == '1') then "CHECKED" else ""# /></p>
</td>
<td>
<br>
<p>
NZBs.org UID:<br>
<input type="text" name="nzbsorg_uid" value="${config.NZBsorg['nzbsorg_uid']}" size="30" maxlength="40">
</p>
</td>
<td>
<br>
<p>
NZBs.org Hash:<br>
<input type="text" name="nzbsorg_hash" value="${config.NZBsorg['nzbsorg_hash']}" size="46" maxlength="40">
</p>
</td>
</tr>
</table>
<a name="post_processing"><h1><u>Quality &amp; Post Processing</u></h1></a>
<table class="configtable" summary="Quality & Post Processing">
<tr>
<td>
<p><b>Album Quality:</b></p>
<input type="checkbox" name="include_lossless" value="1" #if (config.General['include_lossless'] == '1') then "CHECKED" else ""# />Include lossless <br>
<input type="checkbox" name="flac_to_mp3" value="1" #if (config.General['flac_to_mp3'] == '1') then "CHECKED" else ""# />Convert lossless to mp3
</td>
<td>
<p>
<p><b>iTunes:</b></p>
<input type="checkbox" name="move_to_itunes" value="1" #if (config.General['move_to_itunes'] == '1') then "CHECKED" else ""# />Move downloads to iTunes
</p>
</td>
</tr>
<tr>
<td>
<br>
<p><b>Path to iTunes folder</b>:<br><input type="text" name="path_to_itunes" value="${config.General['path_to_itunes']}" size="60" maxlength="40">
<br>
<i class="smalltext">i.e. Music/iTunes or /Users/name/Music/iTunes</i>
</p>
</td>
<td>
<b>Renaming &amp; Metadata:</b>
<p>
<input type="checkbox" name="rename_mp3s" value="1" #if (config.General['rename_mp3s'] == '1') then "CHECKED" else ""# />Rename &amp; add metadata
<br>
<input type="checkbox" name="cleanup" value="1" #if (config.General['cleanup'] == '1') then "CHECKED" else ""# />Delete leftover files
</p>
</td>
</tr>
<tr>
<td>
<br>
<p><b>Album Art:</b></p>
<input type="checkbox" name="add_album_art" value="1" #if (config.General['add_album_art'] == '1') then "CHECKED" else ""#>Add album art
</td>
</tr>
</table>
<p class="center"><input type="submit" value="Save Changes"><br>
(For now, all changes require a restart to take effect)</p>
</form>
</div>
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl")
-3
View File
@@ -1,3 +0,0 @@
#import os.path
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl")
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl")
+32
View File
@@ -0,0 +1,32 @@
<%inherit file="base.html"/>
<%def name="body()">
<table class="display" id="artist_table">
<thead>
<tr>
<th>Artist Name</th>
<th>Status</th>
<th>Latest Album</th>
<th>Have</th>
</tr>
</thead>
<tbody>
%for artist in artists:
<tr>
<td><a href="artistPage?ArtistID=${artist['ArtistID']}">${artist['ArtistName']}</a></td>
<td>${artist['Status']}</td>
<td><a href="albumPage?AlbumID=${artist['AlbumID']}">${artist['LatestAlbum']}</a></td>
<td>${artist['HaveTracks']}/${artist['TotalTracks']}</td>
</tr>
%endfor
</tbody>
</table>
</%def>
<%def name="headerIncludes()">
<link rel="stylesheet" href="css/data_table.css">
</%def>
<%def name="javascriptIncludes()">
<script src="js/libs/jquery.dataTables.min.js"></script>
</%def>
-33
View File
@@ -1,33 +0,0 @@
#import os.path
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl")
<table border="0" cellpadding="3">
<tr>
<th align="left" width="170">Artist Name</th>
<th align="center" width="100">Status</th>
<th align="center" width="300">Upcoming Albums</th>
</tr>
#for $artist in $artists
<tr>
<td align="left" width="300">
<a href="artistPage?ArtistID=$artist[1]">$artist[0]</a>
(<a class="external" href="http://musicbrainz.org/artist/$artist[1]">link</a>)
[<a class="externalred" href="deleteArtist?ArtistID=$artist[1]">delete</a>]
</td>
<td align="center" width="160">
#if $artist[2] == 'Active':
$artist[2] (<a class="external" href="pauseArtist?ArtistID=$artist[1]">pause</a>)
#else:
<font color="red"><b>$artist[2]</b></font>(<A class="external" href="resumeArtist?ArtistID=$artist[1]">resume</a>)
#end if
</td>
<td align="center">
#try
$artist[3] $artist[4]
#except
<font color="#CFCFCF">None</font>
#end try
</td>
</tr>
#end for
</table>
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl")
-28
View File
@@ -1,28 +0,0 @@
#attr $path = ""
#import os.path
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl")
<div class="config">
<h1>Import or Sync Your iTunes Library/Music Folder</h1>
<p> Enter the full path to your iTunes XML file or music folder
i.e. /Users/"username"/Music/iTunes/iTunes Music Library.xml
<i>or</i> /Users/"username"/Music/iTunes/iTunes Media/Music
(artists should have their own directories for folder import to work)
<b>note: This process can take a LONG time!</b>
Once you click "Submit" you can navigate away from this
page while the process runs. </p>
<form action="importItunes" method="GET" align="center">
<input type="text" value="${path}" onfocus="if
(this.value==this.defaultValue) this.value='';" name="path" size="70" />
<input type="submit" />
</form>
</div>
<div class="table">
<div class="config">
<h1>Force Search</h1>
<a href="forceSearch">Force Check for Wanted Albums</a><br />
<a href="forceUpdate">Force Update Active Artists </a><br />
</div>
</div>
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl")
-31
View File
@@ -1,31 +0,0 @@
#import os.path
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl")
<div id="search" style="float:left;">
<table border="0" cellpadding="3">
<form name="search">
<tr>
<td><label for="artist">Artist</label></td>
<td><input type="textbox" id="artist" /></td>
</tr>
<tr>
<td><label for="artist">Release</label></td>
<td><input type="textbox" id="artist" /></td>
</tr>
<tr>
<td><label for="artist">Label</label></td>
<td><input type="textbox" id="artist" /></td>
</tr>
<tr>
<td></td>
<td align="right"><input type="submit" value="search" onclick="$.getJSON"/></td>
</tr>
</form>
</table>
</div>
<div id="results" style="float:left;">
<b>Results:</b>
<ul id="resultsList">
<ul>
</div>
<p style="clear:both;"></p>
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl")
-3
View File
@@ -1,3 +0,0 @@
#import os.path
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_header.tmpl")
#include os.path.abspath($appPath+"/data/interfaces/default/_inc_footer.tmpl")