2012-02-15 16:03:58 +00:00
|
|
|
{% extends "basepledge.html" %}
|
2011-11-07 21:01:08 +00:00
|
|
|
|
|
|
|
{% block title %}Pledge{% endblock %}
|
|
|
|
|
2011-11-21 20:07:10 +00:00
|
|
|
{% block extra_extra_head %}
|
2011-11-07 21:01:08 +00:00
|
|
|
<link type="text/css" rel="stylesheet" href="/static/css/campaign.css" />
|
2012-02-15 16:09:34 +00:00
|
|
|
<link type="text/css" rel="stylesheet" href="/static/css/pledge.css" />
|
2012-04-17 13:26:45 +00:00
|
|
|
|
|
|
|
<script type="text/javascript" src="/static/js/prefill_pledge.js"></script>
|
2011-11-07 21:01:08 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block doccontent %}
|
2012-02-15 16:03:58 +00:00
|
|
|
<div style="height:10px";></div>
|
|
|
|
<div class="book-detail">
|
|
|
|
<div class="book-detail-img">
|
|
|
|
<a href="#"><img src="{{ work.cover_image_thumbnail }}" alt="{{ work.title }}" title="{{ work.title }}" width="131" height="192" /></a>
|
|
|
|
</div>
|
2011-11-07 21:01:08 +00:00
|
|
|
|
2012-02-15 16:03:58 +00:00
|
|
|
<div class="book-detail-info">
|
|
|
|
<h2 class="book-name">{{ work.title }}</h2>
|
|
|
|
<h3 class="book-author">{{ work.author }}</h3>
|
|
|
|
<h3 class="book-year">{{ work.publication_date }}</h3>
|
2012-03-28 15:31:50 +00:00
|
|
|
|
2012-02-15 16:03:58 +00:00
|
|
|
<div class="pledged-info">
|
|
|
|
<div class="pledged-group">
|
|
|
|
{{ work.last_campaign.supporters.count }} Ungluers have pledged ${{ work.last_campaign.current_total }}
|
|
|
|
</div>
|
|
|
|
<div class="status">
|
2012-03-09 18:00:00 +00:00
|
|
|
<img src="/static/images/images/icon-book-37by25-{{ work.percent_unglued }}.png" title="book list status" alt="book list status" />
|
2012-02-15 16:03:58 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="jsmodule rounded pledge">
|
|
|
|
<div class="jsmod-content">
|
|
|
|
${{ work.last_campaign.target }} needed by<br />
|
|
|
|
{{ work.last_campaign.deadline }}
|
|
|
|
</div>
|
|
|
|
</div>
|
2011-11-30 02:02:51 +00:00
|
|
|
|
2012-02-15 16:03:58 +00:00
|
|
|
<div class="jsmodule rounded">
|
2011-11-30 02:02:51 +00:00
|
|
|
<div class="jsmod-content">
|
2011-11-30 16:58:26 +00:00
|
|
|
|
2012-02-15 16:03:58 +00:00
|
|
|
{% comment %}
|
|
|
|
Even there is a CampaignPledgeForm in frontend/forms.py , the "widget" for premium_id is implemented in HTML here for now.
|
|
|
|
{% endcomment %}
|
2011-11-30 16:58:26 +00:00
|
|
|
|
2012-03-26 19:26:47 +00:00
|
|
|
<form class="pledgeform" method="POST" action="{% url pledge work_id=work.id %}">
|
2012-02-15 16:03:58 +00:00
|
|
|
{% csrf_token %}
|
|
|
|
{{ form.non_field_errors }}
|
2012-04-16 18:18:04 +00:00
|
|
|
<div class="pledge_amount">{{ form.preapproval_amount.label_tag }}: {{ form.preapproval_amount.errors }}${{ form.preapproval_amount }}</div>
|
2012-02-15 16:03:58 +00:00
|
|
|
|
|
|
|
{% comment %}
|
|
|
|
not supported yet; don't display
|
2012-04-16 18:18:04 +00:00
|
|
|
{{ form.anonymous.label_tag }}: {{ form.anonymous.errors }}{{ form.anonymous }}
|
2012-02-15 16:03:58 +00:00
|
|
|
{% endcomment %}
|
2011-11-30 02:02:51 +00:00
|
|
|
|
2012-04-17 13:26:45 +00:00
|
|
|
<ul class="support menu" id="premiums_list">
|
2012-02-15 16:03:58 +00:00
|
|
|
{% for premium in premiums %}
|
2012-03-26 22:46:34 +00:00
|
|
|
{% if premium.limit == 0 or premium.limit > premium.premium_count %}
|
2012-04-17 13:33:47 +00:00
|
|
|
<label for="premium_{{premium.id}}">
|
2012-02-15 16:03:58 +00:00
|
|
|
<li class="{% if forloop.first %}first{% else %}{% if forloop.last %}last{% endif %}{% endif %}">
|
2012-04-17 13:33:47 +00:00
|
|
|
<input type="radio" name="premium_id" id="premium_{{premium.id}}" value="{{premium.id}}" {% ifequal request.REQUEST.premium_id premium.id|stringformat:"s" %}checked="checked"{% endifequal %} />
|
2012-02-15 16:03:58 +00:00
|
|
|
<span class="menu-item-price">
|
|
|
|
${{ premium.amount }}
|
|
|
|
</span>
|
|
|
|
<span class="menu-item-desc">
|
2012-03-26 22:46:34 +00:00
|
|
|
{{ premium.description }} {% ifnotequal premium.limit 0 %}<br /> Only {{ premium.premium_remaining }} remaining! {% endifnotequal %}
|
2012-02-15 16:03:58 +00:00
|
|
|
</span>
|
2012-02-15 16:09:34 +00:00
|
|
|
</a></li></label>
|
2012-03-26 22:46:34 +00:00
|
|
|
{% endif %}
|
2012-02-15 16:03:58 +00:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
|
2012-04-05 15:53:58 +00:00
|
|
|
<input type="submit" value="Pledge" id="pledgesubmit" />
|
2012-02-15 16:03:58 +00:00
|
|
|
</form>
|
2011-11-07 21:01:08 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|