diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-03-24 23:08:29 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-03-24 23:08:29 -0400 |
commit | ff84855c68c0259a03add207f2e3b313e0c17621 (patch) | |
tree | 3b3c4ec32a26d848ca1a9112e9ec0aa144efaf51 /askbot/conf | |
parent | a91dc795f94e9c159e3cc9ecd4131ac0511366dc (diff) | |
download | askbot-ff84855c68c0259a03add207f2e3b313e0c17621.tar.gz askbot-ff84855c68c0259a03add207f2e3b313e0c17621.tar.bz2 askbot-ff84855c68c0259a03add207f2e3b313e0c17621.zip |
added option to disable the big ask button
Diffstat (limited to 'askbot/conf')
-rw-r--r-- | askbot/conf/main_pages.py | 14 | ||||
-rw-r--r-- | askbot/conf/questions_page.py | 71 |
2 files changed, 14 insertions, 71 deletions
diff --git a/askbot/conf/main_pages.py b/askbot/conf/main_pages.py index 940d2e91..06339a2f 100644 --- a/askbot/conf/main_pages.py +++ b/askbot/conf/main_pages.py @@ -15,6 +15,20 @@ MAIN_PAGES = livesettings.ConfigurationGroup( settings.register( livesettings.BooleanValue( MAIN_PAGES, + 'ASK_BUTTON_ENABLED', + default=True, + description=_('Enable big Ask button'), + help_text=_( + 'Disabling this button will reduce number of new questions. ' + 'If this button is disabled, the ask button in the search menu ' + 'will still be available.' + ) + ) +) + +settings.register( + livesettings.BooleanValue( + MAIN_PAGES, 'ALL_SCOPE_ENABLED', default=True, description=_('Enable "All Questions" selector'), diff --git a/askbot/conf/questions_page.py b/askbot/conf/questions_page.py deleted file mode 100644 index b1a9b689..00000000 --- a/askbot/conf/questions_page.py +++ /dev/null @@ -1,71 +0,0 @@ -""" -Settings responsible for display of questions lists -""" -from askbot.conf.settings_wrapper import settings -from askbot.conf.super_groups import DATA_AND_FORMATTING -from askbot.deps import livesettings -from django.utils.translation import ugettext_lazy as _ - -MAIN_PAGES = livesettings.ConfigurationGroup( - 'MAIN_PAGES', - _('Questions page'), - super_group=DATA_AND_FORMATTING - ) - -settings.register( - livesettings.StringValue( - MAIN_PAGES, - 'ALL_SCOPE_ENABLED', - default=True, - description=_('Enable "All Questions" selector'), - ) -) - -settings.register( - livesettings.BooleanValue( - MAIN_PAGES, - 'UNANSWERED_SCOPE_ENABLED', - default=True, - description=_('Enable "Unanswered Questions" selector'), - ) -) - -settings.register( - livesettings.BooleanValue( - MAIN_PAGES, - 'FOLLOWED_SCOPE_ENABLED', - default=True, - description=_('Enable "Followed Questions" selector'), - ) -) - -SCOPE_CHOICES_AUTHENTICATED = ( - ('all', _('All Questions')), - ('unanswered', _('Unanswered Questions')), - ('followed', _('Followed Questions')) -) - -settings.register( - livesettings.StringValue( - MAIN_PAGES, - 'DEFAULT_SCOPE_AUTHENTICATED', - choices=SCOPE_CHOICES_AUTHENTICATED, - default='all', - description=_('Default questions selector for the authenticated users') - ) -) - -SCOPE_CHOICES_ANONYMOUS = (#anonymous users can't see followed questions - ('all', _('All Questions')), - ('unanswered', _('Unanswered Questions')), -) - -settings.register( - livesettings.StringValue( - MAIN_PAGES, - 'DEFAULT_SCOPE_ANONYMOUS', - choices=SCOPE_CHOICES_ANONYMOUS, - default='all', - description=_('Default questions selector for the anonymous users') - ) -) |