summaryrefslogtreecommitdiffstats
path: root/askbot/templates/question.html
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-03-27 23:41:46 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-03-27 23:41:46 -0400
commit85db009cc8f28f98c277c3631f169b5d648a1155 (patch)
tree3225549f3a128bf4671079aa09d047fa02de70c4 /askbot/templates/question.html
parenta4a2fcf214813d5c79908609b335cab3d2599a62 (diff)
parent86c38acf1038c23f0f4bd83a980cf5369834eaf5 (diff)
downloadaskbot-85db009cc8f28f98c277c3631f169b5d648a1155.tar.gz
askbot-85db009cc8f28f98c277c3631f169b5d648a1155.tar.bz2
askbot-85db009cc8f28f98c277c3631f169b5d648a1155.zip
merged the master branch
Diffstat (limited to 'askbot/templates/question.html')
-rw-r--r--askbot/templates/question.html46
1 files changed, 45 insertions, 1 deletions
diff --git a/askbot/templates/question.html b/askbot/templates/question.html
index 9b1f8a6c..5fa32206 100644
--- a/askbot/templates/question.html
+++ b/askbot/templates/question.html
@@ -8,7 +8,6 @@
{% block forestyle %}
<link rel="canonical" href="{{settings.APP_URL|strip_path}}{{question.get_absolute_url()}}" />
<link rel="stylesheet" type="text/css" href="{{'/js/wmd/wmd.css'|media}}" />
- <link href="{{'/bootstrap/css/bootstrap.css'|media}}" rel="stylesheet" type="text/css" />
{% endblock %}
{% block forejs %}
<script type="text/javascript">
@@ -151,6 +150,14 @@
if (flags.length > 0) {
removeNode(flags[0]);
}
+ var closeBtn = findChildrenByClassName(controls, 'question-close');
+ if (
+ closeBtn.length === 1 &&
+ data['userReputation'] <
+ {{ settings.MIN_REP_TO_CLOSE_OTHERS_QUESTIONS }}
+ ) {
+ removeNode(closeBtn[0]);
+ }
if (//maybe remove "edit" button
data['userReputation'] <
{{settings.MIN_REP_TO_EDIT_OTHERS_POSTS}}
@@ -240,10 +247,47 @@
{% include "question/sidebar.html" %}
{% endblock %}
{% block endjs %}
+ <script type='text/javascript'>
+ {# not compressable #}
+ {% if settings.ENABLE_MATHJAX or settings.MARKUP_CODE_FRIENDLY %}
+ var codeFriendlyMarkdown = true;
+ {% else %}
+ var codeFriendlyMarkdown = false;
+ {% endif %}
+ var maxCommentLength = {{settings.MAX_COMMENT_LENGTH}};
+ askbot['urls']['postComments'] = '{% url post_comments %}';
+ askbot['urls']['editComment'] = '{% url edit_comment %}';
+ askbot['urls']['deleteComment'] = '{% url delete_comment %}';
+ askbot['urls']['convertComment'] = '{% url comment_to_answer %}';
+ askbot['urls']['getComment'] = '{% url get_comment %}';
+ askbot['urls']['saveDraftAnswer'] = '{% url save_draft_answer %}';
+ askbot['urls']['vote_url'] = '{% url vote question.id %}';
+ askbot['urls']['user_signin'] = '{{ settings.LOGIN_URL }}';
+ askbot['urls']['swap_question_with_answer'] = '{% url swap_question_with_answer %}';
+ askbot['urls']['upvote_comment'] = '{% url upvote_comment %}';
+ askbot['urls']['delete_post'] = '{% url delete_post %}';
+ askbot['urls']['get_html_template'] = '{% url get_html_template %}';
+ askbot['urls']['getGroupsList'] = '{% url get_groups_list %}';
+ askbot['urls']['publishAnswer'] = '{% url publish_answer %}';
+ askbot['data']['userIsThreadModerator'] = {{ user_is_thread_moderator|as_js_bool }};
+ askbot['data']['questionAuthorId'] = {{ question.author_id }};
+ askbot['data']['threadIsClosed'] = {{ thread.closed|as_js_bool }};
+ askbot['data']['answersSortTab'] = '{{ tab_id }}';
+ askbot['data']['questionId'] = {{ question.id }};
+ askbot['data']['threadSlug'] = '{{ thread.title|slugify }}';
+ askbot['messages']['addComment'] = '{% trans %}post a comment{% endtrans %}';
+ askbot['settings']['saveCommentOnEnter'] = {{ settings.SAVE_COMMENT_ON_ENTER|as_js_bool }};
+ askbot['settings']['tagSource'] = '{{ settings.TAG_SOURCE }}';
+ askbot['settings']['enableSharingGoogle'] = {{ settings.ENABLE_SHARING_GOOGLE|as_js_bool }};
+ </script>
+ {% include "meta/editor_data.html" %}
+ {% compress js %}
{% include "question/javascript.html" %}
{% if settings.TAG_SOURCE == 'category-tree' %}
{% include "meta/category_tree_js.html" %}
{% endif %}
+ {% include "question/custom_javascript.html" ignore missing %}
+ {% endcompress %}
{#
<script type="text/javascript">
var messages = askbot['messages'];