Merge branch 'master' into production

pull/91/head
eric 2017-08-28 10:09:40 -04:00
commit f476295b7b
3 changed files with 337 additions and 278 deletions

View File

@ -1,3 +1,5 @@
PAGE TEMPLATES
base.html extra_css(empty) extra_js(empty) extra_head(empty)
404.html
500.html
@ -9,10 +11,12 @@ base.html extra_css(empty) extra_js(empty) extra_head(empty)
about_unglued_empty.html
about_wishlist.html
about_wishlist_empty.html
base-questionnaire.html
campaign_list.html extra_css extra_head
cc_list.html extra_css extra_head
comments.html extra_css extra_head
download.html extra_js
faceted_list.html extra_css extra_head
goodreads_display.html extra_head
home.html extra_css extra_js
kindle_change_successful.html extra_js
@ -22,43 +26,52 @@ base.html extra_css(empty) extra_js(empty) extra_head(empty)
librarything.html
lockss.html
lockss_manifest.html
map_subject.html
profiles/create_profile.html
profiles/edit_profile.html
profiles/profile_detail.html
profiles/profile_list.html
registration/registration_base.html extra_js extra_head extra_extra_head
basedocumentation.html extra_js extra_extra_head
api_help.html
about.html
about_smashwords.html
admins_only.html
api_help.html
ask_rh.html
campaign_admin.html extra_extra_head
campaign_results.html
claim.html
comments/base.html
comments/preview.html extra_css
edit_edition.html extra_extra_head
edition_uploads.html
emailshare.html
gift.html extra_extra_head
emailshare.html extra_css
faq.html
feedback.html
front_matter.html extra_extra_head
join_library.html
languages.html
libraries.html extra_css extra_js
libraryauth/edit.html extra_extra_head
manage_account.html extra_extra_head
manage_campaign.html extra_extra_head
manage_ebooks.html
manage_survey.html
marc.html
merge.html extra_extra_head
metrics.html
new_edition.html extra_extra_head
notification/base.html
notification/notice_settings.html extra_css extra_js
notification/notices.html extra_css
press.html
press_new.html
press_submitterator.html
privacy.html
rh_tools.html extra_extra_head
rights_holders.html extra_extra_head
surveys.html
terms.html extra_css
thanks.html
basepledge.html extra_css extra_js extra_extra_head(empty)
@ -75,8 +88,25 @@ base.html extra_css(empty) extra_js(empty) extra_head(empty)
pledge_user_error.html extra_extra_head
purchase.html extra_extra_head
stripe.html extra_extra_head
email_change/base.html
email_change_complete.html
email_change_form.html
email_verification_sent.html
email_verify.html
kindle_change_successful.html
kindle_config.html
marc_config.html
gift_duplicate.html
gift_error.html
gift_login.html
gift_welcome.html
kindle_response_graceful_degradation.html
registration/activation_complete.html
registration/activate.html
registration/from_pledge.html
registration/from_add.html
registration/from_error.html
registration/from_purchase.html
registration/login.html
registration/logout.html
registration/password_change_done.html
@ -98,18 +128,41 @@ base.html extra_css(empty) extra_js(empty) extra_head(empty)
work.html extra_css extra_js
work_list.html extra_css extra_head
bypub_list.html
recommended.html
COMPONENT TEMPLATES
about_lightbox_footer.html
book_plain.html
book_panel_addbutton.html
cardform.html
cardscripts.html
cardscripts.html
claim_terms.html
ebook_list.html
ebookfiles.html
edition_display.html
edition_upload.html
explore.html
faqmenu.html
faq_b2u.html
faq_pledge_cancel.html
faq_pledge.html
faq_purchase.html
faq_t4u.html
faqmenu.html
kindle_response_message.html
learn_more.html
marc_form.html
num_wishes.html
press_item.html
refine.html
registration/login_form.html
registration/password_reset_email.html
registration/registration_closed.html
registration/test_template_name.html
sidebar_pledge_complete.html
slideshow.html
split.html
stripe_stuff.html
subjectbox.html
trans_summary.html
work_action.html
workbox.html

View File

@ -280,14 +280,18 @@
</div>
<div>
{% for work_rel in work.works_related_to.all %}
<p>
This work is a {{ work_rel.relation }} of <a href="{% url 'work' work_rel.from_work.id %}">{{ work_rel.from_work }}</a>.
</p>
{% if work_rel.from_work.language != 'xx' and work.language != 'xx' %}
<p>
This work is a {{ work_rel.relation }} of <a href="{% url 'work' work_rel.from_work.id %}">{{ work_rel.from_work }}</a>.
</p>
{% endif %}
{% endfor %}
{% for work_rel in work.works_related_from.all %}
<p>
<a href="{% url 'work' work_rel.to_work.id %}">{{ work_rel.to_work }}</a> is a {{ work_rel.relation }} of this work.
</p>
{% if work.language != 'xx' and work_rel.to_work.language != 'xx' %}
<p>
<a href="{% url 'work' work_rel.to_work.id %}">{{ work_rel.to_work }}</a> is a {{ work_rel.relation }} of this work.
</p>
{% endif %}
{% endfor %}
{% if work.doab %}
<p>
@ -509,273 +513,7 @@
</div>
</div>
<div id="js-rightcol">
<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:"" }}&amp;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:"" }}&amp;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:"" }}&amp;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">&lt;iframe src="https://{{request.META.HTTP_HOST}}/api/widget/{{work.id}}/" width="152" height="325" frameborder="0"&gt;&lt;/iframe&gt;</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 &amp; 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, &amp; 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 &amp; 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, &amp; 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 %}
{% include 'work_action.html' %}
</div>
</div>
</div>

View File

@ -0,0 +1,268 @@
{% 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:"" }}&amp;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:"" }}&amp;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:"" }}&amp;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">&lt;iframe src="https://{{request.META.HTTP_HOST}}/api/widget/{{work.id}}/" width="152" height="325" frameborder="0"&gt;&lt;/iframe&gt;</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 &amp; 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, &amp; 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 &amp; 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, &amp; 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 %}