mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-04 18:59:30 +01:00
Added manage new artists page, fixed some bugs in the importer
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
%>
|
||||
<tr class="grade${grade}">
|
||||
<td id="dateadded">${item['DateAdded']}</td>
|
||||
<td id="filename"><a href="${item['URL']}">${item['Title']}</a> <a href="albumPage?AlbumID=?${item['AlbumID']}">[album page]</a></td>
|
||||
<td id="filename">${item['Title']} [<a href="${item['URL']}">nzb</a>]<a href="albumPage?AlbumID=${item['AlbumID']}">[album page]</a></td>
|
||||
<td id="size">${helpers.bytes_to_mb(item['Size'])}</td>
|
||||
<td id="status">${item['Status']}</td>
|
||||
<td id="action">[<a href="queueAlbum?AlbumID=${item['AlbumID']}&redirect=history">retry</a>][<a href="queueAlbum?AlbumID=${item['AlbumID']}&new=True&redirect=history">new</a>]</td>
|
||||
|
||||
@@ -5,7 +5,10 @@
|
||||
<%def name="headerIncludes()">
|
||||
<div id="subhead_container">
|
||||
<ul id="subhead_menu">
|
||||
<li><a href="manageArtists">Manage Artists</a></li>
|
||||
<li><a href="manageArtists">Manage Artists</a></li>
|
||||
%if not headphones.ADD_ARTISTS:
|
||||
<li><a href="manageNew">Manage New Artists</a></li>
|
||||
%endif
|
||||
</ul>
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
<%inherit file="base.html" />
|
||||
|
||||
<%!
|
||||
import headphones
|
||||
%>
|
||||
<%def name="body()">
|
||||
<div id="paddingheader">
|
||||
<h1>Manage Artists<h1>
|
||||
<h1>Manage New Artists<h1>
|
||||
</div>
|
||||
<form action="markArtists" method="get">
|
||||
<form action="addArtists" method="get">
|
||||
<p class="indented">
|
||||
<select name="action">
|
||||
<option value="pause">Pause</option>
|
||||
<option value="resume">Resume</option>
|
||||
<option value="refresh">Refresh</option>
|
||||
<option value="delete">Delete</option>
|
||||
</select>
|
||||
selected artists
|
||||
Add selected artists
|
||||
<input type="submit" value="Go">
|
||||
</p>
|
||||
<table class="display" id="artist_table">
|
||||
@@ -20,23 +16,13 @@
|
||||
<tr>
|
||||
<th id="select"><input type="checkbox" onClick="toggle(this)" /></th>
|
||||
<th id="name">Artist Name</th>
|
||||
<th id="status">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%for artist in artists:
|
||||
<%
|
||||
if artist['Status'] == 'Paused':
|
||||
grade = 'X'
|
||||
elif artist['Status'] == 'Loading':
|
||||
grade = 'C'
|
||||
else:
|
||||
grade = 'Z'
|
||||
%>
|
||||
<tr class="grade${grade}">
|
||||
%for artist in headphones.NEW_ARTISTS:
|
||||
<tr class="gradeZ">
|
||||
<td id="select"><input type="checkbox" name="${artist['ArtistID']}" class="checkbox" /></td>
|
||||
<td id="name"><span title="${artist['ArtistSortName']}"></span><a href="artistPage?ArtistID=${artist['ArtistID']}">${artist['ArtistName']}</a></td>
|
||||
<td id="status">${artist['Status']}</td>
|
||||
</tr>
|
||||
%endfor
|
||||
</tbody>
|
||||
@@ -58,7 +44,6 @@
|
||||
"aoColumns": [
|
||||
null,
|
||||
{ "sType": "title-string"},
|
||||
null
|
||||
],
|
||||
"bStateSave": true,
|
||||
"bPaginate": false
|
||||
|
||||
51
data/interfaces/default/managenew.html
Normal file
51
data/interfaces/default/managenew.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<%inherit file="base.html" />
|
||||
<%!
|
||||
import headphones
|
||||
%>
|
||||
<%def name="body()">
|
||||
<div id="paddingheader">
|
||||
<h1>Manage New Artists<h1>
|
||||
</div>
|
||||
<form action="addArtists" method="get">
|
||||
<p class="indented">
|
||||
Add selected artists
|
||||
<input type="submit" value="Go">
|
||||
</p>
|
||||
<table class="display" id="artist_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="select"><input type="checkbox" onClick="toggle(this)" /></th>
|
||||
<th id="name">Artist Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%for artist in headphones.NEW_ARTISTS:
|
||||
<tr class="gradeZ">
|
||||
<td id="select"><input type="checkbox" name="${artist}" class="checkbox" /></td>
|
||||
<td id="name">${artist}</a></td>
|
||||
</tr>
|
||||
%endfor
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</%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()
|
||||
{
|
||||
$('#artist_table').dataTable(
|
||||
{
|
||||
"aaSorting": [[1, 'asc']],
|
||||
"bStateSave": false,
|
||||
"bPaginate": false
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
Reference in New Issue
Block a user