From af2fa7143f68cc56b2c5053f2f079399bbba6885 Mon Sep 17 00:00:00 2001 From: hernani Date: Thu, 17 Mar 2011 00:32:04 +0000 Subject: [PATCH 1/1] Makes tips on the ask a question page editable in the admin. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@860 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/settings/sidebar.py | 23 +++++++++++ .../default/templates/question_edit_tips.html | 38 +++---------------- 2 files changed, 29 insertions(+), 32 deletions(-) diff --git a/forum/settings/sidebar.py b/forum/settings/sidebar.py index ee75293..2242538 100644 --- a/forum/settings/sidebar.py +++ b/forum/settings/sidebar.py @@ -16,6 +16,29 @@ label = _("Application intro"), help_text = _("The introductory page that is visible in the sidebar for anonymous users."), widget=Textarea)) +QUESTION_TITLE_TIPS = Setting('QUESTION_TITLE_TIPS', +u""" + - **ask a question relevant to the |APP_TITLE| community** + - the title must be in the form of a question + - provide enough details + - be clear and concise +""" +, SIDEBAR_SET, dict( +label = "Question title tips", +help_text = "Tips visible on the ask or edit questions page about the question title.", +required=False)) + +QUESTION_TAG_TIPS = Setting('QUESTION_TAG_TIPS', +u""" + - Tags are words that will tell others what this question is about. + - They will help other find your question. + - A question can have up to |FORM_MAX_NUMBER_OF_TAGS| tags, but it must have at least |FORM_MIN_NUMBER_OF_TAGS|. +""" +, SIDEBAR_SET, dict( +label = "Tagging tips", +help_text = "Tips visible on the ask or edit questions page about good tagging.", +required=False)) + SIDEBAR_UPPER_SHOW = Setting('SIDEBAR_UPPER_SHOW', True, SIDEBAR_SET, dict( label = "Show Upper Block", diff --git a/forum/skins/default/templates/question_edit_tips.html b/forum/skins/default/templates/question_edit_tips.html index 649ce8c..ce7ac95 100644 --- a/forum/skins/default/templates/question_edit_tips.html +++ b/forum/skins/default/templates/question_edit_tips.html @@ -1,26 +1,10 @@ +{% load markup %} {% load i18n general_sidebar_tags %}

{% trans "Title Tips" %}

-
-
    -
  • - - {% blocktrans with settings.APP_SHORT_NAME as app_title %} - ask a question relevant to the {{ app_title }} community - {% endblocktrans %} - -
  • -
  • - {% trans "the title must be in the form of a question" %} -
  • -
  • - {% trans "please try provide enough details" %} -
  • -
  • - {% trans "be clear and concise" %} -
  • -
+
+ {{ settings.QUESTION_TITLE_TIPS|markdown:"settingsparser" }} @@ -31,19 +15,9 @@

{% trans "What Are Tags" %}

-
    -
  • - {% trans "Tags are words that will tell others what this question is about." %} -
  • -
  • - {% trans "They will help other find your question." %} -
  • -
  • - {% blocktrans with settings.FORM_MAX_NUMBER_OF_TAGS as max_number_of_tags and settings.FORM_MIN_NUMBER_OF_TAGS as min_number_of_tags %} - A question can have up to {{max_number_of_tags}} tags, but it must have at least {{min_number_of_tags}}. - {% endblocktrans %} -
  • -
+
+ {{ settings.QUESTION_TAG_TIPS|markdown:"settingsparser" }} +
-- 2.39.5