Added log, history templates, changed some css, included updatebar, subheadings

This commit is contained in:
Remy
2011-08-06 01:25:47 -07:00
parent fe1667a2e0
commit 644344cb27
11 changed files with 157 additions and 87 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
<%inherit file="base.html"/>
<%def name="subhead()">
<%def name="headerIncludes()">
<div id="subhead_container">
<ul id="subhead_menu">
<li><a href="refresh?ArtistID=${artist['ArtistID']}">Refresh Artist</a></li>
@@ -11,7 +11,7 @@
</%def>
<%def name="body()">
<div id="artistheader">
<div id="paddingheader">
${artist['ArtistName']}
</div>
<table class="display" id="album_table">
@@ -40,7 +40,7 @@
</table>
</%def>
<%def name="headerIncludes()">
<%def name="headIncludes()">
<link rel="stylesheet" href="css/data_table.css">
</%def>
+16 -6
View File
@@ -20,13 +20,22 @@
<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()}
${next.headIncludes()}
<script src="js/libs/modernizr-1.7.min.js"></script>
</head>
<body>
<div id="container">
<header>
% if not headphones.CURRENT_VERSION:
<div id="updatebar">
You're running an unknown version of Headphones. <a class="blue" href="update">Click here to update</a>
</div>
% elif headphones.CURRENT_VERSION != headphones.LATEST_VERSION and headphones.INSTALL_TYPE != 'win':
<div id="updatebar">
A <a class="blue" href="http://github.com/rembo10/headphones/compare/${headphones.CURRENT_VERSION}...${headphones.LATEST_VERSION}"> newer version</a> is available. You're ${headphones.COMMITS_BEHIND} commits behind. <a class="blue" href="update">Click here to update</a>
</div>
% endif
<div id="logo">
<img src="images/headphoneslogo.png" alt="headphones">
</div>
@@ -45,10 +54,11 @@
<input type="submit" value="Add Artist"/>
</form>
</div>
<div id="subhead">
${next.headerIncludes()}
</div>
</header>
<div id="subhead">
${next.subhead()}
</div>
<div id="main" class="main">
${next.body()}
</div>
@@ -83,5 +93,5 @@
</html>
<%def name="javascriptIncludes()"></%def>
<%def name="headerIncludes()"></%def>
<%def name="subhead()"></%def>
<%def name="headIncludes()"></%def>
<%def name="headerIncludes()"></%def>
+64
View File
@@ -0,0 +1,64 @@
<%inherit file="base.html"/>
<%def name="headerIncludes()">
<div id="subhead_container">
<ul id="subhead_menu">
<li><a href="clearhistory?type=all">Clear All History</a></li>
<li><a href="clearhistory?type=processed">Clear Processed</a></li>
<li><a href="clearhistory?type=unprocessed">Clear Unprocessed</a></li>
<li><a href="clearhistory?type=snatched">Clear Snatched</a></li>
</ul>
</div>
</%def>
<%def name="body()">
<div id="paddingheader">
History
</div>
<table class="display" id="history_table">
<thead>
<tr>
<th id="dateadded">Date Added</th>
<th id="filename">File Name</th>
<th id="size">Size</th>
<th id="status">Status</th>
</tr>
</thead>
<tbody>
%for item in history:
<tr>
<td id="dateadded">${item['DateAdded']}</td>
<td id="filename"><a href="${item['URL']}">${item['Title']}</a></td>
<td id="size">${item['Size']}</td>
<td id="status">${item['Status']}</td>
</tr>
%endfor
</tbody>
</table>
</%def>
<%def name="headIncludes()">
<link rel="stylesheet" href="css/data_table.css">
</%def>
<%def name="javascriptIncludes()">
<script src="js/libs/jquery.dataTables.min.js"></script>
<script>
$(document).ready(function()
{
$('#history_table').dataTable(
{
"oLanguage": {
"sLengthMenu":"Show _MENU_ items per page",
"sEmptyTable": "No History to Display",
"sInfo":"Showing _START_ to _END_ of _TOTAL_ items",
"sInfoEmpty":"Showing 0 to 0 of 0 items",
"sInfoFiltered":"(filtered from _MAX_ total items)"},
"bStateSave": true,
"iDisplayLength": 25,
"sPaginationType": "full_numbers"
});
});
</script>
</%def>
+8 -4
View File
@@ -38,14 +38,14 @@
<td id="name"><a href="artistPage?ArtistID=${artist['ArtistID']}">${artist['ArtistName']}</a></td>
<td id="album"><a href="albumPage?AlbumID=${artist['AlbumID']}">${artist['LatestAlbum']}</a></td>
<td id="reldate">${releasedate}</td>
<td id="have"><div class="progress-container"><div style="width:${percent}%"><div class="havetracks">${havetracks}/${totaltracks}</div></div></div></td>
<td id="have"><span title="${percent}"><span><div class="progress-container"><div style="width:${percent}%"><div class="havetracks">${havetracks}/${totaltracks}</div></div></div></td>
</tr>
%endfor
</tbody>
</table>
</%def>
<%def name="headerIncludes()">
<%def name="headIncludes()">
<link rel="stylesheet" href="css/data_table.css">
</%def>
@@ -56,8 +56,12 @@
{
$('#artist_table').dataTable(
{
"aoColumnDefs": [
{ "bSOtrable": false, "aTargets": [ 1 ] } ],
"aoColumns": [
{ "sType": "anti-the" },
null,
null,
{ "sType": "title-numeric"}
],
"bStateSave": true,
"iDisplayLength": 50,
"sPaginationType": "full_numbers",
+4 -2
View File
@@ -14,7 +14,9 @@
%for line in lineList:
<%
from headphones import helpers
timestamp, level, thread, message = helpers.extract_logline(line)
out_tuple = helpers.extract_logline(line)
if out_tuple:
timestamp, level, thread, message = out_tuple
%>
%if timestamp and level and thread and message:
<tr>
@@ -29,7 +31,7 @@
</table>
</%def>
<%def name="headerIncludes()">
<%def name="headIncludes()">
<link rel="stylesheet" href="css/data_table.css">
</%def>
+9
View File
@@ -0,0 +1,9 @@
<%inherit file="base.html"/>
<%def name="headIncludes()">
<meta http-equiv="refresh" content="30;url=index">
</%def>
<%def name="body()">
Headphones is restarting
</%def>
+9
View File
@@ -0,0 +1,9 @@
<%inherit file="base.html"/>
<%def name="headIncludes()">
<meta http-equiv="refresh" content="15;url=index">
</%def>
<%def name="body()">
Headphones is shutting down
</%def>
+9
View File
@@ -0,0 +1,9 @@
<%inherit file="base.html"/>
<%def name="headIncludes()">
<meta http-equiv="refresh" content="120;url=index">
</%def>
<%def name="body()">
Headphones is updating
</%def>