<?php
  /**
   * View Compare
   *
   * @package Wojo Framework
   * @author wojoscripts.com
   * @copyright 2017
   * @version $Id: viewCompare.tpl.php, v1.00 2017-05-05 10:12:05 gewa Exp $
   */
  if (!defined("_WOJO"))
      die('Direct access to this location is not allowed.');
	  
  $bfluid = true;
?>
<div class="header">
  <?php echo Lang::$word->FRONT_COMPARE;?></div>
<div class="scrolling content">
  <?php if(!$this->data):?>
  <div class="content-center"><img src="<?php echo ADMINVIEW;?>/images/notfound.png" alt="">
    <p class="wojo small thick caps text"><?php echo Lang::$word->FRONT_COMPARE_EMPTY;?></p>
  </div>
  <?php else:?>
  <div class="row phone-block-1 mobile-block-2 tablet-block-3 screen-block-6 half-gutters">
    <?php foreach($this->data as $i=> $row):?>
    <?php $i++;?>
    <div class="column" id="compare_<?php echo $row->id?>">
      <div class="wojo soft shadow card">
        <span class="wojo mini top left attached label"><?php echo $i;?></span>
        <div class="header content-center ">
          <a href="<?php echo Url::url('/product', $row->slug);?>"><img src="<?php echo Product::hasThumb($row->thumb, $row->id);?>" alt="<?php echo $row->title?>" class="wojo basic image"></a>
          <h4 class="truncate"><a href="<?php echo Url::url('/product', $row->slug);?>" class="inverted"><?php echo $row->title?></a>
          </h4>
        </div>
        <div class="content">
          <div class="wojo large text"><?php echo Utility::renderPrice($row->is_sale, $row->price, $row->sprice, "negative");?></div>
          <div class="wojo space divider"></div>
          <?php include(THEMEBASE . '/snippets/listButton.tpl.php');?>
        </div>
        <div class="footer wojo small text half-padding">
          <?php echo Validator::sanitize($row->body, "string", 100)?>
          <div class="wojo divider"></div>
          <div class="content-center"><a data-set='{"option":[{"qAction": "1","page":"removeCompare", "id":<?php echo $row->id?>}], "url":"/controller.php", "complete":"remove", "parent":"#compare_<?php echo $row->id?>"}' class="inverted qAction"><i class="icon negative link delete"></i></a>
          </div>
        </div>
      </div>
    </div>
    <?php endforeach;?>
  </div>
  <?php endif;?>
</div>