Merge branch 'master' into push

# Conflicts:
#	settings/common.py
pull/1/head
eric 2016-05-20 16:44:13 -04:00
commit bf220c5c6f
211 changed files with 585 additions and 397 deletions

View File

@ -1,5 +1,4 @@
{% extends 'basedocumentation.html' %}
{% load url from future %}
{% block title %}API Help{% endblock %}

View File

@ -1,4 +1,4 @@
{% load url from future %}<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<title>editions</title>

View File

@ -1,4 +1,4 @@
{% load url from future %}
<!DOCTYPE html>
<html>
<head>

View File

@ -3,6 +3,7 @@ external library imports
"""
import json
import logging
import re
import requests
from datetime import timedelta
@ -887,13 +888,14 @@ def load_from_yaml(yaml_url, test_mode=False):
# use GitHub API to compute the ebooks in release until we're in test mode
if test_mode:
# not using ebook_name in this code
ebooks_in_release = [('epub', None)]
ebooks_in_release = [('epub', 'book.epub')]
else:
ebooks_in_release = ebooks_in_github_release(repo_owner, repo_name, repo_tag, token=token)
for (ebook_format, ebook_name) in ebooks_in_release:
(book_name_prefix, _ ) = re.search(r'(.*)\.([^\.]*)$', ebook_name).groups()
(ebook, created)= models.Ebook.objects.get_or_create(
url=git_download_from_yaml_url(yaml_url,metadata._version,edition_name=metadata._edition,
url=git_download_from_yaml_url(yaml_url,metadata._version,edition_name=book_name_prefix,
format_= ebook_format),
provider='Github',
rights = metadata.rights if metadata.rights in cc.LICENSE_LIST_ALL else None,

View File

@ -16,6 +16,7 @@ INFO_CC = (
INFO_FREE = INFO_CC + (
('GFDL', 'gdfl', 'GNU Free Documentation License', 'http://www.gnu.org/licenses/fdl-1.3-standalone.html', 'GNU Free Documentation License'),
('LAL', 'lal', 'Licence Art Libre', 'http://artlibre.org/licence/lal/', 'Licence Art Libre'),
('OSI', 'opensource', 'OSI Approved License', 'https://opensource.org/licenses', 'OSI Approved License'),
)
INFO_PD = (
('PD-US', 'pd-us', 'Public Domain, US', 'http://creativecommons.org/about/pdm', 'Public Domain, US'),
@ -73,6 +74,8 @@ class CCLicense():
return '/static/images/gfdl.png'
elif license == 'LAL':
return '/static/images/lal.png'
elif license == 'OSI':
return '/static/images/opensource.png'
else:
return ''
@ -97,6 +100,8 @@ def description(license):
return 'The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.'
elif license == 'LAL':
return 'Avec la Licence Art Libre, l\'autorisation est donnée de copier, de diffuser et de transformer librement les œuvres dans le respect des droits de l\'auteur.'
elif license == 'OSI':
return 'Open source licenses are licenses that comply with the Open Source Definition — in brief, they allow software to be freely used, modified, and shared. To be approved by the Open Source Initiative (also known as the OSI), a license must go through the Open Source Initiative\'s license review process.'
else:
return ''

View File

@ -0,0 +1,70 @@
from __future__ import print_function
from itertools import islice
from urlparse import urlparse
import sys
import requests
from django.db.models import Q
from django.core.management.base import BaseCommand
from regluit.core.models import Ebook
from regluit.core.bookloader import load_from_yaml
def repo_name_from_url(url):
u = urlparse(url)
return u.path.split("/")[2]
def yaml_url(repo_name):
return "https://github.com/GITenberg/{}/raw/master/metadata.yaml".format(repo_name)
def calc_problem_ebooks():
results = []
non302statuscode_count = 0
for (i, ebook) in enumerate(islice(Ebook.objects.filter(
Q(url__startswith="https://github.com/GITenberg/") &
Q(active = True)),
None)):
status_code = requests.head(ebook.url).status_code
if status_code <> 302:
non302statuscode_count += 1
print ("\r", i, ebook.url, status_code, non302statuscode_count, end="")
sys.stdout.flush()
results.append(
{'id':ebook.id,
'url':ebook.url,
'status_code': requests.head(ebook.url).status_code
}
)
return [result for result in results if result['status_code'] <> 302]
class Command(BaseCommand):
help = "deactivate GITenberg ebooks that have invalid URLs and reload the yaml for the corresponding repos"
def handle(self, **options):
problem_ebooks = calc_problem_ebooks()
print ("number of problem ebooks", len(problem_ebooks))
# deactivate problem ebooks
for (i, result) in enumerate(problem_ebooks):
ebook = Ebook.objects.get(id=result['id'])
print ("\r", "deactivating ", i, ebook.id, end="")
ebook.deactivate()
# reload repos
for (i, repo_name) in enumerate(set([repo_name_from_url(ebook['url']) for ebook in problem_ebooks])):
print ("reloading ", repo_name)
load_from_yaml(yaml_url(repo_name))

View File

@ -2141,10 +2141,16 @@ class Ebook(models.Model):
def set_free_flag(sender, instance, created, **kwargs):
if created:
if not instance.edition.work.is_free:
if not instance.edition.work.is_free and instance.active:
instance.edition.work.is_free = True
instance.edition.work.save()
elif not instance.active and instance.edition.work.is_free==True and instance.edition.work.ebooks().count()==0:
instance.edition.work.is_free = False
instance.edition.work.save()
elif instance.active and instance.edition.work.is_free==False and instance.edition.work.ebooks().count()>0:
instance.edition.work.is_free = True
instance.edition.work.save()
post_save.connect(set_free_flag,sender=Ebook)
def reset_free_flag(sender, instance, **kwargs):

View File

@ -500,11 +500,12 @@ class CampaignTests(TestCase):
def test_b2u(self):
w = Work()
w.save()
this_year = datetime.now().year
c = Campaign(
target=D('12000.00'),
deadline=datetime(2013, 1, 1),
deadline=datetime(this_year, 1, 1),
work=w, type=2,
cc_date_initial=datetime(2113, 1, 1),
cc_date_initial=datetime(this_year + 100, 1, 1),
)
self.assertTrue(c.set_dollar_per_day()<0.34)
self.assertTrue(c.dollar_per_day>0.31)
@ -855,7 +856,7 @@ class DownloadPageTest(TestCase):
anon_client = Client()
response = anon_client.get("/work/%s/download/" % w.id, follow=True)
self.assertContains(response, "/download_ebook/%s/"% eb1.id, count=10)
self.assertContains(response, "/download_ebook/%s/"% eb1.id, count=11)
self.assertContains(response, "/download_ebook/%s/"% eb2.id, count=5)
self.assertTrue(eb1.edition.work.is_free)
eb1.delete()

View File

@ -0,0 +1,33 @@
[
{
"fields": {
"name": "24 Symbols",
"host":"ftp.24symbols.net",
"user":"ebookfoundation",
"pw":"GU0GMNbcjmqILZ9ssdrG",
"protocol":"secure"
},
"model": "distro.target",
"pk": 1
},
{
"fields": {
"name": "Bitlit",
"host":"publishers.bitlit.ca",
"user":"unglueit",
"pw":"9pkgaCZc"
},
"model": "distro.target",
"pk": 2
},
{
"fields": {
"name": "Odilo",
"host":"ftp.odilo.us",
"user":"FreeEbookFundation",
"pw":"Xlh62lCmhd7l"
},
"model": "distro.target",
"pk": 3
}
]

View File

@ -78,6 +78,8 @@ CREATOR_RELATIONS = (
('edt', 'Editor'),
('trl', 'Translator'),
('ill', 'Illustrator'),
('dsr', 'Designer'),
('aui', 'Author of Introduction'),
)
bisac_headings = BisacHeading.objects.all()

View File

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load url from future %}
{% block content %}
<div class="js-main">
<h1>Oops! This page does not exist.</h1>

View File

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load url from future %}
{% block content %}
<div class="js-main">
<h1>Whoops, an error occurred.</h1>

View File

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load url from future %}
{% block news %}
<div class="launch_top">
We estimate that we will be back online at 2:00 pm EDT on Saturday, March 30, 2013.

View File

@ -11,7 +11,7 @@
<li>Books that are out of print, not available as ebooks, or otherwise hard to enjoy will be available for everyone to read, share, learn from, and love -- freely and legally.</li>
</ul>
<p>You can learn more about us in our <a href="{{ faqurl }}">FAQs</a> and our <a href="{{ pressurl }}">press page</a>.
<p>You can learn more about us in our <a href="{% url 'faq' %}">FAQs</a> and our <a href="{% url 'press' %}">press page</a>.
<h3>Team</h3>
<div class="pressimages">
<div class="outer">

View File

@ -1,5 +1,5 @@
{% load url from future %}
<div class="right_border"><a href="{{ faqurl }}">Read the FAQ</a></div>
<div class="right_border"><a href="{% url 'faq' %}">Read the FAQ</a></div>
<div class="right_border"><a href="{% url 'faq_location' 'rightsholders' %}">Read the FAQ for authors and publishers</a></div>
<div class="right_border"><a href="{% url 'press' %}">Our press coverage</a></div>
{% if not user.is_authenticated %}

View File

@ -1,5 +1,5 @@
{% extends 'basedocumentation.html' %}
{% load url from future %}
{% block title %} for Smashwords Authors{% endblock %}
{% block doccontent %}
<h1>Smashwords + Unglue.it</h1>

View File

@ -1,17 +1,4 @@
{% load url from future %}<!DOCTYPE html>
{# raw url references raise test errors in tests for django registration; this is a workaround #}
{% url 'privacy' as privacyurl %}
{% url 'terms' as termsurl %}
{% url 'manage_account' as editurl %}
{% url 'rightsholders' as rhtoolsurl %}
{% url 'faq' as faqurl %}
{% url 'about' as abouturl %}
{% url 'press' as pressurl %}
{% url 'rh_admin' as adminurl %}
{% url 'landing' as landingurl %}
{% url 'new_edition' '' '' as editionurl %}
{% url 'libraries' as librariesurl %}
{% url 'about_specific' 'main' as aboutmainurl %}
<!DOCTYPE html>
{% load truncatechars %}
<html>
@ -59,7 +46,7 @@
<div id="js-header">
<div class="js-main">
<div class="js-logo">
<a href="{{ landingurl }}"><img src="/static/images/logo.png" alt="unglue.it" title="unglue.it" /></a>
<a href="{% url 'landing' %}"><img src="/static/images/logo.png" alt="unglue.it" title="unglue.it" /></a>
</div>
{% block search_box %}
{% if not suppress_search_box %}
@ -102,7 +89,7 @@
<li><a class="notbutton" href="{% url 'supporter' user %}#edit" id="profile_edit"><span>Profile Settings</span></a></li>
<li><a class="notbutton" href="{% url 'manage_account' %}"><span>Account &amp; Pledges</span></a></li>
{% if user.rights_holder.all %}
<li><a class="notbutton" href="{{ rhtoolsurl }}">Rights Holder Tools</a></li>
<li><a class="notbutton" href="{% url 'rightsholders' %}">Rights Holder Tools</a></li>
{% endif %}
<li><a class="notbutton" href="{% url 'auth_logout' %}"><span>Sign Out</span></a></li>
</ul>
@ -134,10 +121,10 @@
<div class="column">
<span>About Unglue.it</span>
<ul>
<li><a href="{{ aboutmainurl }}" class="hijax">Concept</a></li>
<li><a href="{{ abouturl }}">Team</a></li>
<li><a href="{% url 'about_specific' 'main' %}" class="hijax">Concept</a></li>
<li><a href="{% url 'about' %}">Team</a></li>
<li><a href="https://blog.unglue.it">Blog</a></li>
<li><a href="{{ pressurl }}">Press</a></li>
<li><a href="{% url 'press' %}">Press</a></li>
<li><a href="http://eepurl.com/fKLfI">Newsletter</a></li>
</ul>
</div>
@ -145,28 +132,28 @@
<span>Your account</span>
<ul>
{% if user.is_authenticated %}
<li><a href="{{ editurl }}">Account Settings</a></li>
<li><a href="{% url 'manage_account' %}">Account Settings</a></li>
{% endif %}
<li><a href="{{ rhtoolsurl }}">Rights Holder Tools</a></li>
<li><a href="{{ privacyurl }}">Privacy</a></li>
<li><a href="{{ termsurl }}">Terms of Use</a></li>
<li><a href="{% url 'rightsholders' %}">Rights Holder Tools</a></li>
<li><a href="{% url 'privacy' %}">Privacy</a></li>
<li><a href="{% url 'terms' %}">Terms of Use</a></li>
{% for library in user.libraries.all %}
<li><a href="{% url 'library_admin' library.id %}">{{ library }} Administration</a></li>
{% endfor %}
{% if user.is_staff %}
<li><a href="{{ adminurl }}">Unglue.it Administration</a></li>
<li><a href="{{ editionurl }}">Create New Editions</a></li>
<li><a href="{% url 'rh_admin' %}">Unglue.it Administration</a></li>
<li><a href="{% url 'new_edition' '' '' %}">Create New Editions</a></li>
{% endif %}
</ul>
</div>
<div class="column">
<span>Help</span>
<ul>
<li><a href="{{ faqurl }}">General FAQ</a></li>
<li><a href="{% url 'faq' %}">General FAQ</a></li>
<li><a href="{% url 'faq_location' 'rightsholders' %}">Author/Publisher FAQ</a></li>
<li><a href="{% url 'api_help' %}">API</a></li>
<li><a href="{% url 'feedback' %}?page={{request.build_absolute_uri|urlencode:""}}">Support</a>
<li><a href="{{ librariesurl }}">Unglue.it &hearts; Libraries</a>
<li><a href="{% url 'libraries' %}">Unglue.it &hearts; Libraries</a>
</ul>
</div>
<div class="column">

View File

@ -1,4 +1,4 @@
{% load url from future %}
{% load humanize %}
{% load purchased %}
{% load lib_acqs %}
@ -154,9 +154,9 @@
{% if status == 'INITIALIZED' %}
<p>Campaign coming soon!</p>
{% else %}{% if status == 'SUSPENDED' %}
<p>This campaign has been suspended.</p><br /><p>See the <a href="{{faqurl}}">FAQ</a> for details.</p>
<p>This campaign has been suspended.</p><br /><p>See the <a href="{% url 'faq' %}">FAQ</a> for details.</p>
{% else %}{% if status == 'WITHDRAWN' %}
<p>This campaign has been withdrawn.</p><br /><p>See the <a href="{{faqurl}}">FAQ</a> for details.</p>
<p>This campaign has been withdrawn.</p><br /><p>See the <a href="{% url 'faq' %}">FAQ</a> for details.</p>
{% else %}{% if status == 'UNSUCCESSFUL' %}
<p>{{ deadline }}</p>
<p>Watch for a new campaign.</p>

View File

@ -1,4 +1,4 @@
{% load url from future %}{% comment %}
{% comment %}
status of book vis-a-vis user's wishlist.
Non-logged-in users should see login to add option.
Logged-in users, book on wishlist:

View File

@ -1,3 +1,3 @@
{% load url from future %}<p style="line-height: 15px; ">
<p style="line-height: 15px; ">
<i>{{ work.title }}</i>, by {{ work.authors_short }}, <a href="https://unglue.it{% url 'work' work.id %}">https://unglue.it{% url 'work' work.id %}</a>
</p>

View File

@ -1,5 +1,5 @@
{% extends 'work_list.html' %}
{% load url from future %}
{% load endless %}
{% load lang_utils %}

View File

@ -1,5 +1,5 @@
{% extends 'base.html' %}
{% load url from future %}
{% load endless %}
{% load lang_utils %}

View File

@ -1,4 +1,4 @@
{% load url from future %}{% load humanize %}
{% load humanize %}
{% if request.user.profile.account %}
<div id="authorize" {% if nonprofit.is_on %}class="off clearfix"{% else %}class="clearfix"{% endif %}>
<h3>{{ action|capfirst }} by Credit Card</h3>

View File

@ -1,5 +1,5 @@
{% extends 'base.html' %}
{% load url from future %}
{% load endless %}
{% load lang_utils %}

View File

@ -1,5 +1,5 @@
{% extends 'basedocumentation.html' %}
{% load url from future %}
{% block title %}Claim Form{% endblock %}
{% block doccontent %}

View File

@ -1,3 +1,3 @@
{% load url from future %} <h3> Terms and Conditions for Claiming Works </h3>
<h3> Terms and Conditions for Claiming Works </h3>
<p>By claiming this work, you agree that your claim is governed by a Platform Services Agreement in effect between you (or an entity that you act as agent for) and the Free Ebook Foundation, Inc., the operator of the Unglue.it website, and by the <a href="{% url 'terms' %}">unglue.it Website Terms </a>.</p>

View File

@ -1,5 +1,5 @@
{% extends 'base.html' %}
{% load url from future %}
{% block title %} Comments {% endblock %}
{% block extra_css %}
<link type="text/css" rel="stylesheet" href="/static/css/supporter_layout.css" />

View File

@ -1,4 +1,4 @@
{% load url from future %}<div id="comments">
<div id="comments">
{% for comment in comment_list reversed %}
<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 %}">

View File

@ -1,5 +1,5 @@
{% extends 'comments/base.html' %}
{% load url from future %}
{% load i18n %}
{% block title %}{% trans "Preview your comment" %}{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends 'base.html' %}
{% load url from future %}
{% load humanize %}
{% with work.title as title %}
{% block title %}
@ -237,11 +237,18 @@ $j(document).ready(function() {
<li>Download the <a href="{{ formats.epub }}">epub file</a>.</li>
<li>You will be given the option of opening the file in iBooks.</li>
</ul>
<p class="ebook_download logo"><img src="/static/images/marvin_logo.jpg" alt="iBooks Logo" />Marvin is a great way to read ebooks. </p>
<p class="ebook_download logo"><img src="/static/images/marvin_logo.jpg" alt="Marvin Logo" />Marvin is a great way to read ebooks. </p>
<ul>
<li><a href="https://itunes.apple.com/us/app/marvin-ebook-reader-for-epub/id667361209?ls=1&mt=8">Install Marvin</a> from the App Store.</li>
<li>Click the "Load to Marvin" button above.</li>
</ul>
<p class="ebook_download logo"><img src="/static/images/aldiko_logo.png" alt="Aldiko Logo" />So is Aldiko.</p>
<ul>
<li><a href="http://www.aldiko.com/">Download the free Aldiko app.</a></li>
<li>Download the <a href="{{ formats.epub }}">epub file</a>.</li>
<li>When the download is complete, tap it in your notifications menu. It will be added to Aldiko, ready to read next time you open the app.</li>
</ul>
{% else %}{% if formats.pdf %}
<p>
@ -280,7 +287,7 @@ $j(document).ready(function() {
<p class="ebook_download logo"><img src="/static/images/aldiko_logo.png" alt="Aldiko Logo" />Aldiko</p>
<ul>
<li><a href="http://www.aldiko.com/download.html">Download the free Aldiko app.</a></li>
<li><a href="http://www.aldiko.com/">Download the free Aldiko app.</a></li>
<li>Download the <a href="{{ formats.epub }}">epub file</a>.</li>
<li>When the download is complete, tap it in your notifications menu. It will be added to Aldiko, ready to read next time you open the app.</li>
</ul>
@ -291,7 +298,7 @@ $j(document).ready(function() {
<p class="ebook_download logo"><img src="/static/images/aldiko_logo.png" alt="Aldiko Logo" />Aldiko</p>
<ul>
<li><a href="http://www.aldiko.com/download.html">Download the free Aldiko app.</a></li>
<li><a href="http://www.aldiko.com/">Download the free Aldiko app.</a></li>
<li>Download the <a href="{{ formats.pdf }}">pdf file</a>.</li>
<li>When the download is complete, tap it in your notifications menu. It will be added to Aldiko, ready to read next time you open the app.</li>
</ul>

View File

@ -1,4 +1,4 @@
{% load url from future %}<div class="clearfix">
<div class="clearfix">
<div class="editions">
{% if edition.googlebooks_id %}
<div class="image">

View File

@ -1,4 +1,4 @@
{% load url from future %}<div class="clearfix">
<div class="clearfix">
{% if edition.ebook_form %}
{% if show_ebook_form %}
<div id="add_ebook">

View File

@ -1,5 +1,5 @@
{% extends 'basedocumentation.html' %}
{% load url from future %}
{% block doccontent %}
<div class="work_campaigns">

View File

@ -1,5 +1,5 @@
{% extends 'registration/registration_base.html' %}
{% load url from future %}

View File

@ -1,4 +1,4 @@
{% load url from future %}I just {{ action }} one of my favorite books, "{{ work.title }}", on Unglue.it:
I just {{ action }} one of my favorite books, "{{ work.title }}", on Unglue.it:
https://{{site}}{% url 'work' work.id %}.
{% ifequal work.last_campaign.type 1 %}If enough of us pledge to unglue this book, the creator will be paid and the ebook will become free to everyone on earth.{% endifequal %}{% ifequal work.last_campaign.type 2 %}If enough of us buy this book, the ebook will become free to everyone on earth.{% endifequal %}{% ifequal work.last_campaign.type 3 %}Creators of free ebooks need support if we want there to be more of them.{% endifequal %}

View File

@ -1,4 +1,4 @@
{% load url from future %}Help me unglue one of my favorite books, "{{ work.title }}" on Unglue.it:
Help me unglue one of my favorite books, "{{ work.title }}" on Unglue.it:
https://{{site}}{% url 'work' work.id %}
{% ifequal work.last_campaign.type 1 %}If enough of us pledge to unglue this book, the creator will be paid and the ebook will become free to everyone on earth.{% endifequal %}{% ifequal work.last_campaign.type 2 %}If enough of us buy this book, the ebook will become free to everyone on earth.{% endifequal %}{% ifequal work.last_campaign.type 3 %}Creators of free ebooks need support if we want there to be more of them.{% endifequal %}

View File

@ -1,3 +1,3 @@
{% load url from future %}Thanks to Unglue.it, I'm reading a free, non-DRM ebook of {{ work.title }}. I think you'd enjoy reading it too. You can download it at https://{{site}}{% url 'download' work.id %} You can also copy it, put it on your favorite ereader, and shift it to different formats, freely and legally.
Thanks to Unglue.it, I'm reading a free, non-DRM ebook of {{ work.title }}. I think you'd enjoy reading it too. You can download it at https://{{site}}{% url 'download' work.id %} You can also copy it, put it on your favorite ereader, and shift it to different formats, freely and legally.
Unglue.it helps book lovers pay creators to make their ebooks free to everyone on earth. You can help too at https://unglue.it/ .

View File

@ -1,4 +1,4 @@
{% load url from future %}{% if work.is_free %}"{{ work.title }}" is a free ebook on Unglue.it:
{% if work.is_free %}"{{ work.title }}" is a free ebook on Unglue.it:
https://{{site}}{% url 'work' work.id %}
You can download it and read it on your favorite device.

View File

@ -1,4 +1,4 @@
{% load url from future %}{% load truncatechars %}
{% load truncatechars %}
{% load lang_utils %}
<div class="jsmodule">
<h3 class="jsmod-title"><span>Explore</span></h3>

View File

@ -1,5 +1,5 @@
{% extends 'base.html' %}
{% load url from future %}
{% load endless %}
{% load lang_utils %}

View File

@ -1,5 +1,5 @@
{% extends 'basedocumentation.html' %}
{% load url from future %}
{% block title %} FAQ {% endblock %}
{% block topsection %}
{% endblock %}

View File

@ -1,4 +1,4 @@
{% load url from future %}{% load humanize %}<a class="more_featured_books short" href="{% url 'campaign_list' 'b2u' %}" title="Buy to Unglue list"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
{% load humanize %}<a class="more_featured_books short" href="{% url 'campaign_list' 'b2u' %}" title="Buy to Unglue list"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
<h4> Buy-to-Unglue Campaigns</h4>
<div class="faq_tldr">
Read the ebook now, help to make if available to all in the future. The eBook wants to be free!

View File

@ -1,4 +1,4 @@
{% load url from future %} <div class="jsmodule">
<div class="jsmodule">
<h3 class="jsmod-title"><span>Pledging FAQs</span></h3>
<div class="jsmod-content">
<ul class="menu level1">

View File

@ -1,4 +1,4 @@
{% load url from future %} <div class="jsmodule">
<div class="jsmodule">
<h3 class="jsmod-title"><span>Buying FAQs</span></h3>
<div class="jsmod-content">
<ul class="menu level1">

View File

@ -1,4 +1,4 @@
{% load url from future %}{% load humanize %}<a class="more_featured_books short" href="{% url 'campaign_list' 't4u' %}" title="Thanks for ungluing list"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
{% load humanize %}<a class="more_featured_books short" href="{% url 'campaign_list' 't4u' %}" title="Thanks for ungluing list"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
<h4> Thanks-for-Ungluing Campaigns:</h4>
<div class="faq_tldr">
Reward the courageous creators who've made their ebooks free to all.

View File

@ -1,4 +1,4 @@
{% load url from future %} <div class="jsmodule">
<div class="jsmodule">
<h3 class="jsmod-title"><span>FAQs</span></h3>
<div class="jsmod-content">
<ul class="menu level1">

View File

@ -1,5 +1,5 @@
{% extends "basedocumentation.html" %}
{% load url from future %}
{% block title %}Feedback{% endblock %}
{% block doccontent %}

View File

@ -1,5 +1,5 @@
{% extends 'basedocumentation.html' %}
{% load url from future %}
{% block title %}Ungluers supporting the {{ campaign }}{% endblock %}
{% block extra_extra_head %}
{{ block.super }}

View File

@ -1,5 +1,5 @@
{% extends 'basedocumentation.html' %}
{% load url from future %}
{% load humanize %}
{% block title %}Gifts{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends 'basepledge.html' %}
{% load url from future %}
{% load humanize %}
{% block title %}You Have Gift Credits{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends 'registration/registration_base.html' %}
{% load url from future %}
{% block title %}Duplicate Gift Code{% endblock %}
{% block doccontent %}
<div><h2>Re-Gifting</h2>

View File

@ -1,5 +1,5 @@
{% extends 'registration/registration_base.html' %}
{% load url from future %}
{% block title %}Invalid Gift Code{% endblock %}
{% block doccontent %}
<div><h2>Invalid Gift Code</h2>

View File

@ -1,5 +1,5 @@
{% extends "registration/registration_base.html" %}
{% load url from future %}
{% block title %}Log in to Unglue.it{% endblock %}
{% block doccontent %}
<div id="lightbox_content">

View File

@ -1,5 +1,5 @@
{% extends 'basepledge.html' %}
{% load url from future %}
{% load humanize %}
{% block title %}Please Log in as...{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends 'registration/registration_base.html' %}
{% load url from future %}
{% block title %}Welcome to Unglue.It{% endblock %}
{% block doccontent %}

View File

@ -1,5 +1,5 @@
{% extends 'base.html' %}
{% load url from future %}
{% block extra_head %}
<script type="application/x-javascript">

View File

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load url from future %}
{% load truncatechars %}
{% block title %}&#151; Support Free eBooks{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends 'basedocumentation.html' %}
{% load url from future %}
{% block title %}Join {{ library }}{% endblock %}
{% block doccontent %}
<h2> Select your library </h2>

View File

@ -1,5 +1,5 @@
{% extends 'email_change/base.html' %}
{% load url from future %}
{% with request.user.profile.kindle_email as kindle_email %}
{% block title %}Kindle email change successful{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends 'email_change/base.html' %}
{% load url from future %}
{% block title %}Add or change your Kindle email{% endblock %}

View File

@ -1,4 +1,4 @@
{% load url from future %}{% ifequal message 0 %}It turns out that this ebook is too big for us to send by email. Using a computer, <a href="{{ebook.url}}">download the file</a>. Plug your Kindle into your computer using a USB cable. It will mount as a filesystem. Drag the downloaded {{ebook.format}} file into the documents folder on the Kindle, and then unmount the Kindle. (Kindle 1 owners: youll also need to unplug the USB cable to get your Kindle back into book-reading mode. Kindle 2 owners can leave the cable connected).
{% ifequal message 0 %}It turns out that this ebook is too big for us to send by email. Using a computer, <a href="{{ebook.url}}">download the file</a>. Plug your Kindle into your computer using a USB cable. It will mount as a filesystem. Drag the downloaded {{ebook.format}} file into the documents folder on the Kindle, and then unmount the Kindle. (Kindle 1 owners: youll also need to unplug the USB cable to get your Kindle back into book-reading mode. Kindle 2 owners can leave the cable connected).
{% endifequal %}
{% ifequal message 1 %}Well, this is awkward. We can't seem to email that. Please download it using the instructions for your device, and we'll look into the error.
{% endifequal %}

View File

@ -1,6 +1,6 @@
<div id="js-topsection">
<div class="js-main">
{% load url from future %} <div class="js-topnews">
<div class="js-topnews">
<div class="user-block">
<div id="user-block1">
<div class="block-inner">

View File

@ -1,5 +1,5 @@
{% extends 'basedocumentation.html' %}
{% load url from future %}
{% block title %} &#x2665; Libraries{% endblock %}
{% block extra_css %}
<link type="text/css" rel="stylesheet" href="/static/css/campaign2.css" />

View File

@ -1,5 +1,5 @@
{% extends 'basedocumentation.html' %}
{% load url from future %}
{% block title %} Library Admin {% endblock %}
{% block extra_extra_head %}
{{ block.super }}

View File

@ -1,5 +1,5 @@
{% extends 'base.html' %}
{% load url from future %}
{% load endless %}
{% load truncatechars %}
{% block title %} &#8212; {{ library }}{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends 'base.html' %}
{% load url from future %}
{% load libraryauthtags %}
{% block title %} Libraries {% endblock %}
{% block extra_css %}

View File

@ -1,5 +1,5 @@
{% extends 'base.html' %}
{% load url from future %}
{% block title %} Users of {{ library }} {% endblock %}
{% block extra_css %}
<link type="text/css" rel="stylesheet" href="/static/css/supporter_layout.css" />

View File

@ -1,5 +1,5 @@
{% extends 'base.html' %}
{% load url from future %}
{% block content %}
<div style="width: 80%; margin: 15px auto;" class="clearfix">

View File

@ -1,5 +1,5 @@
{% extends 'base.html' %}
{% load url from future %}
{% block news %}
{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends 'basedocumentation.html' %}
{% load url from future %}
{% block title %}Your Unglue.it Account{% endblock %}
{% block extra_extra_head %}
{{ block.super }}

View File

@ -1,5 +1,5 @@
{% extends 'basedocumentation.html' %}
{% load url from future %}
{% load humanize %}
{% block title %}Campaign Management{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends 'basedocumentation.html' %}
{% load url from future %}
{% block extra_extra_head %}
{{ block.super }}

View File

@ -1,5 +1,5 @@
{% extends 'base.html' %}
{% load url from future %}
{% block extra_css %}
<link rel="stylesheet" href="/static/css/ui-lightness/jquery-ui-1.8.16.custom.css" type="text/css" media="screen">
{{ form.media.css }}

View File

@ -1,5 +1,5 @@
{% extends 'basedocumentation.html' %}
{% load url from future %}
{% block title %} MARC records{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends 'basedocumentation.html' %}
{% load url from future %}
{% block title %}Add new MARC records{% endblock %}

View File

@ -1,5 +1,5 @@
{% extends 'email_change/base.html' %}
{% load url from future %}
{% block extra_extra_head %}
{{ block.super }}

View File

@ -1,4 +1,4 @@
{% load url from future %}{% csrf_token %}
{% csrf_token %}
<span style="padding: 5px;"><a href="{% url 'marc' %}">record</a> format:
<select name="format">
<option value="xml" selected>xml</option>

View File

@ -1,5 +1,5 @@
{% extends 'basedocumentation.html' %}
{% load url from future %}
{% block extra_extra_head %}
{{ block.super }}

View File

@ -1,5 +1,5 @@
{% extends 'basedocumentation.html' %}
{% load url from future %}
{% load humanize %}
{% block title %} Metrics {% endblock %}
{% block doccontent %}

View File

@ -1,4 +1,4 @@
{% load url from future %}{% if request.user.profile.on_ml %}
{% if request.user.profile.on_ml %}
You are subscribed to the Unglue.it Newsletter. It comes roughly twice a month. <br />
<form id="ml_unsubscribe" action="{% url 'ml_unsubscribe' %}" method="POST">
{% csrf_token %}

View File

@ -1,5 +1,5 @@
{% extends 'basedocumentation.html' %}
{% load url from future %}
{% block extra_extra_head %}
{{ block.super }}

View File

@ -1,5 +1,5 @@
{% extends "notification/notice_template.html" %}
{% load url from future %}
{% load humanize %}
{% block comments_graphical %}

View File

@ -1,4 +1,4 @@
{% load url from future %}{% load humanize %}
{% load humanize %}
We want to let you know that your {{ user.profile.account.card_type }} card ending in {{ user.profile.account.card_last4 }} has expired.
When you receive your new card, simply go to https://{{ site.domain }}{% url 'manage_account' %} to enter your card information. Thank you!

View File

@ -1,5 +1,5 @@
{% extends 'notification/notice_template.html' %}
{% load url from future %}
{% load humanize %}
{% block comments_graphical %}

View File

@ -1,4 +1,4 @@
{% load url from future %}{% load humanize %}
{% load humanize %}
We want to give you advance notice that your {{ user.profile.account.card_type }} card ending in {{ user.profile.account.card_last4 }} will expire this month.
When you receive your new card, simply go to https://{{ site.domain }}{% url 'manage_account' %} to enter your card information. Thank you!

View File

@ -1,5 +1,5 @@
{% extends 'notification/notice_template.html' %}
{% load url from future %}
{% load humanize %}
{% block comments_graphical %}

View File

@ -1,4 +1,4 @@
{% load url from future %}{{ comment.user.username }} has commented on a book you also commented on, {{ comment.content_object.title }}, as follows.
{{ comment.user.username }} has commented on a book you also commented on, {{ comment.content_object.title }}, as follows.
{{ comment.comment }}

View File

@ -1,5 +1,5 @@
{% extends 'notification/notice_template.html' %}
{% load url from future %}
{% block comments_book %}
<a href="{% url 'work' comment.content_object.id %}?tab=2"><img src="{{ comment.content_object.cover_image_small }}" alt="cover image for {{ comment.content_object.title }}" /></a>

View File

@ -1,4 +1,4 @@
{% load url from future %}You have borrowed {{ acq.work.title }} from {{ acq.lib_acq.user.username }}. During the borrowing period, you can download the ebook at the book's download page:
You have borrowed {{ acq.work.title }} from {{ acq.lib_acq.user.username }}. During the borrowing period, you can download the ebook at the book's download page:
https://{{ current_site.domain }}{% url 'download' acq.work.id %}
This ebook is made available to you by {{ acq.lib_acq.user.username }} for your personal use only, and a personal license has been embedded in the ebook file. You may download as many times as you need to until {{ acq.expires }}. If you want to use the ebook after that, please consider buying a copy for yourself. Doing so will bring closer the day when this ebook is free for everyone to read.

View File

@ -1,5 +1,5 @@
{% extends 'notification/notice_template.html' %}
{% load url from future %}
{% block comments_book %}
<a href="{% url 'work' acq.work.id %}"><img src="{{ acq.work.cover_image_small }}" alt="cover image for {{ acq.work.title }}" /></a>

View File

@ -1,4 +1,4 @@
{% load url from future %}{% ifequal user recipient %}{{ user.username }},
{% ifequal user recipient %}{{ user.username }},
Your request to join {{ library }} has been accepted. Welcome!

View File

@ -1,5 +1,5 @@
{% extends 'notification/notice_template.html' %}
{% load url from future %}
{% block comments_book %}
<a href="{% url 'library' library.user %}"><img src="{{ library.user.profile.avatar_url }}" alt="avatar for {{ library }}" /></a>
{% endblock %}

View File

@ -1,4 +1,4 @@
{% load url from future %}{{ acq.work.title }} is reserved for you from {{ acq.lib_acq.user.username }} until {{ acq.expires }}. You can borrow the ebook by downloading it from the book's download page:
{{ acq.work.title }} is reserved for you from {{ acq.lib_acq.user.username }} until {{ acq.expires }}. You can borrow the ebook by downloading it from the book's download page:
https://{{ current_site.domain }}{% url 'download' acq.work.id %}
If you don't download the book before {{ acq.expires }}, other members of {{ acq.lib_acq.user.username }} will be able to use it instead.

View File

@ -1,5 +1,5 @@
{% extends 'notification/notice_template.html' %}
{% load url from future %}
{% block comments_book %}
<a href="{% url 'work' acq.work.id %}"><img src="{{ acq.work.cover_image_small }}" alt="cover image for {{ acq.work.title }}" /></a>

View File

@ -1,4 +1,4 @@
{% load url from future %}{{ supporter }} ({{ base_url }}{% url 'supporter' supporter.username %}) has favorited for a work you hold rights to, {{ work.title }} ({{ base_url }}{% url 'work' work.id %}). Hooray! {% with work.num_wishes as num_wishes %}{% ifequal num_wishes 1 %}Your first ungluer!{% else %}There are now {{ num_wishes }} people who have favorited this work.{% endifequal %}{% endwith %}
{{ supporter }} ({{ base_url }}{% url 'supporter' supporter.username %}) has favorited for a work you hold rights to, {{ work.title }} ({{ base_url }}{% url 'work' work.id %}). Hooray! {% with work.num_wishes as num_wishes %}{% ifequal num_wishes 1 %}Your first ungluer!{% else %}There are now {{ num_wishes }} people who have favorited this work.{% endifequal %}{% endwith %}
The Unglue.it team

View File

@ -1,5 +1,5 @@
{% extends 'notification/notice_template.html' %}
{% load url from future %}
{% block comments_book %}
<a href="{% url 'work' work.id %}?tab=2"><img src="{{ work.cover_image_small }}" alt="cover image for {{ work.title }}" /></a>

View File

@ -1,5 +1,5 @@
{% extends 'notification/base.html' %}
{% load url from future %}
{% load i18n %}
{% load truncatechars %}
@ -200,13 +200,13 @@ $j(document).ready(function() {
{{ user.email }}<br />
</p>
<p>
({% blocktrans %}You can change this under <a href="{{ editurl }}">Account</a>.{% endblocktrans %})
({% blocktrans %}You can change this under <a href="{% url 'manage_account' %}">Account</a>.{% endblocktrans %})
</p>
{% else %}
<div class="errorlist">
{% blocktrans %}
You do not have a verified email address to which notices can be sent.
You can add one by going to <a href="{{ editurl }}">Account</a>.
You can add one by going to <a href="{% url 'manage_account' %}">Account</a>.
{% endblocktrans %}
</div>
{% endif %}

View File

@ -1,10 +1,3 @@
{% load url from future %}{% comment %}
django-notification and {% with %} play poorly together. Don't use {% with %}
in child templates. Also don't do {% url 'something' as something %}; it doesn't work and I'm not clear why.
Exception: you can include notification/sharing_block.html into a notice.html to have
tweet, FB, email sharing show up. Include a {% url 'work' your.local.work.id as work_url %} immediately prior.
{% endcomment %}
<div class="comments clearfix">
<div class="comments_info clearfix">
<div class="comments_book">

View File

@ -1,5 +1,5 @@
{% extends 'notification/base.html' %}
{% load url from future %}
{% load i18n %}

View File

@ -1,4 +1,4 @@
{% load url from future %}{% load humanize %}An Ungluing!
{% load humanize %}An Ungluing!
Thanks to you and other ungluers, {{ transaction.campaign.work.title }} will be released to the world in an unglued ebook edition. Your credit card has been charged ${{ transaction.amount|floatformat:2|intcomma }}.

Some files were not shown because too many files have changed in this diff Show More