From a27e319e5ad6ce4b798a9d0e9f4a07062292bf8d Mon Sep 17 00:00:00 2001 From: Andromeda Yelton Date: Wed, 16 Jan 2013 11:13:23 -0500 Subject: [PATCH 1/9] more status-sensitive twitter share text --- frontend/templates/work.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/templates/work.html b/frontend/templates/work.html index 0eaeadc6..b0b5e355 100644 --- a/frontend/templates/work.html +++ b/frontend/templates/work.html @@ -418,7 +418,15 @@ $j(document).ready(function(){
From 1887599595d3a36687778e9cb6c35e5aaf2635cf Mon Sep 17 00:00:00 2001 From: Andromeda Yelton Date: Wed, 16 Jan 2013 11:23:28 -0500 Subject: [PATCH 2/9] more status-sensitive email share text --- frontend/templates/emails/read_this.txt | 3 +++ frontend/views.py | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 frontend/templates/emails/read_this.txt diff --git a/frontend/templates/emails/read_this.txt b/frontend/templates/emails/read_this.txt new file mode 100644 index 00000000..eae67f6d --- /dev/null +++ b/frontend/templates/emails/read_this.txt @@ -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/ . \ No newline at end of file diff --git a/frontend/views.py b/frontend/views.py index c0593842..9ba47e0b 100755 --- a/frontend/views.py +++ b/frontend/views.py @@ -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: From 68b1fd9bf788fb7bec29270c9a7dc70d56a3def1 Mon Sep 17 00:00:00 2001 From: Andromeda Yelton Date: Wed, 16 Jan 2013 12:10:36 -0500 Subject: [PATCH 3/9] add sharing options to front matter --- frontend/templates/front_matter.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/templates/front_matter.html b/frontend/templates/front_matter.html index f6e60101..812dd43b 100644 --- a/frontend/templates/front_matter.html +++ b/frontend/templates/front_matter.html @@ -91,6 +91,15 @@

You can say thank you by supporting the ungluing of more books at https://unglue.it/ .

+

+ If you're reading this book on an internet-connected device, you can also share it with your friends: +

+

From 5fb880c9da94dea23a72d50fb0f6c66c77d6272a Mon Sep 17 00:00:00 2001 From: Andromeda Yelton Date: Wed, 16 Jan 2013 12:50:20 -0500 Subject: [PATCH 4/9] sharing options on download page --- frontend/templates/download.html | 12 ++++++++++++ frontend/views.py | 3 ++- static/css/download.css | 2 +- static/css/sitewide2.css | 2 +- static/less/download.less | 27 +++++++++++++++++++++++++-- 5 files changed, 41 insertions(+), 5 deletions(-) diff --git a/frontend/templates/download.html b/frontend/templates/download.html index 02373c76..4ff9e688 100644 --- a/frontend/templates/download.html +++ b/frontend/templates/download.html @@ -14,6 +14,18 @@