From 64f3b2395b7168cd35ac86330033c3c7955fafad Mon Sep 17 00:00:00 2001 From: hernani Date: Fri, 25 Jun 2010 22:40:58 +0000 Subject: [PATCH] Adds an optional "announcement bar". git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@446 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/settings/static.py | 11 +++++++++++ forum/skins/default/templates/header.html | 9 +++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/forum/settings/static.py b/forum/settings/static.py index 4d6fb8c..97b5952 100644 --- a/forum/settings/static.py +++ b/forum/settings/static.py @@ -32,6 +32,17 @@ CUSTOM_HEADER = Setting('CUSTOM_HEADER', '', HEAD_AND_FOOT_SET, dict( widget=Textarea(attrs={'rows': '25'}), required=False)) +USE_ANNOUNCEMENT_BAR = Setting('USE_ANNOUNCEMENT_BAR', False, HEAD_AND_FOOT_SET, dict( + label = _("Show announcement bar"), + help_text = _("Some piece of content that goes under the search bar and can be used for announcements, etc."), + required=False)) + +ANNOUNCEMENT_BAR = Setting('ANNOUNCEMENT_BAR', '', HEAD_AND_FOOT_SET, dict( + label = _("Announcement bar"), + help_text = _("The announcement bar content."), + widget=Textarea(attrs={'rows': '25'}), + required=False)) + USE_CUSTOM_FOOTER = Setting('USE_CUSTOM_FOOTER', False, HEAD_AND_FOOT_SET, dict( label = _("Use custom footer"), help_text = _("Do you want to use a custom footer."), diff --git a/forum/skins/default/templates/header.html b/forum/skins/default/templates/header.html index 5710550..bf5160b 100644 --- a/forum/skins/default/templates/header.html +++ b/forum/skins/default/templates/header.html @@ -1,5 +1,5 @@ -{% load extra_tags ui_registry i18n %} +{% load extra_tags ui_registry i18n extra_filters markup %}
-
+ {% if settings.USE_ANNOUNCEMENT_BAR|or_preview:request %} +
+ {{ settings.ANNOUNCEMENT_BAR|or_preview:request|markdown:"settingsparser" }} +
+ {% endif %} + -- 2.39.5