123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- <?php
- /**
- * @version 7.9 [rev.7.9.01]
- */
- ?>
- <nav class="navbar navbar-filter">
- <div class="navbar-left">
- <?php
- /** @var \Cube\Navigation\Page\AbstractPage $container */
- $container = $this->navigation()->getContainer();
- echo $this->navigation()
- ->setContainer($container->findOneBy('label', $this->_('Filter Auctions Products')))
- ->setPartial('navigation/browse-filter.phtml')
- ->menu();
- $this->navigation()->setContainer($container);
- ?>
- <?php
- $sortOptions = array(
- 'relevance' => $this->_('Relevance'),
- 'price_asc' => $this->_('Price Low to High'),
- 'price_desc' => $this->_('Price High to Low'),
- 'started_desc' => $this->_('Recently Listed'),
- 'ending_asc' => $this->_('Ending Soon')
- );
- $sort = (isset($params['sort'])) ? $params['sort'] : 'relevance';
- ?>
- <div class="btn-group">
- <button
- class="btn btn-default"><?php echo (array_key_exists($sort, $sortOptions)) ? $sortOptions[$sort] : $this->_('Sort By'); ?></button>
- <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
- <span class="caret"></span>
- </button>
- <ul class="dropdown-menu">
- <?php foreach ($sortOptions as $key => $value) { ?>
- <li>
- <a href="<?php echo $this->url(array('sort' => $key), null, true, array('page')); ?>"><?php echo $value; ?></a>
- </li>
- <?php } ?>
- </ul>
- </div>
- </div>
- <form class="navbar-form navbar-right"
- action="<?php echo $this->url(null, null, true, array('listing_id', 'keywords', 'option', 'page', 'submit')); ?>"
- method="get">
- <div class="form-group">
- <?php echo $this->formElement('text', 'listing_id', $this->listingId)
- ->setAttributes(array('placeholder' => $this->_('Listing ID'), 'class' => 'form-control input-small'))
- ->render();
- ?>
- <?php echo $this->formElement('text', 'keywords', $this->keywords)
- ->setAttributes(array('placeholder' => $this->_('Listing Title'), 'class' => 'form-control input-medium'))
- ->render();
- ?>
- </div>
- <?php echo $this->formElement('submit', 'submit', $this->_('Search'))
- ->setAttributes(array('class' => 'btn btn-default'))
- ->render();
- ?>
- </form>
- </nav>
- <form action="" method="post">
- <?php echo $this->formElement('hidden', 'option', '')->render(); ?>
- <div class="table-responsive">
- <table class="table table-striped table-hover">
- <caption>
- <strong><?php echo $this->paginator->getPages()->totalItemCount; ?></strong> <?php echo $this->_('listings found.'); ?>
- <?php if ($this->paginator->getPages()->totalItemCount) { ?>
- <?php echo $this->_('Showing results'); ?>
- <strong><?php echo $this->paginator->getPages()->firstItemNumber; ?></strong>
- <?php echo $this->_('to'); ?>
- <strong><?php echo $this->paginator->getPages()->lastItemNumber; ?></strong>
- <?php } ?>
- </caption>
- <?php if ($this->paginator->getPages()->totalItemCount) { ?>
- <thead>
- <tr>
- <th class="size-tiny">
- <?php echo $this->formElement('checkbox', 'selectAll')
- ->setMultiOptions(array(1 => null))
- ->render();
- ?>
- </th>
- <th><?php echo $this->_('Listing Details'); ?></th>
- <th class="size-mini"><?php echo $this->_('Status'); ?></th>
- <th class="size-tiny"></th>
- </tr>
- </thead>
- <?php } ?>
- <tbody>
- <?php
- /** @var \Ppb\Db\Table\Row\Listing $listing */
- foreach ($this->paginator as $listing) {
- /** @var \Ppb\Db\Table\Row\User $owner */
- $owner = $listing->findParentRow('\Ppb\Db\Table\Users');
- ?>
- <tr>
- <td>
- <?php echo $this->formElement('checkbox', 'id')
- ->setMultiOptions(array($listing['id'] => null))
- ->setAttributes(array('class' => 'select-all'))
- ->setMultiple()
- ->render();
- ?>
- </td>
- <td>
- <?php echo $this->partial('partials/listing-box.phtml',
- array(
- 'listing' => $listing,
- 'seller' => true,
- 'enhanced' => true));
- ?>
- </td>
- <td>
- <?php echo $this->listingDetails($listing)->status(); ?>
- </td>
- <td>
- <div class="btn-group-vertical">
- <a class="btn btn-default btn-sm"
- href="<?php echo $this->url(array('controller' => 'listings', 'action' => 'edit', 'id' => $listing['id'])); ?>"
- title="<?php echo $this->_('Edit Listing'); ?>">
- <i class="fa fa-folder-open"></i>
- </a>
- <a class="btn btn-danger btn-sm confirm-box"
- href="<?php echo $this->url(array('controller' => 'listings', 'action' => 'delete', 'id' => $listing['id']), null, true); ?>"
- title="<?php echo $this->_('Delete Listing'); ?>"
- data-message="<?php echo $this->_('Are you sure that you want to delete this listing?'); ?>">
- <i class="fa fa-times"></i>
- </a>
- </div>
- </td>
- </tr>
- <?php } ?>
- <?php if ($this->paginator->getPages()->totalItemCount) { ?>
- <tr>
- <td colspan="5">
- <div class="btn-group">
- <?php if (in_array($this->filter, array('open'))) { ?>
- <button class="btn btn-default confirm-form" value="close"
- data-message="<?php echo $this->_('Are you sure you want to close the listings you have selected?'); ?>"><?php echo $this->_('Close'); ?></button>
- <?php } ?>
- <?php if (in_array($this->filter, array('scheduled'))) { ?>
- <button class="btn btn-default confirm-form" value="open"
- data-message="<?php echo $this->_('Are you sure you want to open the listings you have selected?'); ?>"><?php echo $this->_('Open'); ?></button>
- <?php } ?>
- <?php if (in_array($this->filter, array('closed'))) { ?>
- <button class="btn btn-default confirm-form" value="relist"
- data-message="<?php echo $this->_('Are you sure you want to relist the listings you have selected?'); ?>"><?php echo $this->_('Relist'); ?></button>
- <?php } ?>
- <?php if (in_array($this->filter, array('open', 'scheduled', 'closed'))) { ?>
- <button class="btn btn-default confirm-form" value="suspend"
- data-message="<?php echo $this->_('Are you sure you want to suspend the listings you have selected?'); ?>"><?php echo $this->_('Suspend'); ?></button>
- <?php } ?>
- <?php if (in_array($this->filter, array('awaiting_approval'))) { ?>
- <button class="btn btn-default confirm-form" value="approve"
- data-message="<?php echo $this->_('Are you sure you want to approve the listings you have selected?'); ?>"><?php echo $this->_('Approve'); ?></button>
- <?php } ?>
- <?php if (in_array($this->filter, array('suspended'))) { ?>
- <button class="btn btn-default confirm-form" value="activate"
- data-message="<?php echo $this->_('Are you sure you want to activate the listings you have selected?'); ?>"><?php echo $this->_('Activate'); ?></button>
- <?php } ?>
- <?php if (in_array($this->filter, array('deleted'))) { ?>
- <button class="btn btn-default confirm-form" value="undelete"
- data-message="<?php echo $this->_('Are you sure you want to undelete the listings you have selected?'); ?>"><?php echo $this->_('Undelete'); ?></button>
- <?php } ?>
- <button class="btn btn-default confirm-form" value="delete"
- data-message="<?php echo $this->_('Are you sure you want to delete the listings you have selected?'); ?>"><?php echo $this->_('Delete'); ?></button>
- </div>
- </td>
- </tr>
- <?php } ?>
- </tbody>
- </table>
- </div>
- </form>
- <div class="clearfix"></div>
- <?php if ($this->paginator->getPages()->totalItemCount) {
- ?>
- <div class="pull-left">
- <?php echo $this->partial('partials/items-per-page.phtml', array('itemsPerPage' => $itemsPerPage)); ?>
- </div>
- <?php } ?>
- <div class="pull-right">
- <?php echo $this->pagination($this->paginator, 'sliding', 'partials/pagination.phtml'); ?>
- </div>
|