<?php
/**
 * @version		2.6.x
 * @package		K2
 * @author		JoomlaWorks http://www.joomlaworks.net
 * @copyright	Copyright (c) 2006 - 2014 JoomlaWorks Ltd. All rights reserved.
 * @license		GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
 */

// no direct access
defined('_JEXEC') or die;
?>
<?php if(count($items)): ?>
  <ul class="t-side_posts_list">
    <?php foreach ($items as $key=>$item):    ?>
    <li>
        <?php if($params->get('itemImage') && isset($item->image)): ?>
          <img src="<?php echo $item->image; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($item->title); ?>" width="80" height="80"/>
          <?php endif; ?> 
          <div class="t-side_posts_text">
              <?php if($params->get('itemTitle')): ?>
              <a class="moduleItemTitle" href="<?php echo $item->link; ?>"><?php echo $item->title; ?></a>
              <?php endif; ?>
              <div class="t-side_posts_info clearfix">
                <?php if($params->get('itemDateCreated')): ?>
                  <span class="t-posts_date"><?php echo JHTML::_('date', $item->created, 'M d Y'); ?></span>
                  <?php endif; ?>
                  <?php if(!empty($item->event->K2CommentsCounter)): ?>
                    <!-- K2 Plugins: K2CommentsCounter -->
                    <span class="t-posts_comments"><i class="icon-bubbles"></i><?php echo $item->event->K2CommentsCounter; ?></span>
                <?php endif; ?>
              </div>  
          </div>       
        </li>
    <?php endforeach; ?>       
  </ul>
  <?php endif; ?>
