Commit ab27cb2c authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

Formatted question detail page.

parent 845ca5a8
<div class="row">
<div class="col-lg-10 col-lg-offset-1">
<div class="panel panel-default">
<div class="panel-body">
<p>{{ comment.text }}</p>
<a data-toggle="collapse" data-target="#replies{{comment.pk}}"
style="cursor:pointer;">Replies ({{ comment.get_replies|length }})</a>
<div id="replies{{comment.pk}}" class="collapse">
{% if comment.get_replies %}
{% for reply in comment.get_replies %}
<div class="well well-sm well-replies">
{{ reply.text }}
</div>
{% endfor %}
{% else %}
<div class="well well-sm well-replies">
No replies yet.
</div>
{% endif %}
<div class="well well-sm well-replies">
{% include 'reply_form.html' %}
</div>
</div>
</div>
</div>
</div>
</div>
......@@ -17,7 +17,34 @@ HNRS 110 &bull; Homepage
{% if questions %}
{% for question in questions %}
{% include 'question_component.html' %}
<div class="row">
<div class="col-lg-10 col-lg-offset-1">
<div class="panel panel-default">
<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">
<p>{{ question.text }}</p>
<a href="{{ question.get_absolute_url }}">
Comments ({{ question.get_comments|length }})
</a>
</div>
</div>
</div>
</div>
{% endfor %}
{% else %}
<div class="row">
......
......@@ -10,16 +10,61 @@ HNRS 110 &bull; Question Discussion
<div class="row">
<div class="col-lg-10 col-lg-offset-1">
<h1>Question Discussion</h1>
<p class="lead">Description</p>
<p class="lead">Discuss the student's proposed question.</p>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-lg-offset-1">
<h1>{{question.user.first_name}} {{question.user.last_name}}</h1>
{{ question.text }}
<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="#make-comment"
style="cursor:pointer;">
Make Comment
</a>
<div class="collapse" id="make-comment">
Form
</div>
</div>
</div>
</div>
</div>
{% if question.get_comments %}
{% for comment in question.get_comments %}
{% include 'comment_panel.html' %}
{% endfor %}
{% else %}
<div class="row">
<div class="col-lg-10 col-lg-offset-1">
<div class="panel panel-danger">
<div class="panel-body">
There are no comments here yet.
</div>
</div>
</div>
</div>
{% endif %}
{% endblock %}
<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 href="{{ question.get_absolute_url }}">
<em>Comments ({{ question.get_comments|length }})</em>
</a>
</div>
</div>
</div>
</div>
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