summaryrefslogtreecommitdiffstats
path: root/askbot/templates
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-04-11 04:41:53 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2013-04-11 04:41:53 -0400
commit0e2b9b7225d71e6a1b8d9c929570daf5ef44c012 (patch)
tree4214bf6991ea1b08d5689b739700e0f6216981ed /askbot/templates
parent6b5ad87abfcc97653b57974a4f75c27bc2b18cc6 (diff)
downloadaskbot-0e2b9b7225d71e6a1b8d9c929570daf5ef44c012.tar.gz
askbot-0e2b9b7225d71e6a1b8d9c929570daf5ef44c012.tar.bz2
askbot-0e2b9b7225d71e6a1b8d9c929570daf5ef44c012.zip
refactored the voting function a little
Diffstat (limited to 'askbot/templates')
-rw-r--r--askbot/templates/main_page.html10
-rw-r--r--askbot/templates/main_page/javascript.html6
-rw-r--r--askbot/templates/question.html2
3 files changed, 11 insertions, 7 deletions
diff --git a/askbot/templates/main_page.html b/askbot/templates/main_page.html
index a0635a7a..0014dbe2 100644
--- a/askbot/templates/main_page.html
+++ b/askbot/templates/main_page.html
@@ -8,6 +8,9 @@
there is no html markup in this file
#}
<!-- questions.html -->
+{% block forejs %}
+ {% include "main_page/custom_head_javascript.html" ignore missing %}
+{% endblock %}
{% block title %}{% spaceless %}{% trans %}Questions{% endtrans %}{% endspaceless %}{% endblock %}
{% block content %}
{% include "main_page/tab_bar.html" %}
@@ -23,6 +26,13 @@
{% include "main_page/sidebar.html" %}
{% endblock %}
{% block endjs %}
+ <script type="text/javascript">
+ {# cant cache this #}
+ askbot['settings']['showSortByRelevance'] = {{ show_sort_by_relevance|as_js_bool }};
+ </script>
+ {% compress js %}
{% include "main_page/javascript.html" %}
+ {% include "main_page/custom_javascript.html" ignore missing %}
+ {% endcompress %}
{% endblock %}
<!-- end questions.html -->
diff --git a/askbot/templates/main_page/javascript.html b/askbot/templates/main_page/javascript.html
index dc6bdc94..3d1db550 100644
--- a/askbot/templates/main_page/javascript.html
+++ b/askbot/templates/main_page/javascript.html
@@ -1,9 +1,4 @@
<script type="text/javascript">
- {# cant cache this #}
- askbot['settings']['showSortByRelevance'] = {{ show_sort_by_relevance|as_js_bool }};
-</script>
-{% compress js %}
-<script type="text/javascript">
/*<![CDATA[*/
$(document).ready(function(){
/*var on_tab = '#nav_questions';
@@ -45,4 +40,3 @@
</script>
<script type='text/javascript' src='{{"/js/editor.js"|media}}'></script>
<script type='text/javascript' src='{{"/js/tag_selector.js"|media}}'></script>
-{% endcompress %}
diff --git a/askbot/templates/question.html b/askbot/templates/question.html
index 6235f7ed..0ab4221a 100644
--- a/askbot/templates/question.html
+++ b/askbot/templates/question.html
@@ -298,7 +298,7 @@
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']['vote_url'] = '{% url vote %}'
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 %}';