<?php $__env->startSection('content'); ?>

  <div id="content-header">
    <div id="breadcrumb"> <a href="<?php echo e(url('/admin')); ?>" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> Home</a> <a href="<?php echo e(url('/admin/albumPhoto')); ?>">Album Photo Management</a> <a href="javascript:void(0);" class="current">Listing</a> </div>
  </div>
  
<div id="filter_wrap">
  <div id="filter">
  <form name="search_form" id="search_form" action="" method="get">
  <table border="0" cellspacing="0" cellpadding="0" class="tbl_filter">
    <tr>
      <td>Keywords: <input type="text" name="keyword" value="<?php echo isset($_GET['keyword']) ? $_GET['keyword']: ''?>" /></td>
      <td>Album: 
		<select name="album_id" id="album_id" style="width:180px;">
			<option value="">All</option>
			<?php foreach($album_list as $key=>$album): ?>
			<option value="<?php echo e($album->id); ?>" <?php echo isset($_GET['album_id']) && $_GET['album_id']==$album->id? ' selected="selected"': '';?>><?php echo e($album->title); ?></option>
			<?php endforeach;?>
		</select>
	  </td>
    
    <td><input type="hidden" name="from_sch" id="from_sch" value="0" /><input type="submit" name="Search" id="Search" class="btn btn_grey" value="Search" /></td>
    </tr>
  </table>
  </form>
<div class="clear"></div>
  </div><!--filter-->
</div>
<!--filter_wrap-->
  
  <div class="container-fluid">
    <div class="row-fluid">
      <div class="span12">
        
		<?php echo parseSuccessMessageLaravel();?>
		
        <div class="widget-box">
          <div class="widget-content nopadding">
		  
		  	<div class="title_btn">
				<h2>Listing</h2>
				<a href="<?php echo e(URL('/admin/albumPhoto/create')); ?>" class="btn btn_tac right m_all_10">+ Add</a>
			</div>
			<div class="clear"></div>
			
			<div class="tab_name">
				<a href="<?php echo e(URL('/admin/album')); ?>" class="">Album</a>
				<a href="<?php echo e(URL('/admin/albumPhoto')); ?>" class="active">Album Photo</a>
			</div><!--tab_name-->
			<div class="clear"></div>
			
            <table class="table table-bordered data-table">
              <thead>
                <tr>
				<th width="60"><a href="<?php echo getAdminOrderURL(URL('/admin/albumPhoto/index'), 'id', $_GET);?>">ID <span class="admin_order"><?php echo getAdminOrderImCode('id', $_GET);?></span></a></th>
				<th><a href="<?php echo getAdminOrderURL(URL('/admin/albumPhoto/index'), 'title', $_GET);?>">Title <span class="admin_order"><?php echo getAdminOrderImCode('title', $_GET);?></span></a></th>
				<th width="10%"><a href="<?php echo getAdminOrderURL(URL('/admin/albumPhoto/index'), 'object_id', $_GET);?>">相册 <span class="admin_order"><?php echo getAdminOrderImCode('object_id', $_GET);?></span></a></th>
				<th width="10%">Photo</th>
				<th width="10%"><a href="<?php echo getAdminOrderURL(URL('/admin/albumPhoto/index'), 'viewnum', $_GET);?>">View Num <span class="admin_order"><?php echo getAdminOrderImCode('viewnum', $_GET);?></span></a></th>
				<th width="10%"><a href="<?php echo getAdminOrderURL(URL('/admin/albumPhoto/index'), 'updated_at', $_GET);?>">Modified Time <span class="admin_order"><?php echo getAdminOrderImCode('updated_at', $_GET);?></span></a></th>
				<th width="220">Actions</th>
				</tr>
              </thead>
			  
              <tbody>
			  <?php foreach($object_list as $object): ?>
				<tr>
					<td><?php echo e($object->id); ?></td>
					<td><?php echo e($object->title); ?></td>
					<td><?php echo e($object->getAlbumTitle()); ?></td>
					<td><?php if( isset($object['media_path']) && $object['media_path']!="" ):?><img src="<?php echo get_ext_path_advanced($object['media_path'], $object['media_id'], 's');?>" style="max-width:400px;" /><?php endif;?></td>
					<td><?php echo e($object->viewnum); ?></td>
					<td><?php echo e($object->updated_at); ?></td>
					<td>
						<a href="<?php echo e(URL('admin/albumPhoto/details/'.$object->id)); ?>">Details</a> | 
						<a href="<?php echo e(URL('admin/albumPhoto/edit/'.$object->id)); ?>">Edit</a> | 
						<a href="<?php echo e(URL('admin/albumPhoto/destroy/'.$object->id)); ?>" class="a_red" onclick="return confirm('Are you sure you want to delete this record?');">Delete</a>
						<br />
						<a href="<?php echo e(URL('admin/albumPhoto/cover/'.$object->id)); ?>" class="a_red" onclick="return confirm('Are you sure to set this record as Cover?');">Set Cover</a>
					</td>
				</tr>
				<?php endforeach; ?>
				
				<?php if( $pagination!='' ):?>
				<tr>
					<td colspan="7"><div class="pagination"><?php echo $pagination;?></div></td>
				</tr>
				<?php endif;?>
              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>
  </div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin_layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>