2011-09-29 06:23:50 +00:00
|
|
|
{% extends "base.html" %}
|
2011-12-03 00:28:13 +00:00
|
|
|
{% block extra_css %}
|
2011-10-18 01:35:58 +00:00
|
|
|
<link rel="stylesheet" href="/static/css/book_list.css">
|
2013-03-22 15:25:06 +00:00
|
|
|
<link rel="stylesheet" href="/static/css/book_panel2.css">
|
2012-02-06 15:50:37 +00:00
|
|
|
<link rel="stylesheet" href="/static/css/search.css">
|
2011-12-03 00:28:13 +00:00
|
|
|
{% endblock %}
|
|
|
|
{% block extra_head %}
|
2011-11-07 16:04:09 +00:00
|
|
|
<script type="text/javascript" src="/static/js/wishlist.js"></script>
|
2011-11-09 01:34:15 +00:00
|
|
|
<script type="text/javascript" src="/static/js/greenpanel.js"></script>
|
|
|
|
<script type="text/javascript" src="/static/js/toggle.js"></script>
|
2012-02-05 00:06:53 +00:00
|
|
|
<script type="text/javascript" src="/static/js/jquery.endless-scroll.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var $j = jQuery.noConflict();
|
|
|
|
var page = 1;
|
|
|
|
$j(document).ready(function() {
|
|
|
|
$j(document).endlessScroll({
|
2012-02-05 16:56:41 +00:00
|
|
|
bottomPixels: 250,
|
2012-02-05 00:06:53 +00:00
|
|
|
fireOnce: false,
|
|
|
|
fireDelay: false,
|
|
|
|
insertAfter: "#results-bottom",
|
2012-03-10 03:16:07 +00:00
|
|
|
loader: '<img src="/static/images/loading.gif" alt="loading..." />',
|
2012-02-05 00:06:53 +00:00
|
|
|
callback: function(p) {
|
|
|
|
page += 1;
|
|
|
|
var url = "?q={{ q }}&page=" + page;
|
|
|
|
$j.get(url, function(html) {
|
|
|
|
var view = $j(".listview").length > 0 ? "list" : "panel";
|
|
|
|
var results = $j(html).find(".book");
|
|
|
|
$j("#results").append(results);
|
|
|
|
if (view === "list") toggleList();
|
|
|
|
else togglePanel();
|
2012-02-09 21:28:14 +00:00
|
|
|
setupWishlistControls();
|
2012-02-05 00:06:53 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
2011-09-29 06:23:50 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
2011-12-13 16:55:34 +00:00
|
|
|
{% block title %}Google Books search results{% endblock %}
|
2011-09-29 06:23:50 +00:00
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<div id="main-container">
|
|
|
|
<div class="js-main">
|
2011-11-06 19:02:29 +00:00
|
|
|
<div id="js-leftcol">
|
2011-11-07 20:39:02 +00:00
|
|
|
{% include "explore.html" %}
|
|
|
|
</div>
|
2011-09-29 06:23:50 +00:00
|
|
|
|
|
|
|
<div id="js-maincol-fr">
|
|
|
|
<div class="js-maincol-inner">
|
2012-02-06 18:53:25 +00:00
|
|
|
<div id="content-block">
|
2013-03-01 17:07:15 +00:00
|
|
|
{% if campaign_works %}
|
2011-09-29 06:23:50 +00:00
|
|
|
<div class="content-block-heading">
|
2013-03-01 17:07:15 +00:00
|
|
|
<h2 class="content-heading">Unglue.it Campaigns</span></h2>
|
2011-09-29 06:23:50 +00:00
|
|
|
<ul class="book-list-view">
|
|
|
|
<li>View As:</li>
|
|
|
|
<li class="view-list">
|
2011-11-07 14:59:23 +00:00
|
|
|
<a href="#" id="toggle-list">
|
2012-03-10 03:16:07 +00:00
|
|
|
<img src="/static/images/booklist/view-list.png" align="view list" title="view list" height="21" width="24" alt="use list view" />
|
2011-09-29 06:23:50 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="view-list">
|
2011-11-07 14:59:23 +00:00
|
|
|
<a href="#" id="toggle-panel">
|
2012-03-10 03:16:07 +00:00
|
|
|
<img src="/static/images/booklist/view-icon.png" align="view icon" title="view icon" height="22" width="22" alt="use panel view" />
|
2011-09-29 06:23:50 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2013-03-01 17:07:15 +00:00
|
|
|
<div id="content-block-content-1"><div id="unglueit-results">
|
|
|
|
{% for work in campaign_works %}
|
2012-02-05 00:06:53 +00:00
|
|
|
<div class="{% cycle 'row1' 'row2' %} book">
|
2011-11-23 17:28:59 +00:00
|
|
|
{% with work.googlebooks_id as googlebooks_id %}
|
2012-01-03 00:07:12 +00:00
|
|
|
{% with work.last_campaign_status as status %}
|
|
|
|
{% with work.last_campaign.deadline as deadline %}
|
2013-03-01 17:07:15 +00:00
|
|
|
{% include "book_panel.html" %}
|
|
|
|
{% endwith %}{% endwith %}{% endwith %}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div></div>
|
|
|
|
{% endif %}
|
|
|
|
<div class="content-block-heading">
|
|
|
|
<h2 class="content-heading"><a href="https://www.google.com/search?q={{q }}&tbm=bks">Google Books</a> search results</span></h2>
|
|
|
|
{% if not campaign_works %}
|
|
|
|
<ul class="book-list-view">
|
|
|
|
<li>View As:</li>
|
|
|
|
<li class="view-list">
|
|
|
|
<a href="#" id="toggle-list">
|
|
|
|
<img src="/static/images/booklist/view-list.png" align="view list" title="view list" height="21" width="24" alt="use list view" />
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="view-list">
|
|
|
|
<a href="#" id="toggle-panel">
|
|
|
|
<img src="/static/images/booklist/view-icon.png" align="view icon" title="view icon" height="22" width="22" alt="use panel view" />
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2012-02-06 19:48:15 +00:00
|
|
|
<div id="content-block-content"><div id="results">
|
2011-11-23 17:28:59 +00:00
|
|
|
{% for work in results %}
|
2013-03-28 01:31:30 +00:00
|
|
|
{% if not work.last_campaign %}
|
2012-02-05 00:06:53 +00:00
|
|
|
<div class="{% cycle 'row1' 'row2' %} book">
|
2011-11-23 17:28:59 +00:00
|
|
|
{% with work.googlebooks_id as googlebooks_id %}
|
2012-05-12 01:28:25 +00:00
|
|
|
{% with 'yes' as on_search_page %}
|
2011-11-23 17:28:59 +00:00
|
|
|
{% include "book_panel.html" %}
|
2013-03-11 20:23:52 +00:00
|
|
|
{% endwith %}{% endwith %}
|
2011-11-07 20:11:52 +00:00
|
|
|
</div>
|
2013-03-01 17:07:15 +00:00
|
|
|
{% endif %}
|
2011-11-20 14:20:08 +00:00
|
|
|
{% empty %}
|
|
|
|
<h2>Sorry, couldn't find that!</h2>
|
|
|
|
<div class="js-search">
|
|
|
|
<div class="js-search-inner">
|
|
|
|
<form action="{% url search %}" method="get">
|
2011-12-13 18:32:29 +00:00
|
|
|
<input type="text" id="watermarkempty" size="25" onfocus="imgfocusempty()" onblur="imgblurempty(15)" class="inputbox" name="q" value="{{ q }}">
|
2011-11-20 14:20:08 +00:00
|
|
|
<input type="button" onclick="this.form.searchword.focus();" class="button" value="Search">
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2011-09-29 06:23:50 +00:00
|
|
|
{% endfor %}
|
2012-02-06 19:48:15 +00:00
|
|
|
</div></div>
|
2012-02-05 00:06:53 +00:00
|
|
|
<div id="results-bottom"></div>
|
2011-09-29 06:23:50 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|