<?php

use yii\helpers\Html;

?>

<?php if($output) : ?>
    
    <div class="panel-group panel-group-2" id="accordion_2">
        <div class="panel panel-default">
            <div class="panel-heading table-responsive">

                <table class="w100pr table_header">
                    <tbody>
                        <tr>
                            <td>
                                <p class="panel-title2 pull-left">
                                    <!-- <a href=""><span class="glyphicon glyphicon-align-justify"></span></a>&nbsp;&nbsp; -->
                                    <a href=""><strong><?=$title?></strong></a>&nbsp;&nbsp;
                                </p>
                            </td>
                            <td class="box_td">
                                <p><strong>Дата <br> поступления</strong></p>
                            </td>
                            <td class="box_td">
                                <p><strong>Срок <br> исполнения</strong></p>
                            </td>
                            <td class="box_td">
                                <p><strong>Стоимость <br> руб.</strong></p>
                            </td>
                        </tr>
                    </tbody>
                </table>

            </div>
            <div id="collapse_1" class="panel-collapse collapse in">
                
                <?php foreach ($output as $model) : ?>
                    <div class="panel-body panel-body-ex-1 color_on_cursor gray_box_2">
                        <table class="w100pr">
                            <tbody>
                                <tr>
                                    <td class="box_td_fir">
                                        <!-- <div class="arrov_poz pull-left">
                                            <a href=""><span class="caret caret_top"></span></a>
                                            <a href=""><span class="caret"></span></a>
                                        </div> -->
                                        <span><?=$model['id']?></span>
                                    </td>
                                    <td class="box_td_cont">
                                        <p><strong><?=Html::a($model['subject'], ['/support/view/'.$model['id']])?></strong></p>
                                    </td>
                                    <td class="box_td">
                                        <span><?=date('d.m.Y', strtotime($model['created_on']))?></span>
                                    </td>
                                    <td class="box_td">
                                        <span><?=($model->due_date?date('d.m.Y', strtotime($model['due_date'])):'')?></span>
                                    </td>
                                    <td class="box_td">
                                        <p class="pull-left"><strong><?=Yii::$app->formatter->asCurrency($model['price_for_customer'], 'RUR', [], [\NumberFormatter::CURRENCY_SYMBOL => '₽'])?></strong></p>
                                        
                                        <!-- <div class="tooltip_wr pull-right">
                                            <div class="tooltip_box">Счет был выставлен</div>
                                            <span class="tooltip_cont"><img src="/images/score_icon.jpg" height="24" width="19" alt=""></span>
                                        </div> -->                                        
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                <?php endforeach; ?>

            </div>
        </div>

    </div>
<?php endif; ?>