diff --git a/main/forum/index.php b/main/forum/index.php index 45e3f34434..791052f82a 100755 --- a/main/forum/index.php +++ b/main/forum/index.php @@ -532,9 +532,6 @@ if (is_array($forumCategories)) { } } $tpl = new Template($nameTools); -if(api_get_configuration_value('forum_fold_categories')==true){ - $tpl->assign('forum_fold_categories', true); -} $tpl->assign('introduction', $introduction); $tpl->assign('actions', $actions); $tpl->assign('data', $listForumCategory); diff --git a/main/template/default/forum/list.tpl b/main/template/default/forum/list.tpl index 6bc89455ee..7f6316cc29 100644 --- a/main/template/default/forum/list.tpl +++ b/main/template/default/forum/list.tpl @@ -1,8 +1,15 @@ {% extends 'layout/layout_1_col.tpl'|get_template %} {% block content %} {{ form_content }} -{% if data is not empty %} - {% if(forum_fold_categories == true) %} + {% set configuration = 'forum_fold_categories'|api_get_configuration_value %} + {% if(configuration == true) %} + {% set collapsed = '' %} + {% set in_collapse = 'in' %} + {% else %} + {% set collapsed = 'collapsed' %} + {% set in_collapse = '' %} + {% endif %} + {% if data is not empty %}
{% for item in data %}
@@ -11,7 +18,7 @@ {{ item.tools }}

- @@ -19,7 +26,7 @@

-
+
{{ item.description }} @@ -84,91 +91,14 @@
{% endfor %} -
{% endfor %} - {% else %} - {% for item in data %} -
-
- {{ item.tools }} -
-

- {{ 'forum_blue.png'|img(32) }} - {{ item.title }}{{ item.icon_session }} -

-
- {{ item.description }} -
-
- {% for subitem in item.forums %} -
-
-
-
- -
-
-
- {{ subitem.tools }} -
-
-

- {{ 'forum_yellow.png'|img(32) }} - {{ subitem.title }} - {% if subitem.forum_of_group != 0 %} - - {{ "forum.png"|img(22) }} {{ "GoTo"|get_lang }} {{ subitem.forum_group_title }} - - {% endif %} - {{ subitem.icon_session }} -

- {% if subitem.last_poster_id is not empty %} -
- - {{ subitem.last_poster_date }} - {{ "By"|get_lang }} - {{ subitem.last_poster_user }} -
- {% endif %} -
- {{ subitem.description }} -
- {{ subitem.alert }} - {% if subitem.moderation is not empty %} - - {{ "PostsPendingModeration"|get_lang }}: {{ subitem.moderation }} - - {% endif %} -
-
-
-
-
- {% endfor %} - {% endfor %} - {% endif %} {% else %}
{{ 'NoForumInThisCategory'|get_lang }}
- {% endif %} +{% endif %} {% endblock %}