Merge branch 'master' of github.com:Gluejar/regluit
commit
7c83f2b1fb
|
@ -531,9 +531,28 @@ class Campaign(models.Model):
|
||||||
@property
|
@property
|
||||||
def success_date(self):
|
def success_date(self):
|
||||||
if self.status == 'SUCCESSFUL':
|
if self.status == 'SUCCESSFUL':
|
||||||
return self.actions.filter(type='succeeded')[0].timestamp
|
try:
|
||||||
|
return self.actions.filter(type='succeeded')[0].timestamp
|
||||||
|
except:
|
||||||
|
return ''
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
@property
|
||||||
|
def countdown(self):
|
||||||
|
from math import ceil
|
||||||
|
time_remaining = self.deadline - now()
|
||||||
|
countdown = ""
|
||||||
|
|
||||||
|
if time_remaining.days:
|
||||||
|
countdown = "%s days" % str(time_remaining.days + 1)
|
||||||
|
elif time_remaining.seconds > 3600:
|
||||||
|
countdown = "%s hours" % str(time_remaining.seconds/3600 + 1)
|
||||||
|
elif time_remaining.seconds > 60:
|
||||||
|
countdown = "%s minutes" % str(time_remaining.seconds/60 + 1)
|
||||||
|
else:
|
||||||
|
countdown = "Seconds"
|
||||||
|
|
||||||
|
return countdown
|
||||||
|
|
||||||
class Identifier(models.Model):
|
class Identifier(models.Model):
|
||||||
# olib, ltwk, goog, gdrd, thng, isbn, oclc, olwk, olib, gute, glue
|
# olib, ltwk, goog, gdrd, thng, isbn, oclc, olwk, olib, gute, glue
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
<div itemprop="comment" itemscope itemtype="http://schema.org/UserComments" class="work_supporter {% if comment.content_object.last_campaign and comment.user in comment.content_object.last_campaign.managers.all %}official{% endif %}">
|
<div itemprop="comment" itemscope itemtype="http://schema.org/UserComments" class="work_supporter {% if comment.content_object.last_campaign and comment.user in comment.content_object.last_campaign.managers.all %}official{% endif %}">
|
||||||
<span itemprop="creator" itemscope itemtype="http://schema.org/Person">
|
<span itemprop="creator" itemscope itemtype="http://schema.org/Person">
|
||||||
<a itemprop="url" href="{% url supporter supporter_username=comment.user.username %}">
|
<a itemprop="url" href="{% url supporter supporter_username=comment.user.username %}">
|
||||||
<div class="work_supporter_avatar">
|
<span class="work_supporter_avatar">
|
||||||
{% if comment.user.profile.pic_url %}
|
{% if comment.user.profile.pic_url %}
|
||||||
<img class="user-avatar" src="{{ comment.user.profile.pic_url }}" height="50" width="50" alt="Picture of {{ comment.user }}" title="{{ comment.user }}" />
|
<img class="user-avatar" src="{{ comment.user.profile.pic_url }}" height="50" width="50" alt="Picture of {{ comment.user }}" title="{{ comment.user }}" />
|
||||||
{% else %}
|
{% else %}
|
||||||
<img class="user-avatar" src="/static/images/header/avatar.png" height="50" width="50" alt="Generic Ungluer Avatar" title="Ungluer" />
|
<img class="user-avatar" src="/static/images/header/avatar.png" height="50" width="50" alt="Generic Ungluer Avatar" title="Ungluer" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</span>
|
||||||
<span class="comment_username">{{comment.user.username }}</span>
|
<span class="comment_username">{{comment.user.username }}</span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -21,13 +21,13 @@
|
||||||
<h1>{% trans "Preview your comment" %}</h1>
|
<h1>{% trans "Preview your comment" %}</h1>
|
||||||
<div class="work_supporter {% if content_object.last_campaign and user in content_object.last_campaign.managers.all %}official{% endif %}">
|
<div class="work_supporter {% if content_object.last_campaign and user in content_object.last_campaign.managers.all %}official{% endif %}">
|
||||||
<a href="{% url supporter supporter_username=user.username %}">
|
<a href="{% url supporter supporter_username=user.username %}">
|
||||||
<div class="work_supporter_avatar">
|
<span class="work_supporter_avatar">
|
||||||
{% if user.profile.pic_url %}
|
{% if user.profile.pic_url %}
|
||||||
<img class="user-avatar" src="{{ user.profile.pic_url }}" height="50" width="50" alt="Picture of {{ user }}" title="{{ user }}" />
|
<img class="user-avatar" src="{{ user.profile.pic_url }}" height="50" width="50" alt="Picture of {{ user }}" title="{{ user }}" />
|
||||||
{% else %}
|
{% else %}
|
||||||
<img class="user-avatar" src="/static/images/header/avatar.png" height="50" width="50" alt="Generic Ungluer Avatar" title="Ungluer" />
|
<img class="user-avatar" src="/static/images/header/avatar.png" height="50" width="50" alt="Generic Ungluer Avatar" title="Ungluer" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</span>
|
||||||
<span class="comment_username">{{user.username }}</span></a> <span>( [today's date] )</span> <br /><span class="comment">{{ comment|linebreaksbr }}<br /></span>
|
<span class="comment_username">{{user.username }}</span></a> <span>( [today's date] )</span> <br /><span class="comment">{{ comment|linebreaksbr }}<br /></span>
|
||||||
</div>
|
</div>
|
||||||
<br /><br /><br />
|
<br /><br /><br />
|
||||||
|
|
|
@ -31,21 +31,31 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="jsmodule rounded pledge">
|
|
||||||
<div class="jsmod-content">
|
|
||||||
${{ work.last_campaign.target|floatformat:0|intcomma }} needed by<br />
|
|
||||||
{{ work.last_campaign.deadline }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="pledged-info">
|
<div>
|
||||||
<div class="pledged-group">
|
<div class="thermometer">
|
||||||
{{ work.last_campaign.supporters_count }} Ungluers have pledged ${{ work.last_campaign.current_total|intcomma }}
|
<div class="cover" style="width: {{ cover_width }}%;">
|
||||||
</div>
|
</div>
|
||||||
<div class="status">
|
<span>{{ work.percent_of_goal }}% of goal</span>
|
||||||
<img src="/static/images/images/icon-book-37by25-{{ work.percent_unglued }}.png" title="book list status" alt="book list status" />
|
</div>
|
||||||
</div>
|
<div class="pledged-info noborder">
|
||||||
|
<div class="campaign-status-info">
|
||||||
|
<span>${{ work.last_campaign.current_total|floatformat:0|intcomma }}</span> pledged
|
||||||
|
</div>
|
||||||
|
<div class="campaign-status-info">
|
||||||
|
<span>${{ work.last_campaign.target|floatformat:0|intcomma }}</span> goal
|
||||||
|
</div>
|
||||||
|
<div class="campaign-status-info">
|
||||||
|
{% if work.last_campaign.supporters_count == 1 %}
|
||||||
|
<span>1</span> ungluer
|
||||||
|
{% else %}
|
||||||
|
<span> {{ work.last_campaign.supporters_count }}</span> ungluers
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="campaign-status-info">
|
||||||
|
<span>{{ work.last_campaign.countdown }}</span> to go
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -49,506 +49,497 @@
|
||||||
{% with work.last_campaign_status as status %}
|
{% with work.last_campaign_status as status %}
|
||||||
{% with work.id as work_id %}
|
{% with work.id as work_id %}
|
||||||
<div id="main-container">
|
<div id="main-container">
|
||||||
<div class="js-main">
|
<div class="js-main">
|
||||||
<div id="js-leftcol">
|
<div id="js-leftcol">
|
||||||
<div class="jsmodule rounded">
|
{% include "explore.html" %}
|
||||||
<div class="jsmod-content {{ status }}">
|
|
||||||
{% if work.first_ebook %}
|
|
||||||
AVAILABLE! <br />
|
|
||||||
{% if wishers == 1 %}
|
|
||||||
1 Ungluer is
|
|
||||||
{% else %}
|
|
||||||
{{ wishers }} Ungluers are
|
|
||||||
{% endif %} enjoying this book
|
|
||||||
{% else %}{% if work.last_campaign %}
|
|
||||||
{% if status == 'ACTIVE' %}
|
|
||||||
Unglue it! <br />
|
|
||||||
${{ work.last_campaign.current_total|floatformat:0|intcomma }}/${{ work.last_campaign.target|floatformat:0|intcomma }} <br />
|
|
||||||
Ending {{ countdown }}
|
|
||||||
{% else %}
|
|
||||||
{% if status == 'SUCCESSFUL' %}
|
|
||||||
Unglued on {{ work.last_campaign.success_date|date:"M j, Y"}}! <br />
|
|
||||||
${{ work.last_campaign.current_total|floatformat:0|intcomma }} raised of ${{ work.last_campaign.target|floatformat:0|intcomma }} goal<br />
|
|
||||||
Ebook in progress
|
|
||||||
{% 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 == 0 %}
|
|
||||||
<span class="findtheungluers">No ungluers are wishing yet.</span>
|
|
||||||
<br />
|
|
||||||
Be the first!
|
|
||||||
{% else %}{% if wishers == 1 %}
|
|
||||||
<span class="findtheungluers">{{ wishers }} Ungluer is wishing</span>
|
|
||||||
<br />
|
|
||||||
You can too!
|
|
||||||
{% else %}
|
|
||||||
<span class="findtheungluers">{{ wishers }} Ungluers are wishing</span>
|
|
||||||
<br />
|
|
||||||
You can too!
|
|
||||||
{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
{% if wishers == 0 %}
|
|
||||||
<span class="findtheungluers">
|
|
||||||
No ungluers are wishing yet.
|
|
||||||
</span>
|
|
||||||
<br />
|
|
||||||
Be the first!
|
|
||||||
{% else %}{% if wishers == 1 %}
|
|
||||||
<span class="findtheungluers">
|
|
||||||
{{ wishers }} Ungluer is wishing
|
|
||||||
</span>
|
|
||||||
<br />
|
|
||||||
You can too!
|
|
||||||
{% else %}
|
|
||||||
<span class="findtheungluers">
|
|
||||||
{{ wishers }} Ungluers are wishing
|
|
||||||
</span>
|
|
||||||
<br />
|
|
||||||
You can too!
|
|
||||||
{% endif %}{% endif %}
|
|
||||||
{% endif %}{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{% include "explore.html" %}
|
<div id="js-maincol">
|
||||||
</div>
|
<div class="js-maincol-inner">
|
||||||
<div id="js-maincol">
|
<div id="content-block" itemscope itemtype="http://schema.org/Book">
|
||||||
<div class="js-maincol-inner">
|
<div class="book-detail">
|
||||||
<div id="content-block" itemscope itemtype="http://schema.org/Book">
|
{% if work.googlebooks_id %}
|
||||||
<div class="book-detail">
|
<div id="book-detail-img">
|
||||||
{% if work.googlebooks_id %}
|
<a href="{{ work.googlebooks_url }}">
|
||||||
<div id="book-detail-img"><a href="{{ work.googlebooks_url }}">
|
<img src="{{ work.cover_image_thumbnail }}" alt="Find {{ work.title }} at Google Books" title="Find {{ work.title }} at Google Books" width="131" height="192" /></a>
|
||||||
<img src="{{ work.cover_image_thumbnail }}" alt="Find {{ work.title }} at Google Books" title="Find {{ work.title }} at Google Books" width="131" height="192" /></a>
|
</div>
|
||||||
</div>
|
{% else %}
|
||||||
{% else %}
|
<div id="book-detail-img">
|
||||||
<div id="book-detail-img">
|
<img itemprop="image" src="{% if work.cover_image_thumbnail %}{{ work.cover_image_thumbnail }}{% else %}/static/images/generic_cover_larger.png{% endif %}" alt="{{ work.title }}" title="{{ work.title }}" width="131" height="192" />
|
||||||
<img itemprop="image" src="{% if work.cover_image_thumbnail %}{{ work.cover_image_thumbnail }}{% else %}/static/images/generic_cover_larger.png{% endif %}" alt="{{ work.title }}" title="{{ work.title }}" width="131" height="192" />
|
</div>
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<div class="book-detail-info">
|
|
||||||
<div class="layout">
|
|
||||||
<h2 class="book-name" itemprop="name">{{ work.title }}</h2>
|
|
||||||
<div>
|
|
||||||
<div class="pubinfo">
|
|
||||||
<h3 class="book-author" itemprop="author">{{ work.author }}</h3>
|
|
||||||
<h3 class="book-year" itemprop="datePublished">{{ work.publication_date_year }}</h3>
|
|
||||||
</div>
|
|
||||||
{% if status == 'ACTIVE' %}
|
|
||||||
{% 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 %}
|
|
||||||
{% else %}
|
|
||||||
{% if work.first_ebook %}
|
|
||||||
<div class="btn_support">
|
|
||||||
<a href="{% url download work_id %}" class="fakeinput hijax">Download</a>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="find-book">
|
|
||||||
<label>Learn more at...</label>
|
|
||||||
<div class="find-link">
|
|
||||||
{% if work.googlebooks_id %}
|
|
||||||
<a id="find-google" href="{{ work.googlebooks_url }}"><img src="/static/images/supporter_icons/googlebooks_square.png" title="Find on Google Books" alt="Find on Google Books" /></a>
|
|
||||||
{% endif %}
|
|
||||||
{% if work.first_oclc %}
|
|
||||||
<a rel="nofollow" id="find-oclc" href="http://www.worldcat.org/oclc/{{ work.first_oclc }}"><img src="/static/images/supporter_icons/worldcat_square.png" title="Find on Worldcat" alt="Find on Worldcat" /></a>
|
|
||||||
{% endif %}
|
|
||||||
<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" alt="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" alt="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" alt="Find on LibraryThing" /></a>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% if not work.first_ebook %}
|
|
||||||
<div class="pledged-info"><div class="pledged-group">
|
|
||||||
{% if status == 'ACTIVE' %}
|
|
||||||
{% if work.last_campaign.supporters_count == 1 %}
|
|
||||||
One Ungluer has
|
|
||||||
{% else %}
|
|
||||||
{{ work.last_campaign.supporters_count }} Ungluers have
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
pledged ${{ work.last_campaign.current_total|floatformat:0|intcomma }}<br />toward a ${{ work.last_campaign.target|floatformat:0|intcomma }} goal
|
<div class="book-detail-info">
|
||||||
{% else %}
|
<div class="layout">
|
||||||
{% if wishers == 1 %}
|
<h2 class="book-name" itemprop="name">{{ work.title }}</h2>
|
||||||
1 Ungluer has
|
<div>
|
||||||
{% else %}
|
<div class="pubinfo">
|
||||||
{{ wishers }} Ungluers have
|
<h3 class="book-author" itemprop="author">{{ work.author }}</h3>
|
||||||
{% endif %} wished for this Work
|
<h3 class="book-year" itemprop="datePublished">{{ work.publication_date_year }}</h3>
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
<div class="status">{% if status == 'ACTIVE' %}{{ work.percent_of_goal }}% {% endif %}<img src="/static/images/images/icon-book-37by25-{% if work.first_ebook %}6{%else%}{{ work.percent_unglued }}{%endif%}.png" title="book list status" alt="book list status" /></div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<div class="btn_wishlist" id="wishlist_actions">
|
|
||||||
{% if request.user.is_anonymous %}
|
|
||||||
<div class="create-account">
|
|
||||||
<span title="{% url work work_id %}">Login to Add</span>
|
|
||||||
</div>
|
|
||||||
{% else %}{% if request.user.id in work.last_campaign.supporters %}
|
|
||||||
<div class="add-wishlist">
|
|
||||||
<span class="on-wishlist">On your wishlist!</span>
|
|
||||||
</div>
|
|
||||||
{% else %}{% if work in request.user.wishlist.works.all %}
|
|
||||||
<div class="remove-wishlist-workpage">
|
|
||||||
<span id="w{{ work_id }}">Remove from Wishlist</span>
|
|
||||||
</div>
|
|
||||||
{% else %}
|
|
||||||
<div class="add-wishlist">
|
|
||||||
<span class="work_id" id="w{{ work_id }}">Add to Wishlist</span>
|
|
||||||
</div>
|
|
||||||
{% endif %}{% endif %}{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% get_comment_count for work as comment_count %}
|
|
||||||
<div class="content-block-heading" id="tabs">
|
|
||||||
<ul class="tabs">
|
|
||||||
<li class="tabs1 {% if activetab == '1' %}active{% endif %}"><a href="#">{% if status == 'ACTIVE' %}Campaign{% else %}Description{% endif %}</a></li>
|
|
||||||
<li class="tabs2 {% if activetab == '2' %}active{% endif %}"><a href="#">Comments {% if comment_count > 0 %}({{ comment_count }}){% endif %}</a></li>
|
|
||||||
<li class="tabs3 {% if activetab == '3' %}active{% endif %}" id="supporters"><a href="#">Ungluers {% if wishers > 0 %}<br />({{ wishers }}){% endif %}</a></li>
|
|
||||||
<li class="tabs4 {% if activetab == '4' %}active{% endif %}"><a href="#">Rights</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content-block-content">
|
|
||||||
<div id="tabs-1" class="tabs {% if activetab == '1' %}active{% endif %}">
|
|
||||||
<div class="tabs-content">
|
|
||||||
{% if status == 'ACTIVE' or status == 'SUCCESSFUL' %}
|
|
||||||
<span itemprop="description">{{ work.last_campaign.description|safe }}</span>
|
|
||||||
{% else %}
|
|
||||||
<h3 class="tabcontent-title">{{work.title}}</h3>
|
|
||||||
<p itemprop="description">{{ work.description|safe }}
|
|
||||||
{% endif %}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="tabs-2" class="tabs {% if activetab == '2' %}active{% endif %}">
|
|
||||||
<h3>Why unglue this? Have your say.</h3>
|
|
||||||
<div class="tabs-content">
|
|
||||||
{% render_comment_list for work %}
|
|
||||||
{% if user.is_authenticated %}
|
|
||||||
{% render_comment_form for work %}
|
|
||||||
{% else %}
|
|
||||||
<p>You must be <a href="{% url auth_login %}?next={{ request.path }}">logged in</a> to comment.</p>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="tabs-3" class="tabs {% if activetab == '3' %}active{% endif %}">
|
|
||||||
<div class="tabs-content">
|
|
||||||
{% if request.user.is_staff or request.user in work.last_campaign.managers.all %}
|
|
||||||
<form id="contact_form" method="POST" action="#" >
|
|
||||||
{% csrf_token %}
|
|
||||||
<input type="hidden" name="work" value="{{ work.id }}" />
|
|
||||||
{% for wish in work.wishes.all reversed %}
|
|
||||||
{% with wish.wishlist.user as supporter %}
|
|
||||||
<div class="work_supporter_wide">
|
|
||||||
<a href="{% url supporter supporter_username=supporter.username %}">
|
|
||||||
<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>
|
||||||
</a>
|
|
||||||
<div class="show_supporter_contact_form" >
|
|
||||||
<img src="/static/images/icons/email.png" title="contact supporter" />
|
|
||||||
</div>
|
|
||||||
<div class="info_for_managers">
|
|
||||||
{{ supporter }}<br />
|
|
||||||
Wished: {{ wish.created }}<br />
|
|
||||||
{% if supporter.id in work.last_campaign.supporters %}Pledged!</br />{% endif %}
|
|
||||||
{% if supporter in work.last_campaign.ungluers.all %}Supported!</br />{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="supporter_contact_form" ></div>
|
{% ifequal status 'ACTIVE' %}
|
||||||
<input class="supporter_contact_form" type="submit" name="msg_{{supporter.id}}" value="Send Message to {{ supporter.username }}" />
|
<div class="thermometer" title="{{ work.percent_of_goal }}% of goal">
|
||||||
{% endwith %}
|
<div class="cover" style="width: {{ cover_width }}%;">
|
||||||
{% endfor %}
|
|
||||||
</form>
|
|
||||||
{% else %}
|
|
||||||
{% for wish in work.wishes.all reversed %}
|
|
||||||
{% with wish.wishlist.user as supporter %}
|
|
||||||
<div class="work_supporter_nocomment" itemscope itemtype="http://schema.org/Person">
|
|
||||||
<a itemprop="url" href="{% url supporter supporter_username=supporter.username %}">
|
|
||||||
<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>
|
||||||
<div class="work_supporter_name">{{ supporter }}</div>
|
<span>{{ work.percent_of_goal }}% of goal</span>
|
||||||
</a>
|
</div>
|
||||||
</div>
|
<div class="pledged-info noborder">
|
||||||
{% endwith %}
|
<div class="campaign-status-info">
|
||||||
{% endfor %}
|
<span>${{ work.last_campaign.current_total|floatformat:0|intcomma }}</span> pledged
|
||||||
{% endif %}
|
</div>
|
||||||
</div>
|
<div class="campaign-status-info">
|
||||||
</div>
|
<span>${{ work.last_campaign.target|floatformat:0|intcomma }}</span> goal
|
||||||
<div id="tabs-4" class="tabs {% if activetab == '4' %}active{% endif %}">
|
</div>
|
||||||
<div class="tabs-content">
|
<div class="campaign-status-info">
|
||||||
{% if status == 'ACTIVE' %}
|
{% if work.last_campaign.supporters_count == 1 %}
|
||||||
<h3 class="tabcontent-title">A campaign is running to unglue <i>{{work.title}}</i>!</h3>
|
<span>1</span> ungluer
|
||||||
<p>The rights holder, {% for claim in work.claim.all %}
|
{% else %}
|
||||||
{% if claim.status == 'active' %}
|
<span>{{ work.last_campaign.supporters_count }}</span> ungluers
|
||||||
{{ claim.rights_holder.rights_holder_name }}
|
{% endif %}
|
||||||
{% endif %}
|
</div>
|
||||||
{% endfor %}
|
<div class="campaign-status-info">
|
||||||
, has agreed to release <i>{{work.title}}</i> to the world as a Creative Commons licensed ebook (<a href="{{ work.last_campaign.license_url }}">{{ work.last_campaign.license }}</a>) if ungluers can join together to raise ${{ work.last_campaign.target|floatformat:0|intcomma }} by {{ work.last_campaign.deadline }}.
|
<span>{{ work.last_campaign.countdown }}</span> to go
|
||||||
You can help!</p>
|
</div>
|
||||||
|
</div>
|
||||||
<h4>Campaign details: the fine print</h4>
|
|
||||||
{{ work.last_campaign.details|safe }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if status == 'SUCCESSFUL' %}
|
|
||||||
<h3 class="tabcontent-title">A campaign has succeeded 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 (<a href="{{ work.last_campaign.license_url }}">{{ work.last_campaign.license }}</a>) thanks to the efforts of ungluers like you.</p>
|
|
||||||
<h4>Campaign details: the fine print</h4>
|
|
||||||
{{ work.last_campaign.details|safe }}
|
|
||||||
{% endif %}
|
|
||||||
{% if status != 'ACTIVE' and status != 'SUCCESSFUL' %}
|
|
||||||
<h4> Rights Information </h4>
|
|
||||||
{% if claimstatus == 'one_active' %}
|
|
||||||
<p>This work has been claimed by {{ rights_holder_name }}.</p>
|
|
||||||
{% else %}
|
|
||||||
{% if claimstatus == 'disputed' %}
|
|
||||||
<p>Rights claims are pending.</p>
|
|
||||||
{% else %}
|
|
||||||
{% if claimstatus == 'one_pending' %}
|
|
||||||
<p>A claim for this work by {{ rights_holder_name }} is pending.</p>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if request.user.rights_holder.all.count %}
|
{% ifequal status 'SUCCESSFUL' %}
|
||||||
Is this work yours? Claim it: <br /><br />
|
<div class="thermometer successful">
|
||||||
|
This campaign succeeded on {{ work.last_campaign.success_date|date:"M j, Y" }}.
|
||||||
<form method="GET" action="{% url claim %}">
|
|
||||||
{% csrf_token %}
|
|
||||||
{{ claimform.user }}
|
|
||||||
{{ claimform.work }}
|
|
||||||
{{ claimform.rights_holder }}
|
|
||||||
<input type="submit" name="submit" value="Claim" />
|
|
||||||
</form><br />
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<p>If you'd like to contact us regarding rights for this work, please email <a href="mailto:rights@gluejar.com">rights@gluejar.com</a>.</p>
|
|
||||||
{% if user.is_staff %}<h4>Related Works</h4>
|
|
||||||
<a href="{% url merge work_id %}">Merge other works into this one</a><br />
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if work.subjects.all.count > 0 %}
|
|
||||||
<h4>Subjects</h4>
|
|
||||||
<ul>
|
|
||||||
{% for subject in work.subjects.all %}
|
|
||||||
<li itemprop="keywords">{{ subject.name }}</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<h4>Editions</h4>
|
|
||||||
{% if user.is_staff %}
|
|
||||||
<div><a href="{% url new_edition work_id edition.id %}">Create a new edition for this work</a><br /><br /></div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if alert %}<div class="alert"><b>Ebook Contribution:</b><br />{{ alert }}</div>{% endif %}
|
|
||||||
{% for edition in editions %}
|
|
||||||
<div class="clearfix">
|
|
||||||
<div class="editions">
|
|
||||||
{% if edition.googlebooks_id %}
|
|
||||||
<div class="image">
|
|
||||||
<img src="{{ edition.cover_image_small }}" title="edition cover" alt="edition cover" />
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
<div class="pledged-info noborder">
|
||||||
<div class="metadata" id="edition_{{edition.id}}">{% if edition.publisher %}Publisher: <a href="{% url bypub_list edition.publisher %}">{{edition.publisher}}</a><br />{% endif %}
|
<div class="campaign-status-info">
|
||||||
{% if edition.publication_date %}Published: {{edition.publication_date}}<br />{% endif %}
|
{% if work.last_campaign.supporters_count == 1 %}
|
||||||
{% if edition.isbn_13 %}
|
<span>1</span> ungluer
|
||||||
ISBN: <spam itemprop="isbn">{{ edition.isbn_13 }}</span><br />
|
{% else %}
|
||||||
{% endif %}
|
<span>{{ work.last_campaign.supporters_count }}</span> ungluers
|
||||||
{% if edition.oclc %}
|
{% endif %}
|
||||||
OCLC: <a href="http://www.worldcat.org/oclc/{{ edition.oclc }}">{{ edition.oclc }}</a><br />
|
</div>
|
||||||
{% endif %}
|
<div class="campaign-status-info">
|
||||||
{% if user.is_staff %}
|
<span>${{ work.last_campaign.current_total|floatformat:0|intcomma }}</span> pledged
|
||||||
<a href="{% url new_edition work_id edition.id %}">Edit this edition</a><br />
|
</div>
|
||||||
{% endif %}
|
<div class="campaign-status-info">
|
||||||
{% if edition.googlebooks_id %}
|
<span>${{ work.last_campaign.target|floatformat:0|intcomma }}</span> goal
|
||||||
See <a href="https://encrypted.google.com/books?id={{ edition.googlebooks_id }}">this edition on Google Books</a>
|
</div>
|
||||||
{% endif %}
|
<div class="campaign-status-info">
|
||||||
|
<span>Unglued!</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
|
||||||
|
<div class="pledged-info">
|
||||||
|
{% if wishers == 1 %}
|
||||||
|
1 Ungluer has
|
||||||
|
{% else %}
|
||||||
|
{{ wishers }} Ungluers have
|
||||||
|
{% endif %} wished for this Work
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endifequal %}
|
||||||
{% if edition.ebook_form %}{% ifnotequal status 'ACTIVE' %}
|
<div class="find-book">
|
||||||
{% if edition.hide_details %}
|
<label>Learn more at...</label>
|
||||||
<div class="show_more_edition" >more...</div>
|
<div class="find-link">
|
||||||
{% endif %}
|
{% if work.googlebooks_id %}
|
||||||
<div {% if edition.hide_details %} class="more_edition" {% endif %}>
|
<a id="find-google" href="{{ work.googlebooks_url }}"><img src="/static/images/supporter_icons/googlebooks_square.png" title="Find on Google Books" alt="Find on Google Books" /></a>
|
||||||
{% if edition.ebooks.count %}
|
{% endif %}
|
||||||
<h5>eBooks for this Edition</h5>
|
{% if work.first_oclc %}
|
||||||
{% for ebook in edition.ebooks.all %}
|
<a rel="nofollow" id="find-oclc" href="http://www.worldcat.org/oclc/{{ work.first_oclc }}"><img src="/static/images/supporter_icons/worldcat_square.png" title="Find on Worldcat" alt="Find on Worldcat" /></a>
|
||||||
<a href="{{ebook.url}}">{{ ebook.format }}</a> {{ebook.rights}} at {{ebook.provider}}<br />
|
{% endif %}
|
||||||
{% endfor %}
|
<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" alt="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" alt="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" alt="Find on LibraryThing" /></a>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<h5>Add an eBook for this Edition:</h5>
|
|
||||||
<span>If you know that this edition is available as a public domain or Creative Commons ebook, you can enter the link here and "unglue" it. Right now, we're only accepting URLs that point to Internet Archive, Wikisources, Hathitrust, Project Gutenberg, or Google Books.</span>
|
|
||||||
<form method="POST" action="#edition_{{edition.id}}">
|
|
||||||
{% csrf_token %}{{ edition.ebook_form.edition.errors }}{{ edition.ebook_form.edition }}{{ edition.ebook_form.user.errors }}{{ edition.ebook_form.user }}{{ edition.ebook_form.provider.errors }}{{ edition.ebook_form.provider }}
|
|
||||||
{{ edition.ebook_form.url.errors }}<span>URL: {{ edition.ebook_form.url }}</span><br />
|
|
||||||
{{ edition.ebook_form.format.errors }}<span>File Format: {{ edition.ebook_form.format }}</span>
|
|
||||||
{{ edition.ebook_form.rights.errors }}<span>License: {{ edition.ebook_form.rights }}</span><br />
|
|
||||||
<input type="submit" name="add_ebook" value="add ebook" />
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
{% endifnotequal %}{% endif %}
|
</div>
|
||||||
|
<div class="btn_wishlist" id="wishlist_actions">
|
||||||
|
{% if request.user.is_anonymous %}
|
||||||
|
<div class="create-account">
|
||||||
|
<span title="{% url work work_id %}">Login to Add</span>
|
||||||
|
</div>
|
||||||
|
{% else %}{% if request.user.id in work.last_campaign.supporters %}
|
||||||
|
<div class="add-wishlist">
|
||||||
|
<span class="on-wishlist">On your wishlist!</span>
|
||||||
|
</div>
|
||||||
|
{% else %}{% if work in request.user.wishlist.works.all %}
|
||||||
|
<div class="remove-wishlist-workpage">
|
||||||
|
<span id="w{{ work_id }}">Remove from Wishlist</span>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="add-wishlist">
|
||||||
|
<span class="work_id" id="w{{ work_id }}">Add to Wishlist</span>
|
||||||
|
</div>
|
||||||
|
{% endif %}{% endif %}{% endif %}
|
||||||
|
</div>
|
||||||
</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={{request.build_absolute_uri|urlencode:"" }}"><li class="facebook first"><span>Facebook</span></li></a>
|
|
||||||
{% if work.first_ebook %}
|
|
||||||
<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 %}
|
|
||||||
{% ifequal 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>
|
|
||||||
{% endifequal %}
|
|
||||||
{% 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.first_isbn_13}}/" width="152" height="325" frameborder="0"></iframe></textarea></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% if status == 'ACTIVE' %}
|
|
||||||
{% if premiums %}
|
|
||||||
<div class="jsmodule">
|
|
||||||
<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{% else %}{% if forloop.last %}last{% endif %}{% 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>
|
|
||||||
{% ifnotequal premium.limit 0 %}<br /> Only {{ premium.premium_remaining }} remaining! {% endifnotequal %}
|
|
||||||
</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{% else %}{% if forloop.last %}last{% endif %}{% 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>
|
|
||||||
{% ifnotequal premium.limit 0 %}<br /> Only {{ premium.premium_remaining }} remaining! {% endifnotequal %}
|
|
||||||
</a></li>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% get_comment_count for work as comment_count %}
|
||||||
{% endif %}
|
<div class="content-block-heading" id="tabs">
|
||||||
<div class="jsmodule">
|
<ul class="tabs">
|
||||||
<a href="{% url pledge work_id %}"><h3 class="jsmod-title"><span>Acknowledgements</span></h3></a>
|
<li class="tabs1 {% if activetab == '1' %}active{% endif %}"><a href="#">{% if status == 'ACTIVE' %}Campaign{% else %}Description{% endif %}</a></li>
|
||||||
<div class="jsmod-content">
|
<li class="tabs2 {% if activetab == '2' %}active{% endif %}"><a href="#">Comments {% if comment_count > 0 %}({{ comment_count }}){% endif %}</a></li>
|
||||||
In addition to any premiums you're eligible for, you'll automatically be acknowledged in the unglued ebook as follows:
|
<li class="tabs3 {% if activetab == '3' %}active{% endif %}" id="supporters"><a href="#">Ungluers {% if wishers > 0 %}<br />({{ wishers }}){% endif %}</a></li>
|
||||||
<ul class="support menu">
|
<li class="tabs4 {% if activetab == '4' %}active{% endif %}"><a href="#">Rights</a></li>
|
||||||
{% if pledged %}
|
</ul>
|
||||||
{% with pledged.0.amount as amount %}
|
</div>
|
||||||
<li class="first">
|
|
||||||
<a href="{% url pledge_modify work_id %}?preapproval_amount=1">
|
<div id="content-block-content">
|
||||||
<span class="menu-item-price">Any amount</span>{% if amount < 25 %}<div class="you_pledged">Yours!</div>{% endif %}
|
<div id="tabs-1" class="tabs {% if activetab == '1' %}active{% endif %}">
|
||||||
<span class="menu-item-desc">The unglued ebook, free for you to read and share.</span>
|
<div class="tabs-content">
|
||||||
</a>
|
{% if status == 'ACTIVE' or status == 'SUCCESSFUL' %}
|
||||||
</li>
|
<div itemprop="description">{{ work.last_campaign.description|safe }}</div>
|
||||||
<li>
|
{% else %}
|
||||||
<a href="{% url pledge_modify work_id %}?preapproval_amount=25">
|
<h3 class="tabcontent-title">{{work.title}}</h3>
|
||||||
<span class="menu-item-price">$25 and up</span>{% if amount >= 25 and amount < 50 %}<div class="you_pledged">Yours!</div>{% endif %}
|
<p itemprop="description">{{ work.description|safe }}
|
||||||
<span class="menu-item-desc">Your name in the acknowledgements section of the unglued ebook under "Supporters".</span>
|
</p>
|
||||||
</a>
|
{% endif %}
|
||||||
</li>
|
</div>
|
||||||
<li>
|
</div>
|
||||||
<a href="{% url pledge_modify work_id %}?preapproval_amount=50">
|
<div id="tabs-2" class="tabs {% if activetab == '2' %}active{% endif %}">
|
||||||
<span class="menu-item-price">$50 and up</span>{% if amount >= 50 and amount < 100 %}<div class="you_pledged">Yours!</div>{% endif %}
|
<h3>Why unglue this? Have your say.</h3>
|
||||||
<span class="menu-item-desc">Your name & profile link in the acknowledgements section of the unglued ebook under "Benefactors".</span>
|
<div class="tabs-content">
|
||||||
</a>
|
{% render_comment_list for work %}
|
||||||
</li>
|
{% if user.is_authenticated %}
|
||||||
<li class="last">
|
{% render_comment_form for work %}
|
||||||
<a href="{% url pledge_modify work_id %}?preapproval_amount=100">
|
{% else %}
|
||||||
<span class="menu-item-price">$100 and up</span>{% if amount >= 100 %}<div class="you_pledged">Yours!</div>{% endif %}
|
<p>You must be <a href="{% url auth_login %}?next={{ request.path }}">logged in</a> to comment.</p>
|
||||||
<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>
|
{% endif %}
|
||||||
</a>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
{% endwith %}
|
<div id="tabs-3" class="tabs {% if activetab == '3' %}active{% endif %}">
|
||||||
{% else %}
|
<div class="tabs-content">
|
||||||
<li class="first">
|
{% if request.user.is_staff or request.user in work.last_campaign.managers.all %}
|
||||||
<a href="{% url pledge work_id %}?preapproval_amount=1">
|
<form id="contact_form" method="POST" action="#" >
|
||||||
<span class="menu-item-price">Any amount</span>
|
{% csrf_token %}
|
||||||
<span class="menu-item-desc">The unglued ebook, free for you to read and share.</span>
|
<input type="hidden" name="work" value="{{ work.id }}" />
|
||||||
</a>
|
{% for wish in work.wishes.all reversed %}
|
||||||
</li>
|
{% with wish.wishlist.user as supporter %}
|
||||||
<li>
|
<div class="work_supporter_wide">
|
||||||
<a href="{% url pledge work_id %}?preapproval_amount=25">
|
<a href="{% url supporter supporter_username=supporter.username %}">
|
||||||
<span class="menu-item-price">$25 and up</span>
|
<span class="work_supporter_avatar">
|
||||||
<span class="menu-item-desc">Your name in the acknowledgements section of the unglued ebook under "Supporters".</span>
|
{% if supporter.profile.pic_url %}
|
||||||
</a>
|
<img class="user-avatar" src="{{ supporter.profile.pic_url }}" height="50" width="50" alt="Picture of {{ supporter }}" title="{{ supporter }}" />
|
||||||
</li>
|
{% else %}
|
||||||
<li>
|
<img class="user-avatar" src="/static/images/header/avatar.png" height="50" width="50" alt="Generic Ungluer Avatar" title="Ungluer" />
|
||||||
<a href="{% url pledge work_id %}?preapproval_amount=50">
|
{% endif %}
|
||||||
<span class="menu-item-price">$50 and up</span>
|
</span>
|
||||||
<span class="menu-item-desc">Your name & profile link in the acknowledgements section of the unglued ebook under "Benefactors".</span>
|
</a>
|
||||||
</a>
|
<div class="show_supporter_contact_form" >
|
||||||
</li>
|
<img src="/static/images/icons/email.png" title="contact supporter" />
|
||||||
<li class="last">
|
</div>
|
||||||
<a href="{% url pledge work_id %}?preapproval_amount=100">
|
<div class="info_for_managers">
|
||||||
<span class="menu-item-price">$100 and up</span>
|
{{ supporter }}<br />
|
||||||
<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>
|
Wished: {{ wish.created }}<br />
|
||||||
</a>
|
{% if supporter.id in work.last_campaign.supporters %}Pledged!</br />{% endif %}
|
||||||
</li>
|
{% if supporter in work.last_campaign.ungluers.all %}Supported!</br />{% endif %}
|
||||||
{% endif %}
|
</div>
|
||||||
</ul>
|
</div>
|
||||||
|
<div class="supporter_contact_form" ></div>
|
||||||
|
<input class="supporter_contact_form" type="submit" name="msg_{{supporter.id}}" value="Send Message to {{ supporter.username }}" />
|
||||||
|
{% endwith %}
|
||||||
|
{% endfor %}
|
||||||
|
</form>
|
||||||
|
{% else %}
|
||||||
|
{% for wish in work.wishes.all reversed %}
|
||||||
|
{% with wish.wishlist.user as supporter %}
|
||||||
|
<div class="work_supporter_nocomment" itemscope itemtype="http://schema.org/Person">
|
||||||
|
<a itemprop="url" href="{% url supporter supporter_username=supporter.username %}">
|
||||||
|
<span 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 %}
|
||||||
|
</span>
|
||||||
|
<span class="work_supporter_name">{{ supporter }}</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% endwith %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="tabs-4" class="tabs {% if activetab == '4' %}active{% endif %}">
|
||||||
|
<div class="tabs-content">
|
||||||
|
{% 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 (<a href="{{ work.last_campaign.license_url }}">{{ work.last_campaign.license }}</a>) if ungluers can join together to raise ${{ work.last_campaign.target|floatformat:0|intcomma }} by {{ work.last_campaign.deadline }}.
|
||||||
|
You can help!</p>
|
||||||
|
|
||||||
|
<h4>Campaign details: the fine print</h4>
|
||||||
|
{{ work.last_campaign.details|safe }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if status == 'SUCCESSFUL' %}
|
||||||
|
<h3 class="tabcontent-title">A campaign has succeeded 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 (<a href="{{ work.last_campaign.license_url }}">{{ work.last_campaign.license }}</a>) thanks to the efforts of ungluers like you.</p>
|
||||||
|
<h4>Campaign details: the fine print</h4>
|
||||||
|
{{ work.last_campaign.details|safe }}
|
||||||
|
{% endif %}
|
||||||
|
{% if status != 'ACTIVE' and status != 'SUCCESSFUL' %}
|
||||||
|
<h4> Rights Information </h4>
|
||||||
|
{% if claimstatus == 'one_active' %}
|
||||||
|
<p>This work has been claimed by {{ rights_holder_name }}.</p>
|
||||||
|
{% else %}
|
||||||
|
{% if claimstatus == 'disputed' %}
|
||||||
|
<p>Rights claims are pending.</p>
|
||||||
|
{% else %}
|
||||||
|
{% if claimstatus == 'one_pending' %}
|
||||||
|
<p>A claim for this work by {{ rights_holder_name }} is pending.</p>
|
||||||
|
{% else %}
|
||||||
|
{% if request.user.rights_holder.all.count %}
|
||||||
|
Is this work yours? Claim it: <br /><br />
|
||||||
|
|
||||||
|
<form method="GET" action="{% url claim %}">
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ claimform.user }}
|
||||||
|
{{ claimform.work }}
|
||||||
|
{{ claimform.rights_holder }}
|
||||||
|
<input type="submit" name="submit" value="Claim" />
|
||||||
|
</form><br />
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
<p>If you'd like to contact us regarding rights for this work, please email <a href="mailto:rights@gluejar.com">rights@gluejar.com</a>.</p>
|
||||||
|
{% if user.is_staff %}
|
||||||
|
<h4>Related Works</h4>
|
||||||
|
<a href="{% url merge work_id %}">Merge other works into this one</a><br />
|
||||||
|
{% endif %}
|
||||||
|
{% if work.subjects.all.count > 0 %}
|
||||||
|
<h4>Subjects</h4>
|
||||||
|
<ul>
|
||||||
|
{% for subject in work.subjects.all %}
|
||||||
|
<li itemprop="keywords">{{ subject.name }}</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<h4>Editions</h4>
|
||||||
|
{% if user.is_staff %}
|
||||||
|
<div><a href="{% url new_edition work_id edition.id %}">Create a new edition for this work</a><br /><br /></div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if alert %}
|
||||||
|
<div class="alert"><b>Ebook Contribution:</b><br />{{ alert }}</div>
|
||||||
|
{% endif %}
|
||||||
|
{% for edition in editions %}
|
||||||
|
<div class="clearfix">
|
||||||
|
<div class="editions">
|
||||||
|
{% if edition.googlebooks_id %}
|
||||||
|
<div class="image">
|
||||||
|
<img src="{{ edition.cover_image_small }}" title="edition cover" alt="edition cover" />
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="metadata" id="edition_{{edition.id}}">
|
||||||
|
{% if edition.publisher %}
|
||||||
|
Publisher: <a href="{% url bypub_list edition.publisher %}">{{edition.publisher}}</a><br />
|
||||||
|
{% endif %}
|
||||||
|
{% if edition.publication_date %}
|
||||||
|
Published: {{ edition.publication_date }}<br />
|
||||||
|
{% endif %}
|
||||||
|
{% if edition.isbn_13 %}
|
||||||
|
ISBN: <span itemprop="isbn">{{ edition.isbn_13 }}</span><br />
|
||||||
|
{% endif %}
|
||||||
|
{% if edition.oclc %}
|
||||||
|
OCLC: <a href="http://www.worldcat.org/oclc/{{ edition.oclc }}">{{ edition.oclc }}</a><br />
|
||||||
|
{% endif %}
|
||||||
|
{% if user.is_staff %}
|
||||||
|
<a href="{% url new_edition work_id edition.id %}">Edit this edition</a><br />
|
||||||
|
{% endif %}
|
||||||
|
{% if edition.googlebooks_id %}
|
||||||
|
See <a href="https://encrypted.google.com/books?id={{ edition.googlebooks_id }}">this edition on Google Books</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% if edition.ebook_form %}
|
||||||
|
{% ifnotequal status 'ACTIVE' %}
|
||||||
|
{% if edition.hide_details %}
|
||||||
|
<div class="show_more_edition" >
|
||||||
|
more...
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<div {% if edition.hide_details %} class="more_edition" {% endif %}>
|
||||||
|
{% if edition.ebooks.count %}
|
||||||
|
<h5>eBooks for this Edition</h5>
|
||||||
|
{% for ebook in edition.ebooks.all %}
|
||||||
|
<a href="{{ebook.url}}">{{ ebook.format }}</a> {{ebook.rights}} at {{ebook.provider}}<br />
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<h5>Add an eBook for this Edition:</h5>
|
||||||
|
|
||||||
|
<span>If you know that this edition is available as a public domain or Creative Commons ebook, you can enter the link here and "unglue" it. Right now, we're only accepting URLs that point to Internet Archive, Wikisources, Hathitrust, Project Gutenberg, or Google Books.</span>
|
||||||
|
|
||||||
|
<form method="POST" action="#edition_{{edition.id}}">
|
||||||
|
{% csrf_token %}{{ edition.ebook_form.edition.errors }}{{ edition.ebook_form.edition }}{{ edition.ebook_form.user.errors }}{{ edition.ebook_form.user }}{{ edition.ebook_form.provider.errors }}{{ edition.ebook_form.provider }}
|
||||||
|
{{ edition.ebook_form.url.errors }}<span>URL: {{ edition.ebook_form.url }}</span><br />
|
||||||
|
{{ edition.ebook_form.format.errors }}<span>File Format: {{ edition.ebook_form.format }}</span>
|
||||||
|
{{ edition.ebook_form.rights.errors }}<span>License: {{ edition.ebook_form.rights }}</span><br />
|
||||||
|
<input type="submit" name="add_ebook" value="add ebook" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{% endifnotequal %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="js-rightcol">
|
||||||
|
<div class="clearfix">
|
||||||
|
{% if status == 'ACTIVE' %}
|
||||||
|
{% 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 %}
|
||||||
|
{% else %}
|
||||||
|
{% if work.first_ebook %}
|
||||||
|
<div class="btn_support">
|
||||||
|
<a href="{% url download work_id %}" class="hijax"><span>Download</span></a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<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={{request.build_absolute_uri|urlencode:"" }}"><li class="facebook first"><span>Facebook</span></li></a>
|
||||||
|
{% if work.first_ebook %}
|
||||||
|
<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 %}
|
||||||
|
{% ifequal 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>
|
||||||
|
{% endifequal %}
|
||||||
|
{% 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.first_isbn_13}}/" width="152" height="325" frameborder="0"></iframe></textarea></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% if status == 'ACTIVE' %}
|
||||||
|
{% if premiums %}
|
||||||
|
<div class="jsmodule">
|
||||||
|
<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{% else %}{% if forloop.last %}last{% endif %}{% 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>
|
||||||
|
{% ifnotequal premium.limit 0 %}<br /> Only {{ premium.premium_remaining }} remaining! {% endifnotequal %}
|
||||||
|
</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{% else %}{% if forloop.last %}last{% endif %}{% 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>
|
||||||
|
{% ifnotequal premium.limit 0 %}<br /> Only {{ premium.premium_remaining }} remaining! {% endifnotequal %}
|
||||||
|
</a></li>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="jsmodule">
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endwith %}
|
||||||
{% endwith %}
|
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -115,6 +115,14 @@ def safe_get_work(work_id):
|
||||||
except models.WasWork.DoesNotExist:
|
except models.WasWork.DoesNotExist:
|
||||||
raise Http404
|
raise Http404
|
||||||
return work
|
return work
|
||||||
|
|
||||||
|
def cover_width(work):
|
||||||
|
if work.percent_of_goal() < 100:
|
||||||
|
cover_width = 100 - work.percent_of_goal()
|
||||||
|
else:
|
||||||
|
cover_width = 0
|
||||||
|
|
||||||
|
return cover_width
|
||||||
|
|
||||||
def home(request, landing=False):
|
def home(request, landing=False):
|
||||||
if request.user.is_authenticated() and landing == False:
|
if request.user.is_authenticated() and landing == False:
|
||||||
|
@ -160,8 +168,9 @@ def work(request, work_id, action='display'):
|
||||||
pledged = campaign.transactions().filter(user=request.user, status="ACTIVE")
|
pledged = campaign.transactions().filter(user=request.user, status="ACTIVE")
|
||||||
except:
|
except:
|
||||||
pledged = None
|
pledged = None
|
||||||
|
|
||||||
countdown = ""
|
logger.info("pledged: {0}".format(pledged))
|
||||||
|
cover_width_number = 0
|
||||||
|
|
||||||
try:
|
try:
|
||||||
assert not (work.last_campaign_status() == 'ACTIVE' and work.first_ebook())
|
assert not (work.last_campaign_status() == 'ACTIVE' and work.first_ebook())
|
||||||
|
@ -169,25 +178,7 @@ def work(request, work_id, action='display'):
|
||||||
logger.warning("Campaign running for %s when ebooks are already available: why?" % work.title )
|
logger.warning("Campaign running for %s when ebooks are already available: why?" % work.title )
|
||||||
|
|
||||||
if work.last_campaign_status() == 'ACTIVE':
|
if work.last_campaign_status() == 'ACTIVE':
|
||||||
from math import ceil
|
cover_width_number = cover_width(work)
|
||||||
time_remaining = campaign.deadline - now()
|
|
||||||
|
|
||||||
'''
|
|
||||||
we want to round up on all of these; if it's the 3rd and the
|
|
||||||
campaign ends the 8th, users expect to see 5 days remaining,
|
|
||||||
not 4 (as an artifact of 4 days 11 hours or whatever)
|
|
||||||
time_remaining.whatever is an int, so just adding 1 will do
|
|
||||||
that for us (except in the case where .days exists and both other
|
|
||||||
fields are 0, which is unlikely enough I'm not defending against it)
|
|
||||||
'''
|
|
||||||
if time_remaining.days:
|
|
||||||
countdown = "in %s days" % str(time_remaining.days + 1)
|
|
||||||
elif time_remaining.seconds > 3600:
|
|
||||||
countdown = "in %s hours" % str(time_remaining.seconds/3600 + 1)
|
|
||||||
elif time_remaining.seconds > 60:
|
|
||||||
countdown = "in %s minutes" % str(time_remaining.seconds/60 + 1)
|
|
||||||
else:
|
|
||||||
countdown = "right now"
|
|
||||||
|
|
||||||
if action == 'preview':
|
if action == 'preview':
|
||||||
work.last_campaign_status = 'ACTIVE'
|
work.last_campaign_status = 'ACTIVE'
|
||||||
|
@ -250,7 +241,7 @@ def work(request, work_id, action='display'):
|
||||||
'alert': alert,
|
'alert': alert,
|
||||||
'claimstatus': claimstatus,
|
'claimstatus': claimstatus,
|
||||||
'rights_holder_name': rights_holder_name,
|
'rights_holder_name': rights_holder_name,
|
||||||
'countdown': countdown,
|
'cover_width': cover_width_number
|
||||||
})
|
})
|
||||||
|
|
||||||
def new_edition(request, work_id, edition_id, by=None):
|
def new_edition(request, work_id, edition_id, by=None):
|
||||||
|
@ -763,6 +754,7 @@ class PledgeView(FormView):
|
||||||
'faqmenu': 'modify' if self.transaction else 'pledge',
|
'faqmenu': 'modify' if self.transaction else 'pledge',
|
||||||
'transaction': self.transaction,
|
'transaction': self.transaction,
|
||||||
'tid': self.transaction.id if self.transaction else None,
|
'tid': self.transaction.id if self.transaction else None,
|
||||||
|
'cover_width': cover_width(self.work)
|
||||||
})
|
})
|
||||||
|
|
||||||
return context
|
return context
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -58,36 +58,16 @@
|
||||||
float: left;
|
float: left;
|
||||||
width: auto;
|
width: auto;
|
||||||
padding-bottom: 7px;
|
padding-bottom: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.btn_support {
|
|
||||||
float: right;
|
|
||||||
margin-top: 9px;
|
|
||||||
|
|
||||||
input {
|
|
||||||
font-size: @font-size-larger;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.modify input {
|
|
||||||
background:@blue-grey;
|
|
||||||
font-size: @font-size-default;
|
|
||||||
border: double white;
|
|
||||||
line-height: 17px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn_wishlist span {
|
.btn_wishlist span {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.find-book {
|
.find-book label {
|
||||||
margin-top:15px;
|
float:left;
|
||||||
|
line-height:31px;
|
||||||
label {
|
|
||||||
float:left;
|
|
||||||
line-height:31px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.find-link {
|
.find-link {
|
||||||
|
@ -100,13 +80,80 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.pledged-info {
|
.pledged-info {
|
||||||
padding:0;
|
padding:10px 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
&.noborder {
|
||||||
|
border-top: none;
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.campaign-status-info {
|
||||||
|
float: left;
|
||||||
|
width: 50%;
|
||||||
|
margin-top: @font-size-default;
|
||||||
|
|
||||||
|
span {
|
||||||
|
font-size: @font-size-larger;
|
||||||
|
color: @medium-blue;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.pledged-group {
|
.thermometer {
|
||||||
padding:10px 40px 10px 0;
|
.one-border-radius(10px);
|
||||||
float:left;
|
border: solid 2px @blue-grey;
|
||||||
|
width: 291px;
|
||||||
|
padding: 7px;
|
||||||
|
position: relative;
|
||||||
|
overflow: visible;
|
||||||
|
|
||||||
|
/* looks better if we start the gradient a little closer to the success color */
|
||||||
|
@greener-than-alert: #CF6944;
|
||||||
|
|
||||||
|
background: -webkit-gradient(linear, left top, right top, from(@call-to-action), to(@greener-than-alert));
|
||||||
|
background: -webkit-linear-gradient(left, @greener-than-alert, @call-to-action);
|
||||||
|
background: -moz-linear-gradient(left, @greener-than-alert, @call-to-action);
|
||||||
|
background: -ms-linear-gradient(left, @greener-than-alert, @call-to-action);
|
||||||
|
background: -o-linear-gradient(left, @greener-than-alert, @call-to-action);
|
||||||
|
background: linear-gradient(left, @greener-than-alert, @call-to-action);
|
||||||
|
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='@alert', endColorstr='@call-to-action'); /* IE6 & IE7 */
|
||||||
|
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='@alert', endColorstr='@call-to-action')"; /* IE8+ */
|
||||||
|
|
||||||
|
&.successful {
|
||||||
|
border-color: @bright-blue;
|
||||||
|
background: @pale-blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cover {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
.border-radius(0, 10px, 10px, 0);
|
||||||
|
width: 50px;
|
||||||
|
height: 14px;
|
||||||
|
margin-top: -7px;
|
||||||
|
background: lighten(@blue-grey, 10%);
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover span {
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 200;
|
||||||
|
right: 0;
|
||||||
|
top:-7px;
|
||||||
|
font-size: @font-size-header;
|
||||||
|
color: @medium-blue;
|
||||||
|
background: white;
|
||||||
|
border: 2px solid @blue-grey;
|
||||||
|
.one-border-radius(10px);
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.status {
|
.status {
|
||||||
|
|
|
@ -298,6 +298,18 @@ div#content-block-content {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Right column */
|
/* Right column */
|
||||||
|
|
||||||
|
/* Right - add/remove actions below big green button */
|
||||||
|
#js-rightcol {
|
||||||
|
.add-wishlist, .on-wishlist, .create-account {
|
||||||
|
float: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.on-wishlist {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#js-rightcol, #pledge-rightcol {
|
#js-rightcol, #pledge-rightcol {
|
||||||
float:right;
|
float:right;
|
||||||
width:235px;
|
width:235px;
|
||||||
|
@ -347,6 +359,57 @@ div#content-block-content {
|
||||||
padding:10px;
|
padding:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn_support {
|
||||||
|
margin: 10px;
|
||||||
|
width: 215px;
|
||||||
|
|
||||||
|
a, form input, > span {
|
||||||
|
font-size: @font-size-shout;
|
||||||
|
border: 4px solid @blue-grey;
|
||||||
|
.one-border-radius(10px);
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
padding-top: @font-size-header*.75;
|
||||||
|
padding-bottom: @font-size-header*.75;
|
||||||
|
background-color: @call-to-action;
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: white !important;
|
||||||
|
font-weight: bold;
|
||||||
|
padding-left: 0;
|
||||||
|
margin-left: 0 !important;
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.create-account span {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover, form input:hover {
|
||||||
|
background-color: darken(@call-to-action, 7%);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
width: 207px;
|
||||||
|
}
|
||||||
|
|
||||||
|
form input {
|
||||||
|
width: 215px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.modify a, &.modify form input {
|
||||||
|
background-color: @medium-blue-grey;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: darken(@medium-blue-grey, 7%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Right column - support tiers */
|
/* Right column - support tiers */
|
||||||
ul.support li {
|
ul.support li {
|
||||||
border-bottom:1px solid @blue-grey;
|
border-bottom:1px solid @blue-grey;
|
||||||
|
|
|
@ -28,6 +28,11 @@
|
||||||
border-color: @blue-grey;
|
border-color: @blue-grey;
|
||||||
font-size: @font-size-default;
|
font-size: @font-size-default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.alert {
|
||||||
|
border-color: @alert;
|
||||||
|
font-size: @font-size-default;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.preview_content {
|
.preview_content {
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
@font-size-default: 13px;
|
@font-size-default: 13px;
|
||||||
@font-size-larger: 15px;
|
@font-size-larger: 15px;
|
||||||
@font-size-header: 19px;
|
@font-size-header: 19px;
|
||||||
|
@font-size-shout: 22px;
|
||||||
@link-color: #6994a3;
|
@link-color: #6994a3;
|
||||||
|
|
||||||
.header-text {
|
.header-text {
|
||||||
|
|
Loading…
Reference in New Issue