Rev 5382 | Rev 5683 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php
/**
* Template für die Übersicht der Bestellungen
*/
?>
<div class="wpsg_order" id="wpsg-bs">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li role="presentation" class="<?php echo ((!isset($_REQUEST['action']))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order"><?php echo __("Bestellübersicht", "wpsg"); ?></a></li>
<li role="presentation" class="wpsg_showhide_filter <?php echo (($this->view['hasFilter'] === true)?'active':''); ?>"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'import'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=import&noheader=1"><span class="glyphicon glyphicon-import"></span><?php echo __("Import", "wpsg"); ?></a></li>
<?php if (wpsg_isSizedArray($this->view['data'])) { ?>
<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'export'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=export&noheader=1"><span class="glyphicon glyphicon-export"></span><?php echo __("Export", "wpsg"); ?></a></li>
<?php } ?>
</ul>
</div>
</div>
<div class="wpsg-filter container-fluid form-horizontal" style="display:<?php echo (($this->view['hasFilter'] === true)?'block':'none'); ?>;">
<div class="row">
<div class="col-lg-12">
<form method="post" id="filter_form">
<input id="wpsg_seite" type="text" name="seite" value="<?php echo $this->view['seite']; ?>" class="current-page" />
<input id="wpsg_order" type="text" name="filter[order]" value="<?php echo $this->view['arFilter']['order']; ?>" />
<input id="wpsg_ascdesc" type="text" name="filter[ascdesc]" value="<?php echo $this->view['arFilter']['ascdesc']; ?>" />
<div class="container-fluid">
<div class="row">
<div class="col-lg-6">
<?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($_REQUEST['s'])); ?>
</div>
<div class="col-lg-6">
<?php echo wpsg_drawForm_Select('filter[status]', __('Bestellstatus', 'wpsg'), $this->arStatus, wpsg_getStr($_REQUEST['s'])); ?>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-lg-6">
</div>
<div class="col-lg-6">
<?php echo wpsg_drawForm_SubmitButton(__('Bestellungen suchen')); ?>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</nav>
<?php if ($this->view['pages'] > 1) { ?>
<div class="wpsg_status_link_wrap">
<ul>
<?php foreach ($this->view['arStatus'] as $status_key => $status_info) { ?>
<li><a href="#"><?php echo wpsg_translate(__('#1# (#2#)', 'wpsg'), $status_info['label'], $status_info['count']); ?></a></li>
<?php } ?>
</ul>
</div>
<nav class="pagination_wrap">
<ul class="pagination">
<?php if ($this->view['seite'] > 1) { ?>
<li><a onclick="return goPage(<?php echo $this->view['seite'] - 1; ?>);" href="#" aria-label="<?php echo __('Vorherige Seite'); ?>"><span aria-hidden="true">«</span></a></li>
<?php } ?>
<?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
<li class="<?php echo (($i == $this->view['seite'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
<?php } ?>
<?php if ($this->view['seite'] + 1 <= $this->view['pages']) { ?>
<li><a onclick="return goPage(<?php echo $this->view['seite'] + 1; ?>);" href="#" aria-label="<?php echo __('Nächste Seite'); ?>"><span aria-hidden="true">»</span></a></li>
<?php } ?>
</ul>
</nav>
<?php } ?>
<?php echo $this->writeBackendMessage(); ?>
<div class="content">
<?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
<?php } else { ?>
<p><?php echo __('Keine Bestellungen in der Datenbank.', 'wpsg'); ?></p>
<?php } ?>
</div>
<script type="text/javascript">/* <![CDATA[ */
var wpsg_order = '<?php echo wpsg_getStr($this->view['search']['order']); ?>';
var wpsg_ascdesc = '<?php echo wpsg_getStr($this->view['search']['ascdesc']); ?>';
function goPage(page)
{
if (page <= 0 || page == <?php echo $this->view['seite']; ?> || page > <?php echo wpsg_getStr($this->view['pages'], '0'); ?>) return;
jQuery('#wpsg_seite').val(page);
jQuery('#filter_form').submit();
return false;
} // function goPage(page)
function wpsg_setOrder(order)
{
if (order == wpsg_order)
{
// Nur Richtung ändern
if (wpsg_ascdesc == 'asc') jQuery('#wpsg_ascdesc').val('desc');
else jQuery('#wpsg_ascdesc').val('asc');
}
else
{
jQuery('#wpsg_order').val(order);
jQuery('#wpsg_ascdesc').val('asc');
}
jQuery('#seite').val(1);
jQuery('#filter_form').submit();
return false;
} // function wpsg_setOrder(order)
/* <![CDATA[ */</script>