<?php
echo $this->Html->script('jquery-1.11.2.js');
$menu_modules = unserialize($this->request->session()->read('modules'));
?>

<div class="row">
    <div class="col-md-12">
        <div class="box box-primary">
            <div class="box-body">
                <div class="row" style="text-align:left;" >
                     <div class="col-md-6 col-xs-6 tile">
                            <div class="icon-frame col-md-2" id="light">
                                <i class="fa fa-folder-open-o" style="color:white"></i>
                            </div>
                            <h3 class="box-title no-margin" style="line-height: 3;float: left;"><?php echo __('&nbspView User'); ?></h3>
                    </div>

                    <div class="col-md-6">



                        <div class="row">

                            <div class="col-md-12 text-right" style="line-height: 5;">
                                <?php
                                if (array_key_exists("add", $module_pages)):
                                    $page_id = $module_pages["index"];
                                    foreach ($user_permission as $permission):
                                        if ($permission['page_id'] == $page_id):
                                            ?>

                                            <a href="<?php echo $this->Url->build('/Member/index/'); ?>"  class="btn btn-success btn-flat btn-grid">
                                                <i class="fa fa-list"></i>
            <?php echo __('LIST'); ?>
                                            </a>

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


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

<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">
                        <ul class="view-list">
                            <li>
                                <span><?= __('Name') ?>:</span>
                                <span><?= h($user->full_name)?></span>
                            </li>
                            <li>
                                <span><?= __('Email') ?>:</span>
                                <span><?= h($user->email)?></span>
                            </li>
                            <li>
                                <span><?= __('Mobile') ?>:</span>
                                <span><?= h($user->mobile_number)?></span>
                            </li>
                            <li>
                                <span><?= __('Roll No') ?>:</span>
                                <span><?= h($user->roll_no)?></span>
                            </li>
                            <li>
                                <span><?= __('Batch No') ?>:</span>
                                <span><?= h($user->batch_no)?></span>
                            </li>

                        </ul>
                    </div>
                    <div class="col-md-6 view-section">
                        <ul class="view-list">
                            <li>
                                <span><?= __('Organization') ?>:</span>
                                <span><?= h($user->organization)?></span>
                            </li>
                            <li>
                                <span><?= __('Designation') ?>:</span>
                                <span><?= h($user->designation)?></span>
                            </li>
                            <li>
                                <span><?= __('Status') ?>:</span> 
                                <span><?= h(json_decode(MEMBER_STATUS)[$user->status])?></span>
                            </li>
                            <li>
                                <span><?= __('Type') ?>:</span> 
                                <span><?= h($user->queue->name)?></span>
                            </li>
                        </ul>
                    </div>
                    <div class="col-md-12 col-offset-12 back-btn-section">
                        <a href="<?php echo $this->Url->build('/member'); ?>"  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>
