261 lines
15 KiB
HTML
261 lines
15 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}— {{ work.title }}{% endblock %}
|
|
|
|
{% block extra_css %}
|
|
<link type="text/css" rel="stylesheet" href="/static/css/campaign.css" />
|
|
{% endblock %}
|
|
|
|
{% block base_js %}
|
|
<script type="text/javascript" src="/static/js/jquery-1.6.3.min.js"></script>
|
|
<script type="text/javascript" src="/static/js/jquery-ui-1.8.16.custom.min.js"></script>
|
|
<script type="text/javascript" src="/static/js/wishlist.js"></script>
|
|
<script type="text/javascript" src="/static/js/tabs4.js"></script>
|
|
<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
|
|
|
|
<script>
|
|
jQuery(document).ready(function(){
|
|
jQuery('#embed').click(function(){
|
|
jQuery('div#widgetcode').toggle();
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{% with work.last_campaign_status as status %}
|
|
<div id="main-container">
|
|
<div class="js-main">
|
|
<div id="js-leftcol">
|
|
<div class="jsmodule rounded">
|
|
{% if work.last_campaign %}
|
|
{% if status == 'ACTIVE' %}
|
|
<div class="jsmod-content active {{ work.percent_unglued}}">
|
|
<span>
|
|
Campaign in Progress: <br />${{ work.last_campaign.current_total }}/${{ work.last_campaign.target }}
|
|
{% else %}
|
|
<div class="jsmod-content">
|
|
<span>
|
|
{% if status == 'SUCCESSFUL' %}
|
|
Unglued on {{ work.last_campaign.deadline|date:"M j, Y"}}! <br />${{ work.last_campaign.current_total }} raised of ${{ work.last_campaign.target }} goal
|
|
{% else %}{% if status == 'INITIALIZED' %}
|
|
Campaign starting soon
|
|
{% else %}{% if status == 'SUSPENDED' %}
|
|
Campaign suspended. <br />See <a href="/faq">FAQ</a>.
|
|
{% else %}{% if status == 'WITHDRAWN' %}
|
|
Campaign withdrawn. <br />See <a href="/faq">FAQ</a>.
|
|
{% else %}{% if wishers == 1 %}
|
|
{{ wishers }} Ungluer is WISHING
|
|
{% else %}
|
|
{{ wishers }} Ungluers are WISHING
|
|
{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}
|
|
{% else %}
|
|
<div class="jsmod-content">
|
|
<span>
|
|
{% if wishers == 1 %}
|
|
{{ wishers }} Ungluer is WISHING
|
|
{% else %}
|
|
{{ wishers }} Ungluers are WISHING
|
|
{% endif %}
|
|
{% endif %}
|
|
</span>
|
|
<span class="spacer"> <br /> </span>
|
|
</div>
|
|
</div>
|
|
{% include "explore.html" %}
|
|
</div>
|
|
<div id="js-maincol">
|
|
<div class="js-maincol-inner">
|
|
<div class="content-block">
|
|
<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>
|
|
<div class="book-detail-info">
|
|
<h2 class="book-name">{{ work.title }}</h2>
|
|
<h3 class="book-author">{{ work.author }}</h3>
|
|
<h3 class="book-year">{{ work.editions.all.0.publication_date }}</h3>
|
|
<div class="find-book">
|
|
<label>Find it:</label>
|
|
<div class="find-link">
|
|
<a class="find-google" href="{{ work.googlebooks_url }}"><img src="/static/images/supporter_icons/googlebooks_square.png" align="" title="Find on Google Books" /></a>
|
|
<a rel="nofollow" class="find-openlibrary" href="{% url work_openlibrary work.id %}"><img src="/static/images/supporter_icons/openlibrary_square.png" title="Find on OpenLibrary"></a>
|
|
{% if not request.user.is_anonymous %}
|
|
{% if request.user.profile.goodreads_user_link %}
|
|
<a rel="nofollow" class="find-goodreads" href="{% url work_goodreads work.id %}"><img src="/static/images/supporter_icons/goodreads_square.png" title="Find on GoodReads"></a>
|
|
{% endif %}
|
|
{% if request.user.profile.librarything_id %}
|
|
<a rel="nofollow" class="find-librarything" href="{% url work_librarything work.id %}"><img src="/static/images/supporter_icons/librarything_square.png" title="Find on LibraryThing" /></a>
|
|
{% endif %}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% if status == 'ACTIVE' %}
|
|
<div class="pledged-info"><div class="pledged-group">{% if work.last_campaign.supporters.count == 1 %}One Ungluer has {% else %} {{ work.last_campaign.supporters.count }} Ungluers have {% endif %}pledged ${{ work.last_campaign.current_total }}<br />toward a ${{ work.last_campaign.target }} goal </div><div class="status"><img src="/static/images/images/icon-book-37by25-{{ work.percent_unglued }}.png" /></div></div>
|
|
<div class="btn_support"><form action="{% url pledge work_id=work.id %}" method="get"><input type="submit" value="Support"/></form></div>
|
|
{% else %}
|
|
<div class="pledged-info"><div class="pledged-group">
|
|
{% if wishers == 1 %}
|
|
{{ wishers }} Ungluer has
|
|
{% else %}
|
|
{{ wishers }} Ungluers have
|
|
{% endif %}wished for this Work</div><div class="status"><img src="/static/images/images/icon-book-37by25-{{ work.percent_unglued }}.png" /></div></div>
|
|
<div class="btn_support">
|
|
{% if request.user.is_anonymous %}
|
|
<div class="create-account">
|
|
<span title="{% url work work.id %}">Login to Add</span>
|
|
</div>
|
|
{% else %}{% if work in request.user.wishlist.works.all %}
|
|
<div class="remove-wishlist">
|
|
<span id="{{ work.id }}">Remove This</span>
|
|
</div>
|
|
{% else %}
|
|
<div class="add-wishlist">
|
|
<span id="{{ work.googlebooks_id }}">Add to Wishlist</span>
|
|
</div>
|
|
{% endif %}{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<!-- needed to put 10px padding on this for supporter page but hurts here. disentangle. -->
|
|
<div class="content-block-heading" id="tabs">
|
|
<ul class="tabs">
|
|
<li class="tabs1"><a href="#">Campaign</a></li>
|
|
<li class="tabs2"><a href="#">Community </a></li>
|
|
<li class="tabs3"><a href="#">Supporters</a></li>
|
|
<li class="tabs4"><a href="#">Details</a></li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="content-block-content">
|
|
<div id="tabs-1" class="tabs">
|
|
<div class="tabs-content">
|
|
<p><br>
|
|
{% if status == 'ACTIVE' %}
|
|
<h3 class="tabcontent-title">A campaign is running to unglue <i>{{work.title}}</i>!</h3>
|
|
<p>The rights holder, {% for claim in work.claim.all %}
|
|
{% if claim.status == 'active' %}
|
|
{{ claim.rights_holder.rights_holder_name }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
has agreed to release <i>{{work.title}}</i> to the world as a Creative Commons licensed ebook if ungluers can join together to raise ${{ work.last_campaign.target }} by {{ work.last_campaign.deadline }}.
|
|
You can help!</p>
|
|
{{ work.last_campaign.description|safe }}
|
|
{% else %}
|
|
<h3 class="tabcontent-title">{{work.title}}</h3>
|
|
{{ work.longest_description|safe }}
|
|
{% endif %}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div id="tabs-2" class="tabs">
|
|
<div class="tabs-content">
|
|
Being Unglued infomation
|
|
</div>
|
|
</div>
|
|
<div id="tabs-3" class="tabs">
|
|
<div class="tabs-content">
|
|
{% for supporter in work.wished_by %}
|
|
<div class="work_supporter">
|
|
<a href="/supporter/{{supporter}}">
|
|
<div class="work_supporter_avatar">
|
|
{% if supporter.profile.pic_url %}
|
|
<img class="user-avatar" src="{{ supporter.profile.pic_url }}" height="50" width="50" alt="Picture of {{ supporter }}" title="{{ supporter }}" />
|
|
{% else %}
|
|
<img class="user-avatar" src="/static/images/header/avatar.png" height="50" width="50" alt="Generic Ungluer Avatar" title="Ungluer" />
|
|
{% endif %}
|
|
</div>
|
|
<div class="work_supporter_name">{{supporter }}</div>
|
|
</a>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<div id="tabs-4" class="tabs">
|
|
<div class="tabs-content">
|
|
{% if status == 'ACTIVE' %}
|
|
<h4>Last campaign details</h4>
|
|
{{ work.last_campaign.details|safe }}
|
|
{% endif %}
|
|
|
|
{% if work.claim.count %}
|
|
<h4> Rights Information </h4>
|
|
<p> This work has been claimed by:</p>
|
|
<ul>
|
|
{% for claim in work.claim.all %}
|
|
<li>{{ claim.rights_holder.rights_holder_name }} </li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
{% if not user.is_anonymous %}
|
|
{% if request.user.rights_holder.all.count %}
|
|
<h4> Claim this work:</h4>
|
|
<form method="GET" action="{% url claim %}">
|
|
{% csrf_token %}
|
|
{{ claimform.user }}
|
|
{{ claimform.work }}
|
|
{{ claimform.rights_holder }}
|
|
<input type="submit" name="submit" value="Claim" id="submit">
|
|
</form>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% if work.subjects.all.count > 0 %}
|
|
<h4>Subjects</h4>
|
|
<ul>
|
|
{% for subject in work.subjects.all %}
|
|
<li>{{ subject.name }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
|
|
<h4>Editions</h4>
|
|
{% for edition in editions %}
|
|
<div class="editions"><div><img src="http://bks{% cycle '1' '2' '3' '4' '5' '6' '7' '8' '9' %}.books.google.com/books?id={{ edition.googlebooks_id }}&printsec=frontcover&img=1&zoom=5" /></div><div class="metadata">{{edition.publisher}}<br />{{edition.publication_date}}<br /><a href="http://bks{% cycle '1' '2' '3' '4' '5' '6' '7' '8' '9' %}.books.google.com/books?id={{ edition.googlebooks_id }}">This edition on Google Books</a></div></div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="js-rightcol">
|
|
<div class="js-rightcol-pad rounded">
|
|
|
|
<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=http%3A%2F%2F{{ request.META.HTTP_HOST|urlencode:"" }}{{ request.path|urlencode:"" }}"><li class="facebook first"><span>Facebook</span></li></a>
|
|
<a href="https://twitter.com/intent/tweet?url=http%3A%2F%2F{{ request.META.HTTP_HOST|urlencode:"" }}{{ request.path|urlencode:"" }}&text=I'm%20ungluing%20{{ work.title|urlencode }}%20at%20%40unglueit"><li class="twitter"><span>Twitter</span></li></a>
|
|
<a href="#"><li class="email"><span>Email</span></li></a>
|
|
<a href="#" id="embed"><li class="embed"><span>Embed</span></li></a>
|
|
<div id="widgetcode">Copy/paste this into your site:<br /><textarea rows="7" cols="22"><iframe src="{{base_url}}/api/widget/{{work.editions.all.0.isbn_13}}/" width="152" height="325" frameborder="0"></iframe></textarea></div>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
{% if status == 'ACTIVE' %}
|
|
<div class="jsmodule">
|
|
<h3 class="jsmod-title"><span>Support</span></h3>
|
|
<div class="jsmod-content">
|
|
<ul class="support menu">
|
|
{% for premium in premiums %}
|
|
<li class="{% if forloop.first %}first{% else %}{% if forloop.last %}last{% endif %}{% endif %}">
|
|
<a href="{% url pledge work_id=work.id %}?premium_id={{premium.id}}">
|
|
<span class="menu-item-price">${{ premium.amount }}</span>
|
|
<span class="menu-item-desc">{{ premium.description }}</span>
|
|
{% ifequal premium.type 'CU' %}<span class="custom-premium">exclusive!</span>{% endifequal %}
|
|
</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endwith %}
|
|
{% endblock %}
|