fix template forum - refs #2681
parent
223f3658c6
commit
5b6eb88465
@ -1,90 +1,90 @@ |
||||
{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %} |
||||
{% import '@ChamiloTheme/Macros/box.html.twig' as macro %} |
||||
|
||||
{% block content %} |
||||
{% autoescape false %} |
||||
|
||||
{{ introduction_section }} |
||||
{{ form_content }} |
||||
|
||||
<div class="accordion forum" id="accordion-forum"> |
||||
{% if data is not empty %} |
||||
{% for item in data %} |
||||
<div class="category-forum" id="category_{{ item.id }}"> |
||||
<div class="float-right"> |
||||
{{ item.tools }} |
||||
</div> |
||||
<h3> |
||||
{{ 'forum_blue.png'|img(32) }} |
||||
<div class="card"> |
||||
<h5 class="card-header" id="heading-{{ item.id }}"> |
||||
<div class="float-actions"> |
||||
{{ item.tools }} |
||||
</div> |
||||
<a href="#" data-toggle="collapse" class="btn btn-link" data-target="#collapse-{{ item.id }}" aria-expanded="true" aria-controls="collapse-{{ item.id }}"> |
||||
{{ 'forum_blue.png'|img(32) }} |
||||
</a> |
||||
<a href="{{ item.url }}" title="{{ item.title }}">{{ item.title }}{{ item.icon_session }}</a> |
||||
</h3> |
||||
<div class="forum-description"> |
||||
{{ item.description }} |
||||
</div> |
||||
</div> |
||||
{% for subitem in item.forums %} |
||||
<div class="forum_display"> |
||||
<div class="card forum"> |
||||
<div class="card-body"> |
||||
<div class="row"> |
||||
<div class="col-md-3"> |
||||
<div class="number-post"> |
||||
<a href="{{ forum.url }}" title="{{forum.title}}"> |
||||
{% if subitem.forum_image is not empty %} |
||||
<img src="{{ subitem.forum_image }}" width="48px"> |
||||
{% else %} |
||||
{% if subitem.forum_of_group == 0 %} |
||||
{{ 'forum_group.png'|img(48) }} |
||||
{% else %} |
||||
{{ 'forum.png'|img(48) }} |
||||
{% endif %} |
||||
{% endif %} |
||||
</a> |
||||
<p>{{ 'ForumThreads'| get_lang }}: {{ subitem.number_threads }} </p> |
||||
</h5> |
||||
<div id="collapse-{{ item.id }}" class="collapse show" aria-labelledby="heading-{{ item.id }}" data-parent="#accordion-forum"> |
||||
<div class="card-body"> |
||||
|
||||
<div class="forum-description"> |
||||
{{ item.description }} |
||||
</div> |
||||
{% for subitem in item.forums %} |
||||
{% set content %} |
||||
<div class="d-flex flex-row bd-highlight mb-3"> |
||||
<div class="p-2 bd-highlight"> |
||||
<div class="avatar"> |
||||
<img src="{{ subitem.avatar }}" width="32px" class="rounded-circle"> |
||||
</div> |
||||
</div> |
||||
<div class="col-md-9"> |
||||
<div class="float-right"> |
||||
<div class="toolbar"> |
||||
{{ subitem.tools }} |
||||
</div> |
||||
</div> |
||||
<h3 class="title"> |
||||
{{ 'forum_yellow.png'|img(32) }} |
||||
<a href="{{ subitem.url }}" title="{{ subitem.title }}" class="{{ subitem.visibility != '1' ? 'text-muted': '' }}">{{ subitem.title }}</a> |
||||
{% if subitem.forum_of_group != 0 %} |
||||
<a class="forum-goto" href="../group/group_space.php?{{ _p.web_cid_query }}&gidReq={{ subitem.forum_of_group }}"> |
||||
{{ "forum.png"|img(22) }} {{ "GoTo"|get_lang }} {{ subitem.forum_group_title }} |
||||
</a> |
||||
{% endif %} |
||||
{{ subitem.icon_session }} |
||||
</h3> |
||||
{% if subitem.last_poster_id is not empty %} |
||||
<div class="forum-date"> |
||||
<i class="fa fa-comments" aria-hidden="true"></i> |
||||
{{ subitem.last_poster_date }} |
||||
{{ "By"|get_lang }} |
||||
{{ subitem.last_poster_user }} |
||||
<div class="p-2 bd-highlight"> |
||||
<h4 class="title"> |
||||
<a href="{{ subitem.url }}" title="{{ subitem.title }}" class="{{ subitem.visibility != '1' ? 'text-muted': '' }}">{{ subitem.title }}</a> |
||||
{% if subitem.forum_of_group != 0 %} |
||||
<a class="forum-goto" href="../group/group_space.php?{{ _p.web_cid_query }}&gidReq={{ subitem.forum_of_group }}"> |
||||
{{ "forum.png"|img(22) }} {{ "GoTo"|get_lang }} {{ subitem.forum_group_title }} |
||||
</a> |
||||
{% endif %} |
||||
{{ subitem.icon_session }} |
||||
<div class="float-right"> |
||||
<div class="toolbar"> |
||||
{{ subitem.tools }} |
||||
</div> |
||||
</div> |
||||
{% endif %} |
||||
<div class="description"> |
||||
{{ subitem.description }} |
||||
</div> |
||||
{{ subitem.alert }} |
||||
{% if subitem.moderation is not empty %} |
||||
<span class="label label-warning"> |
||||
{{ "PostsPendingModeration"|get_lang }}: {{ subitem.moderation }} |
||||
</span> |
||||
{% endif %} |
||||
</h4> |
||||
<ul class="forum-threads"> |
||||
<li class="threads">{{ 'ForumThreads'| get_lang }}: {{ subitem.number_threads }} </li> |
||||
{% if subitem.last_poster_id is not empty %} |
||||
<li class="date"> |
||||
<i class="fa fa-comments" aria-hidden="true"></i> |
||||
{{ subitem.last_poster_date }} |
||||
{{ "By"|get_lang }} |
||||
{{ subitem.last_poster_user }} |
||||
</li> |
||||
{% endif %} |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
<div class="description"> |
||||
{{ subitem.description }} |
||||
</div> |
||||
{{ subitem.alert }} |
||||
|
||||
{% if subitem.moderation is not empty %} |
||||
<span class="label label-warning"> |
||||
{{ "PostsPendingModeration"|get_lang }}: {{ subitem.moderation }} |
||||
</span> |
||||
{% endif %} |
||||
{% endset %} |
||||
{% set forum_id = 'forum-'~ subitem.id %} |
||||
<div class="list-forum"> |
||||
{{ macro.panel_box(forum_id,'', content ) }} |
||||
</div> |
||||
</div> |
||||
{% endfor %} |
||||
</div> |
||||
{% endfor %} |
||||
</div> |
||||
</div> |
||||
{% endfor %} |
||||
{% else %} |
||||
<div class="alert alert-warning"> |
||||
{{ 'NoForumInThisCategory'|get_lang }} |
||||
</div> |
||||
{% endif %} |
||||
</div> |
||||
{% endautoescape %} |
||||
{% endblock %} |
||||
|
Loading…
Reference in new issue