widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #03835
[Merge] lp:~franku/widelands-website/forum_notifyings_contain_links_to_post into lp:widelands-website
kaputtnik has proposed merging lp:~franku/widelands-website/forum_notifyings_contain_links_to_post into lp:widelands-website.
Requested reviews:
Widelands Developers (widelands-dev)
For more details, see:
https://code.launchpad.net/~franku/widelands-website/forum_notifyings_contain_links_to_post/+merge/253003
This branch changes the E-mail notifications to contain a link to the last post, which triggers the notify.
The new E-mail looks like this:
> You have received the following notice from localhost:8000:
>
> A new forum post was added under topic "E-mailtests":
>
> "neuerUser" wrotes:
>
> *content of post*
>
> –––––––––––
> Link to post: http://localhost:8000/forum/post/158/
> Link to topic: http://localhost:8000/forum/topic/14/
>
> To see other notices or change how you receive notifications, please go to http://localhost:8000/notification/.
The "http://localhost:8000" is naturally changed with "https://wl.widelands.org".
This also includes changes to the notification page ( https://wl.widelands.org/notification/ ) If this branch is merged the notification page contains also a link to the related post in future notifications.
--
Your team Widelands Developers is requested to review the proposed merge of lp:~franku/widelands-website/forum_notifyings_contain_links_to_post into lp:widelands-website.
=== modified file 'mainpage/views.py'
--- mainpage/views.py 2013-06-14 19:23:53 +0000
+++ mainpage/views.py 2015-03-15 20:20:09 +0000
@@ -42,7 +42,7 @@
This reads out the authors file in the SVN directory, and returns it
as a wl_markdown_object. This replaces the wiki developers list
"""
- data = open(WIDELANDS_SVN_DIR + "txts/developers", "r").readlines()[4:]
+ data = open(WIDELANDS_SVN_DIR, "r").readlines()[4:]
newdata = []
for line in data:
line = line.strip('"_ \n\r').rstrip('" _ \n\r')
=== modified file 'templates/notification/email_body.txt'
--- templates/notification/email_body.txt 2009-02-20 16:46:21 +0000
+++ templates/notification/email_body.txt 2015-03-15 20:20:09 +0000
@@ -1,6 +1,5 @@
{% load i18n %}{% blocktrans %}You have received the following notice from {{ current_site }}:
{{ message }}
-
To see other notices or change how you receive notifications, please go to {{ notices_url }}.
-{% endblocktrans %}
+{% endblocktrans %}
\ No newline at end of file
=== modified file 'templates/notification/forum_new_post/full.txt'
--- templates/notification/forum_new_post/full.txt 2010-06-10 12:13:43 +0000
+++ templates/notification/forum_new_post/full.txt 2015-03-15 20:20:09 +0000
@@ -1,7 +1,10 @@
-{% load i18n %}{% blocktrans with topic.get_absolute_url as topic_url %} A new forum post was added under topic "{{ topic }}" by "{{ user }}".
+{% load i18n %}A new forum post was added under topic "{{ topic }}":
-http://{{ current_site }}{{ topic_url }}
-{% endblocktrans %}
-{{ topic }}:
+"{{ user }}" wrotes:
{{ post.body_text }}
+{% blocktrans with post.get_absolute_url as post_url and topic.get_absolute_url as topic_url %}
+–––––––––––
+Link to post: http://{{ current_site }}{{ post_url }}
+Link to topic: http://{{ current_site }}{{ topic_url }}
+{% endblocktrans %}
\ No newline at end of file
=== modified file 'templates/notification/forum_new_post/notice.html'
--- templates/notification/forum_new_post/notice.html 2010-06-10 12:13:43 +0000
+++ templates/notification/forum_new_post/notice.html 2015-03-15 20:20:09 +0000
@@ -1,2 +1,2 @@
{% load i18n %}{% url profile_view user.username as user_url %}
-{% blocktrans with topic.get_absolute_url as topic_url %}A new forum post has be created in forum under topic <a href="{{ topic_url }}">{{ topic }}</a> by <a href="{{ user_url }}">{{ user }}</a>.{% endblocktrans %}
+{% blocktrans with topic.get_absolute_url as topic_url and post.get_absolute_url as post_url%}A new <a href="{{ post_url }}">forum post</a> has be created in forum under topic <a href="{{ topic_url }}">{{ topic }}</a> by <a href="{{ user_url }}">{{ user }}</a>.{% endblocktrans %}
Follow ups