<?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/report')); ?>">Report 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>Status: 
		<select name="status" id="status" style="width:120px;">
			<option value="">All</option>
			<?php foreach( $status_list as $status ):?>
			<option value="<?php echo e($status); ?>" <?php echo isset($_GET['status']) && $_GET['status']==$status? ' selected="selected"': '';?>><?php echo e($status); ?></option>
			<?php endforeach;?>
		</select>
	  </td>
	  <td>Category: 
		<select name="cat_id" id="cat_id" style="width:240px;">
			<option value="">All</option>
			<?php foreach( $category_list as $category ):?>
				<option value="<?php echo e($category->id); ?>" <?php echo isset($_GET['cat_id']) && $_GET['cat_id']==$category->id? ' selected="selected"': '';?>><?php echo e($category->title); ?> ( <?php echo isset($type_names[$category->type_id]) ? $type_names[$category->type_id]: '';?> )</option>
			<?php endforeach;?>
		</select>
	  </td>
	  <td>Year: 
		<select name="year" id="year" style="width:120px;">
			<option value="">All</option>
			<?php foreach( $year_list as $year ):?>
			<option value="<?php echo e($year); ?>" <?php echo isset($_GET['year']) && $_GET['year']==$year? ' selected="selected"': '';?>><?php echo e($year); ?></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/report/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/reportType')); ?>" class="">Report Type</a>
				<a href="<?php echo e(URL('/admin/reportCategory')); ?>" class="">Report Category</a>
				<a href="<?php echo e(URL('/admin/report')); ?>" class="active">Report</a>
				<a href="<?php echo e(URL('/admin/homepage/index/Content')); ?>">CPFIS FUNDS REPORTS</a>
			</div><!--tab_name-->
			<div class="clear"></div>
			
            <table class="table table-bordered data-table">
              <thead>
                <tr>
				<th width="40"><a href="<?php echo getAdminOrderURL(URL('/admin/report/index'), 'id', $_GET);?>">ID <span class="admin_order"><?php echo getAdminOrderImCode('id', $_GET);?></span></a></th>
				<th width="10%"><a href="<?php echo getAdminOrderURL(URL('/admin/report/index'), 'type_id', $_GET);?>">Type <span class="admin_order"><?php echo getAdminOrderImCode('type_id', $_GET);?></span></a></th>
				<th width="10%"><a href="<?php echo getAdminOrderURL(URL('/admin/report/index'), 'cat_id', $_GET);?>">Category <span class="admin_order"><?php echo getAdminOrderImCode('cat_id', $_GET);?></span></a></th>
				<th><a href="<?php echo getAdminOrderURL(URL('/admin/report/index'), 'title', $_GET);?>">Title <span class="admin_order"><?php echo getAdminOrderImCode('title', $_GET);?></span></a></th>
				<th width="5%"><a href="<?php echo getAdminOrderURL(URL('/admin/report/index'), 'year', $_GET);?>">Year <span class="admin_order"><?php echo getAdminOrderImCode('year', $_GET);?></span></a></th>
				<th width="5%"><a href="<?php echo getAdminOrderURL(URL('/admin/report/index'), 'quarter_1_path', $_GET);?>">Quarter 1 <span class="admin_order"><?php echo getAdminOrderImCode('quarter_1_path', $_GET);?></span></a></th>
				<th width="5%"><a href="<?php echo getAdminOrderURL(URL('/admin/report/index'), 'quarter_2_path', $_GET);?>">Quarter 2 <span class="admin_order"><?php echo getAdminOrderImCode('quarter_2_path', $_GET);?></span></a></th>
				<th width="5%"><a href="<?php echo getAdminOrderURL(URL('/admin/report/index'), 'quarter_3_path', $_GET);?>">Quarter 3 <span class="admin_order"><?php echo getAdminOrderImCode('quarter_3_path', $_GET);?></span></a></th>
				<th width="5%"><a href="<?php echo getAdminOrderURL(URL('/admin/report/index'), 'quarter_4_path', $_GET);?>">Quarter 4 <span class="admin_order"><?php echo getAdminOrderImCode('quarter_4_path', $_GET);?></span></a></th>
				<th width="5%"><a href="<?php echo getAdminOrderURL(URL('/admin/report/index'), 'sort', $_GET);?>">Sort <span class="admin_order"><?php echo getAdminOrderImCode('sort', $_GET);?></span></a></th>
				<th width="5%"><a href="<?php echo getAdminOrderURL(URL('/admin/report/index'), 'status', $_GET);?>">Status <span class="admin_order"><?php echo getAdminOrderImCode('status', $_GET);?></span></a></th>
				<th width="10%"><a href="<?php echo getAdminOrderURL(URL('/admin/report/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 if(isset($type_list) && !empty($type_list)): ?>
	<?php foreach($type_list as $type): ?>
		<?php echo $type->id==$object->type_id ? $type->title: '';?>
	<?php endforeach; ?>
<?php endif;?>
					</td>
					<td>
<?php if(isset($category_list) && !empty($category_list)): ?>
	<?php foreach($category_list as $category): ?>
		<?php echo $category->id==$object->cat_id ? $category->title: '';?>
	<?php endforeach; ?>
<?php endif;?>
					</td>
					<td><?php echo e($object->title); ?></td>
					<td><?php echo e($object->year); ?></td>
					<td><?php if( isset($object->quarter_1_path) && $object->quarter_1_path!='' ):?><a href="<?php echo get_ext_path($object->quarter_1_path);?>" target="_blank"><?php echo e(Helper::stringIntercept_strip($object->quarter_1_path, 30)); ?></a><?php endif;?></td>
					<td><?php if( isset($object->quarter_2_path) && $object->quarter_2_path!='' ):?><a href="<?php echo get_ext_path($object->quarter_2_path);?>" target="_blank"><?php echo e(Helper::stringIntercept_strip($object->quarter_2_path, 30)); ?></a><?php endif;?></td>
					<td><?php if( isset($object->quarter_3_path) && $object->quarter_3_path!='' ):?><a href="<?php echo get_ext_path($object->quarter_3_path);?>" target="_blank"><?php echo e(Helper::stringIntercept_strip($object->quarter_3_path, 30)); ?></a><?php endif;?></td>
					<td><?php if( isset($object->quarter_4_path) && $object->quarter_4_path!='' ):?><a href="<?php echo get_ext_path($object->quarter_4_path);?>" target="_blank"><?php echo e(Helper::stringIntercept_strip($object->quarter_4_path, 30)); ?></a><?php endif;?></td>
					<td><?php echo e($object->sort); ?></td>
					<td><?php echo e($object->status); ?></td>
					<td><?php echo e($object->updated_at); ?></td>
					<td>
						<a href="<?php echo e(URL('admin/report/details/'.$object->id)); ?>">Details</a> | 
						<a href="<?php echo e(URL('admin/report/edit/'.$object->id)); ?>">Edit</a> | 
						<a href="<?php echo e(URL('admin/report/destroy/'.$object->id)); ?>" class="a_red" onclick="return confirm('Are you sure you want to delete this record?');">Delete</a> | 
						<?php if( $object->status!='Active' ):?>
							<a href="<?php echo e(URL('admin/report/active/'.$object->id)); ?>" onclick="return confirm('Are you sure you want to Active this record?');">Active</a>
						<?php else:?>
							<a href="<?php echo e(URL('admin/report/archive/'.$object->id)); ?>" onclick="return confirm('Are you sure you want to Archive this record?');">Archive</a>
						<?php endif;?>
					</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(); ?>