summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--forum/conf/settings_wrapper.py7
-rw-r--r--forum/context.py22
-rwxr-xr-xforum/skins/default/media/style/style.css13
-rw-r--r--forum/skins/default/templates/faq.html32
-rw-r--r--forum/templatetags/extra_filters.py4
-rw-r--r--locale/de/LC_MESSAGES/django.mobin80883 -> 80778 bytes
-rw-r--r--locale/en/LC_MESSAGES/django.mobin25222 -> 25272 bytes
-rw-r--r--locale/en/LC_MESSAGES/django.po2
-rw-r--r--locale/es/LC_MESSAGES/django.mobin43243 -> 43243 bytes
-rw-r--r--locale/sr/LC_MESSAGES/django.mobin56072 -> 56072 bytes
-rw-r--r--locale/tr/LC_MESSAGES/django.mobin53017 -> 52875 bytes
-rw-r--r--locale/vi/LC_MESSAGES/django.mobin25698 -> 25588 bytes
-rw-r--r--locale/zh-cn/LC_MESSAGES/django.mobin24271 -> 24271 bytes
13 files changed, 38 insertions, 42 deletions
diff --git a/forum/conf/settings_wrapper.py b/forum/conf/settings_wrapper.py
index 86d41709..b3645333 100644
--- a/forum/conf/settings_wrapper.py
+++ b/forum/conf/settings_wrapper.py
@@ -66,5 +66,12 @@ class ConfigSettings(object):
else:
self.__instance[key] = config_register(value)
+ def as_dict(self):
+ out = dict()
+ for key in self.__instance.keys():
+ #todo: this is odd that I could not use self.__instance.items() mapping here
+ out[key] = self.__instance[key].value
+ return out
+
#settings instance to be used elsewhere in the project
settings = ConfigSettings()
diff --git a/forum/context.py b/forum/context.py
index 47fb43f2..a5801302 100644
--- a/forum/context.py
+++ b/forum/context.py
@@ -1,25 +1,9 @@
from django.conf import settings
from forum.conf import settings as forum_settings
def application_settings(context):
- my_settings = {
- 'WIKI_ON':forum_settings.WIKI_ON,
- 'APP_TITLE' : forum_settings.APP_TITLE,
- 'APP_URL' : forum_settings.APP_URL,
- 'APP_KEYWORDS' : forum_settings.APP_KEYWORDS,
- 'APP_DESCRIPTION': forum_settings.APP_DESCRIPTION,
- 'APP_COPYRIGHT': forum_settings.APP_COPYRIGHT,
- 'FEEDBACK_SITE_URL': forum_settings.FEEDBACK_SITE_URL,
- 'FORUM_ABOUT': forum_settings.FORUM_ABOUT,
- 'FORUM_PRIVACY': forum_settings.FORUM_PRIVACY,
- 'GOOGLE_SITEMAP_CODE':forum_settings.GOOGLE_SITEMAP_CODE,
- 'GOOGLE_ANALYTICS_KEY':forum_settings.GOOGLE_ANALYTICS_KEY,
- 'EMAIL_VALIDATION': forum_settings.EMAIL_VALIDATION,
- 'RESOURCE_REVISION':forum_settings.MEDIA_RESOURCE_REVISION,
- 'ASKBOT_SKIN':forum_settings.ASKBOT_DEFAULT_SKIN,
- 'EDITABLE_SCREEN_NAME':forum_settings.EDITABLE_SCREEN_NAME,
- 'FORUM_SCRIPT_ALIAS': settings.FORUM_SCRIPT_ALIAS,
- 'LANGUAGE_CODE': settings.LANGUAGE_CODE,
- }
+ my_settings = forum_settings.as_dict()
+ my_settings['LANGUAGE_CODE'] = settings.LANGUAGE_CODE
+ my_settings['FORUM_SCRIPT_ALIAS'] = settings.FORUM_SCRIPT_ALIAS
return {'settings':my_settings}
def auth_processor(request):
diff --git a/forum/skins/default/media/style/style.css b/forum/skins/default/media/style/style.css
index 855dc75d..7147b672 100755
--- a/forum/skins/default/media/style/style.css
+++ b/forum/skins/default/media/style/style.css
@@ -353,6 +353,7 @@ blockquote {
#searchBar {
display:inline-block;
background-color: #cccccc;/*888a85; /*#e9b96e;*/
+ width:700px;
border: 1px solid #aaaaaa;
padding: 4px 7px 5px 5px;
}
@@ -361,7 +362,7 @@ blockquote {
font-size: 24px;
line-height: 24px;
height: 36px;
- width: 598px;
+ width: 605px;
margin: 0px;
padding: 5px 0 0 5px;
}
@@ -370,7 +371,7 @@ blockquote {
font-size: 24px;
line-height: 24px;
height: 36px;
- width: 552px;
+ width: 561px;
padding: 5px 0 0 5px;
margin: 0px;
}
@@ -379,6 +380,9 @@ blockquote {
font-size: 20px;
color: #666666;
height: 40px;
+ width: 80px;
+ width: 80px;
+ width: 80px;
line-height: 22px;
text-align: center;
margin-top:1px;
@@ -2630,3 +2634,8 @@ p.signup_p {
.search-tips a {
text-decoration: underline;
}
+
+.faq-rep-item {
+ text-align:right;
+ padding-right:5px;
+}
diff --git a/forum/skins/default/templates/faq.html b/forum/skins/default/templates/faq.html
index c944240a..83a24d68 100644
--- a/forum/skins/default/templates/faq.html
+++ b/forum/skins/default/templates/faq.html
@@ -1,6 +1,7 @@
{% extends "base.html" %}
<!-- template faq.html -->
{% load extra_tags %}
+{% load extra_filters %}
{% load humanize %}
{% load i18n %}
{% block title %}{% spaceless %}FAQ{% endspaceless %}{% endblock %}
@@ -39,7 +40,7 @@
<div>
<h3 class="subtitle">{% trans "How does reputation system work?" %}</h3>
<p>{% trans "Rep system summary" %}</p>
- <p>{% blocktrans %}For example, if you ask an interesting question or give a helpful answer, your input will be upvoted. On the other hand if the answer is misleading - it will be downvoted. Each vote in favor will generate <strong>10</strong> points, each vote against will subtract <strong>2</strong> points. There is a limit of <strong>200</strong> points that can be accumulated per question or answer. The table below explains reputation point requirements for each type of moderation task.{% endblocktrans %}
+ <p>{% blocktrans with settings.MAX_REP_GAIN_PER_USER_PER_DAY as MAX_REP_GAIN_PER_USER_PER_DAY and settings.REP_GAIN_FOR_RECEIVING_UPVOTE as REP_GAIN_FOR_RECEIVING_UPVOTE and settings.REP_LOSS_FOR_RECEIVING_DOWNVOTE|absolute_value as REP_LOSS_FOR_RECEIVING_DOWNVOTE%}For example, if you ask an interesting question or give a helpful answer, your input will be upvoted. On the other hand if the answer is misleading - it will be downvoted. Each vote in favor will generate <strong>{{REP_GAIN_FOR_RECEIVING_UPVOTE}}</strong> points, each vote against will subtract <strong>{{REP_LOSS_FOR_RECEIVING_DOWNVOTE}}</strong> points. There is a limit of <strong>{{MAX_REP_GAIN_PER_USER_PER_DAY}}</strong> points that can be accumulated for a question or answer per day. The table below explains reputation point requirements for each type of moderation task.{% endblocktrans %}
</p>
<table style="font-family:arial;" cellspacing="3" cellpadding="3">
@@ -47,54 +48,45 @@
<th width="40px" style="text-align:right"></th>
<th width="300px"></th>
</tr>
- <!--
<tr>
- <td style="text-align:right;padding-right:5px"><strong>15</strong></td>
+ <td class="faq-rep-item"><strong>{{settings.MIN_REP_TO_VOTE_UP}}</strong></td>
<td>{% trans "upvote" %}</td>
</tr>
+ <!--
<tr>
- <td style="text-align:right;padding-right:5px"><strong>15</strong></td>
+ <td class="faq-rep-item"><strong>15</strong></td>
<td>{% trans "use tags" %}</td>
</tr>
-->
<tr>
- <td style="text-align:right;padding-right:5px"><strong>50</strong></td>
+ <td class="faq-rep-item"><strong>{{settings.MIN_REP_TO_LEAVE_COMMENTS}}</strong></td>
<td>{% trans "add comments" %}</td>
</tr>
<tr>
- <td style="text-align:right;padding-right:5px"><strong>100</strong></td>
+ <td class="faq-rep-item"><strong>{{settings.MIN_REP_TO_VOTE_DOWN}}</strong></td>
<td>{% trans "downvote" %}</td>
</tr><tr>
- <td style="text-align:right;padding-right:5px"><strong>250</strong></td>
+ <td class="faq-rep-item"><strong>{{settings.MIN_REP_TO_CLOSE_OWN_QUESTIONS}}</strong></td>
<td>{% trans "open and close own questions" %}</td>
</tr>
<tr>
- <td style="text-align:right;padding-right:5px"><strong>500</strong></td>
+ <td class="faq-rep-item"><strong>{{settings.MIN_REP_TO_RETAG_OTHERS_QUESTIONS}}</strong></td>
<td>{% trans "retag questions" %}</td>
</tr>
{% if settings.WIKI_ON %}
<tr>
- <td style="text-align:right;padding-right:5px"><strong>750</strong></td>
+ <td class="faq-rep-item"><strong>{{settings.MIN_REP_TO_EDIT_WIKI}}</strong></td>
<td>{% trans "edit community wiki questions" %}</td>
</tr>
{% endif %}
<tr>
- <td style="text-align:right;padding-right:5px"><strong>2000</strong></td>
+ <td class="faq-rep-item"><strong>{{settings.MIN_REP_TO_EDIT_OTHERS_POSTS}}</strong></td>
<td>{% trans "edit any answer" %}</td>
</tr>
<tr>
- <td style="text-align:right;padding-right:5px"><strong>3000</strong></td>
- <td>{% trans "open any closed question" %}</td>
- </tr>
- <tr>
- <td style="text-align:right;padding-right:5px"><strong>5000</strong></td>
+ <td class="faq-rep-item"><strong>{{settings.MIN_REP_TO_DELETE_OTHERS_COMMENTS}}</strong></td>
<td>{% trans "delete any comment" %}</td>
</tr>
- <tr>
- <td style="text-align:right;padding-right:5px"><strong>10000</strong></td>
- <td>{% trans "delete any questions and answers and perform other moderation tasks" %}</td>
- </tr>
-
</table>
</div>
{% comment %}
diff --git a/forum/templatetags/extra_filters.py b/forum/templatetags/extra_filters.py
index d600c23e..2da313db 100644
--- a/forum/templatetags/extra_filters.py
+++ b/forum/templatetags/extra_filters.py
@@ -107,3 +107,7 @@ def humanize_counter(number):
return s + 'k'
else:
return str(number)
+
+@register.filter
+def absolute_value(number):
+ return abs(number)
diff --git a/locale/de/LC_MESSAGES/django.mo b/locale/de/LC_MESSAGES/django.mo
index 8883bd04..fd451a6d 100644
--- a/locale/de/LC_MESSAGES/django.mo
+++ b/locale/de/LC_MESSAGES/django.mo
Binary files differ
diff --git a/locale/en/LC_MESSAGES/django.mo b/locale/en/LC_MESSAGES/django.mo
index a751a47c..1ab98e9b 100644
--- a/locale/en/LC_MESSAGES/django.mo
+++ b/locale/en/LC_MESSAGES/django.mo
Binary files differ
diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po
index 5fd49fbb..9c7dd12c 100644
--- a/locale/en/LC_MESSAGES/django.po
+++ b/locale/en/LC_MESSAGES/django.po
@@ -3214,7 +3214,7 @@ msgstr ""
#: forum/skins/default/templates/user_tabs.html:28 forum/views/users.py:959
msgid "email subscriptions"
-msgstr ""
+msgstr "subscriptions"
#: forum/skins/default/templates/users.html:6
#: forum/skins/default/templates/users.html:24
diff --git a/locale/es/LC_MESSAGES/django.mo b/locale/es/LC_MESSAGES/django.mo
index 69386ee0..27fb5837 100644
--- a/locale/es/LC_MESSAGES/django.mo
+++ b/locale/es/LC_MESSAGES/django.mo
Binary files differ
diff --git a/locale/sr/LC_MESSAGES/django.mo b/locale/sr/LC_MESSAGES/django.mo
index e8e8bfe8..bdc63f43 100644
--- a/locale/sr/LC_MESSAGES/django.mo
+++ b/locale/sr/LC_MESSAGES/django.mo
Binary files differ
diff --git a/locale/tr/LC_MESSAGES/django.mo b/locale/tr/LC_MESSAGES/django.mo
index ab6380ea..66384a39 100644
--- a/locale/tr/LC_MESSAGES/django.mo
+++ b/locale/tr/LC_MESSAGES/django.mo
Binary files differ
diff --git a/locale/vi/LC_MESSAGES/django.mo b/locale/vi/LC_MESSAGES/django.mo
index 1c34a57f..67785c70 100644
--- a/locale/vi/LC_MESSAGES/django.mo
+++ b/locale/vi/LC_MESSAGES/django.mo
Binary files differ
diff --git a/locale/zh-cn/LC_MESSAGES/django.mo b/locale/zh-cn/LC_MESSAGES/django.mo
index 8687c477..a73a9675 100644
--- a/locale/zh-cn/LC_MESSAGES/django.mo
+++ b/locale/zh-cn/LC_MESSAGES/django.mo
Binary files differ