Replaced 'Melange' with site_name where appropriate
authorSverre Rabbelier <srabbelier@gmail.com>
Sat, 28 Feb 2009 14:29:23 +0000
changeset 1561 fe1b141bfc2c
parent 1560 656aace0b15f
child 1562 0e1a93e0c54d
Replaced 'Melange' with site_name where appropriate Also fixed EOL damage in django templates. Patch by: Sverre Rabbelier
app/soc/logic/helper/notifications.py
app/soc/templates/soc/mail/new_notification.html
app/soc/templates/soc/mail/welcome.html
--- a/app/soc/logic/helper/notifications.py	Sat Feb 28 14:28:28 2009 +0000
+++ b/app/soc/logic/helper/notifications.py	Sat Feb 28 14:29:23 2009 +0000
@@ -178,6 +178,8 @@
           model_view.notification.view.getParams())}
 
   sender = mail_dispatcher.getDefaultMailSender()
+  site_entity = site_logic.logic.getSingleton()
+  site_name = site_entity.site_name
 
   # get the default mail sender
   default_sender = mail_dispatcher.getDefaultMailSender()
@@ -196,6 +198,7 @@
       'sender_name': sender_name,
       'to': to,
       'sender': sender,
+      'site_name': site_name,
       'subject': force_unicode(DEF_NEW_NOTIFICATION_MSG),
       'notification' : notification_entity,
       'notification_url' : notification_url
--- a/app/soc/templates/soc/mail/new_notification.html	Sat Feb 28 14:28:28 2009 +0000
+++ b/app/soc/templates/soc/mail/new_notification.html	Sat Feb 28 14:29:23 2009 +0000
@@ -1,20 +1,25 @@
-{% extends "soc/mail/base.html" %}
-{% comment %}
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-{% endcomment %}
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-{% block content %}
-You have received a new notification entitled "{{ notification.subject }}". 
-To read, respond to, or delete this notification please click <a href="{{ notification_url }}">here</a>.
-{% endblock %}
-{% block signature %}Greetings, <br />The Melange Team{% endblock %}
+{% extends "soc/mail/base.html" %}
+{% comment %}
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+
+{% block content %}
+You have received a new notification entitled "{{ notification.subject }}".
+To read, respond to, or delete this notification please click <a href="{{ notification_url }}">here</a>.
+{% endblock %}
+
+{% block signature %}
+Greetings, <br />
+The {{ site_name }} Team
+{% endblock %}
--- a/app/soc/templates/soc/mail/welcome.html	Sat Feb 28 14:28:28 2009 +0000
+++ b/app/soc/templates/soc/mail/welcome.html	Sat Feb 28 14:29:23 2009 +0000
@@ -1,21 +1,32 @@
-{% extends "soc/mail/base.html" %}
-{% comment %}
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-{% endcomment %}
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-{% block content %}
-Welcome to Melange. If you are reading this it means you have successfully registered as user
-on our website. Currently Melange is still under development, if you run into any trouble you can usually
-find us at #melange on freenode IRC network. If you find any bugs, please report them to our <a href="http://code.google.com/p/soc/issues/list">Issue Tracker</a>.
-{% endblock %}
-{% block signature %}Greetings, <br />The Melange Team{% endblock %}
+{% extends "soc/mail/base.html" %}
+{% comment %}
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+
+{% block content %}
+Welcome to {{ site_name }}. If you are reading this it means you have successfully registered as user
+on our website.
+
+{% ifequal site_name "Melange" %}
+Currently Melange is still under development, if you run into any trouble you
+can usually find us at #melange on freenode IRC network.
+If you find any bugs,please report them to our
+<a href="http://code.google.com/p/soc/issues/list">Issue Tracker</a>.
+{% endifequal %}
+{% endblock %}
+
+{% block signature %}
+Greetings, <br />
+The {{ site_name }} Team
+{% endblock %}