{% load humanize %} {% 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 %} {% with work.last_campaign.status as status %}
{% if not is_preview %} {% comment %}top section: campaign info + optional action button. Varies by campaign status.{% endcomment %} {% if first_ebook %} AVAILABLE!
{% if first_ebook %}{% endif %}Read it Now
{% else %}{% if status == 'SUCCESSFUL' %} UNGLUED!

On: {{ deadline|date:"M d, Y" }}

Raised: {{ work.last_campaign.current_total|intcomma }}

{% if first_ebook %}{% endif %}Read it Now
{% else %}{% if status == 'ACTIVE' %} UNGLUE IT!

${{ work.last_campaign.current_total|intcomma }} raised

${{ work.last_campaign.target|intcomma }} needed

by {{ deadline|date:"M d, Y" }}

{% else %}{% if status == 'INITIALIZED' %}

Campaign coming soon!

{% else %}{% if status == 'SUSPENDED' %}

This campaign has been suspended.


See the FAQ for details.

{% else %}{% if status == 'WITHDRAWN' %}

This campaign has been withdrawn.


See the FAQ for details.

{% else %}{% if status == 'UNSUCCESSFUL' %}

{{ deadline }}

Watch for a new campaign.

{% else %}

No campaign yet.


But if lots of ungluers wishlist this book, maybe there will be!

{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %} {% else %}

No campaign yet.


But if lots of ungluers wishlist this book, maybe there will be!

{% endif %} {% comment %}link to work page{% endcomment %}
More Info
{% comment %}bibliographic data{% endcomment %}

{{ work.title }}

{{ author }}

{% comment %}status of book vis-a-vis user's wishlist{% endcomment %} {% if works and activetab %}
{% if on_search_page %} Add to Wishlist {% else %} Add to Wishlist {% endif %}
{% else %} {% if request.user.id in supporters %}
Pledged!
{% else %} {% ifequal supporter request.user %}
Remove This
{% else %}{% if request.user.is_anonymous %}
Login to Add
{% else %}{% if work in request.user.wishlist.works.all %}
On Wishlist!
{% else %}
{% if on_search_page %} Add to Wishlist {% else %} Add to Wishlist {% endif %}
{% endif %}{% endif %}{% endifequal %}{% endif %}{% endif %}
Book cover
{{ work.title }}
{{ author }}
{% if request.user.id in supporters %}
Pledged!
{% else %} {% ifequal supporter request.user %}
Remove This
{% else %}{% if request.user.is_anonymous %}
Login to Add
{% else %}{% if work in request.user.wishlist.works.all %}
On Wishlist!
{% else %}
{% if on_search_page %} Add to Wishlist {% else %} Add to Wishlist {% endif %}
{% endif %}{% endif %}{% endifequal %}{% endif %}
{% if not is_preview %} {% ifequal status "ACTIVE" %} ${{ work.last_campaign.current_total|intcomma }}/${{ work.last_campaign.target|intcomma }} {% else %}{% if status == "INITIALIZED" %} Status: Coming soon! {% else %} Status: {{ status }} {% endif %}{% endifequal %} {% endif %}
{% if status == 'No campaign yet' or status == 'INITIALIZED' %} Wished by {{ work.num_wishes }} {% else %}{% if first_ebook %} {% for ebook in work.ebooks|slice:":3" %} {{ ebook.rights}}  {{ ebook.format }} at {{ebook.provider}} {% endfor %} {% else %}
book list status
{% if status == 'ACTIVE' or status == 'SUCCESSFUL' %}
{{ work.percent_of_goal }}%
{% endif %} {% endif %}{% endif %}
{% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %}