diff options
-rw-r--r-- | askbot/conf/sidebar_question.py | 15 | ||||
-rw-r--r-- | askbot/templates/question.html | 2 | ||||
-rw-r--r-- | askbot/templates/question/content.html | 13 |
3 files changed, 20 insertions, 10 deletions
diff --git a/askbot/conf/sidebar_question.py b/askbot/conf/sidebar_question.py index feebf896..ffe2f783 100644 --- a/askbot/conf/sidebar_question.py +++ b/askbot/conf/sidebar_question.py @@ -29,6 +29,21 @@ settings.register( settings.register( values.LongStringValue( SIDEBAR_QUESTION, + 'QUESTION_PAGE_ANSWER_BANNER', + description = _('Answers banner'), + default = '', + help_text = _( + 'This banner will show above the second answer. ' + 'When using this option, please ' + 'use the HTML validation service to make sure that ' + 'your input is valid and works well in all browsers.' + ) + ) +) + +settings.register( + values.LongStringValue( + SIDEBAR_QUESTION, 'SIDEBAR_QUESTION_HEADER', description = _('Custom sidebar header'), default = '', diff --git a/askbot/templates/question.html b/askbot/templates/question.html index 5a317707..e2e6f394 100644 --- a/askbot/templates/question.html +++ b/askbot/templates/question.html @@ -209,7 +209,7 @@ {% endblock %} {% block content %} <div> - {{ settings.QUESTION_PAGE_TOP_BANNER }} + {{ settings.QUESTION_PAGE_TOP_BANNER|safe }} </div> {% if is_cacheable %} {% cache long_time "thread-content-html" thread.id %} diff --git a/askbot/templates/question/content.html b/askbot/templates/question/content.html index 66b3014b..7efc1d54 100644 --- a/askbot/templates/question/content.html +++ b/askbot/templates/question/content.html @@ -1,34 +1,29 @@ {% import "macros.html" as macros %} -{# ==== BEGIN: question/question_card.html ==== #} {% include "question/question_card.html" %} -{# ==== END: question/question_card.html ==== #} {% if answers %} <div class="clean"></div> - {# ==== START: question/answer_tab_bar.html ==== #} {% include "question/answer_tab_bar.html" %} - {# ==== END: question/answer_tab_bar.html ==== #} <div class="clean"></div> {{ macros.paginator(paginator_context, anchor='#sort-top') }} <div class="clean"></div> {% for answer in answers %} - {# ==== START: question/answer_card.html ==== #} + {% if answers|length > 1 and loop.index == 2 %} + {{ settings.QUESTION_PAGE_ANSWER_BANNER|safe }} + {% endif %} {% include "question/answer_card.html" %} - {# ==== END: question/answer_card.html ==== #} {% endfor %} + {{ macros.paginator(paginator_context, anchor='#sort-top') }} <div class="clean"></div> {% else %} - {# ==== START: question/sharing_prompt_phrase.html ==== #} {% include "question/sharing_prompt_phrase.html" %} - {# ==== END: question/sharing_prompt_phrase.html ==== #} {% endif %} -{# ==== START: question/new_answer_form.html ==== #} {# buttons below cannot be cached yet #} {% if user_already_gave_answer %} <a |