Skip to content

Commit

Permalink
[feat-155965544] : modify the template to display the questions and a…
Browse files Browse the repository at this point in the history
…nswers
  • Loading branch information
Rodgers-M committed Apr 8, 2018
1 parent 7a68579 commit d2bfa5a
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion templates/front/faqs.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,36 @@

{% block content %}
{%if question_list%}
here are the questiions

<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
{% for question in question_list %}
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingOne">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion"
href="#collapse{{question.id}}"
{%if loop.first %}
aria-expanded="true"
{%else%}
aria-expanded="false"
{%endif%}
aria-controls="collapse{{question.id}}">
{{question.question_text}}
{{loop.index}}
</a>
</h4>
</div>
<div id="collapse{{question.id}}" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
<div class="panel-body">
{%for answer in question.answer_set.all%}
<p>{{answer.answer_text}}</p>
{%endfor%}
</div>
</div>
</div>
{%endfor %}
</div>

{%else %}
no questions
{% endif%}
Expand Down

0 comments on commit d2bfa5a

Please sign in to comment.