summaryrefslogtreecommitdiff
path: root/static/website/templates/get-question.html
diff options
context:
space:
mode:
authorJayaram Pai2013-12-11 15:31:24 +0530
committerJayaram Pai2013-12-11 15:31:24 +0530
commit3a680b5d2442268ab117c0f98f21a039d4544bd8 (patch)
treead3b7e40a99cea53d63d0dc9e5fe216178dff7b9 /static/website/templates/get-question.html
parent0dd964ec05401809a408ab55d5517d3b2fba3a85 (diff)
downloadFOSSEE-Forum-3a680b5d2442268ab117c0f98f21a039d4544bd8.tar.gz
FOSSEE-Forum-3a680b5d2442268ab117c0f98f21a039d4544bd8.tar.bz2
FOSSEE-Forum-3a680b5d2442268ab117c0f98f21a039d4544bd8.zip
base one
Diffstat (limited to 'static/website/templates/get-question.html')
-rw-r--r--static/website/templates/get-question.html23
1 files changed, 6 insertions, 17 deletions
diff --git a/static/website/templates/get-question.html b/static/website/templates/get-question.html
index 5e68aed..bd63d02 100644
--- a/static/website/templates/get-question.html
+++ b/static/website/templates/get-question.html
@@ -2,13 +2,13 @@
{% load static %}
{% load widget_tweaks %}
{% block content %}
-<div class="question">
+<div class="question {% ifequal question.user|stringformat:'s' user|stringformat:'s' %}editable{% endifequal %}">
<div class="title">
<a href=""> {{ question.title }} </a>
</div>
<div id="questionNicPanel"></div>
- <div id="questionInstance" class="body">
+ <div id="{% ifequal question.user|stringformat:'s' user|stringformat:'s' %}questionInstance{% endifequal %}" class="body">
{{ question.body|safe }}
</div>
<br>
@@ -48,7 +48,7 @@
<span class="modify">
{% ifequal question.uid|stringformat:'s' user.id|stringformat:'s' %}
<a class="edit btn btn-xs btn-info" href="#">Edit</a>
- <a id="save-{{ question.id }}" class="save btn btn-xs btn-success" href="#">Save</a>
+ <a class="save btn btn-xs btn-success" data-qid="{{ question.id }}" href="#">Save</a>
{% endifequal %}
</span>
@@ -65,7 +65,7 @@
</div>
{% for reply in replies %}
- <div class="reply {% ifequal reply.uid|stringformat:'s' user.id|stringformat:'s' %}editable{% endifequal %}">
+ <div class="reply {% ifequal reply.uid|stringformat:'s' user.id|stringformat:'s' %}editable{% endifequal %}" id="reply{{reply.id}}">
<div class="body" id="body{{ reply.id }}">
{{ reply.body|safe }}
@@ -78,7 +78,7 @@
{% 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>
+ <a class="save btn btn-xs btn-success vs" data-target="body{{ reply.id }}" data-rid="{{ reply.id }}" href="#">Save</a>
</span>
{% endifequal %}
</div> <!-- /.reply -->
@@ -111,16 +111,5 @@
{% endblock %}
{% block javascript %}
- {% if user.is_authenticated %}
- {% 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");
- });
- </script>
- {% endifequal %}
- {% endif %}
+ <script src="{% static 'website/js/thread-user.js' %}"></script>
{% endblock %}