{% 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 %}
{% 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 }}

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

${{ work.last_campaign.current_total }} raised

${{ work.last_campaign.target }} 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 %} {% comment %}status of book vis-a-vis user's wishlist{% endcomment %} {% 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 %}
Add to Wishlist
{% endif %}{% endif %}{% endifequal %}{% endif %} {% comment %}bibliographic data{% endcomment %}

{{ work.title }}

{{ author }}

{% comment %}link to work page{% endcomment %}
More Info
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 %}
Add to Wishlist
{% endif %}{% endif %}{% endifequal %}{% endif %}
Status: {{ status }}
{% 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.format }} {% endfor %} {% else %}
book list status
{{ work.percent_unglued_number }}%
{% endif %}{% endif %}
{% endwith %} {% endwith %} {% endwith %} {% endwith %}