[Widelands-dev] [Merge] lp:~franku/widelands-website/changes_to_admin_wlimages into lp:widelands-website

2015-03-15 Thread kaputtnik
kaputtnik has proposed merging 
lp:~franku/widelands-website/changes_to_admin_wlimages into 
lp:widelands-website.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~franku/widelands-website/changes_to_admin_wlimages/+merge/252996

This branch sort the contents of https://wl.widelands.org/admin/wlimages/image/ 
and the details page for an image.

Currently you have to click on a username to get the details of an image, which 
is not logical. The proposed branch fixes this and make some other sortings. 
See the picture http://home.arcor.de/frank.ue/admin_wlimages.jpg for a 
comparison to the current state.
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~franku/widelands-website/changes_to_admin_wlimages into 
lp:widelands-website.
=== modified file 'wlimages/admin.py'
--- wlimages/admin.py	2009-03-05 17:06:08 +
+++ wlimages/admin.py	2015-03-15 18:12:44 +
@@ -15,11 +15,11 @@
 
 class ImageAdmin(admin.ModelAdmin):
 fieldsets = (
-(None, {'fields': ('content_type', 'object_id')}),
-(_('Content'), {'fields': ('user', 'image', 'revision', 'name')}),
-(_('Meta'), {'fields': ('date_submitted', 'editor_ip')}),
+(None, {'fields': ( ('image', 'name'), 'date_submitted', 'url','revision')}),
+(_('Upload data:'), { 'fields': ( 'user', 'editor_ip')}),
+(_('Content object:'), { 'fields': ( 'content_type', 'object_id' )}),
 )
-list_display = ('user', 'date_submitted', 'content_type', 'get_content_object', '__unicode__')
+list_display = ( '__unicode__', 'date_submitted', 'content_type', 'user')
 list_filter = ('date_submitted',)
 date_hierarchy = 'date_submitted'
 search_fields = ('image', 'user__username')

=== modified file 'wlimages/models.py'
--- wlimages/models.py	2015-02-18 22:30:08 +
+++ wlimages/models.py	2015-03-15 18:12:44 +
@@ -60,7 +60,7 @@
 """
 # Generic Foreign Key Fields
 content_type = models.ForeignKey(ContentType)
-object_id = models.PositiveIntegerField(_('object ID'))
+object_id = models.PositiveIntegerField()
 content_object = generic.GenericForeignKey()
 
 name = models.CharField(max_length=100)
@@ -79,7 +79,7 @@
 objects = ImageManager()

 def __unicode__(self):
-return "Image:%s" % self.name
+return self.name
 
 def get_content_object(self):
 """

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~franku/widelands-website/forum_notifyings_contain_links_to_post into lp:widelands-website

2015-03-15 Thread kaputtnik
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 +
+++ mainpage/views.py	2015-03-15 20:20:09 +
@@ -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 +
+++ templates/notification/email_body.txt	2015-03-15 20:20:09 +
@@ -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 +
+++ templates/notification/forum_new_post/full.txt	2015-03-15 20:20:09 +
@@ -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 +
+++ templates/notification/forum_new_post/notice.html	2015-03-15 20:20:09 +
@@ -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 {{ topic }} by {{ user }}.{% endblocktrans %}
+{% blocktrans with topic.get_absolute_url as topic_url and post.get_absolute_url as post_url%}A new forum post has be created in forum under topic {{ topic }} by {{ user }}.{% endblocktrans %}

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~franku/widelands-website/forum_notifyings_contain_links_to_post into lp:widelands-website

2015-03-15 Thread kaputtnik
Sorry, there went something wrong... i've updated this branch.
-- 
https://code.launchpad.net/~franku/widelands-website/forum_notifyings_contain_links_to_post/+merge/253003
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.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~franku/widelands-website/forum_notifyings_contain_links_to_post into lp:widelands-website

2015-03-15 Thread GunChleoc
I have added some diff comments with my anal retentive proofreader hat on.

Diff comments:

> === modified file 'templates/notification/email_body.txt'
> --- templates/notification/email_body.txt 2009-02-20 16:46:21 +
> +++ templates/notification/email_body.txt 2015-03-15 20:23:54 +
> @@ -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.txt2010-06-10 12:13:43 
> +
> +++ templates/notification/forum_new_post/full.txt2015-03-15 20:23:54 
> +
> @@ -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 }}":

... was added to the topic ...

or:

A new topic "{{ topic }}" has been added to the forum.

>  
> -http://{{ current_site }}{{ topic_url }}
> -{% endblocktrans %}
> -{{ topic }}:
> +"{{ user }}" wrotes:
>  

"{{ user }}" wrote:

drop the s.

>  {{ 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 %}

Do we want new lines for the links? Links can get screwed up by the email 
programs' word wrapping.

> \ 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 
> +
> +++ templates/notification/forum_new_post/notice.html 2015-03-15 20:23:54 
> +
> @@ -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 {{ topic }} 
> by {{ user }}.{% endblocktrans %}
> +{% blocktrans with topic.get_absolute_url as topic_url and 
> post.get_absolute_url as post_url%}A new forum 
> post has be created in forum under topic {{ 
> topic }} by {{ user }}.{% endblocktrans %}

A new forum post has been added to the topic X by Y.

or:

Y has replied to the forum topic X.

with links for Y, replied, and X.

> 


-- 
https://code.launchpad.net/~franku/widelands-website/forum_notifyings_contain_links_to_post/+merge/253003
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.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~franku/widelands-website/forum_notifyings_contain_links_to_post into lp:widelands-website

2015-03-15 Thread kaputtnik
Thanks for your review :-) . I just used the current text, reorder and put the 
links inside.

I'll change the branch to your suggestions. While the changes affect only to 
added posts, i use "was added to the topic" instead of "A new topic "{{ topic 
}}" has been added to the forum."





Diff comments:

> === modified file 'templates/notification/email_body.txt'
> --- templates/notification/email_body.txt 2009-02-20 16:46:21 +
> +++ templates/notification/email_body.txt 2015-03-15 20:23:54 +
> @@ -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.txt2010-06-10 12:13:43 
> +
> +++ templates/notification/forum_new_post/full.txt2015-03-15 20:23:54 
> +
> @@ -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 }}":

The changes do only affect to additional posts. So i use "was added".

>  
> -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 
> +
> +++ templates/notification/forum_new_post/notice.html 2015-03-15 20:23:54 
> +
> @@ -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 {{ topic }} 
> by {{ user }}.{% endblocktrans %}
> +{% blocktrans with topic.get_absolute_url as topic_url and 
> post.get_absolute_url as post_url%}A new forum 
> post has be created in forum under topic {{ 
> topic }} by {{ user }}.{% endblocktrans %}
> 


-- 
https://code.launchpad.net/~franku/widelands-website/forum_notifyings_contain_links_to_post/+merge/253003
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.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp