more status-sensitive email share text

pull/1/head
Andromeda Yelton 2013-01-16 11:23:28 -05:00
parent a27e319e5a
commit 1887599595
2 changed files with 9 additions and 2 deletions

View File

@ -0,0 +1,3 @@
Thanks to Unglue.it, I'm reading a free, DRM-free 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

@ -2011,11 +2011,15 @@ def emailshare(request, action):
status = None
# customize the call to action depending on campaign status
if status == 'ACTIVE':
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'
subject = 'Come see one of my favorite books on Unglue.it'
form = EmailShareForm(initial={ 'next':next, 'subject': subject, 'message': message})
except: