regluit/frontend/templates/book_panel.html

116 lines
6.9 KiB
HTML

{% if status == 'SUCCESSFUL' %}
<div class="listview tabs tabs-1">
{% else %}{% if status == 'ACTIVE' %}
<div class="listview tabs tabs-2">
{% else %}
<div class="listview tabs tabs-3">
{% endif %}{% endif %}
<div class="listview book-list side1">
<span class="listview panelback side2">
<div class="greenpanel2">
<div class="unglued_white">
{% if work.first_pdf_url or work.first_epub_url %}
<b>AVAILABLE!</b>
{% else %}
<b>{{ status }}</b>
{% if status == 'SUCCESSFUL' %}
<p><b>On:</b> {{ deadline|date:"M d, Y" }}</p>
<p><b>Raised:</b> {{ work.last_campaign.current_total }}</p>
{% else %}{% if status == 'ACTIVE' %}
<p><b>Until:</b> {{ deadline|date:"M d, Y" }}</p>
<p><b>Raised:</b> {{ work.last_campaign.current_total }}</p>
{% else %}{% if status == 'INITIALIZED' %}
<p>Campaign coming soon!</p>
{% else %}{% if status == 'SUSPENDED' %}
<p>This campaign was suspended on {{ work.last_campaign.suspended }}.</p>
{% else %}{% if status == 'WITHDRAWN' %}
<p>This campaign was withdrawn on {{ work.last_campaign.withdrawn }}.</p>
{% else %}{% if status == 'UNSUCCESSFUL' %}
<p>{{ deadline }}</p>
<p>Watch for a new campaign.</p>
{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}
</div>
{% if work.first_pdf_url or work.first_epub_url %}
<div class="read_itbutton">{% if work.first_epub_url %}<a href="{{ work.first_epub_url }}">{% else %}<a href="{{ work.first_pdf_url }}">{% endif %}Read it Now</a> </div>
{% else %}
<div class="Unglue_itbutton"><a href="#">Unglue it!</a> </div>
{% endif %}
{% ifequal supporter request.user %}
<div class="moreinfo remove-wishlist"><div><a id="{{ work.id }}">Remove</a></div></div>
{% else %}{% if work in shared_works %}
<div class="moreinfo on-wishlist">
<a href="#">On Your Wishlist!</a>
</div>
{% else %}{% if request.user.is_anonymous %}
<div class="moreinfo create-account">
<a href="#">Add to Wishlist</a>
</div>
{% else %}
<div class="moreinfo add-wishlist">
<a href="#" id="{{ googlebooks_id }}">Add to Wishlist</a>
</div>
{% endif %}{% endif %}{% endifequal %}
<div class="white_text"> <p>{% if work.id %}<a href="{% url work work.id %}">{% else %}<a href="{% url googlebooks work.googlebooks_id %}">{% endif %}{{ work.title }}</a></p>
<p>{{ work.author }}</p>
</div>
<div class="moreinfo">
{% if work.id %}<a href="{% url work work.id %}">{% else %}<a href="{% url googlebooks work.googlebooks_id %}">{% endif %}More Info</a>
</div>
</div>
</span>
<div class="listview book-thumb">
<a href="#"><img src="{{ work.cover_image_thumbnail }}" alt="Book name" title="book name" /></a>
</div>
<div class="listview book-name">
<div class="title">
{% if work.id %}<a href="{% url work work.id %}">{% else %}<a href="{% url googlebooks googlebooks_id %}">{% endif %}{{ work.title }}</a>
</div>
<div class="listview author {{ work.author }}">{{ work.author }}</div>
</div>
{% ifequal supporter request.user %}
<div class="listview remove-wishlist">
<span id="{{ work.id }}">Remove from Wishlist</span>
</div>
{% else %}{% if work in shared_works %}
<div class="listview on-wishlist">
<span>On Your Wishlist!</span>
</div>
{% else %}{% if request.user.is_anonymous %}
<div class="listview create-account">
<span>Add to Wishlist</span>
</div>
{% else %}
<div class="listview add-wishlist">
<span id="{{ work.editions.all.0.googlebooks_id }}">Add to Wishlist</span>
</div>
{% endif %}{% endif %}{% endifequal %}
<div class="listview booklist-status">
<span class="booklist-status-label">Status:&nbsp;</span><span class="booklist-status-text">{{ status }}</span>
</div>
<div class="listview icons">
<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>
<div class="booklist-status-label">{{ work.percent_unglued_number }}%</div>
<div class="right_add"><img src="/static/images/book-panel/add_gray.png" border="0" /></div>
</div>
<div class="listview ebooks">
{% if work.first_epub_url %}
<span class="listview boolist-ebook">
<a href="{{ work.first_epub_url }}">epub</a>
</span>
{% endif %}
{% if work.first_pdf_url %}
<span class="listview boolist-ebook">
<a href="{{ work.first_pdf_url }}">pdf</a>
</span>
{% endif %}
</div>
<div class="unglue-this none">
<div class="unglue-this-inner1">
<div class="unglue-this-inner2">
</div>
</div>
</div>
</div>
</div>