Add faq index see BT#10668

ofaj
Julio 10 years ago
parent 6a3b6868ef
commit ec815e8bc4
  1. 30
      src/Chamilo/FaqBundle/Resources/views/Faq/index.html.twig

@ -2,13 +2,40 @@
{% block sonata_page_container %}
<h1>FAQ</h1>
<br />
<div class="well">
<ul>
{% for category in categories %}
<li class="active">
<h3>{{ category.getHeadline|e }}</h3>
</li>
<ul>
{% set list = [false] %}
{% if is_granted('IS_AUTHENTICATED_FULLY') %}
{% set list = [false, true] %}
{% endif %}
{% for question in category.questions if question.onlyAuthUsers in list %}
{% if question.isActive %}
<li>
<a href="#{{ question.id }}">
{{ question.getHeadline|e }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% endfor %}
</ul>
</div>
<br />
<ul>
{% for category in categories %}
<li class="active">
<h2>{{ category.getHeadline|e }}</h2>
</li>
<ul>
{% set list = [false] %}
{% if is_granted('IS_AUTHENTICATED_FULLY') %}
@ -21,6 +48,7 @@
<h3>
{{ question.getHeadline|e }}
</h3>
<a name="{{ question.id }}" id="{{ question.id }}"></a>
<p>{{ question.getBody }}</p>
</li>
{% endif %}

Loading…
Cancel
Save