diff options
author | Jayaram Pai | 2014-03-19 13:22:23 +0530 |
---|---|---|
committer | Jayaram Pai | 2014-03-19 13:22:23 +0530 |
commit | dffa556eede4d633879e55b60bf95e4469c530c0 (patch) | |
tree | 4f20ef8a8291123adfef10101a727b4f1029b0e1 /static/website/templates/user-answers.html | |
parent | 45ee2992b4ec72c62d5ce69611589521e16d0366 (diff) | |
download | spoken-tutorial-forums-dffa556eede4d633879e55b60bf95e4469c530c0.tar.gz spoken-tutorial-forums-dffa556eede4d633879e55b60bf95e4469c530c0.tar.bz2 spoken-tutorial-forums-dffa556eede4d633879e55b60bf95e4469c530c0.zip |
added commenting feature on the answers
replies are now renamed to answers
Diffstat (limited to 'static/website/templates/user-answers.html')
-rw-r--r-- | static/website/templates/user-answers.html | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/static/website/templates/user-answers.html b/static/website/templates/user-answers.html new file mode 100644 index 0000000..34a1c68 --- /dev/null +++ b/static/website/templates/user-answers.html @@ -0,0 +1,36 @@ +{% extends 'website/templates/base.html' %} +{% load count_tags %} +{% block content %} + <h4>My Answers</h4> + {% for answer in answers%} + <div class="my-answer"> + <span class="body"> + <a href="{% url 'website:get_question' answer.question.id %}#answer{{ answer.id }}">{{ answer.body|safe }}</a> + </span> + <br> + <span class="date"> + <small> + Replied on: + {{ answer.date_created }} + </small> + </span> + </div> + {% endfor %} + + {% if total > 10 %} + <ul class="pagination pull-right"> + {% for i in total|get_range:"0,10" %} + <li> + <a href="{% url 'website:user_answers' user.id %}?marker={{ i }}"> + {% if i == marker %} + <strong>{{ i|div:"10"|inc }}</strong> + {% else %} + {{ i|div:"10"|inc }} + {% endif %} + </a> + </li> + {% endfor %} + </ul> + {% endif %} + +{% endblock %} |