<?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;

?>
<div class="t-home_single_blog t-list_single_blog clearfix">
    <div class="col-lg-1 col-md-1 col-sm-1 col-xs-12 t-home_bloger_img">
          <div class="row">
            <div class="t-glyp_icon ">
                  <span class="glyph-item mega" aria-hidden="true" data-icon="&#xe07f;" data-js-prompt="&amp;#xe07f;"></span>  
                  <?php if( $avatar = K2HelperUtilities::getAvatar( $this->item->created_by ) ) : ?>
                  <img src="<?php echo $avatar; ?>" class="wow swing center animated" alt="" data-wow-iteration="1" width="60" height="60" >
                  <?php endif; ?>
            </div>
          </div>
    </div>
    <?php if($this->item->params->get('latestItemImage') && !empty($this->item->image)): ?>
    <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 t-home_blog_img">
          <!-- Item Image -->
          <div class="xlatestItemImageBlock">
              <span class="xlatestItemImage">
                <a href="<?php echo $this->item->link; ?>" title="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>">
                    <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" class="img-responsive" height="252" />
                </a>
              </span>
          </div>          
    </div>
    <?php endif; ?>
    <div class="<?php if($this->item->params->get('latestItemImage') && !empty($this->item->image)): ?>col-lg-7 col-md-7<?php else : ?>col-lg-11 col-md-11<?php endif; ?> col-sm-8 col-xs-12 t_home_blog_content">
          <div class="row t-home_blog_content_inner">
                <?php if($this->item->params->get('latestItemTitle')): ?>
                    <h5><?php echo $this->item->title; ?></h5>
                <?php endif; ?>
                <ul class="t-home_blog_info">
                    <?php if($this->item->params->get('latestItemDateCreated')): ?>
                    <li><span><?php echo JHTML::_('date', $this->item->created , 'M d, Y'); ?></span></li>
                    <?php endif; ?>
                    <li><span>
                        <?php echo K2HelperUtilities::writtenBy( null ); ?>
                        <?php echo JFactory::getUser( $this->item->created_by )->name; ?>
                    </span></li>
                    <li>
                        <?php if(!empty($this->item->event->K2CommentsCounter)): ?>
                            <!-- K2 Plugins: K2CommentsCounter -->
                            <span>
                                <i aria-hidden="true" class="icon-bubbles"></i> &nbsp;<?php echo $this->item->event->K2CommentsCounter; ?>
                            </span>
                        <?php else: ?>
                            <?php if($this->item->numOfComments > 0): ?>
                            <a href="<?php echo $this->item->link; ?>#itemCommentsAnchor">
                                <span><i aria-hidden="true" class="icon-bubbles"></i> &nbsp;<?php echo $this->item->numOfComments; ?></span> 
                            </a>  
                            <?php else: ?>
                            <a href="<?php echo $this->item->link; ?>#itemCommentsAnchor">
                                <span><i aria-hidden="true" class="icon-bubbles"></i> &nbsp;0</span>
                            </a>
                            <?php endif; ?>
                        <?php endif; ?>
                    </li>
                </ul>  
                <?php if($this->item->params->get('latestItemIntroText')): ?> 
                    <?php echo $this->item->introtext; ?>
                <?php endif; ?>
                <?php if ($this->item->params->get('latestItemReadMore')): ?>
                <!-- Item "read more..." link -->
                <a class="t-btn t-btn_bg k2ReadMore" href="<?php echo $this->item->link; ?>">
                    <?php echo JText::_('K2_READ_MORE'); ?>
                </a>
                <?php endif; ?>
          </div>
    </div>
</div>
