mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-02 01:39:29 +01:00
changed my repo to elmarkou branch of rembo10
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
<%inherit file="base.html" />
|
||||
|
||||
<%def name="body()">
|
||||
|
||||
<div class="table_wrapper">
|
||||
<div id="paddingheader">
|
||||
<h1>Search Results<h1>
|
||||
<h1 class="clearfix"><img src="interfaces/default/images/icon_search.png" alt="Search results"/>Search Result</h1>
|
||||
</div>
|
||||
<table class="display" id="searchresults_table">
|
||||
<thead>
|
||||
<tr>
|
||||
%if type == 'album':
|
||||
<th id="albumname">Album Name</th>
|
||||
%endif
|
||||
<th id="albumart"></th>
|
||||
%if type == 'album':
|
||||
<th id="albumname">Album Name</th>
|
||||
%endif
|
||||
<th id="artistname">Artist Name</th>
|
||||
<th id="score">Score</th>
|
||||
<th id="add"></th>
|
||||
@@ -25,46 +26,69 @@
|
||||
else:
|
||||
grade = 'Z'
|
||||
%>
|
||||
<tr class="grade${grade}">
|
||||
<tr class="grade${grade}">
|
||||
<td id="albumart"><div id="artistImg"><img class="albumArt" src="http://ec1.images-amazon.com/images/P/${result['uniquename']}.01.MZZZZZZZ.jpg" height="50" width="50"></div></td>
|
||||
%if type == 'album':
|
||||
<td id="albumname"><a href="${result['albumurl']}">${result['title']}</a></td>
|
||||
%endif
|
||||
<td id="artistname"><a href="${result['url']}">${result['uniquename']}</a></td>
|
||||
<td id="score">${result['score']}</td>
|
||||
<td id="artistname"><a href="${result['url']}" title="${result['uniquename']}">${result['uniquename']}</a></td>
|
||||
<td id="score"><div class="bar"><div class="score" style="width: ${result['score']}px">${result['score']}</div></div></td>
|
||||
%if type == 'album':
|
||||
<td id="add"><a href="addReleaseById?rid=${result['albumid']}">Add this album</a></td>
|
||||
<td id="add"><a href="#" onclick="doAjaxCall('addReleaseById?rid=${result['albumid']}',$(this));" data-success="Album '${result['title']}' added"><span class="ui-icon ui-icon-plus"></span> Add this album</a></td>
|
||||
%else:
|
||||
<td id="add"><a href="addArtist?artistid=${result['id']}">Add this artist</a></td>
|
||||
<td id="add"><a href="#" onclick="doAjaxCall('addArtist?artistid=${result['id']}',$(this));" data-success="'${result['uniquename']}' added"><span class="ui-icon ui-icon-plus"></span> Add this artist</a></td>
|
||||
%endif
|
||||
</tr>
|
||||
%endfor
|
||||
%endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
<%def name="headIncludes()">
|
||||
<link rel="stylesheet" href="css/data_table.css">
|
||||
<link rel="stylesheet" href="interfaces/default/css/data_table.css">
|
||||
</%def>
|
||||
|
||||
<%def name="javascriptIncludes()">
|
||||
|
||||
<script src="js/libs/jquery.dataTables.min.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function()
|
||||
{
|
||||
$(document).ready(function(){
|
||||
$("table#searchresults_table tr td#artistname").each(function(){
|
||||
var artist = $(this).children('a').attr('title');
|
||||
var image = $(this).parent().find("td#albumart img");
|
||||
var album = $(this).prev().text();
|
||||
var getId = $(this).children('a').attr('href');
|
||||
var id = getId.substr(30);
|
||||
%if type == 'artist':
|
||||
getArtistInfo(artist,image,1,id);
|
||||
%endif
|
||||
%if type == 'album':
|
||||
getAlbumInfo(artist,album,image,1);
|
||||
%endif
|
||||
});
|
||||
$('#searchresults_table').dataTable(
|
||||
{
|
||||
"aoColumnDefs": [
|
||||
{ 'bSortable': false, 'aTargets': [ 0,3 ] }
|
||||
],
|
||||
"oLanguage": {
|
||||
"sLengthMenu":"Show _MENU_ results per page",
|
||||
"sEmptyTable": "No results",
|
||||
"sInfo":"Showing _START_ to _END_ of _TOTAL_ results",
|
||||
"sInfoEmpty":"Showing 0 to 0 of 0 results",
|
||||
"sInfoFiltered":"(filtered from _MAX_ total results)"},
|
||||
"sInfoFiltered":"(filtered from _MAX_ total results)",
|
||||
"sSearch" : ""},
|
||||
"iDisplayLength": 25,
|
||||
"sPaginationType": "full_numbers",
|
||||
"aaSorting": []
|
||||
|
||||
});
|
||||
resetFilters("album");
|
||||
});
|
||||
$(window).load(function(){
|
||||
initFancybox();
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
Reference in New Issue
Block a user