269 lines
16 KiB
HTML
269 lines
16 KiB
HTML
{% load humanize %}
|
|
<div class="clearfix">
|
|
{% if status == 'ACTIVE' %}
|
|
{% if work.last_campaign.type == 1 %}
|
|
{% if pledged %}
|
|
<div class="btn_support modify"><form action="{% url 'pledge_modify' work_id %}" method="get"><input type="submit" value="Modify Pledge" /></form></div>
|
|
{% else %}
|
|
<div class="btn_support"><form action="{% url 'pledge' work_id %}" method="get"><input type="submit" value="Pledge" /></form></div>
|
|
{% endif %}
|
|
{% elif work.last_campaign.type == 3 %}
|
|
<div class="btn_support">
|
|
<a href="{% url 'download' work_id %}{% if action == 'preview' %}?testmode=1{% endif %}" class="hijax"><span>Download</span></a>
|
|
</div>
|
|
<div style="text-align: center;">... and thank the creators!</div>
|
|
{% elif license_is_active %}
|
|
<div class="btn_support">
|
|
<a href="{% url 'download_purchased' work_id %}" class="hijax"><span>Download</span></a>
|
|
</div>
|
|
{% elif borrowable %}
|
|
<div class="btn_support"><form action="{% url 'borrow' work_id %}" method="get"><input type="submit" value="Borrow" /></form></div>
|
|
{% else %}
|
|
<div class="btn_support"><form action="{% url 'purchase' work_id %}" method="get"><input type="submit" value="{% if next_acq %}{% if on_hold %}On Hold{% else %}Reserve{% endif %}{% else %}Purchase{% endif %}" /></form></div>
|
|
{% endif %}
|
|
{% elif work.is_free %}
|
|
<div class="btn_support">
|
|
<a href="{% url 'download' work_id %}" class="hijax"><span>Download</span></a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<br />
|
|
<div class="js-rightcol-pad rounded">
|
|
{% if status == 'ACTIVE' and work.last_campaign.email %}
|
|
<div class="jsmodule">
|
|
<h3 class="jsmod-title"><span>Ask Questions</span></h3>
|
|
<div class="jsmod-content">
|
|
<ul class="social menu">
|
|
<a href="{% url 'ask_rh' work.last_campaign.id %}"><li class="email"><span>Email the Rights Holder</span></li></a>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
<div class="jsmodule">
|
|
<h3 class="jsmod-title"><span>Share</span></h3>
|
|
<div class="jsmod-content">
|
|
<ul class="social menu">
|
|
<a href="https://www.facebook.com/sharer.php?u={{request.build_absolute_uri|urlencode:"" }}"><li class="facebook first"><span>Facebook</span></li></a>
|
|
{% if work.is_free %}
|
|
<a href="https://twitter.com/intent/tweet?url={{request.build_absolute_uri|urlencode:"" }}&text=I%27m%20enjoying%20{{ work.title|urlencode }}%2C%20a%20free%2C%20DRM%2Dfree%20ebook%2E%20You%20can%20too%21"><li class="twitter"><span>Twitter</span></li></a>
|
|
{% else %}
|
|
{% if status == 'SUCCESSFUL' %}
|
|
<a href="https://twitter.com/intent/tweet?url={{request.build_absolute_uri|urlencode:"" }}&text=I%27m%20looking%20forward%20to the%20free%2C%20non%2DDRM%20ebook%20of%20{{ work.title|urlencode }}%2E%20You%20can%20too%21 "><li class="twitter"><span>Twitter</span></li></a>
|
|
{% else %}
|
|
<a href="https://twitter.com/intent/tweet?url={{request.build_absolute_uri|urlencode:"" }}&text=I%27m%20ungluing%20{{ work.title|urlencode }}%20at%20%40unglueit.%20Join%20me%21"><li class="twitter"><span>Twitter</span></li></a>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if request.user.is_authenticated %}<a href="{% url 'emailshare' '' %}?next={{request.build_absolute_uri|urlencode:""}}"><li class="email"><span>Email</span></li></a>{% endif %}
|
|
<a href="#" id="embed"><li class="embed"><span>Embed</span></li></a>
|
|
</ul>
|
|
<div id="widgetcode">
|
|
Copy/paste this into your site:<br /><textarea rows="7" cols="22"><iframe src="https://{{request.META.HTTP_HOST}}/api/widget/{{work.id}}/" width="152" height="325" frameborder="0"></iframe></textarea></div>
|
|
</div>
|
|
</div>
|
|
{% if status == 'ACTIVE' %}
|
|
<div class="jsmodule">
|
|
{% if premiums %}
|
|
<a href="{% url 'pledge' work_id %}"><h3 class="jsmod-title"><span>Premiums</span></h3></a>
|
|
<div class="jsmod-content">
|
|
<ul class="support menu">
|
|
{% if pledged %}
|
|
{% for premium in premiums %}
|
|
{% if premium.limit == 0 or premium.limit > premium.premium_count %}
|
|
<li class="{% if forloop.first %}first{% elif forloop.last %}last{% endif %}">
|
|
<a href="{% url 'pledge_modify' work_id %}?premium_id={{premium.id}}">
|
|
<span class="menu-item-price">{% if premium.amount %}${{ premium.amount|floatformat:0|intcomma }}{% else %}Any amount{% endif %}</span>{% if pledged.0.premium == premium %}<div class="you_pledged">Yours!</div>{% endif %}
|
|
<span class="menu-item-desc">{{ premium.description }}</span>
|
|
{% if premium.limit != 0 %}<br /> Only {{ premium.premium_remaining }} remaining! {% endif %}
|
|
</a></li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% else %}
|
|
{% for premium in premiums %}
|
|
{% if premium.limit == 0 or premium.limit > premium.premium_count %}
|
|
<li class="{% if forloop.first %}first{% elif forloop.last %}last{% endif %}">
|
|
<a href="{% url 'pledge' work_id %}?premium_id={{premium.id}}">
|
|
<span class="menu-item-price">${{ premium.amount|floatformat:0|intcomma }}</span>
|
|
<span class="menu-item-desc">{{ premium.description }}</span>
|
|
{% if premium.limit != 0 %}<br /> Only {{ premium.premium_remaining }} remaining! {% endif %}
|
|
</a></li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
{% if work.last_campaign.type == 1 %}
|
|
<a href="{% url 'pledge' work_id %}"><h3 class="jsmod-title"><span>Acknowledgements</span></h3></a>
|
|
<div class="jsmod-content">
|
|
In addition to any premiums you're eligible for, you'll automatically be acknowledged in the unglued ebook as follows:
|
|
<ul class="support menu">
|
|
{% if pledged %}
|
|
{% with pledged.0.amount as amount %}
|
|
<li class="first">
|
|
<a href="{% url 'pledge_modify' work_id %}?preapproval_amount=1">
|
|
<span class="menu-item-price">Any amount</span>{% if amount < 25 %}<div class="you_pledged">Yours!</div>{% endif %}
|
|
<span class="menu-item-desc">The unglued ebook, free for you to read and share.</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{% url 'pledge_modify' work_id %}?preapproval_amount=25">
|
|
<span class="menu-item-price">$25 and up</span>{% if amount >= 25 and amount < 50 %}<div class="you_pledged">Yours!</div>{% endif %}
|
|
<span class="menu-item-desc">Your name in the acknowledgements section of the unglued ebook under "Supporters".</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{% url 'pledge_modify' work_id %}?preapproval_amount=50">
|
|
<span class="menu-item-price">$50 and up</span>{% if amount >= 50 and amount < 100 %}<div class="you_pledged">Yours!</div>{% endif %}
|
|
<span class="menu-item-desc">Your name & profile link in the acknowledgements section of the unglued ebook under "Benefactors".</span>
|
|
</a>
|
|
</li>
|
|
<li class="last">
|
|
<a href="{% url 'pledge_modify' work_id %}?preapproval_amount=100">
|
|
<span class="menu-item-price">$100 and up</span>{% if amount >= 100 %}<div class="you_pledged">Yours!</div>{% endif %}
|
|
<span class="menu-item-desc">Your name, profile link, & a dedication of your choice in the acknowledgements section of the unglued ebook under "Bibliophiles".</span>
|
|
</a>
|
|
</li>
|
|
{% endwith %}
|
|
{% else %}
|
|
<li class="first">
|
|
<a href="{% url 'pledge' work_id %}?preapproval_amount=1">
|
|
<span class="menu-item-price">Any amount</span>
|
|
<span class="menu-item-desc">The unglued ebook, free for you to read and share.</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{% url 'pledge' work_id %}?preapproval_amount=25">
|
|
<span class="menu-item-price">$25 and up</span>
|
|
<span class="menu-item-desc">Your name in the acknowledgements section of the unglued ebook under "Supporters".</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="{% url 'pledge' work_id %}?preapproval_amount=50">
|
|
<span class="menu-item-price">$50 and up</span>
|
|
<span class="menu-item-desc">Your name & profile link in the acknowledgements section of the unglued ebook under "Benefactors".</span>
|
|
</a>
|
|
</li>
|
|
<li class="last">
|
|
<a href="{% url 'pledge' work_id %}?preapproval_amount=100">
|
|
<span class="menu-item-price">$100 and up</span>
|
|
<span class="menu-item-desc">Your name, profile link, & a dedication of your choice in the acknowledgements section of the unglued ebook under "Bibliophiles".</span>
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
{% if work.last_campaign.type == 2 %}
|
|
{% if lib_licenses.available %}
|
|
<h3 class="jsmod-title"><span>Borrow</span></h3>
|
|
<div class="jsmod-content">
|
|
<ul class="support menu">
|
|
{% for lib_license in lib_licenses.all %}
|
|
<li class="{% if forloop.first %}first{% elif forloop.last %}last{% endif %}">
|
|
<a href="???">Borrow!</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
<h3 class="jsmod-title"><span>Buy for Yourself</span></h3>
|
|
<div class="jsmod-content">
|
|
<ul class="support menu">
|
|
{% if purchased %}
|
|
<li class="first no_link">
|
|
<span class="menu-item-desc">{% if purchased.gifts.all.count %}A gift to you!{% else %}Purchased!{% endif %}</span>
|
|
</li>
|
|
{% else %}
|
|
<li class="first" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
|
<a href="{% url 'purchase' work_id %}?offer_id={{work.last_campaign.individual_offer.id}}">
|
|
<span class="menu-item-price" itemprop="price">${{ work.last_campaign.individual_offer.price|floatformat:2|intcomma }}</span>
|
|
<span class="menu-item-desc">{{ work.last_campaign.individual_offer.get_license_display }}</span>
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
<h3 class="jsmod-title"><span>Buy as a Gift</span></h3>
|
|
<div class="jsmod-content">
|
|
<ul class="support menu">
|
|
<li class="first" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
|
<a href="{% url 'purchase' work_id %}?offer_id=give{{work.last_campaign.individual_offer.id}}">
|
|
<span class="menu-item-price" itemprop="price">${{ work.last_campaign.individual_offer.price|floatformat:2|intcomma }}</span>
|
|
<span class="menu-item-desc">{{ work.last_campaign.individual_offer.get_license_display }}</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
{% if borrowed %}
|
|
<h3 class="jsmod-title">
|
|
<span class="on-wishlist">Borrowed!</span>
|
|
</h3>
|
|
{% else %}
|
|
<h3 class="jsmod-title"><span>Buy for a Library</span></h3>
|
|
<div class="jsmod-content">
|
|
<ul class="support menu">
|
|
<li class="first last">
|
|
{% if request.user.profile.libraries %}
|
|
<a href="{% url 'purchase' work_id %}?offer_id={{work.last_campaign.library_offer.id}}">
|
|
<span class="menu-item-price">${{ work.last_campaign.library_offer.price|floatformat:2|intcomma }}</span>
|
|
<span class="menu-item-desc">{{ work.last_campaign.library_offer.get_license_display }}</span>
|
|
</a>
|
|
{% else %}
|
|
<a href="{% url 'library_list' %}"><span class="menu-item-desc">
|
|
Join a Library to share and borrow unglue.it ebooks
|
|
</span></a>
|
|
{% endif %}
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if work.last_campaign.type == 3 %}
|
|
<h3 class="jsmod-title"><span>Thank the Creators</span></h3>
|
|
<div class="jsmod-content">
|
|
<ul class="support menu">
|
|
{% if purchased %}
|
|
<li class="first no_link">
|
|
<span class="menu-item-desc">You're welcome!</span>
|
|
</li>
|
|
{% else %}
|
|
{% if work.last_campaign.ask_money %}
|
|
<li class="first last" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
|
{% if request.user.library %}
|
|
<a href="{% url 'thank' work_id %}?offer_id={{work.last_campaign.library_offer.id}}">
|
|
<span class="menu-item-price" itemprop="price">${{ work.last_campaign.library_offer.price|floatformat:2|intcomma }}</span>
|
|
<span class="menu-item-desc">{{ work.last_campaign.library_offer.get_thanks_display }}</span>
|
|
</a>
|
|
{% else %}
|
|
<a href="{% url 'thank' work_id %}?offer_id={{work.last_campaign.individual_offer.id}}">
|
|
<span class="menu-item-price" itemprop="price">${{ work.last_campaign.individual_offer.price|floatformat:2|intcomma }}</span>
|
|
<span class="menu-item-desc">{{ work.last_campaign.individual_offer.get_thanks_display }}</span>
|
|
</a>
|
|
{% endif %}
|
|
</li>
|
|
{% else %}
|
|
<li class="first last" >
|
|
<a href="{% url 'download' work_id %}">
|
|
<span class="menu-item-desc">Just read the book!</span>
|
|
</a>
|
|
{% endif %}
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% if request.user.libpref %}
|
|
{% if work.is_free or work.ebookfiles %}
|
|
<div id="libtools">
|
|
<p>for libraries...</p>
|
|
<form method="POST" id="record_form" action="{% url 'work_marc' work.id %}">
|
|
{% include 'marc_form.html' %}
|
|
<input type="submit" name="submit" value="Download {% if not work.has_marc %}stub {% endif %}MARC" id="submit">
|
|
|
|
</form>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|