2012-05-13 19:32:32 +00:00
{% load humanize %}
2012-03-09 13:56:59 +00:00
{% with work.first_ebook as first_ebook %}
{% with work.last_campaign.supporters as supporters %}
{% with work.cover_image_thumbnail as thumbnail %}
{% with work.author as author %}
2012-05-29 23:57:38 +00:00
{% with work.last_campaign as last_campaign %}
2012-05-17 16:06:29 +00:00
{% with work.last_campaign.status as status %}
2012-05-24 16:35:58 +00:00
{% with work.last_campaign.deadline as deadline %}
2012-03-09 13:56:59 +00:00
< div class = "thewholebook listview tabs {% if first_ebook %}tabs-1{% else %}{% if status == 'SUCCESSFUL' or status == 'ACTIVE' %}tabs-2{% else %}tabs-3{% endif %}{% endif %}" >
2011-12-01 02:05:19 +00:00
< div class = "listview book-list" >
< div class = "listview panelback side2" >
< div class = "greenpanel2" >
2011-12-27 02:10:32 +00:00
< div class = "greenpanel_top" >
2011-12-01 02:05:19 +00:00
< div class = "unglued_white" >
2011-12-28 00:17:44 +00:00
2012-05-08 19:51:17 +00:00
{% if not is_preview %}
2012-02-24 16:37:06 +00:00
{% comment %}top section: campaign info + optional action button. Varies by campaign status.{% endcomment %}
2012-03-09 13:56:59 +00:00
{% if first_ebook %}
2011-12-28 00:17:44 +00:00
< b > AVAILABLE!< / b >
< / div >
2012-05-23 12:47:41 +00:00
< a href = "{{ work.ebooks.0.url }}" > < div class = "read_itbutton" > < span > Read it Now< / span > < / div > < / a >
2011-12-28 00:17:44 +00:00
{% else %}{% if status == 'SUCCESSFUL' %}
< b > UNGLUED!< / b >
< p > < b > On:< / b > {{ deadline|date:"M d, Y" }}< / p >
2012-05-25 22:34:16 +00:00
< p > < b > Raised:< / b > {{ work.last_campaign.current_total|floatformat:0|intcomma }}< / p >
2011-12-28 00:17:44 +00:00
< / div >
2012-05-23 12:47:41 +00:00
{% if first_ebook %}< a href = "{{ work.ebooks.0.url }}" > < div class = "read_itbutton" > < span > Read it Now< / span > < / div > < / a > {% else %}< div class = "read_itbutton" > < span > Coming Soon< / span > < / div > {% endif %}
2011-12-28 00:17:44 +00:00
2011-12-27 02:10:32 +00:00
{% else %}{% if status == 'ACTIVE' %}
2011-12-28 00:17:44 +00:00
< b > UNGLUE IT!< / b >
2012-05-25 22:34:16 +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 >
2011-12-28 00:17:44 +00:00
< p > by {{ deadline|date:"M d, Y" }}< / p >
< / div >
2012-05-23 12:47:41 +00:00
< a href = "/pledge/{{work.id}}" > < div class = "read_itbutton pledge" > < span > Support< / span > < / div > < / a >
2011-12-28 00:17:44 +00:00
{% else %}{% if status == 'INITIALIZED' %}
< p > Campaign coming soon!< / p >
< / div >
{% else %}{% if status == 'SUSPENDED' %}
< p > This campaign has been suspended.< / p > < br / > < p > See the < a href = "{{faqurl}}" > FAQ< / a > for details.< / p >
< / div >
{% else %}{% if status == 'WITHDRAWN' %}
< p > This campaign has been withdrawn.< / p > < br / > < p > See the < a href = "{{faqurl}}" > FAQ< / a > for details.< / p >
< / div >
{% else %}{% if status == 'UNSUCCESSFUL' %}
< p > {{ deadline }}< / p >
< p > Watch for a new campaign.< / p >
< / div >
{% else %}
< p > No campaign yet.< / p > < br / > < p > But if lots of ungluers wishlist this book, maybe there will be!< / p >
< / div >
{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}
2012-05-08 19:51:17 +00:00
{% else %}
< p > No campaign yet.< / p > < br / > < p > But if lots of ungluers wishlist this book, maybe there will be!< / p >
< / div >
{% endif %}
2011-12-27 02:10:32 +00:00
< / div >
2011-12-28 00:17:44 +00:00
2012-05-01 13:56:19 +00:00
{% comment %}link to work page{% endcomment %}
< div class = "moreinfo" >
< a href = "{% if work.id %}{% url work work.id %}{% else %}{% url googlebooks googlebooks_id %}{% endif %}" target = "_top" > More Info< / a >
< / div >
{% comment %}bibliographic data{% endcomment %}
< div class = "white_text" >
< p > < a href = "{% if work.id %}{% url work work.id %}{% else %}{% url googlebooks googlebooks_id %}{% endif %}" > {{ work.title }}< / a > < / p >
< p > {{ author }}< / p >
< / div >
2012-02-24 16:37:06 +00:00
{% comment %}status of book vis-a-vis user's wishlist{% endcomment %}
2012-03-20 13:52:57 +00:00
{% if works and activetab %}
2012-03-19 19:32:33 +00:00
< div class = "moreinfo add-wishlist" >
2012-05-12 01:28:25 +00:00
{% if on_search_page %}
< span class = "gb_id" id = "p{{ googlebooks_id }}" > Add to Wishlist< / span >
{% else %}
< span class = "work_id" id = "p{{ work.id }}" > Add to Wishlist< / span >
{% endif %}
2012-03-19 19:32:33 +00:00
< / div >
{% else %}
2012-03-09 13:56:59 +00:00
{% if request.user.id in supporters %}
2012-01-02 16:09:48 +00:00
< div class = "moreinfo on-wishlist" >
< span > Pledged!< / span >
< / div >
{% else %}
2011-12-01 02:05:19 +00:00
{% ifequal supporter request.user %}
< div class = "moreinfo remove-wishlist" >
2012-03-09 20:06:25 +00:00
< span id = "p{{ work.id }}" > Remove This< / span >
2011-12-01 02:05:19 +00:00
< / div >
{% else %}{% if request.user.is_anonymous %}
< div class = "moreinfo create-account" >
2011-12-06 19:40:29 +00:00
< span title = "{% if work.id %}{% url work work.id %}{% else %}{% url googlebooks googlebooks_id %}{% endif %}" > Login to Add< / span >
2011-12-01 02:05:19 +00:00
< / div >
2011-12-01 13:42:03 +00:00
{% else %}{% if work in request.user.wishlist.works.all %}
2011-12-01 02:05:19 +00:00
< div class = "moreinfo on-wishlist" >
2011-12-01 13:42:03 +00:00
< a href = "#" > On Wishlist!< / a >
2011-12-01 02:05:19 +00:00
< / div >
{% else %}
< div class = "moreinfo add-wishlist" >
2012-05-12 01:28:25 +00:00
{% if on_search_page %}
< span class = "gb_id" id = "p{{ googlebooks_id }}" > Add to Wishlist< / span >
{% else %}
< span class = "work_id" id = "p{{ work.id }}" > Add to Wishlist< / span >
{% endif %}
2011-12-01 02:05:19 +00:00
< / div >
2012-03-19 19:32:33 +00:00
{% endif %}{% endif %}{% endifequal %}{% endif %}{% endif %}
2011-12-28 00:17:44 +00:00
2011-12-01 02:05:19 +00:00
< / div >
< / div >
< div class = "listview panelfront side1 book-thumb" >
2012-03-09 13:56:59 +00:00
< a href = "{% if work.id %}{% url work work.id %}{% else %}{% url googlebooks googlebooks_id %}{% endif %}" target = "_top" > < img src = "{% if thumbnail %}{{ thumbnail }}{% else %}/static/images/generic_cover_larger.png{% endif %}" 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" >
2011-12-06 19:40:29 +00:00
< a href = "{% if work.id %}{% url work work.id %}{% else %}{% url googlebooks googlebooks_id %}{% endif %}" > {{ work.title }}< / a >
2011-11-22 01:21:06 +00:00
< / div >
2012-03-09 13:56:59 +00:00
< div class = "listview author {{ author }}" > {{ author }}< / div >
2011-11-22 01:21:06 +00:00
< / div >
2012-03-09 13:56:59 +00:00
{% if request.user.id in supporters %}
2012-01-02 15:59:00 +00:00
< div class = "listview panelfront side1 on-wishlist" >
< span > Pledged!< / span >
< / div >
{% else %}
2011-11-22 01:21:06 +00:00
{% ifequal supporter request.user %}
2011-12-01 02:05:19 +00:00
< div class = "listview panelfront side1 remove-wishlist" >
2012-03-09 20:06:25 +00:00
< span id = "l{{ work.id }}" > Remove This< / span >
2011-11-22 01:21:06 +00:00
< / div >
{% else %}{% if request.user.is_anonymous %}
2011-12-01 02:05:19 +00:00
< div class = "listview panelfront side1 create-account" >
2011-12-06 19:40:29 +00:00
< span title = "{% if work.id %}{% url work work.id %}{% else %}{% url googlebooks googlebooks_id %}{% endif %}" > Login to Add< / span >
2011-11-22 01:21:06 +00:00
< / div >
2011-12-01 13:42:03 +00:00
{% else %}{% if work in request.user.wishlist.works.all %}
< div class = "listview panelfront side1 on-wishlist" >
2012-02-14 16:36:12 +00:00
< span > On Wishlist!< / span >
2011-12-01 13:42:03 +00:00
< / div >
2011-11-22 01:21:06 +00:00
{% else %}
2011-12-01 02:05:19 +00:00
< div class = "listview panelfront side1 add-wishlist" >
2012-05-12 01:28:25 +00:00
{% if on_search_page %}
< span class = "gb_id" id = "l{{ googlebooks_id }}" > Add to Wishlist< / span >
{% else %}
< span class = "work_id" id = "l{{ work.id }}" > Add to Wishlist< / span >
{% endif %}
2011-11-22 01:21:06 +00:00
< / div >
2012-01-02 15:59:00 +00:00
{% endif %}{% endif %}{% endifequal %}{% endif %}
2011-12-01 02:05:19 +00:00
< div class = "listview panelfront side1 booklist-status" >
2012-05-08 19:51:17 +00:00
{% if not is_preview %}
{% ifequal status "ACTIVE" %}
2012-05-25 22:34:16 +00:00
< span class = "booklist-status-text" style = "width: 190px" > < b > ${{ work.last_campaign.current_total|floatformat:0|intcomma }}< / b > /< b > ${{ work.last_campaign.target|floatformat:0|intcomma }}< / b > < / span >
2012-05-08 19:51:17 +00:00
{% else %}{% if status == "INITIALIZED" %}
< span class = "booklist-status-label" > Status: < / span > < span class = "booklist-status-text" > Coming soon!< / span >
{% else %}
< span class = "booklist-status-label" > Status: < / span > < span class = "booklist-status-text" > {{ status }}< / span >
{% endif %}{% endifequal %}
{% endif %}
2011-11-22 01:21:06 +00:00
< / div >
2011-12-01 02:05:19 +00:00
< div class = "listview panelfront side1 icons" >
2012-05-29 23:57:38 +00:00
{% if first_ebook %}
2012-01-17 21:28:45 +00:00
< span class = "listview boolist-ebook" >
2012-02-28 22:28:33 +00:00
{% for ebook in work.ebooks|slice:":3" %}
2012-04-26 21:26:27 +00:00
< a href = "{{ ebook.url }}" > < img src = "/static/images/{{ ebook.format }}32.png" height = "32" alt = "{{ ebook.rights}} {{ ebook.format }} at {{ebook.provider}}" title = "{{ ebook.rights}} {{ ebook.format }} at {{ebook.provider}}" / > < / a >
2012-02-28 22:28:33 +00:00
{% endfor %}
2012-01-17 21:28:45 +00:00
< / span >
2012-05-29 23:57:38 +00:00
{% else %}{% if last_campaign == None or status == 'No campaign yet' or status == 'INITIALIZED' %}
< a href = "{% url work work.id %}?tab=3" class = "nobold" > < span class = "rounded" > < span class = "grey" > < span class = "panelnope" > Wished by < / span > {{ work.num_wishes }}< / span > < / span > < / a >
2012-01-16 17:10:38 +00:00
{% else %}
2011-12-26 17:53:28 +00:00
< div class = "booklist-status-img" >
< img src = "/static/images/images/icon-book-37by25-{{ work.percent_unglued }}.png" title = "book list status" alt = "book list status" / >
< / div >
2012-05-21 15:18:30 +00:00
{% if status == 'ACTIVE' or status == 'SUCCESSFUL' %}< div class = "booklist-status-label panel" > {{ work.percent_of_goal }}%< / div > {% endif %}
2012-01-16 17:10:38 +00:00
{% endif %}{% endif %}
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-12-01 02:05:19 +00:00
< div class = "unglue-this panelfront side1 none" >
2011-11-22 01:21:06 +00:00
< div class = "unglue-this-inner1" >
< div class = "unglue-this-inner2" >
< / div >
2011-09-12 03:44:21 +00:00
< / div >
< / div >
< / div >
2012-03-09 13:56:59 +00:00
< / div >
{% endwith %}
{% endwith %}
{% endwith %}
{% endwith %}
2012-05-17 16:06:29 +00:00
{% endwith %}
2012-05-24 16:35:58 +00:00
{% endwith %}
2012-05-29 23:57:38 +00:00
{% endwith %}