<?php
$view->extend('MarketZodacoBundle::base_admin.html.php');
?>
<div class="col-lg-12">
    <div class="panel panel-default">
        <div class="panel-heading"><?php echo $view['translator']->trans("Detail Help and Support"); ?></div>
        <div class="panel-body">
            <?php
            if (count($list) > 0) {
                ?>
                <form method="POST">
                    <table data-toggle="table"  data-show-refresh="false" data-show-toggle="false" data-show-columns="false" data-search="false" data-select-item-name="toolbar1" data-pagination="false">
                        <thead>
                            <tr>
                                <th data-field="id" data-sortable="true"><?php echo $view['translator']->trans("ID"); ?></th>
                                <th data-field="name"  data-sortable="true"><?php echo $view['translator']->trans("Name"); ?></th>
                                <th data-field="status" data-sortable="true"><?php echo $view['translator']->trans("Categories"); ?></th>
                                <th><?php echo $view['translator']->trans("Delete"); ?></th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php foreach ($list as $key => $value) { ?>
                                <tr data-index="<?php echo $value->getId(); ?>">
                                    <td style="">
                                        <?php echo $value->getId(); ?>
                                    </td>
                                    <td style="">
                                        <a href="<?php echo $view['router']->generate('edit_detail_info', array('id' => $value->getId()), true); ?>"><?php echo $value->getTitle(); ?></a>
                                    </td>
                                    <td style=""><?php echo $value->getInformationsCategories()->getTitle(); ?></td>
                                    <td style=""><a style="color: red;" onclick="return  confirm('Delete?');" href="<?php echo $view['router']->generate('del_detail_info', array('id' => $value->getId()), true); ?>"><?php echo $view['translator']->trans("Delete"); ?></a>
                                    </td>
                                </tr>
                            <?php } ?>
                        </tbody> 
                    </table>
                </form>
                <?php
            } else {
                echo $view['translator']->trans("No Data");
            }
            ?>

        </div>
    </div>
</div>