diff options
author | Jayaram Pai | 2013-12-09 12:47:18 +0530 |
---|---|---|
committer | Jayaram Pai | 2013-12-09 12:47:18 +0530 |
commit | 0dd964ec05401809a408ab55d5517d3b2fba3a85 (patch) | |
tree | 805c74ea457c551cea557be39d16fb91d42cea9f /static/website/templates/get-question.html | |
parent | b596364cf3f871887cce519291b684341cc5c014 (diff) | |
download | spoken-tutorial-forums-0dd964ec05401809a408ab55d5517d3b2fba3a85.tar.gz spoken-tutorial-forums-0dd964ec05401809a408ab55d5517d3b2fba3a85.tar.bz2 spoken-tutorial-forums-0dd964ec05401809a408ab55d5517d3b2fba3a85.zip |
reply edit with no ajax
Diffstat (limited to 'static/website/templates/get-question.html')
-rw-r--r-- | static/website/templates/get-question.html | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/static/website/templates/get-question.html b/static/website/templates/get-question.html index f6280cf..5e68aed 100644 --- a/static/website/templates/get-question.html +++ b/static/website/templates/get-question.html @@ -59,16 +59,29 @@ </div> <!-- /.question --> <h4><u>Answers:</u></h4> + +<div id="replyPanelWrapper" style="display:none;"> + <div id="replyNicPanel" style="display:none;"></div> +</div> + {% for reply in replies %} - <div class="reply"> - <span class="body"> + <div class="reply {% ifequal reply.uid|stringformat:'s' user.id|stringformat:'s' %}editable{% endifequal %}"> + + <div class="body" id="body{{ reply.id }}"> {{ reply.body|safe }} - </span> + </div> <span class="user"> {{ reply.user }} </span> - </div> + + {% ifequal reply.uid|stringformat:'s' user.id|stringformat:'s' %} + <span class="modify" style="display:block"> + <a class="edit btn btn-xs btn-info vs" href="#body{{ reply.id}}" data-target="body{{ reply.id }}">Edit</a> + <a id="save-{{ question.id }}" class="save btn btn-xs btn-success vs" href="#" data-target="body{{ reply.id }}">Save</a> + </span> + {% endifequal %} + </div> <!-- /.reply --> {% endfor %} <form action="{% url 'website:question_reply' %}" method="POST"> {% csrf_token %} @@ -102,6 +115,7 @@ {% ifequal question.user|stringformat:"s" user|stringformat:"s" %} <script src="{% static 'website/js/thread-user.js' %}"></script> {% else %} + <script src="{% static 'website/js/thread-user.js' %}"></script> <script type="text/javascript"> $(document).ready(function() { $(".question .body").removeAttr("id"); |