favorite-stores.phtml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <div class="table-responsive">
  2. <table class="table table-striped table-hover">
  3. <caption>
  4. <strong><?php echo $this->paginator->getPages()->totalItemCount; ?></strong> <?php echo $this->_('results found.'); ?>
  5. <?php if ($this->paginator->getPages()->totalItemCount) { ?>
  6. <?php echo $this->_('Showing results'); ?>
  7. <strong><?php echo $this->paginator->getPages()->firstItemNumber; ?></strong>
  8. <?php echo $this->_('to'); ?>
  9. <strong><?php echo $this->paginator->getPages()->lastItemNumber; ?></strong>
  10. <?php } ?>
  11. </caption>
  12. <?php if ($this->paginator->getPages()->totalItemCount) { ?>
  13. <thead>
  14. <tr>
  15. <th class="size-mini"></th>
  16. <th><?php echo $this->_('Name'); ?></th>
  17. <th class="size-small"><?php echo $this->_('Owner'); ?></th>
  18. <th class="size-mini"><?php echo $this->_('Added'); ?></th>
  19. <th class="size-mini"><?php echo $this->_('Options'); ?></th>
  20. </tr>
  21. </thead>
  22. <?php } ?>
  23. <tbody>
  24. <?php
  25. /** @var \Cube\Db\Table\Row $favoriteStore */
  26. foreach ($this->paginator as $favoriteStore) {
  27. /** @var \Ppb\Db\Table\Row\User $store */
  28. $store = $favoriteStore->findParentRow('\Ppb\Db\Table\Users', 'Store');
  29. $storeSettings = $store->getStoreSettings();
  30. $logo = (!empty($storeSettings['store_logo_path'])) ? $storeSettings['store_logo_path'] : null;
  31. ?>
  32. <tr>
  33. <td>
  34. <a href="<?php echo $this->url($store->storeLink()); ?>">
  35. <?php echo $this->thumbnail($logo, 80, true,
  36. array('alt' => $store->storeName())); ?>
  37. </a>
  38. </td>
  39. <td>
  40. <a href="<?php echo $this->url($store->storeLink()); ?>">
  41. <?php echo $store['store_name']; ?>
  42. </a>
  43. </td>
  44. <td>
  45. <?php echo $this->userDetails()->setUser($store)->display(); ?>
  46. </td>
  47. <td>
  48. <small><?php echo $this->date($favoriteStore['created_at']); ?></small>
  49. </td>
  50. <td>
  51. <a class="btn btn-danger confirm-box"
  52. href="<?php echo $this->url(array('option' => 'remove', 'id' => $favoriteStore['id']),
  53. null, true); ?>"
  54. data-message="<?php echo $this->_('Are you sure you wish to remove this store from your favorites list?'); ?>">
  55. <i class="fa fa-times"></i>
  56. </a>
  57. </td>
  58. </tr>
  59. <?php } ?>
  60. </tbody>
  61. </table>
  62. </div>
  63. <?php echo $this->pagination($this->paginator, 'sliding', 'partials/pagination.phtml'); ?>