<?php
echo $this->Html->css('ionicons.min.css');
?>
<?php echo $this->Html->script('bootstrap-datetimepicker.min.js'); ?>
<?php echo $this->Html->script('bootstrap-datepicker.js'); ?>


<div class="row">
    <div class="col-md-12">
        <div class="box box-primary">
            <div class="box-body">
                <div class="row">
                    <div class="col-md-6 col-xs-6 tile">
                        <div class="icon-frame col-md-2" id="light" style="padding-top: 6px;padding-left: 13px;">
                            <i class="fa fa-users" style="color:white"></i>
                        </div>
                        <h3 class="box-title no-margin" style="padding-top: 20px; float: left; text-align: left;"><?php echo __('Report Format Variable Value'); ?></h3>
                    </div>
                    <div class="col-md-6">
                        <div class="row">

                            <div class="col-md-2 col-xs-6 col-md-offset-6">
                                <?php echo $this->element('watch_now',['section_name'=>'Report Format Variable Value']); ?>
                            </div>
                            <div class="col-md-2 col-xs-6 text-right" style="line-height: 4;">
                                <?php
                                if (array_key_exists("add", $module_pages)):
                                    $page_id = $module_pages["add"];
                                    foreach ($user_permission as $permission):
                                        if ($permission['page_id'] == $page_id):
                                            ?>
<!--                                            <a href="--><?php //echo $this->Url->build('/report-format-variable-value/add/'); ?><!--"  class="btn btn-success btn-flat btn-grid">-->
<!--                                                <i class="fa fa-plus-square"></i>-->
<!--                                                --><?php //echo('&nbspAdd'); ?>
<!--                                            </a>-->

                                            <?php
                                            break;
                                        endif;
                                    endforeach;
                                endif;
                                ?>

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

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

<div class="row">
    <div class="col-md-12">
        <div class="box box-primary">
            <div class="box-header">
                <!-- /.box-header -->
                <div class="box-body table-responsive index-table-section">
                    <table class="table table-bordered table-hover" id="index-table">

                        <thead>
                        <tr>

                            <th><?= $this->Paginator->sort('id', ['value' => __('Id')]) ?></th>
                            <th><?= $this->Paginator->sort('report_format_id', ['value' => __('Report Format')]) ?></th>
                            <th><?= $this->Paginator->sort('report_format_variable_id', ['value' => __('Variable Name')]) ?></th>
                            <th><?= $this->Paginator->sort('report_format_generation_history_id', ['value' => __('Generation History')]) ?></th>
                            <th><?= $this->Paginator->sort('value', ['value' => __('Value')]) ?></th>
                            <th><?= $this->Paginator->sort('created_at', ['value' => __('Created On')]) ?></th>
<!--                            <th> Action </th>-->

                        </tr>
                        </thead>
                        <tbody>
                        <?php if(!empty($report_format_variable_values)){?>
                            <?php foreach ($report_format_variable_values as $report_format_variable_value): ?>

                                <tr>
                                    <td><?php echo $report_format_variable_value['id'] ?></td>
                                    <td><?php echo $report_format_variable_value->report_format->name ?></td>
                                    <td><?php echo $report_format_variable_value->report_format_variable->variable_name ?></td>
                                    <td><?php echo $report_format_variable_value->report_format_generation_history->receiver_emails ?></td>
                                    <td><?php echo $report_format_variable_value['value'] ?></td>
                                    <td><?php echo $report_format_variable_value['created_at'] ?></td>
<!--                                    <td>-->
<!--                                        <a href="--><?php //echo $this->Url->build(["controller" => 'ReportFormatVariableValue', "action" => "view", $report_format_variable['id']]) ?><!--"  title="View">-->
<!--                                                    <span style="color:#3c8dbc;padding-left:5px;font-size:18px;">-->
<!--                                                        <i class="fa fa-eye" aria-hidden="true"></i>-->
<!--                                                    </span>-->
<!--                                        </a>-->
<!--                                        <a href="--><?php //echo $this->Url->build(["controller" => 'ReportFormatVariableValue', "action" => "edit", $report_format_variable['id']]) ?><!--" title="Edit">-->
<!--                                                    <span style="color:#00a65a;padding-left:5px;font-size:18px;">-->
<!--                                                        <i class="fa fa-pencil" aria-hidden="true"></i>-->
<!--                                                    </span>-->
<!--                                        </a>-->
<!---->
<!--                                    </td>-->
                                </tr>

                            <?php

                            endforeach;
                        }
                        ?>
                        </tbody>
                    </table>


                </div>
                <!-- /.box-body -->

                <?php echo $this->element('pagination') ?>
            </div>
            <!-- /.box -->


        </div>
    </div>




</div>



