2011-11-19 15:51:51 +00:00
{% extends "base.html" %}
2011-12-31 03:08:04 +00:00
{% load comments %}
2011-12-28 12:27:56 +00:00
{% block title %}— {% if work.last_campaign_status == 'ACTIVE' %}Campaign to unglue {% endif %}{{ work.title }}{% endblock %}
2011-12-07 17:05:31 +00:00
{% block extra_css %}
2011-11-19 15:51:51 +00:00
< link type = "text/css" rel = "stylesheet" href = "/static/css/campaign.css" / >
2011-12-07 17:05:31 +00:00
{% endblock %}
2011-11-19 15:51:51 +00:00
2011-12-07 17:05:31 +00:00
{% block base_js %}
2011-11-28 15:13:21 +00:00
< script type = "text/javascript" src = "/static/js/jquery-1.6.3.min.js" > < / script >
2011-11-19 15:51:51 +00:00
< script type = "text/javascript" src = "/static/js/jquery-ui-1.8.16.custom.min.js" > < / script >
2011-12-07 17:05:31 +00:00
< script type = "text/javascript" src = "/static/js/wishlist.js" > < / script >
2011-11-19 15:51:51 +00:00
< script type = "text/javascript" src = "/static/js/tabs4.js" > < / script >
2011-12-13 19:30:37 +00:00
< script type = "text/javascript" src = "//platform.twitter.com/widgets.js" > < / script >
2011-11-22 19:28:27 +00:00
< script >
2011-12-07 17:05:31 +00:00
jQuery(document).ready(function(){
2011-12-19 07:10:35 +00:00
jQuery('#embed').click(function(){
jQuery('div#widgetcode').toggle();
});
2011-11-22 19:28:27 +00:00
});
< / script >
2011-11-19 15:51:51 +00:00
{% endblock %}
{% block content %}
2011-11-28 16:38:31 +00:00
{% with work.last_campaign_status as status %}
2011-11-19 15:51:51 +00:00
< div id = "main-container" >
< div class = "js-main" >
2011-11-19 16:55:35 +00:00
< div id = "js-leftcol" >
< div class = "jsmodule rounded" >
2012-01-17 21:28:45 +00:00
< div class = "jsmod-content{% if status == 'ACTIVE' %} active{{ work.percent_unglued}}{% endif %}" >
< span >
{% if work.first_epub_url or work.first_pdf_url %}
AVAILABLE!
{% else %}{% if work.last_campaign %}
{% if status == 'ACTIVE' %}
Campaign in Progress: < br / > ${{ work.last_campaign.current_total }}/${{ work.last_campaign.target }}
{% else %}
{% 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 %}
2011-11-19 15:51:51 +00:00
{% else %}
2012-01-17 21:28:45 +00:00
{% if wishers == 1 %}
{{ wishers }} Ungluer is WISHING
{% else %}
{{ wishers }} Ungluers are WISHING
{% endif %}
{% endif %}{% endif %}
< / span >
< span class = "spacer" > < br / > < / span >
2011-11-19 15:51:51 +00:00
< / div >
< / div >
2011-11-19 16:55:35 +00:00
{% include "explore.html" %}
< / div >
2011-11-19 15:51:51 +00:00
< div id = "js-maincol" >
< div class = "js-maincol-inner" >
2011-11-19 16:55:35 +00:00
< 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 >
2011-11-19 15:51:51 +00:00
< / div >
< div class = "book-detail-info" >
2011-12-21 15:59:49 +00:00
< div class = "layout" >
2011-11-19 16:55:35 +00:00
< h2 class = "book-name" > {{ work.title }}< / h2 >
2011-12-21 15:59:49 +00:00
< div >
< div class = "pubinfo" >
< h3 class = "book-author" > {{ work.author }}< / h3 >
2011-12-28 12:27:56 +00:00
< h3 class = "book-year" > {{ pubdate }}< / h3 >
2011-12-21 15:59:49 +00:00
< / div >
2012-01-09 16:50:48 +00:00
{% if status == 'ACTIVE' %}
{% if pledged %}
< div class = "btn_support modify" > < form action = "/stub/modify_pledge" method = "get" > < input type = "submit" value = "Change Pledge" / > < / form > < / div >
{% else %}
< div class = "btn_support" > < form action = "{% url pledge work_id=work.id %}" method = "get" > < input type = "submit" value = "Support" / > < / form > < / div >
{% endif %}
{% endif %}
2011-12-21 15:59:49 +00:00
< / div >
< / div >
2011-11-19 15:51:51 +00:00
< div class = "find-book" >
2011-12-14 21:49:36 +00:00
< label > Find it:< / label >
2011-11-19 15:51:51 +00:00
< div class = "find-link" >
2011-12-08 21:23:31 +00:00
< a class = "find-google" href = "{{ work.googlebooks_url }}" > < img src = "/static/images/supporter_icons/googlebooks_square.png" align = "" title = "Find on Google Books" / > < / a >
2011-12-05 12:37:10 +00:00
< 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 >
2011-12-09 18:03:28 +00:00
{% 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 %}
2011-11-19 15:51:51 +00:00
< / div >
< / div >
< div class = "pledged-info" > < div class = "pledged-group" >
2012-01-17 21:28:45 +00:00
{% if work.first_epub_url or work.first_pdf_url %}
2011-11-21 15:51:50 +00:00
{% if wishers == 1 %}
2012-01-17 21:28:45 +00:00
1 Ungluer is
{% else %}
{{ wishers }} Ungluers are
{% endif %} enjoying this Work
{% else %}{% if status == 'ACTIVE' %}
{% 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
{% else %}
{% if wishers == 1 %}
1 Ungluer has
2011-11-19 16:55:35 +00:00
{% else %}
2011-11-21 15:51:50 +00:00
{{ wishers }} Ungluers have
2012-01-17 21:28:45 +00:00
{% endif %} wished for this Work
{% endif %}{% endif %}
< / div >
< div class = "status" > < img src = "/static/images/images/icon-book-37by25-{% if work.first_epub_url or work.first_pdf_url %}6{%else%}{{ work.percent_unglued }}{%endif%}.png" / > < / div >
< / div >
2011-12-21 15:59:49 +00:00
< div class = "btn_wishlist" >
2012-01-17 21:28:45 +00:00
{% if work.first_epub_url or work.first_pdf_url %}
< span class = "boolist-ebook" >
{% if work.first_epub_url %}
< a href = "{{ work.first_epub_url }}" > EPUB< / a >
{% endif %}
{% if work.first_pdf_url %}
< a href = "{{ work.first_pdf_url }}" > PDF< / a >
{% endif %}
< / span >
{% endif %}
2011-12-19 07:10:35 +00:00
{% if request.user.is_anonymous %}
< div class = "create-account" >
< span title = "{% url work work.id %}" > Login to Add< / span >
< / div >
2012-01-02 15:59:00 +00:00
{% else %}{% if request.user.id in work.last_campaign.supporters %}
< div class = "add-wishlist" >
< span class = "on-wishlist" > Pledged!< / span >
< / div >
2011-12-07 17:05:31 +00:00
{% else %}{% if work in request.user.wishlist.works.all %}
2011-12-28 02:39:40 +00:00
< div class = "remove-wishlist-workpage" >
2011-12-19 07:10:35 +00:00
< span id = "{{ work.id }}" > Remove This< / span >
< / div >
{% else %}
< div class = "add-wishlist" >
2012-01-17 21:28:45 +00:00
< span id = "{{ work.googlebooks_id }}" > Add to {% if work.first_epub_url or work.first_pdf_url %}Enjoying{% else %}Wishlist{% endif %}< / span >
2011-12-19 07:10:35 +00:00
< / div >
2012-01-02 15:59:00 +00:00
{% endif %}{% endif %}{% endif %}
2011-12-07 17:05:31 +00:00
< / div >
2011-11-19 15:51:51 +00:00
< / div >
< / div >
2011-12-31 03:08:04 +00:00
{% get_comment_count for work as comment_count %}
2011-11-19 16:55:35 +00:00
< div class = "content-block-heading" id = "tabs" >
2011-11-19 15:51:51 +00:00
< ul class = "tabs" >
2011-12-31 03:08:04 +00:00
< li class = "tabs1 active" > < a href = "#" > {% if status == 'ACTIVE' %}Campaign{% else %}Description{% endif %}< / a > < / li >
< li class = "tabs2" > < a href = "#" > Comments ({{comment_count}})< / a > < / li >
2011-11-19 15:51:51 +00:00
< li class = "tabs3" > < a href = "#" > Supporters< / a > < / li >
< li class = "tabs4" > < a href = "#" > Details< / a > < / li >
< / ul >
2011-11-19 16:55:35 +00:00
2011-11-19 15:51:51 +00:00
< / div >
< div class = "content-block-content" >
2011-11-19 16:55:35 +00:00
< div id = "tabs-1" class = "tabs" >
2011-11-19 15:51:51 +00:00
< div class = "tabs-content" >
2011-11-20 03:54:59 +00:00
< p > < br >
2011-11-23 22:28:18 +00:00
{% 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 %}
2012-01-02 18:39:58 +00:00
, 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 }}.
2011-11-23 22:28:18 +00:00
You can help!< / p >
2011-11-24 00:28:30 +00:00
{{ work.last_campaign.description|safe }}
2011-11-23 22:28:18 +00:00
{% else %}
< h3 class = "tabcontent-title" > {{work.title}}< / h3 >
{{ work.longest_description|safe }}
{% endif %}
< / p >
2011-11-20 03:54:59 +00:00
< / div >
< / div >
< div id = "tabs-2" class = "tabs" >
< div class = "tabs-content" >
2011-12-31 03:08:04 +00:00
{% render_comment_list for work %}
{% if user.is_authenticated %}{% render_comment_form for work %}{% endif %}
2011-11-20 03:54:59 +00:00
< / div >
< / div >
< div id = "tabs-3" class = "tabs" >
< div class = "tabs-content" >
2011-11-21 18:06:23 +00:00
{% for supporter in work.wished_by %}
2012-01-02 18:10:20 +00:00
< div class = "work_supporter_nocomment" >
2011-12-19 07:10:35 +00:00
< 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 %}
2011-11-21 18:06:23 +00:00
< / div >
2011-12-19 07:10:35 +00:00
< div class = "work_supporter_name" > {{supporter }}< / div >
< / a >
< / div >
2011-11-21 18:06:23 +00:00
{% endfor %}
2011-11-20 03:54:59 +00:00
< / div >
< / div >
< div id = "tabs-4" class = "tabs" >
< div class = "tabs-content" >
2011-11-23 22:28:18 +00:00
{% if status == 'ACTIVE' %}
2011-12-08 21:23:31 +00:00
< h4 > Last campaign details< / h4 >
2011-11-24 00:28:30 +00:00
{{ work.last_campaign.details|safe }}
2011-11-23 22:28:18 +00:00
{% endif %}
2011-12-08 21:23:31 +00:00
2011-11-19 16:55:35 +00:00
< h4 > Rights Information < / h4 >
2012-01-15 21:50:29 +00:00
{% if work.claim.count %}
< 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 >
{% if request.user.rights_holder.all.count %}
Should someone else should be authorized to run campaigns for this work? Select a rights holder:< br / > < br / >
< 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 > < br / >
{% endif %}
Need to talk to us about claim status? Please email < a href = "mailto:rights@gluejar.com" > rights@gluejar.com< / a > .
{% 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" id = "submit" >
< / form > < br / >
{% else %}
Are you the rights holder for this work? Please email < a href = "mailto:rights@gluejar.com" > rights@gluejar.com< / a > .
{% endif %}
2011-11-26 22:09:33 +00:00
{% endif %}
2011-12-19 07:20:24 +00:00
{% if work.subjects.all.count > 0 %}
< h4 > Subjects< / h4 >
< ul >
{% for subject in work.subjects.all %}
< li > {{ subject.name }}< / li >
{% endfor %}
< / ul >
{% endif %}
2011-12-09 21:17:10 +00:00
< h4 > Editions< / h4 >
{% for edition in editions %}
2011-12-19 07:10:35 +00:00
< 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 %}
2011-11-19 15:51:51 +00:00
< / div >
< / div >
< / div >
2011-11-19 16:55:35 +00:00
< / div >
2011-11-19 15:51:51 +00:00
< / div >
< / div >
< div id = "js-rightcol" >
< div class = "js-rightcol-pad rounded" >
2011-11-19 16:55:35 +00:00
< div class = "jsmodule" >
< h3 class = "jsmod-title" > < span > Share< / span > < / h3 >
2011-11-19 15:51:51 +00:00
< div class = "jsmod-content" >
< ul class = "social menu" >
2012-01-02 16:10:33 +00:00
< a href = "https://www.facebook.com/sharer.php?u={{request.build_absolute_uri|urlencode:" " } } " > < li class = "facebook first" > < span > Facebook< / span > < / li > < / a >
< a href = "https://twitter.com/intent/tweet?url={{request.build_absolute_uri|urlencode:" " } } & text = I'm%20ungluing%20{{ work . title | urlencode } } % 20at % 20 % 40unglueit " > < li class = "twitter" > < span > Twitter< / span > < / li > < / a >
2012-01-02 14:39:11 +00:00
{% if request.user.is_authenticated %}< a href = "{% url emailshare %}?next={{request.build_absolute_uri|urlencode:" " } } " > < li class = "email" > < span > Email< / span > < / li > < / a > {% endif %}
2011-12-19 17:22:00 +00:00
< a href = "#" id = "embed" > < li class = "embed" > < span > Embed< / span > < / li > < / a >
2012-01-02 17:59:26 +00:00
< 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.editions.all.0.isbn_13}}/" width="152" height="325" frameborder="0"> < /iframe> < / textarea > < / div >
2011-11-19 15:51:51 +00:00
< / ul >
< / div >
< / div >
2011-11-23 22:28:18 +00:00
{% if status == 'ACTIVE' %}
2011-11-19 15:51:51 +00:00
< div class = "jsmodule" >
2011-11-19 16:55:35 +00:00
< h3 class = "jsmod-title" > < span > Support< / span > < / h3 >
2011-11-19 15:51:51 +00:00
< div class = "jsmod-content" >
< ul class = "support menu" >
2011-11-19 16:55:35 +00:00
{% for premium in premiums %}
2011-11-19 15:51:51 +00:00
< 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}}" >
2011-11-19 16:55:35 +00:00
< span class = "menu-item-price" > ${{ premium.amount }}< / span >
2011-11-19 15:51:51 +00:00
< 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 >
2011-11-23 22:28:18 +00:00
{% endwith %}
2011-11-19 15:51:51 +00:00
{% endblock %}