]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/ask.html
OSQA-263
[osqa.git] / forum / skins / default / templates / ask.html
index 35a6c2c50acd383fb971572897dbd8498fa66559..4eb806b1feb2cf8c980f478814ccd95a97d39a6a 100644 (file)
@@ -7,8 +7,16 @@
         <script type='text/javascript' src='{% media  "/media/js/wmd/showdown.js" %}'></script>
         <script type='text/javascript' src='{% media  "/media/js/wmd/wmd.js" %}'></script>
         <link rel="stylesheet" type="text/css" href="{% media  "/media/js/wmd/wmd.css" %}" />
         <script type='text/javascript' src='{% media  "/media/js/wmd/showdown.js" %}'></script>
         <script type='text/javascript' src='{% media  "/media/js/wmd/wmd.js" %}'></script>
         <link rel="stylesheet" type="text/css" href="{% media  "/media/js/wmd/wmd.css" %}" />
+        <script type="text/html" id="question-summary-template">
+            <div class="answer-summary">
+                <a href="%URL%"><div class="answer-votes">%SCORE%</div></a>
+                <div class="answer-link">
+                    <a class="question-hyperlink" href="%URL%" title="%SUMMARY%">%TITLE%</a>
+                </div>
+            </div>
+        </script>
         <script type="text/javascript">
         <script type="text/javascript">
-        $().ready(function(){
+        $(function(){
             //set current module button style
             $("#nav_ask").attr('className',"on");
             $('#editor').TextAreaResizer();
             //set current module button style
             $("#nav_ask").attr('className',"on");
             $('#editor').TextAreaResizer();
@@ -26,7 +34,7 @@
             });
 
             //Tags autocomplete action
             });
 
             //Tags autocomplete action
-               $("#id_tags").autocomplete("/matching_tags", {
+               $("#id_tags").autocomplete("/matching_tags/", {
                 minChars: 1,
                        matchContains: true,
                 max: 20,
                 minChars: 1,
                        matchContains: true,
                 max: 20,
 
             });
         });
 
             });
         });
+
+        var related_questions_url = "{% url related_questions %}";
         </script>
         </script>
+        <script src="{% media "/media/js/osqa.ask.js" %}" type="text/javascript"></script>
 {% endblock %}
 
 {% block content %}
 {% endblock %}
 
 {% block content %}
@@ -57,7 +68,7 @@
 </div>
 <div id="main-body" class="ask-body">
     <div id="askform">
 </div>
 <div id="main-body" class="ask-body">
     <div id="askform">
-        <form id="fmask" action="" method="post" >
+        <form id="fmask" action="" method="post" accept-charset="utf-8">
                        {% if not request.user.is_authenticated %}
             <div class="message">
                            <p>{% trans "login to post question info" %}</p>
                        {% if not request.user.is_authenticated %}
             <div class="message">
                            <p>{% trans "login to post question info" %}</p>
                     {{ form.title.help_text }}
                 </div>
             </div>
                     {{ form.title.help_text }}
                 </div>
             </div>
-
+            <div id="ask-related-questions"></div>
             <div class="form-item">
                 <div id="wmd-button-bar" class="wmd-panel"></div>
                 {{ form.text }} {{ form.text.errors }}
             <div class="form-item">
                 <div id="wmd-button-bar" class="wmd-panel"></div>
                 {{ form.text }} {{ form.text.errors }}
-
                 <div class="preview-toggle">
                     <table width="100%">
                         <tr>
                 <div class="preview-toggle">
                     <table width="100%">
                         <tr>