From 63093607675712f4289f20a6d886af35c83ee0b1 Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Thu, 13 Jun 2013 11:43:34 -0700 Subject: [PATCH] Re-designed shared story email. --- apps/reader/views.py | 6 +++--- templates/mail/email_base.xhtml | 2 ++ templates/mail/email_story.txt | 16 ++++++++++++++++ templates/mail/email_story.xhtml | 26 ++++++++++++++++++++++++++ templates/mail/email_story_html.xhtml | 25 ------------------------- templates/mail/email_story_text.xhtml | 16 ---------------- 6 files changed, 47 insertions(+), 44 deletions(-) create mode 100644 templates/mail/email_story.txt create mode 100644 templates/mail/email_story.xhtml delete mode 100644 templates/mail/email_story_html.xhtml delete mode 100644 templates/mail/email_story_text.xhtml diff --git a/apps/reader/views.py b/apps/reader/views.py index aaf4c8b65..16cc5efce 100644 --- a/apps/reader/views.py +++ b/apps/reader/views.py @@ -1511,9 +1511,9 @@ def send_story_email(request): "feed": feed, "share_user_profile": share_user_profile, } - text = render_to_string('mail/email_story_text.xhtml', params) - html = render_to_string('mail/email_story_html.xhtml', params) - subject = '%s is sharing a story with you: "%s"' % (from_name, story['story_title']) + text = render_to_string('mail/email_story.txt', params) + html = render_to_string('mail/email_story.xhtml', params) + subject = '%s shares "%s"' % (from_name, story['story_title']) cc = None if email_cc: cc = ['%s <%s>' % (from_name, from_email)] diff --git a/templates/mail/email_base.xhtml b/templates/mail/email_base.xhtml index 1e656942a..a6f85e311 100644 --- a/templates/mail/email_base.xhtml +++ b/templates/mail/email_base.xhtml @@ -26,6 +26,7 @@ + {% block footer %} @@ -72,6 +73,7 @@
+ {% endblock footer %} NewsBlur diff --git a/templates/mail/email_story.txt b/templates/mail/email_story.txt new file mode 100644 index 000000000..72d67f47d --- /dev/null +++ b/templates/mail/email_story.txt @@ -0,0 +1,16 @@ +{{ from_name }} shares "{{ story.story_title }}" from {{ feed.feed_title }}{% if comments %}: + +{{ comments }} +{% else %}.{% endif %} + +--------------------------------------------------------------------------- + +{{ story.story_title }} + +{{ story.story_permalink|safe }} + +{{ story.text|safe }} + +--------------------------------------------------------------------------- + +Sent from NewsBlur - www.newsblur.com - a personal news reader bringing people together to talk about the world. \ No newline at end of file diff --git a/templates/mail/email_story.xhtml b/templates/mail/email_story.xhtml new file mode 100644 index 000000000..31a00bc84 --- /dev/null +++ b/templates/mail/email_story.xhtml @@ -0,0 +1,26 @@ +{% extends "mail/email_base.xhtml" %} +{% load social_tags %} + +{% block header %}{% endblock %} + +{% block body %} + +

+ {{ from_name }} shares "{{ story.story_title }}"{% if feed %} from {{ feed.feed_title }}{% endif %}{% if comments %}:

+

{{ comments }} + {% endif %} +

+ +
+ +

{{ story.story_title }}

+ + {{ story.story_permalink|safe }} + +

{{ story.story_content|safe }}

+ +
+ +{% endblock %} + +{% block footer %}{% endblock footer %} \ No newline at end of file diff --git a/templates/mail/email_story_html.xhtml b/templates/mail/email_story_html.xhtml deleted file mode 100644 index 01fb6369d..000000000 --- a/templates/mail/email_story_html.xhtml +++ /dev/null @@ -1,25 +0,0 @@ -{% extends "mail/email_base.xhtml" %} -{% load social_tags %} - -{% block header %}{% endblock %} - -{% block body %} - -

- {{ from_name }} is sharing a story with you entitled "{{ story.story_title }}"{% if feed %} from {{ feed.feed_title }}{% endif %} -

- - {% if comments %} -

{{ from_name }} writes:
- {{ comments }}

- {% endif %} - -
- -

{{ story.story_title }}

- - {{ story.story_permalink|safe }} - -

{{ story.story_content|safe }}

- -{% endblock %} \ No newline at end of file diff --git a/templates/mail/email_story_text.xhtml b/templates/mail/email_story_text.xhtml deleted file mode 100644 index 377daa7f8..000000000 --- a/templates/mail/email_story_text.xhtml +++ /dev/null @@ -1,16 +0,0 @@ -Hello there! {{ from_name }} is sharing a story with you entitled "{{ story.story_title }}" from {{ feed.feed_title }}. -{% if comments %} -{{ from_name }} writes: -{{ comments }} -{% endif %} --- - -{{ story.story_title }} - -{{ story.story_permalink|safe }} - -{{ story.text|safe }} - --- - -Sent from NewsBlur - www.newsblur.com - a personal news reader bringing people together to talk about the world. \ No newline at end of file