2012-09-13 15:27:34 +00:00
< %inherit file="base.html" />
2014-06-02 19:02:28 +00:00
< %def name="headerIncludes()">
< div id = "subhead_container" >
< div id = "subhead_menu" >
2014-06-04 18:53:33 +00:00
%if explicit == 'loose':
< a id = "menu_link_delete" title = "This will search for ALL of the terms given : ${name}" href = "searchit?name=${name |u}&explicit=loose" > Search ALL terms< / a >
< a id = "menu_link_delete" title = "This will search EXPLICITLY for only the terms given : ${name}" href = "searchit?name=${name |u}&explicit=explicit" > Explicit Search< / a >
%elif explicit == 'explicit':
< a id = "menu_link_delete" title = "Warning: This will search for ANY of the terms given : ${name} (this could take awhile)" href = "searchit?name=${name |u}&explicit=loose" > Loose Search< / a >
< a id = "menu_link_delete" title = "This will search for ALL of the terms given : ${name}" href = "searchit?name=${name |u}&explicit=all" > Search ALL terms< / a >
%elif explicit == 'all':
< a id = "menu_link_delete" title = "This will search EXPLICITLY for only the terms given : ${name}" href = "searchit?name=${name |u}&explicit=explicit" > Explicit Search< / a >
< a id = "menu_link_delete" title = "Warning: This will search for ANY of the terms given : ${name} (this could take awhile)" href = "searchit?name=${name |u}&explicit=loose" > Loose Search< / a >
2014-06-02 19:02:28 +00:00
%endif
< / div >
< / div >
< /%def>
2012-09-13 15:27:34 +00:00
< %def name="body()">
< div id = "paddingheader" >
2014-06-02 19:02:28 +00:00
< %
2014-06-04 18:53:33 +00:00
if explicit == 'loose':
searchtext = "Loose Search results for: < / br > < center > " + name + "< / center > "
elif explicit == 'explicit':
2014-06-02 19:02:28 +00:00
searchtext = "Explicit Search results for: < / br > < center > " + name + "< / center > "
else:
searchtext = "Search results for : < / br > < center > " + name + "< / center > "
%>
< h1 class = "clearfix" > < img src = "interfaces/default/images/icon_search.png" alt = "Search results" / > ${searchtext}< / h1 >
< / div >
< div class = "table_wrapper" >
2012-09-13 15:27:34 +00:00
< table class = "display" id = "searchresults_table" >
< thead >
< tr >
< th id = "blank" > < / th >
< th id = "name" > Comic Name< / th >
2014-06-02 19:02:28 +00:00
< th id = "publisher" > Publisher< / th >
< th id = "comicyear" > Year< / th >
2012-09-13 15:27:34 +00:00
< th id = "issues" > Issues< / th >
< th id = "add" > < / th >
< / tr >
< / thead >
< tbody >
%if searchresults:
%for result in searchresults:
< %
2014-06-02 19:02:28 +00:00
if result['comicyear'] == '2014':
2012-09-13 15:27:34 +00:00
grade = 'A'
else:
grade = 'Z'
%>
< tr class = "grade${grade}" >
2012-12-12 22:15:06 +00:00
< td class = "blank" > < / td >
< td class = "name" > < a href = "${result['url']}" title = "${result['name']}" target = "_blank" > ${result['name']}< / a > < / td >
2013-01-23 09:43:21 +00:00
< td class = "publisher" > ${result['publisher']}< / a > < / td >
< td class = "comicyear" > ${result['comicyear']}< / a > < / td >
2012-12-12 22:15:06 +00:00
< td class = "issues" > ${result['issues']}< / td >
2013-01-14 05:42:03 +00:00
2014-02-26 19:48:50 +00:00
< td class = "add" nowrap = "nowrap" > < a href = "addComic?comicid=${result['comicid']}&comicname=${result['name'] |u}&comicyear=${result['comicyear']}&comicpublisher=${result['publisher'] |u}&comicimage=${result['comicimage']}&comicissues=${result['issues']}&imported=${imported}&ogcname=${ogcname}" > < span class = "ui-icon ui-icon-plus" > < / span > Add this Comic< / a > < / td >
2012-09-13 15:27:34 +00:00
< / tr >
%endfor
%endif
< / tbody >
< / table >
< / 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 >
< script >
2014-06-02 19:02:28 +00:00
function initThisPage(){
initActions();
2012-09-13 15:27:34 +00:00
$('#searchresults_table').dataTable(
{
2014-06-02 19:02:28 +00:00
"bDestroy": true,
"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)",
"sSearch" : ""},
"iDisplayLength": 25,
"sPaginationType": "full_numbers",
"aaSorting": []
});
resetFilters("result");
setTimeout(function(){
initFancybox();
},1500);
}
$(document).ready(function() {
initThisPage();
});
2012-09-13 15:27:34 +00:00
< / script >
< /%def>
2014-06-02 19:02:28 +00:00