diff --git a/frontend/templates/download.html b/frontend/templates/download.html
index d86d4338..a5ba32ea 100644
--- a/frontend/templates/download.html
+++ b/frontend/templates/download.html
@@ -69,7 +69,7 @@ $j(document).ready(function() {
Facebook
{% endwith %}
- {% if request.user.is_authenticated %}Email{% endif %}
+ {% if request.user.is_authenticated %}Email{% endif %}
Embed
Copy/paste this into your site:
diff --git a/frontend/templates/emails/i_just_pledged.txt b/frontend/templates/emails/i_just_pledged.txt
index 753cf366..1b5f8360 100644
--- a/frontend/templates/emails/i_just_pledged.txt
+++ b/frontend/templates/emails/i_just_pledged.txt
@@ -1,4 +1,6 @@
-I just pledged to unglue 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 %}.
-If enough of us pledge to unglue this book, the creator will be paid and the ebook will become free to everyone on earth. Will you join me?
+{% 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 %}
+
+Will you join me?
diff --git a/frontend/templates/emails/pledge_this.txt b/frontend/templates/emails/pledge_this.txt
index c5184269..a7a684fa 100644
--- a/frontend/templates/emails/pledge_this.txt
+++ b/frontend/templates/emails/pledge_this.txt
@@ -1,4 +1,4 @@
Help me unglue one of my favorite books, "{{ work.title }}" on Unglue.it:
https://{{site}}{% url work work.id %}
-If enough of us pledge to unglue this book, the creator will be paid and the ebook will become free to everyone on earth.
+{% 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 %}
\ No newline at end of file
diff --git a/frontend/templates/emails/wish_this.txt b/frontend/templates/emails/wish_this.txt
index d577f2e6..a2799410 100644
--- a/frontend/templates/emails/wish_this.txt
+++ b/frontend/templates/emails/wish_this.txt
@@ -1,4 +1,4 @@
Help me unglue one of my favorite books, "{{ work.title }}" on Unglue.it:
https://{{site}}{% url work work.id %}
-If enough of us wishlist this book, Unglue.it may start a campaign to pay the creator and make the ebook free to everyone on earth.
+If enough of us fave this book, Unglue.it may start a campaign to pay the creator and make the ebook free to everyone on earth.
diff --git a/frontend/templates/notification/sharing_block.html b/frontend/templates/notification/sharing_block.html
index 9d82c132..15fdd4e2 100644
--- a/frontend/templates/notification/sharing_block.html
+++ b/frontend/templates/notification/sharing_block.html
@@ -1,5 +1,5 @@
- {% if request.user.is_authenticated %}- Email it!
{% endif %}
+ {% if request.user.is_authenticated %}- Email it!
{% endif %}
- Tweet it!
- Share it on Facebook.
- Best idea: talk about it with those you love.
diff --git a/frontend/templates/pledge_complete.html b/frontend/templates/pledge_complete.html
index 0650d002..9ecf140b 100644
--- a/frontend/templates/pledge_complete.html
+++ b/frontend/templates/pledge_complete.html
@@ -52,7 +52,7 @@
diff --git a/frontend/views.py b/frontend/views.py
index ee293bf3..4606ddf6 100755
--- a/frontend/views.py
+++ b/frontend/views.py
@@ -2474,44 +2474,25 @@ def emailshare(request, action):
work_id = next.split('/')[-2]
work_id = int(work_id)
work = models.Work.objects.get(pk=work_id)
- if action == 'pledge':
- message = render_to_string('emails/i_just_pledged.txt',{'request':request,'work':work,'site': Site.objects.get_current()})
- subject = "Help me unglue "+work.title
- else:
- try:
- status = work.last_campaign().status
- except:
- status = None
-
- # customize the call to action depending on campaign status
- if status == 'SUCCESSFUL' or work.first_ebook():
- message = render_to_string('emails/read_this.txt',{'request':request,'work':work,'site': Site.objects.get_current()})
- subject = 'I think you\'d like this book I\'m reading'
- elif status == 'ACTIVE':
- message = render_to_string('emails/pledge_this.txt',{'request':request,'work':work,'site': Site.objects.get_current()})
- subject = 'Please help me give this book to the world'
- else:
- message = render_to_string('emails/wish_this.txt',{'request':request,'work':work,'site': Site.objects.get_current()})
- subject = 'Come see one of my favorite books on Unglue.it'
-
- form = EmailShareForm(initial={ 'next':next, 'subject': subject, 'message': message})
+ if not action:
+ status = work.last_campaign().status
except:
pass
-
- if action == 'pledge':
- message = render_to_string('emails/i_just_pledged.txt',{'request':request,'work':work,'site': Site.objects.get_current()})
+ context = {'request':request,'work':work,'site': Site.objects.get_current(), 'action': action}
+ if work and action :
+ message = render_to_string('emails/i_just_pledged.txt', context)
subject = "Help me unglue "+work.title
else:
# customize the call to action depending on campaign status
if status == 'ACTIVE':
- message = render_to_string('emails/pledge_this.txt',{'request':request,'work':work,'site': Site.objects.get_current()})
+ message = render_to_string('emails/pledge_this.txt', context)
subject = 'Please help me give this book to the world'
elif work:
- message = render_to_string('emails/wish_this.txt',{'request':request,'work':work,'site': Site.objects.get_current()})
- subject = 'Come see one of my favorite books on Unglue.it'
+ message = render_to_string('emails/wish_this.txt', context)
+ subject = 'This is one of my favorite books on Unglue.it'
else:
# for email shares not bound to a campaign or pledge
- message = render_to_string('emails/join_me.txt',{'request':request,'site': Site.objects.get_current()})
+ message = render_to_string('emails/join_me.txt', context)
subject = "Help me give books to the world"
form = EmailShareForm(initial={ 'next':next, 'subject': subject, 'message': message})