<?php require_once(THEME_ROOT . '/blocks/head.php'); ?>
<?php require_once(THEME_ROOT . '/blocks/top.php'); ?>
<br><br>
<div class="container">
    <div class="row">
<div class="main">
    <h3><?php echo T('Часто задаваемые вопросы'); ?></h3>
</div>

<div class="panel-group" id="accordion">

    <?php $i = 1;
    $fist_item = true;
    foreach (get_content_faq() as $index => $value) { ?>
        <div class="panel panel-default">
            <div class="panel-heading" style="cursor:pointer;">
                <h4 class="panel-title">
                    <a data-toggle="collapse" data-parent="#accordion" style="text-decoration:none; display:block;" href="#collapse<?php echo (int)$i; ?>">
                        <?php echo T(html($index)); ?>
                    </a>
                </h4>
            </div>
            <div id="collapse<?php echo (int)$i; ?>" class="panel-collapse collapse <?php if ($fist_item) { echo 'in'; $fist_item = false; } ?>">
                <div class="panel-body">
                    <?php foreach ($value as $question => $answer) { ?>
                        <b>
                            <i class="fa fa-caret-right"></i>
                            <?php echo T(html($question)); ?>
                        </b>
                        <p>
                            <?php echo T(html($answer)); ?>
                        </p>
                    <?php } ?>
                </div>
            </div>
        </div>
        <?php $i++;
    } ?>

</div>
    </div>
</div>
<?php
require_once(THEME_ROOT . "/blocks/footer.php");
?>
