Commit 59701c27 authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

Adde comment/reply/question system to index.

parent 4d47a4f0
<p>{{ comment.user.first_name }} {{ comment.user.last_name }} says:</p>
<p>{{ comment.text }}</p>
<a data-toggle="collapse" data-target="#replies{{comment.pk}}"
style="cursor:pointer;">
<em>Replies ({{ comment.get_replies|length }})</em></a>
<div class="row collapse" id="replies{{comment.pk}}">
<div class="col-lg-12">
<div class="well well-sm well-replies">
{% if comment.get_replies %}
{% for reply in comment.get_replies %}
{% include 'components/reply.html' %}
{% endfor %}
{% else %}
No replies yet.
{% endif %}
</div>
</div>
</div>
<!--
<div class="well well-sm collapse" id="replies{{comment.pk}}">
{% if comment.get_replies %}
{% else %}
No replies yet.
{% endif %}
</div>
-->
<div class="row">
<div class="col-lg-10 col-lg-offset-1">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">
{{question.user.first_name}} {{question.user.last_name}}
<span class="pull-right">
<em>Asked on {{question.date.date}}</em>
</span>
</h3>
</div>
<div class="panel-body">
{{ question.text }}
</div>
<div class="panel-footer">
<a data-toggle="collapse" data-target="#comments{{question.pk}}"
style="cursor:pointer;">
<em>Comments ({{ question.get_comments|length }})</em>
</a>
</div>
</div>
</div>
</div>
<div class="row collapse" id="comments{{question.pk}}">
<div class="col-lg-9 col-lg-offset-2">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">
Comments
</h3>
</div>
{% if question.get_comments %}
{% for comment in question.get_comments %}
<div class="panel-body">
{% include 'components/comment.html' %}
</div>
{% endfor %}
{% else %}
<div class="panel-body">
No comments yet.
</div>
{% endif %}
</div>
</div>
</div>
<p>{{ reply.user.first_name }} {{ reply.user.last_name }} says:<br />
{{ reply.text }}</p>
......@@ -10,35 +10,22 @@ HNRS 110 &bull; Homepage
<div class="row">
<div class="col-lg-10 col-lg-offset-1">
<h1>Research Question Review</h1>
<p class="lead">Description</p>
<p class="lead">Review and critique your peers' research questions.</p>
</div>
</div>
</div>
{% for question in questions %}
<div id="question{{ question.pk }}" class="question-box">
<div class="question-box-title">
<div class="question-box-title-left">
{{question.user.first_name}} {{question.user.last_name}}
</div>
<div class="question-box-title-right">
{{question.rating}}
</div>
</div>
<div class="question-text" id="question-text{{question.pk}}">
{{question.text}}
</div>
<div class="question-box-footer">
Toggle Comments
{% if questions %}
{% for question in questions %}
{% include 'components/question.html' %}
{% endfor %}
{% else %}
<div class="row">
<div class="col-lg-10 col-lg-offset-1">
No questions have yet been submitted. Why don't you try
<a href="/submit">submitting</a> one yourself!
</div>
</div>
{% endfor %}
{% endif %}
{% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment