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

// Define default image size (do not change)
K2HelperUtilities::setDefaultImage($this->item, 'itemlist', $this->params);
  
?>

<div class="t-single_blog">
    <?php if($this->item->params->get('catItemImage') && !empty($this->item->image)): ?>
      <!-- Item Image -->
      <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" />
      </a>
      <?php endif; ?>                                                       
  <div class="t-home_single_blog t-single_blog_text clearfix">
    <div class="col-lg-1 col-md-2 col-sm-2 col-xs-12 t-home_bloger_img">
      <div class="row">
        <div class="t-glyp_icon ">
            <?php if($this->item->params->get('catItemImage') && !empty($this->item->image)): ?>
            <span data-js-prompt="&amp;#xe07f;" data-icon="&#xe07f;" aria-hidden="true" class="glyph-item mega"></span>
            <?php endif; ?>
            <?php if(property_exists( $this->item->author, 'avatar' )): ?>
            <img class="wow swing center animated" alt="" data-wow-iteration="1" src="<?php echo $this->item->author->avatar; ?>" width="60">
            <?php endif; ?>
        </div>
      </div>
    </div>
    <div class="col-lg-11 col-md-10 col-sm-10 col-xs-12 t_home_blog_content pull-right">
          <div class="row t-home_blog_content_inner">
                <?php if($this->item->params->get('catItemTitle')): ?>
                <h5><?php echo $this->item->title; ?></h5>
                <?php endif; ?>
                <ul class="t-home_blog_info">
                        <?php if($this->item->params->get('catItemDateCreated')): ?>
                        <!-- Date created -->
                        <li><span><?php echo JHTML::_( 'date', $this->item->created , 'M d Y' ); ?></span></li>
                        <?php endif; ?>
                        <?php if($this->item->params->get('catItemAuthor')): ?>
                        <!-- Item Author -->
                        <li><span class="catItemAuthor">
                            <?php echo K2HelperUtilities::writtenBy($this->item->author->profile->gender); ?> 
                            <?php if(isset($this->item->author->link) && $this->item->author->link): ?>
                            <a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>
                            <?php else: ?>
                            <?php echo $this->item->author->name; ?>
                            <?php endif; ?>
                        </span></li>
                        <?php endif; ?>
                        <?php if($this->item->params->get('catItemCommentsAnchor') && ( ($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1')) ): ?>
                        <!-- Anchor link to comments below -->
                        <li class="catItemCommentsLink">
                            <?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>
                        <?php endif; ?> 
                        <?php if($this->item->params->get('catItemRating')): ?>
                        <!-- Item Rating -->
                        <div class="catItemRatingBlock">
                             <div class="itemRatingForm">
                                <ul class="itemRatingList">
                                    <li class="itemCurrentRating" id="itemCurrentRating<?php echo $this->item->id; ?>" style="width:<?php echo $this->item->votingPercentage; ?>%;"></li>
                                    <li><a href="#" data-id="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_1_STAR_OUT_OF_5'); ?>" class="one-star">1</a></li>
                                    <li><a href="#" data-id="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_2_STARS_OUT_OF_5'); ?>" class="two-stars">2</a></li>
                                    <li><a href="#" data-id="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_3_STARS_OUT_OF_5'); ?>" class="three-stars">3</a></li>
                                    <li><a href="#" data-id="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_4_STARS_OUT_OF_5'); ?>" class="four-stars">4</a></li>
                                    <li><a href="#" data-id="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_5_STARS_OUT_OF_5'); ?>" class="five-stars">5</a></li>
                                </ul>
                                <div id="itemRatingLog<?php echo $this->item->id; ?>" class="itemRatingLog"><?php echo $this->item->numOfvotes; ?></div>
                            </div>    
                        </div>
                        <?php endif; ?> 
                  </ul> 
                  <?php if($this->item->params->get('catItemIntroText')): ?>
                  <!-- Item introtext -->
                  <div class="catItemIntroText">
                      <?php echo $this->item->introtext; ?>
                  </div>
                  <?php endif; ?> 
                  <?php if ($this->item->params->get('catItemReadMore')): ?>
                    <!-- 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>
</div>
     