summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhenlei Cai <jpenguin@gmail.com>2014-04-27 12:33:41 -0700
committerZhenlei Cai <jpenguin@gmail.com>2014-05-03 19:54:43 -0700
commit3f8f6694ab5bde2b367c60cddf359b5489485eb8 (patch)
tree33db8f28a00890870b127f015b3328ca7842a062
parentcfe6efc153e5ad37e506b931af15e3c2e6635a73 (diff)
downloadaskbot-3f8f6694ab5bde2b367c60cddf359b5489485eb8.tar.gz
askbot-3f8f6694ab5bde2b367c60cddf359b5489485eb8.tar.bz2
askbot-3f8f6694ab5bde2b367c60cddf359b5489485eb8.zip
Allow customization of the destional URL for the logo image
Chinese locale message for since you are not logged in right now ...
-rw-r--r--askbot/conf/skin_general_settings.py10
-rw-r--r--askbot/locale/zh_CN/LC_MESSAGES/django.mobin142943 -> 143134 bytes
-rw-r--r--askbot/locale/zh_CN/LC_MESSAGES/django.po3
-rw-r--r--askbot/templates/widgets/logo.html4
4 files changed, 14 insertions, 3 deletions
diff --git a/askbot/conf/skin_general_settings.py b/askbot/conf/skin_general_settings.py
index 11d201ad..2a4c76fa 100644
--- a/askbot/conf/skin_general_settings.py
+++ b/askbot/conf/skin_general_settings.py
@@ -17,6 +17,16 @@ GENERAL_SKIN_SETTINGS = ConfigurationGroup(
)
settings.register(
+ values.StringValue(
+ GENERAL_SKIN_SETTINGS,
+ 'LOGO_DESTINATION_URL',
+ default = '/',
+ description = _('Destination URL for the site logo'),
+ )
+)
+
+
+settings.register(
values.ImageValue(
GENERAL_SKIN_SETTINGS,
'SITE_LOGO_URL',
diff --git a/askbot/locale/zh_CN/LC_MESSAGES/django.mo b/askbot/locale/zh_CN/LC_MESSAGES/django.mo
index 8d468276..6fb17c0e 100644
--- a/askbot/locale/zh_CN/LC_MESSAGES/django.mo
+++ b/askbot/locale/zh_CN/LC_MESSAGES/django.mo
Binary files differ
diff --git a/askbot/locale/zh_CN/LC_MESSAGES/django.po b/askbot/locale/zh_CN/LC_MESSAGES/django.po
index 8ed703d0..40f0106c 100644
--- a/askbot/locale/zh_CN/LC_MESSAGES/django.po
+++ b/askbot/locale/zh_CN/LC_MESSAGES/django.po
@@ -4504,7 +4504,8 @@ msgstr "发起问题"
msgid ""
"since you are not logged in right now, you will be asked to sign in or "
"register after posting your question"
-msgstr ""
+msgstr "因为你还没有登录, 发表问题后你需要注册或登录."
+
#: templates/ask.html:25
#, python-format
diff --git a/askbot/templates/widgets/logo.html b/askbot/templates/widgets/logo.html
index 1b251432..afa0a95b 100644
--- a/askbot/templates/widgets/logo.html
+++ b/askbot/templates/widgets/logo.html
@@ -1,5 +1,5 @@
-<a id="logo" href="{% url questions %}"><img
- src="{{ settings.SITE_LOGO_URL|media }}"
+<a id="logo" href="{%if settings.LOGO_DESTINATION_URL%}{{ settings.LOGO_DESTINATION_URL}}{% else %} {% url questions %}{% endif %}"><img
+ src="{{ settings.SITE_LOGO_URL|media }}"
title="{% trans %}back to home page{% endtrans %}"
alt="{% trans site=settings.APP_SHORT_NAME %}{{site}} logo{% endtrans %}"/>
</a>