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

  <div class="containerOuter row">
    <div class="sideBar col-lg-3 hideMobile">
      <div class="header"><?php echo isset($nav_data->title) ? $nav_data->title: '';?></div>
	  <?php $is_sub_nav = FALSE;?>
      <?php if( !empty($nav_data->sub_list) ):?>
      <ul>
	  	<?php foreach($nav_data->sub_list as $nav_sub): ?>
        <li><a href="<?php echo isset($nav_sub->url) ? $nav_sub->url: '#';?>" class="<?php echo $nav_data->active_id==$nav_sub->id ? 'active': '';?>"><?php echo isset($nav_sub->title) ? $nav_sub->title: '';?></a> </li>
		<?php if( $nav_data->active_id==$nav_sub->id ){$is_sub_nav = TRUE;}?>
        <?php endforeach; ?>
      </ul>
	  <?php endif;?>
    </div>
	
    <div class="pageWrap floatRight col-lg-9 col-xs-12">
      <?php if( isset($section->media_path) && $section->media_path!="" ):?>
      <div class="subBanner" style="display:block;"><img src="<?php echo get_ext_path_advanced($section->media_path, $section->media_id, 'o');?>"/></div>
	  <?php endif;?>
	  
      <div class="pageCont">
	  
	  <div class="headerRow clear">
        <h1>ARTICLES</h1>
		<form name="event_search_form" id="event_search_form" action="<?php echo e(url('resources/articles/')); ?>" method="get">
        <div class="filterRow">
          <span class="label">Year:</span>
          <span class="selectWrap">
            <select name="year" id="year" onchange="document.getElementById('event_search_form').submit();">
              <option value="">View All</option>
              <?php foreach($year_list as $year_i): ?>
              <option value="<?php echo $year_i;?>" <?php echo $year==$year_i ? ' selected="selected"': '';?>><?php echo $year_i;?></option>
			  <?php endforeach; ?>
            </select>
          </span>
          <span class="label">Sort by:</span>
          <span class="selectWrap">
            <select name="sort" id="sort" onchange="document.getElementById('event_search_form').submit();">
              <option value="Alphabetical" <?php echo $sort=='Alphabetical' ? ' selected="selected"': '';?>>Alphabetical</option>
              <option value="Chronological" <?php echo $sort=='Chronological' ? ' selected="selected"': '';?>>Chronological</option>
            </select>
          </span>
        </div>
		</form>
	  </div>
		
        <p>
          These articles have been contributed by IMAS members or industry players. IMAS is not responsible for the topicality, correctness, completeness, or quality of the information provided within these articles. IMAS is also not responsible for any losses resulting from reliance on the information provided in these articles.
        </p>


<div id="article_list_div">
        <ul class="articleList">
<?php if( !empty($object_list) ):?>
	<?php foreach($object_list as $object): ?>
          <li>
            <a href="<?php echo e(url('Articles/'.$object->seo_url)); ?>" class="title" target="_blank"><?php echo isset($object->title) ? $object->title : NULL?></a><!-- - <?php echo date("j F Y", strtotime($object->published));?>-->
          </li>
	<?php endforeach; ?>
<?php else:?>
          <li>
            No data.
          </li>
<?php endif;?>
        </ul>
		
		<?php if( $page_t>$page ):?>
			<div id="page_more_div<?php echo $page;?>"><div class="btnShowMore" onclick="loadMorePage(<?php echo $page;?>, <?php echo $page+1;?>)"><span class="stateMore">View More <i class="icon icon-showMore"></i></span></div></div>
		<?php endif;?>

</div>



      </div>
    </div>
  </div>
  
  
<script type="text/javascript" language="javascript">
function loadMorePage(Page, page_n){
	var year = $('#year').val();
	var psort = $('#sort').val();
	
	$("#page_more_div"+Page).html('Loading...');
	$.ajax({
		type: "GET",
		url: "<?php echo e(url('home/ajax_res_articles/')); ?>",
		data: {"page": page_n, "year": year, "sort": psort},
		cache: false,
		success: function(data) {
			$("#page_more_div"+Page).html('');	
			$("#article_list_div").append(data);
		}
	});
}
</script>

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