<?php
  /**
   * Dashboard
   *
   * @package Wojo Framework
   * @author wojoscripts.com
   * @copyright 2017
   * @version $Id: dashboard.tpl.php, v1.00 2017-05-05 10:12:05 gewa Exp $
   */
  if (!defined("_WOJO"))
      die('Direct access to this location is not allowed.');
?>
<?php include_once(THEMEBASE . '/snippets/dashNav.tpl.php');?>
<div class="padding">
  <h2><?php echo Lang::$word->META_M_MYDOWNS;?></h2>
  <?php if($this->data):?>
  <table class="wojo basic dashed table">
    <thead>
      <tr>
        <th>&nbsp;</th>
        <th><?php echo Lang::$word->NAME;?></th>
        <th><?php echo Lang::$word->DATE;?></th>
        <th class="right aligned">&nbsp;</th>
      </tr>
    </thead>
    <?php foreach ($this->data as $row):?>
    <tr>
      <td class="collapsing"><a href="<?php echo Url::url('/product', $row->slug);?>"><img src="<?php echo Product::hasThumb($row->thumb, $row->product_id);?>" alt="" class="wojo small basic image"></a></td>
      <td><a href="<?php echo Url::url('/product', $row->slug);?>"><?php echo $row->title;?></a></td>
      <td><?php echo Date::doDate("short_date", $row->created);?></td>
      <td class="collapsing"><a href="<?php echo Url::url('/dashboard/view', Utility::encode($row->product_id));?>" class="wojo tiny basic primary icon button"><i class="icon download"></i></a>
        <a data-tooltip="<?php echo Lang::$word->INVOICE;?>" href="<?php echo FRONTVIEW;?>/controller.php?action=pInvoice&amp;tid=<?php echo $row->txn_id?>" class="wojo tiny basic secondary icon button"><i class="icon files"></i></a></td>
    </tr>
    <?php endforeach;?>
    <?php unset($row);?>
  </table>
  <?php endif;?>
</div>