<?= $this->Html->css('multi-image-selector-with-tag-caption.css'); ?>
    <?= $this->Html->script('multi-image-selector-with-tag-caption.js'); ?>
<section class="content">
            <div class="col-md-12">
               <div class="submenu">
            <?php 
            echo $this->element('banners/menu/submenu'); ?>
                 </div>
                <div class="panel panel-default">
                    <div class="panel-body">
                
                       
                   


<div class="row">
  
<div class="row">
<h4><center><b><?php echo $pageTitle; ?></b></center></h4>
</div>
<div class="submenu">
            <?php 
            echo $this->element('menus/menu/bannersmenu'); ?>
                 </div>
        <hr class="hr-primary" />

        
    </div>

    <div class="container">
    <div class="table-responsive">
        <table class="table table-striped">
            <thead>
                <tr>
                    <th>Banner</th>
                    <th>Title</th>
                    <th>Description </th>
                    <th>Current Order Value </th>
                    <th>New Order Value</th>
                   
                </tr>
            </thead>
            <tbody>
                <?php 
                    foreach ($listings as $listing): 
                    $image_path = Cake\Core\Configure::read('IMAGE_PREPATH') . $listing->image_path;
                ?>
                <tr>
               <td> <?= '<a href="' . $this->Url->image($image_path) . '">' . $this->Html->image($image_path, ['id' => 'image',  'style' => 'max-width:200px; max-height:150px;']) . '</a>' ?></td>
                    <td><?= $listing->title ?></td>
                    <td><?= $listing->description ?></td>
                    </td>
                  <td><?= $listing->order_value ?></td>
                  <td>
                  <?=$this->Form->create('null',['url' => ['controller' => 'banners', 'action' => 'orderBanner']])?>
                     <?php echo $this->Form->input('banner_id',['type'=>'hidden','value'=>$listing->id]);?>
                    
                  <div class="col-sm-2">
                        <?= $this->Form->input('new_order_value', ['class' => 'form-control','id'=>'new-order-value','label' => false,'value'=>'']);?>
                        </div>
                        <div class="col-sm-6">
                        <?php echo $this->Form->button('Submit',array('class'=>'btn btn-primary btn-sm'));?> 
                        <?=$this->Form->end()?>
                        <a class="btn btn-danger btn-sm" href="<?= $this->Url->build(['controller' => 'banners', 'action' => 'disableOrderValue'.'/',$listing->id ]) ?>">Disable</a></td>
                     
                       

                        </div>
                         
                  </td>
                
                </tr>
                <?php endforeach; ?>
            </tbody>
        </table>
    </div>
</div>


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


