<?php $__env->startSection('content'); ?>
<div class="content" id="content">

  <div class="overlay"></div>     
  
<?php echo $__env->make('admin.includes.topbar', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
  
  <!-- main content -->
  <div class="main-content">


    <!-- panel -->

    <div class="panel panel-piluku">
      <div class="panel-heading">
        <h3 class="panel-title">
          Image Upload - <?php echo $hotel->name; ?> - <?php echo $room->name; ?>

          <span class="panel-options">
            <a href="#" class="panel-refresh">
              <i class="icon ti-reload"></i>
            </a>
            <a href="#" class="panel-minimize">
              <i class="icon ti-angle-up"></i>
            </a>
            <a href="#" class="panel-close">
              <i class="icon ti-close"></i>
            </a>
          </span>
        </h3>
      </div>

<?php if(Session::has('error')): ?>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
    swal("Failed", "something went wrong", "error");
}, false);
</script>
<?php endif; ?>

<?php if(Session::has('success')): ?>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
    swal("Thank You", "Inserted Successfully", "success");
}, false);
</script>
<?php endif; ?>





      <div class="panel-body">
      <?php echo Form::open(array('url'=>'admin/insertroomimage','files'=>true, 'id' => 'form-a', 'class' => 'form form-horizontal')); ?>

      

                   <input type="hidden" id="roomid" value="<?php echo $roomid; ?>" name="roomid" class="form-control" data-required="true" >

          <div class="form-group">
            <label class="col-sm-2 control-label" for="inline-suggestions">Title:</label>
            <div class="col-sm-8">
              <input name="title" id="title" type="text"  required class="form-control"  />
            </div>
          </div>

          <div class="form-group">
            <label class="col-sm-2 control-label" for="inline-suggestions">Description:</label>
            <div class="col-sm-8">
                  <input type="text" id="description" name="description" class="form-control" data-required="true" >
            </div>
          </div>

          <div class="form-group">
            <label class="col-sm-2 control-label" for="inline-suggestions">(min - 1140x417):</label>
            <div class="col-sm-8">
                                 <span class="btn btn-default btn-file"><span class="fileupload-new">Select Thumbnail</span><span class="fileupload-exists">Change</span><input name="file" id="file" type="file"></span>
            </div>
          </div>

          





          
      <div class="form-group">
        <div class="col-sm-offset-2 col-sm-8">
          <input type="submit" class="btn btn-success">
          <input type="reset" class="btn btn-danger">
        </div>
      </div>
    </form>
  </div>
</div>
<!-- /panel -->



            <!--                        *** gallery ***-->
            <div class="panel panel-piluku">
                <div class="panel-body">
                    <!--gallery-->
                    <div class="form-heading">
                    <?php echo $hotel->name; ?> - <?php echo $room->name; ?> Images
                    </div>
                    <!--gallery-->
                    <!--                               row-->
                  <div class="row">
                        <!--                                   col md 12-->
                        <div class="col-md-12">
                            <!--                        *** Gallery Items ***-->
                                <ul class="list-inline list-unstyled">
                                <?php foreach($data as $img): ?>
             
                                    <li>
                                        <a href="<?php echo URL('media/uploads/images/hotel/size/180x135/'.$img->file.''); ?>">
                                            <img src="<?php echo URL('media/uploads/images/hotel/size/180x135/'.$img->file.''); ?>" title="<?php echo $img->title; ?>" alt="<?php echo $img->description; ?>"/>
                                            <a href="<?php echo URL('/admin/images/delete/'.$img->id.''); ?>">
                                            <br>
                                            <button class="btn btn-red btn-xs">Delete</button>
                                            </a>
                                        </a>
                                    </li>
                
                                <?php endforeach; ?>
                                   
                                </ul>
                   
                            <!--                        *** /Gallery Items ***-->
                        </div>
                        <!--                                    /col md 12-->
                    </div>
                    <!--                                /row-->


                </div>
            </div>
            <!--                        *** /gallery ***-->
            <!-- /panel -->







</div>
<!-- /main content -->        
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>