]> git.openstreetmap.org Git - osqa.git/commitdiff
Adds an optional "announcement bar".
authorhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Fri, 25 Jun 2010 22:40:58 +0000 (22:40 +0000)
committerhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Fri, 25 Jun 2010 22:40:58 +0000 (22:40 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@446 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/settings/static.py
forum/skins/default/templates/header.html

index 4d6fb8ca0b1eb673f4c86d592913704259a71725..97b595252769a6ccbc34b630bc8ba062bcdd564c 100644 (file)
@@ -32,6 +32,17 @@ CUSTOM_HEADER = Setting('CUSTOM_HEADER', '', HEAD_AND_FOOT_SET, dict(
         widget=Textarea(attrs={'rows': '25'}),
         required=False))
 
         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."),
 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."),
index 5710550f8631981caaf95439845d7cae8b0f9887..bf5160bf4c5dee337d35c7e496f52666f2d4f1e0 100644 (file)
@@ -1,5 +1,5 @@
 <!-- template header.html -->
 <!-- template header.html -->
-{% load extra_tags ui_registry i18n %}
+{% load extra_tags ui_registry i18n extra_filters markup %}
 
        <div id="roof">
                <div id="navBar">
 
        <div id="roof">
                <div id="navBar">
             </tr>
                        </table>
                </div>
             </tr>
                        </table>
                </div>
-       </div>
+               {% if settings.USE_ANNOUNCEMENT_BAR|or_preview:request %}
+        <div id="announcement">
+            {{ settings.ANNOUNCEMENT_BAR|or_preview:request|markdown:"settingsparser" }}
+        </div>
+        {% endif %}
+       </div>                 
 <!-- end template header.html -->
 <!-- end template header.html -->