<?php
$menu_modules = unserialize($this->request->session()->read('modules'));

?>

<?= $this->element('page_top', array('title' => __('Letter Sent History'), 'permissions' => $user_permission)); ?>
<div class="box box-primary">
    <!-- /.box-header -->
    <div class="box-body">
        <div class="row">
            <div class="col-md-12  main-view-section">

                <div id="basic_info_div">
                    <div class="col-md-6 view-section">
                        <table class="table table-striped">
                            <thead>
                            <tr>
                                <th> <span><?= __('Report Format') ?></span> </th>
                                <th> <?= h($letter_sent_history->report_format->name)?> </th>

                            </tr>
                            <tr>
                                <th> <span><?= __('Student Name') ?></span> </th>
                                <th> <?= h($letter_sent_history->student->first_name.' '.$letter_sent_history->student->surname)?> </th>

                            </tr>

                            <tr>
                                <th> <span><?= __('Student Email') ?></span></th>
                                <th>
                                    <?= $letter_sent_history->student_email ?>
                                </th>
                            </tr>
                            <tr>
                                <th> <span><?= __('Send Date') ?></span></th>
                                <th>
                                    <?= $letter_sent_history->sent_date->format('d-m-Y') ?>
                                </th>
                            </tr>

                            <tr>
                                <th> <span><?= __('Created On') ?></span></th>
                                <th>   <span><?= h($letter_sent_history->created_at)?></span></th>
                            </tr>
                            </thead>

                        </table>

                    </div>
                    <div class="col-md-6 col-sm-12 col-xs-12">
                        <div class="form-group row">
                            <?= $this->Form->textarea('content', ['placeholder' => __('Content'),'label'=>false,'style'=>'height:300px','class' => 'form-control editable required', 'type' => 'text','id'=>'content', 'value' => $report , 'required' => false,'name' => 'content' ,'readonly' => true]); ?>
                        </div>
                    </div>

                    <div class="col-md-12 col-offset-12 back-btn-section">
                        <a href="<?php echo $this->Url->build('/letter-sent-history'); ?>"  class="btn btn-success btn-flat btn-orange-color" id="back-btn">
                            <i class="fa fa-arrow-left"></i>
                            <?php echo __('Back'); ?>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<?php echo $this->element('tinymce_js'); ?>