2016-05-11 14:41:50 +00:00
|
|
|
|
2012-05-13 19:32:32 +00:00
|
|
|
{% load humanize %}
|
2013-08-20 02:54:43 +00:00
|
|
|
{% load purchased %}
|
2013-10-18 16:36:55 +00:00
|
|
|
{% load lib_acqs %}
|
2013-12-20 23:01:15 +00:00
|
|
|
{% load bookpanel %}
|
2017-12-14 21:24:26 +00:00
|
|
|
{% with first_ebook=work.first_ebook thumbnail=work.cover_image_thumbnail author=work.authors_short title=work.title last_campaign=work.last_campaign status=work.last_campaign.status deadline=work.last_campaign.deadline workid=work.id wishlist=request.user.wishlist.works.all %}
|
2013-12-20 23:01:15 +00:00
|
|
|
{% purchased %}{% lib_acqs %}{% bookpanel %}
|
2016-07-25 18:50:19 +00:00
|
|
|
<div class="thewholebook listview tabs {% if tab_override %}{{tab_override}}{% elif first_ebook or status == 'SUCCESSFUL' %}tabs-1{% elif status == 'ACTIVE' %}tabs-2{% else %}tabs-3{% endif %}">
|
2011-12-01 02:05:19 +00:00
|
|
|
<div class="listview book-list">
|
|
|
|
<div class="listview panelback side2">
|
2012-05-31 17:29:41 +00:00
|
|
|
{% comment %} hover state of panel {% endcomment %}
|
|
|
|
<div class="greenpanel2">
|
2013-03-11 20:09:40 +00:00
|
|
|
{% if last_campaign %}
|
|
|
|
{% comment %}top section: campaign info + optional action button. Varies by campaign status.{% endcomment %}
|
2013-10-18 16:36:55 +00:00
|
|
|
{% if status == 'SUCCESSFUL' or license_is_active or borrowable %}
|
2013-03-11 20:09:40 +00:00
|
|
|
<div class="greenpanel_top">
|
|
|
|
{% comment %}bibliographic data{% endcomment %}
|
|
|
|
<div class="white_text">
|
2015-04-28 03:24:02 +00:00
|
|
|
<p><a href="{% if workid %}{% url 'work' workid %}{% else %}{% url 'googlebooks' googlebooks_id %}{% endif %}">{{ title }}</a></p>
|
2013-03-11 20:09:40 +00:00
|
|
|
<p>{{ author }}</p>
|
|
|
|
</div>
|
|
|
|
{% comment %}link to work page{% endcomment %}
|
|
|
|
<div class="moreinfo">
|
2015-04-28 03:24:02 +00:00
|
|
|
<a href="{% if workid %}{% url 'work' workid %}{% else %}{% url 'googlebooks' googlebooks_id %}{% endif %}" target="_top">More Info</a>
|
2013-03-11 20:09:40 +00:00
|
|
|
</div>
|
2013-10-18 16:36:55 +00:00
|
|
|
{% if purchased %}
|
|
|
|
<div class="unglued_white">
|
2014-12-20 18:03:20 +00:00
|
|
|
<b>{% if purchased.gifts.all.count %}A gift to you!{% else %}Purchased!{% endif %}</b>
|
2013-10-18 16:36:55 +00:00
|
|
|
</div>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif borrowed %}
|
2013-10-19 20:54:09 +00:00
|
|
|
<b>Borrowed! </b>
|
|
|
|
<p><b>until</b> {{ borrowed.expires|date:"M d, Y" }}</p>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif borrowable %}
|
2013-10-18 16:36:55 +00:00
|
|
|
<div class="unglued_white">
|
|
|
|
<b>Library has it!</b>
|
2016-07-25 18:50:19 +00:00
|
|
|
<p><b>{{ lib_acqs.count }}</b>{% if lib_acqs.count == 1 %} copy{% else %} copies{% endif %}</p>
|
2013-10-18 16:36:55 +00:00
|
|
|
</div>
|
|
|
|
{% else %}
|
2013-03-11 20:09:40 +00:00
|
|
|
<div class="unglued_white">
|
2016-07-25 18:50:19 +00:00
|
|
|
{% if work.last_campaign.type == 3 %}
|
2014-03-17 01:29:00 +00:00
|
|
|
<b>THANKED!</b>
|
2014-02-20 21:31:13 +00:00
|
|
|
<p><b>${{ work.last_campaign.current_total|floatformat:0|intcomma }}</b> of thanks</p>
|
2014-02-20 21:53:30 +00:00
|
|
|
<p> from <b>{{ work.last_campaign.supporters_count }}</b> ungluers</p>
|
2014-02-20 21:31:13 +00:00
|
|
|
<p> and <b>{{ work.last_campaign.anon_count }}</b> others</p>
|
|
|
|
{% else %}
|
2014-03-17 01:29:00 +00:00
|
|
|
<b>UNGLUED!</b>
|
2014-02-20 21:31:13 +00:00
|
|
|
<p><b>On:</b> {{ deadline|date:"M d, Y" }}</p>
|
|
|
|
<p><b>Raised:</b> {{ work.last_campaign.current_total|floatformat:0|intcomma }}</p>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% endif %}
|
2013-10-18 16:36:55 +00:00
|
|
|
</div>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% endif %}
|
2013-03-11 19:38:04 +00:00
|
|
|
</div>
|
2013-03-11 20:09:40 +00:00
|
|
|
<div class="add_button">
|
2014-02-11 16:37:39 +00:00
|
|
|
{% include "book_panel_addbutton.html" %}
|
2013-03-11 20:09:40 +00:00
|
|
|
</div>
|
|
|
|
<div class="white_text bottom_button" >
|
2018-11-03 21:23:07 +00:00
|
|
|
{% if purchased %}
|
2015-04-28 03:24:02 +00:00
|
|
|
<a href="{% url 'download' workid %}" class="hijax"><span class="read_itbutton button_text"><span>Read it Now</span></span></a>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif borrowed %}
|
2015-04-28 03:24:02 +00:00
|
|
|
<a href="{% url 'download' workid %}" class="hijax"><span class="read_itbutton button_text"><span>Read it Now</span></span></a>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif borrowable %}
|
2015-04-28 03:24:02 +00:00
|
|
|
<a href="{% url 'borrow' workid %}?library={{library}}" class="hijax"><span class="read_itbutton button_text"><span>Borrow It</span></span></a>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif first_ebook %}
|
2015-04-28 03:24:02 +00:00
|
|
|
<a href="{% url 'download' workid %}" class="hijax"><span class="read_itbutton button_text"><span>Read it Now</span></span></a>
|
2013-03-11 20:09:40 +00:00
|
|
|
{% else %}
|
2015-04-28 03:24:02 +00:00
|
|
|
<a href="{% url 'work' workid %}"><span class="read_itbutton button_text"><span>Coming Soon</span></span></a>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% endif %}
|
2013-03-11 19:38:04 +00:00
|
|
|
</div>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif status == 'ACTIVE' %}
|
2013-03-11 20:09:40 +00:00
|
|
|
<div class="greenpanel_top">
|
|
|
|
{% comment %}bibliographic data{% endcomment %}
|
|
|
|
<div class="white_text">
|
2015-04-28 03:24:02 +00:00
|
|
|
<p><a href="{% if workid %}{% url 'work' workid %}{% else %}{% url 'googlebooks' googlebooks_id %}{% endif %}">{{ title }}</a></p>
|
2013-03-11 20:09:40 +00:00
|
|
|
<p>{{ author }}</p>
|
|
|
|
</div>
|
|
|
|
{% comment %}link to work page{% endcomment %}
|
|
|
|
<div class="moreinfo">
|
2015-04-28 03:24:02 +00:00
|
|
|
<a href="{% if workid %}{% url 'work' workid %}{% else %}{% url 'googlebooks' googlebooks_id %}{% endif %}" target="_top">More Info</a>
|
2013-03-11 20:09:40 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="unglued_white">
|
2013-10-19 20:54:09 +00:00
|
|
|
{% if in_library %}
|
|
|
|
{% if borrowable %}
|
|
|
|
<p>Available in your library now!</p>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif lib_thanked %}
|
2014-03-19 02:30:21 +00:00
|
|
|
<p>Supported by your library!</p>
|
2013-10-19 20:54:09 +00:00
|
|
|
{% else %}
|
|
|
|
<p>Available in your library on<br />{{ next_acq.refreshes|date:"M j, Y" }}</p>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% endif %}
|
2013-08-14 03:47:55 +00:00
|
|
|
{% else %}
|
2016-07-25 18:50:19 +00:00
|
|
|
{% if work.last_campaign.type == 1 %}
|
2014-03-17 01:29:00 +00:00
|
|
|
<b>UNGLUE IT!</b>
|
2013-10-19 20:54:09 +00:00
|
|
|
<p><b>${{ work.last_campaign.current_total|floatformat:0|intcomma }}</b> raised</p>
|
|
|
|
<p><b>${{ work.last_campaign.target|floatformat:0|intcomma }}</b> needed</p>
|
|
|
|
<p>by {{ deadline|naturalday:"M d, Y" }}</p>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif work.last_campaign.type == 2 %}
|
2014-03-17 01:29:00 +00:00
|
|
|
<b>UNGLUE IT!</b>
|
2013-10-19 20:54:09 +00:00
|
|
|
<p><b>${{ work.last_campaign.left|floatformat:0|intcomma }}</b> needed</p>
|
|
|
|
<p>will unglue on </p>
|
|
|
|
<p>{{ work.last_campaign.cc_date|naturalday:"M d, Y" }}</p>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif work.last_campaign.type == 3 %}
|
2014-03-17 01:29:00 +00:00
|
|
|
<b>SAY THANKS!</b>
|
2014-03-03 21:51:33 +00:00
|
|
|
<p><b>${{ work.last_campaign.current_total|floatformat:0|intcomma }}</b> of thanks</p>
|
|
|
|
<p> from <b>{{ work.last_campaign.supporters_count }}</b> ungluers</p>
|
|
|
|
<p> and <b>{{ work.last_campaign.anon_count }}</b> others</p>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% else %}
|
|
|
|
Never.
|
|
|
|
{% endif %}
|
2013-10-19 20:54:09 +00:00
|
|
|
{% endif %}
|
2013-03-11 20:09:40 +00:00
|
|
|
</div>
|
2013-03-11 19:38:04 +00:00
|
|
|
</div>
|
2017-12-14 21:24:26 +00:00
|
|
|
{% if not supported %}
|
2013-03-20 19:24:53 +00:00
|
|
|
<div class="white_text bottom_button">
|
|
|
|
{% include "book_panel_addbutton.html" %}
|
|
|
|
</div>
|
2013-03-11 20:09:40 +00:00
|
|
|
{% else %}
|
2013-03-20 19:24:53 +00:00
|
|
|
<div class="add_button">
|
|
|
|
{% include "book_panel_addbutton.html" %}
|
|
|
|
</div>
|
|
|
|
<div class="white_text bottom_button" >
|
2016-07-25 18:50:19 +00:00
|
|
|
{% if work.last_campaign.type == 1 %}
|
2017-12-14 21:24:26 +00:00
|
|
|
<a href="{% url 'pledge' work_id=workid %}"><span class="read_itbutton pledge button_text"><span>Support</span></span></a>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif work.last_campaign.type == 2 %}
|
2013-10-19 20:54:09 +00:00
|
|
|
{% if in_library %}
|
2015-04-28 03:24:02 +00:00
|
|
|
<a href="{% url 'purchase' work_id=workid %}"><span class="read_itbutton pledge button_text"><span>Reserve It</span></span></a>
|
2013-10-19 20:54:09 +00:00
|
|
|
{% else %}
|
2015-04-28 03:24:02 +00:00
|
|
|
<a href="{% url 'purchase' work_id=workid %}" title="${{ work.last_campaign.individual_offer.price|floatformat:2 }}"><span class="read_itbutton pledge button_text"><span>Purchase</span></span></a>
|
2013-10-19 20:54:09 +00:00
|
|
|
{% endif %}
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif work.last_campaign.type == 3 %}
|
2015-04-28 03:24:02 +00:00
|
|
|
<a href="{% url 'thank' workid %}" class="hijax"><span class="read_itbutton button_text"><span>Read it Now</span></span></a>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% endif %}
|
2013-03-20 19:24:53 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2013-03-11 19:38:04 +00:00
|
|
|
|
|
|
|
{% else %}
|
2013-03-11 20:09:40 +00:00
|
|
|
<div class="greenpanel_top">
|
|
|
|
{% comment %}bibliographic data{% endcomment %}
|
|
|
|
<div class="white_text">
|
2015-04-28 03:24:02 +00:00
|
|
|
<p><a href="{% if workid %}{% url 'work' workid %}{% else %}{% url 'googlebooks' googlebooks_id %}{% endif %}">{{ title }}</a></p>
|
2013-03-11 20:09:40 +00:00
|
|
|
<p>{{ author }}</p>
|
|
|
|
</div>
|
|
|
|
{% comment %}link to work page{% endcomment %}
|
|
|
|
<div class="moreinfo">
|
2015-04-28 03:24:02 +00:00
|
|
|
<a href="{% if workid %}{% url 'work' workid %}{% else %}{% url 'googlebooks' googlebooks_id %}{% endif %}" target="_top">More Info</a>
|
2013-03-11 20:09:40 +00:00
|
|
|
</div>
|
|
|
|
<div class="unglued_white">
|
|
|
|
{% if status == 'INITIALIZED' %}
|
|
|
|
<p>Campaign coming soon!</p>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif status == 'SUSPENDED' %}
|
2016-05-11 14:36:20 +00:00
|
|
|
<p>This campaign has been suspended.</p><br /><p>See the <a href="{% url 'faq' %}">FAQ</a> for details.</p>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif status == 'WITHDRAWN' %}
|
2016-05-11 14:36:20 +00:00
|
|
|
<p>This campaign has been withdrawn.</p><br /><p>See the <a href="{% url 'faq' %}">FAQ</a> for details.</p>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif status == 'UNSUCCESSFUL' %}
|
2013-03-11 20:09:40 +00:00
|
|
|
<p>{{ deadline }}</p>
|
|
|
|
<p>Watch for a new campaign.</p>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% endif %}
|
2014-02-11 16:37:39 +00:00
|
|
|
{% include "book_panel_addbutton.html" %}
|
|
|
|
</div>
|
2013-03-11 20:09:40 +00:00
|
|
|
</div>
|
|
|
|
<div class="white_text bottom_button">
|
2014-02-11 16:37:39 +00:00
|
|
|
{% include "num_wishes.html" %}
|
2013-03-11 20:09:40 +00:00
|
|
|
</div>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% endif %}
|
2013-03-11 19:38:04 +00:00
|
|
|
{% else %}
|
|
|
|
<div class="greenpanel_top">
|
|
|
|
{% comment %}bibliographic data{% endcomment %}
|
|
|
|
<div class="white_text">
|
2015-04-28 03:24:02 +00:00
|
|
|
<p><a href="{% if workid %}{% url 'work' workid %}{% else %}{% url 'googlebooks' googlebooks_id %}{% endif %}">{{ title }}</a></p>
|
2013-03-11 19:38:04 +00:00
|
|
|
<p>{{ author }}</p>
|
|
|
|
</div>
|
|
|
|
{% comment %}link to work page{% endcomment %}
|
|
|
|
<div class="moreinfo">
|
2015-04-28 03:24:02 +00:00
|
|
|
<a href="{% if workid %}{% url 'work' workid %}{% else %}{% url 'googlebooks' googlebooks_id %}{% endif %}" target="_top">More Info</a>
|
2013-03-11 19:38:04 +00:00
|
|
|
</div>
|
|
|
|
<div class="unglued_white">
|
|
|
|
{% if first_ebook %}
|
|
|
|
<b>AVAILABLE!</b>
|
|
|
|
{% else %}
|
2014-02-11 16:37:39 +00:00
|
|
|
<p>No campaign yet.</p><br /><p>But if lots of ungluers fave this book, maybe there will be!</p>
|
2013-03-11 19:38:04 +00:00
|
|
|
{% endif %}
|
2014-04-10 19:52:25 +00:00
|
|
|
<div class="add_button">
|
2014-02-11 16:37:39 +00:00
|
|
|
{% include "book_panel_addbutton.html" %}
|
2014-04-10 19:52:25 +00:00
|
|
|
</div>
|
2013-03-11 19:38:04 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="white_text bottom_button">
|
|
|
|
{% if first_ebook %}
|
2015-04-28 03:24:02 +00:00
|
|
|
<a href="{% url 'download' workid %}" class="hijax"><span class="read_itbutton button_text"><span>Read it Now</span></span></a>
|
2013-03-11 19:38:04 +00:00
|
|
|
{% else %}
|
2014-02-11 16:37:39 +00:00
|
|
|
{% include "num_wishes.html" %}
|
2013-03-11 19:38:04 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
2013-03-11 20:09:40 +00:00
|
|
|
{% endif %}
|
2013-03-11 19:38:04 +00:00
|
|
|
|
|
|
|
|
2012-05-31 17:29:41 +00:00
|
|
|
</div>
|
2011-12-01 02:05:19 +00:00
|
|
|
</div>
|
|
|
|
<div class="listview panelfront side1 book-thumb">
|
2015-08-21 21:54:39 +00:00
|
|
|
<a href="{% if workid %}{% url 'work' workid %}{% else %}{% url 'googlebooks' googlebooks_id %}{% endif %}" target="_top"><img src="{{ thumbnail }}" alt="Book cover" title="book cover" /></a>
|
2011-11-22 01:21:06 +00:00
|
|
|
</div>
|
2011-12-01 02:05:19 +00:00
|
|
|
<div class="listview panelfront side1 book-name">
|
2011-11-22 01:21:06 +00:00
|
|
|
<div class="title">
|
2015-04-28 03:24:02 +00:00
|
|
|
<a href="{% if workid %}{% url 'work' workid %}{% else %}{% url 'googlebooks' googlebooks_id %}{% endif %}">{{ title }}</a>
|
2011-11-22 01:21:06 +00:00
|
|
|
</div>
|
2014-01-18 02:37:19 +00:00
|
|
|
<div class="listview author">{{ author }}</div>
|
2011-11-22 01:21:06 +00:00
|
|
|
</div>
|
2012-05-31 17:25:19 +00:00
|
|
|
|
|
|
|
{% comment %}same logic as above{% endcomment %}
|
2014-12-11 04:27:49 +00:00
|
|
|
{% if setkw %}
|
|
|
|
{% if setkw in work.subjects.all %}
|
|
|
|
<div class="listview panelfront side1 remove-wishlist">
|
|
|
|
<span class="kw_id" id="l{{ workid }}" data-kw="{{setkw}}">Unset <i>{{setkw}}</i></span>
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<div class="listview panelfront side1 add-wishlist">
|
|
|
|
<span class="kw_id" id="l{{ workid }}" data-kw="{{setkw}}">Set <i>{{setkw}}</i></span>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2018-01-03 01:08:11 +00:00
|
|
|
{% elif show_pledge %}
|
2013-10-18 16:36:55 +00:00
|
|
|
<div class="listview panelfront side1 add-wishlist">
|
2017-12-14 21:24:26 +00:00
|
|
|
<span class="booklist_pledge"><a href="{% url 'pledge' work_id=workid %}" class="fakeinput">Support</a></span>
|
2013-10-18 16:36:55 +00:00
|
|
|
</div>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif show_purchase %}
|
2013-10-18 16:36:55 +00:00
|
|
|
<div class="listview panelfront side1 add-wishlist">
|
2015-04-28 03:24:02 +00:00
|
|
|
<span class="booklist_pledge"><a href="{% url 'purchase' work_id=workid %}" class="fakeinput" title="${{ work.last_campaign.individual_offer.price|floatformat:2 }}">Purchase</a></span>
|
2013-10-18 16:36:55 +00:00
|
|
|
</div>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif request.user.is_anonymous %}
|
2013-01-05 00:21:34 +00:00
|
|
|
<div class="listview panelfront side1 create-account">
|
2018-11-03 21:23:07 +00:00
|
|
|
<span title="{% if workid %}{% url 'work' workid %}{% else %}{% url 'googlebooks' googlebooks_id %}{% endif %}">Login to Fave</span>
|
2013-01-05 00:21:34 +00:00
|
|
|
</div>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif work in wishlist %}
|
|
|
|
{% if supporter == request.user %}
|
2013-10-18 16:36:55 +00:00
|
|
|
{% comment %} used only on your own supporter page. {% endcomment %}
|
2013-01-03 21:33:07 +00:00
|
|
|
<div class="listview panelfront side1 remove-wishlist">
|
2014-02-11 16:37:39 +00:00
|
|
|
<span id="l{{ workid }}">Un-Fave</span>
|
2013-01-03 21:33:07 +00:00
|
|
|
</div>
|
2013-10-18 16:36:55 +00:00
|
|
|
{% else %}
|
|
|
|
<div class="listview panelfront side1 on-wishlist">
|
|
|
|
{% if purchased %}
|
2014-12-20 18:03:20 +00:00
|
|
|
<span>{% if purchased.gifts.all.count %}A gift to you!{% else %}Purchased!{% endif %}</span>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif borrowed %}
|
2013-10-19 20:54:09 +00:00
|
|
|
<span>Borrowed! ...until</span>
|
2017-12-14 21:24:26 +00:00
|
|
|
{% elif supported %}
|
|
|
|
<span>Supported!</span>
|
2013-10-18 16:36:55 +00:00
|
|
|
{% else %}
|
2014-02-11 16:37:39 +00:00
|
|
|
<span>Faved!</span>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% endif %}
|
2013-10-18 16:36:55 +00:00
|
|
|
</div>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% endif %}
|
2011-11-22 01:21:06 +00:00
|
|
|
{% else %}
|
2013-01-05 00:21:34 +00:00
|
|
|
<div class="listview panelfront side1 add-wishlist">
|
2012-11-20 14:56:04 +00:00
|
|
|
{% if on_search_page %}
|
2014-02-11 16:37:39 +00:00
|
|
|
<span class="gb_id" id="l{{ googlebooks_id }}">Fave</span>
|
2012-11-20 14:56:04 +00:00
|
|
|
{% else %}
|
2014-02-11 16:37:39 +00:00
|
|
|
<span class="work_id" id="l{{ workid }}">Fave</span>
|
2012-11-20 14:56:04 +00:00
|
|
|
{% endif %}
|
2013-01-05 00:21:34 +00:00
|
|
|
</div>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% endif %}
|
2012-05-31 17:25:19 +00:00
|
|
|
|
2018-11-03 21:23:07 +00:00
|
|
|
<div class="listview panelfront side1 booklist-status">
|
2016-07-25 18:50:19 +00:00
|
|
|
{% if status == "ACTIVE" %}
|
|
|
|
{% if work.last_campaign.type == 1 %}
|
2014-02-11 16:37:39 +00:00
|
|
|
<div class="booklist-status-label">{{ work.percent_of_goal }}%</div>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if work.last_campaign.type == 2 %}
|
2014-02-11 16:37:39 +00:00
|
|
|
{% if in_library %}
|
|
|
|
{% if borrowed %}
|
|
|
|
<span class="booklist-status-text">{{ borrowed.expires|date:"M j, Y" }}</span>
|
|
|
|
{% else %}
|
|
|
|
<span class="booklist-status-text" style="line-height:19px">available<br />
|
|
|
|
{% if next_acq.refreshes %}
|
|
|
|
{{ next_acq.refreshes|date:"M j, Y" }}
|
|
|
|
{% else %}
|
|
|
|
now
|
|
|
|
{% endif %}
|
|
|
|
</span>
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
2014-06-17 18:39:16 +00:00
|
|
|
<div class="booklist-status-label"><span class="buyit">${{ work.last_campaign.individual_offer.price|floatformat:2|intcomma }}</span> </div>
|
2014-02-11 16:37:39 +00:00
|
|
|
{% endif %}
|
2016-07-25 18:50:19 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if work.last_campaign.type == 3 %}
|
2014-02-11 16:37:39 +00:00
|
|
|
{% include 'num_wishes.html' %}
|
2016-07-25 18:50:19 +00:00
|
|
|
{% endif %}
|
|
|
|
{% elif status == "INITIALIZED" %}
|
2013-10-19 20:54:09 +00:00
|
|
|
<span class="booklist-status-label">Status: </span><span class="booklist-status-text">Coming soon!</span>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif status == "SUCCESSFUL" %}
|
2012-12-31 19:57:01 +00:00
|
|
|
{% if not first_ebook %}
|
2013-01-02 21:10:32 +00:00
|
|
|
<span class="booklist-status-text">Ebook coming soon</span>
|
2012-12-31 19:57:01 +00:00
|
|
|
{% else %}
|
2014-02-11 16:37:39 +00:00
|
|
|
{% include 'num_wishes.html' %}
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
{% if first_ebook %}
|
|
|
|
{% include 'num_wishes.html' %}
|
2012-12-31 19:57:01 +00:00
|
|
|
{% endif %}
|
2016-07-25 18:50:19 +00:00
|
|
|
{% endif %}
|
2011-11-22 01:21:06 +00:00
|
|
|
</div>
|
2018-11-03 21:23:07 +00:00
|
|
|
<div class="listview panelfront side1 icons">
|
|
|
|
|
2012-05-31 17:25:19 +00:00
|
|
|
{% comment %}
|
|
|
|
For status icons, we should display...
|
|
|
|
If there is an ebook: options to get it
|
|
|
|
If no ebook but there is an active or successful campaign: progress toward goal
|
2013-10-19 20:54:09 +00:00
|
|
|
If B2U, read, borrow, reserve, purchase
|
2012-05-31 17:25:19 +00:00
|
|
|
Otherwise: number of wishes
|
|
|
|
{% endcomment %}
|
2013-10-19 20:54:09 +00:00
|
|
|
{% if purchased or borrowed or first_ebook %}
|
2018-11-03 21:23:07 +00:00
|
|
|
<a href="{% url 'download' workid %}" class="hijax" title="Download this work"><div class="read_itbutton"><span>Read it Now</span></div></a>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif borrowable %}
|
2015-04-28 03:24:02 +00:00
|
|
|
<a href="{% url 'borrow' workid %}?library={{library}}" class="hijax" title="Borrow this work"><div class="read_itbutton"><span>Borrow It</span></div></a>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif in_library %}
|
2015-04-28 03:24:02 +00:00
|
|
|
<a href="{% url 'purchase' work_id=workid %}" title="Reserve or buy this work"><div class="read_itbutton"><span>Reserve It</span></div></a>
|
2016-07-25 18:50:19 +00:00
|
|
|
{% elif status == 'ACTIVE' or status == 'SUCCESSFUL' %}
|
2013-10-19 20:54:09 +00:00
|
|
|
{% if not library or not in_library %}
|
2012-05-31 17:25:19 +00:00
|
|
|
<div class="booklist-status-img">
|
2014-06-17 18:39:16 +00:00
|
|
|
<img src="/static/images/images/icon-book-37by25-{{ work.percent_unglued }}.png" title="{{ work.percent_of_goal }}% of goal" alt="book list status" />
|
2012-05-31 17:25:19 +00:00
|
|
|
</div>
|
|
|
|
<div class="booklist-status-label panel">{{ work.percent_of_goal }}%</div>
|
2013-10-19 20:54:09 +00:00
|
|
|
{% endif %}
|
2012-01-16 17:10:38 +00:00
|
|
|
{% else %}
|
2014-02-11 16:37:39 +00:00
|
|
|
{% include "num_wishes.html" %}
|
2016-07-25 18:50:19 +00:00
|
|
|
{% endif %}
|
2012-01-16 17:10:38 +00:00
|
|
|
|
2011-11-22 01:21:06 +00:00
|
|
|
</div>
|
2011-12-01 02:05:19 +00:00
|
|
|
<div class="listview panelfront side1 ebooks">
|
2011-11-22 01:21:06 +00:00
|
|
|
</div>
|
2011-09-12 03:44:21 +00:00
|
|
|
</div>
|
2012-03-09 13:56:59 +00:00
|
|
|
</div>
|
2018-11-03 21:23:07 +00:00
|
|
|
{% endwith %}
|