diff options
| -rw-r--r-- | views/css/admin.css | 1 | ||||
| -rw-r--r-- | views/mods/mod_gutschein/index.phtml | 72 | ||||
| -rw-r--r-- | views/mods/mod_gutschein/settings_edit.phtml | 3 |
3 files changed, 56 insertions, 20 deletions
diff --git a/views/css/admin.css b/views/css/admin.css index 5de8ea7..e3279db 100644 --- a/views/css/admin.css +++ b/views/css/admin.css @@ -304,6 +304,7 @@ table.wpsgitrecht_table { width:100%; } .wpsg_mod_voucher_fieldtable .col_y { width:60px; }
.wpsg_mod_voucher_fieldtable .col_color { width:80px; }
.wpsg_mod_voucher_fieldtable .col_groesse { width:60px; }
+.wpsg_voucher .wpsg_status_link_wrap { min-height:50px; float:left; display:inline-block; }
/* Modul Lieferschein/Rechnung */
diff --git a/views/mods/mod_gutschein/index.phtml b/views/mods/mod_gutschein/index.phtml index 8832946..2da20ed 100644 --- a/views/mods/mod_gutschein/index.phtml +++ b/views/mods/mod_gutschein/index.phtml @@ -5,7 +5,6 @@ */
?>
-
<div class="wpsg_voucher" id="wpsg-bs">
<nav class="navbar navbar-default">
@@ -16,17 +15,8 @@ </div>
<div class="collapse navbar-collapse" id="bs-customer-navbar-collapse-1">
<ul class="nav navbar-nav">
- <?php
- $cnt = 0;
- if (is_array($this->view['arData']) && sizeof($this->view['arData']) > 0) {
- foreach ($this->view['arData'] as $oVoucher) {
- if (($this->get_option('wpsg_mod_gutschein_active') == '1') && ($oVoucher->getStatus() > 0)) $cnt=$cnt;
- else $cnt++;
- }
- }
- ?>
- <li role="presentation" class="wpsg-voucher-tab-a active"><a href="#" onclick="return false;"><?php echo wpsg_translate(__("Gutscheinverwaltung (#1# Gutscheine)", "wpsg"), $cnt); ?></a></li>
- <li role="presentation" class="wpsg-voucher-tab-a wpsg_showhide_filter <?php echo (($this->view['hasFilter'])?'active':''); ?>" id="wpsg-voucher-tab-0"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
+ <li role="presentation" class="wpsg-voucher-tab-a active"><a href="#" onclick="return false;"><?php echo __("Gutscheinverwaltung", "wpsg"); ?></a></li>
+ <li role="presentation" class="wpsg-voucher-tab-a wpsg_showhide_filter <?php echo ((($this->view['hasFilter']) && (wpsg_getStr($this->view['arFilter']['s']) != ''))?'active':''); ?>" id="wpsg-voucher-tab-0"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'add'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&action=add"><span class="glyphicon glyphicon-plus"></span><?php echo __("Hinzufügen", "wpsg"); ?></a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
@@ -38,7 +28,7 @@ </div>
</div>
- <div class="wpsg-filter wpsg-customer-tab wpsg-voucher-tab-0 container-fluid form-horizontal" style="display:<?php echo (($this->view['hasFilter'] === true)?'block':'none'); ?>;">
+ <div class="wpsg-filter wpsg-customer-tab wpsg-voucher-tab-0 container-fluid form-horizontal" style="display:<?php echo ((($this->view['hasFilter'] === true) && ($this->view['arFilter']['s'] != ''))?'block':'none'); ?>;">
<div class="row">
<div class="col-lg-4">
<form method="post" id="filter_form">
@@ -50,6 +40,7 @@ <?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
<?php echo wpsg_drawForm_SubmitButton(__('Gutscheine suchen')); ?><br />
+ <input type="hidden" id="filterstatus" name="filter[status]" value="<?php echo @$this->view['arFilter']['status']; ?>" />
</form>
</div>
@@ -58,7 +49,17 @@ </nav>
- <div class="wpsg_clear"></div>
+ <div class="wpsg_msg_wrap"><hr class="wp-header-end wpsg-wp-header-end"/></div>
+
+ <div class="pagination_wrap wpsg_status_link_wrap">
+
+ <ul class="pagination">
+ <?php foreach ($this->view['arStatus'] as $status_key => $status_info) { ?>
+ <li class="<?php echo ((wpsg_getStr($this->view['arFilter']['status']) == $status_key)?'active':''); ?>"><a href="#" onclick="return wpsg_setFilterStatus('<?php echo $status_key; ?>');"><?php echo wpsg_translate(__('#1# <span>(#2#)<span>', 'wpsg'), $status_info['label'], $status_info['count']); ?></a></li>
+ <?php } ?>
+ </ul>
+
+ </div>
<?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
@@ -80,7 +81,6 @@ </thead>
<tbody>
<?php foreach ($this->view['arData'] as $oVoucher) { ?>
- <?php if (($this->get_option('wpsg_mod_gutschein_active') == '1') && ($oVoucher->getStatus() > 0)) continue; ?>
<tr>
<td class="col_checkbox">
@@ -123,10 +123,10 @@ <input onclick="if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;" type="submit" value="<?php echo __('Markierte Gutscheine löschen', 'wpsg'); ?>" class="button-secondary action" id="doaction" name="submit-multidelete" />
</div>
+ </form>
+
- </div>
-
- <?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
+ <?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
<?php } else { ?>
@@ -146,6 +146,18 @@ jQuery('th[data-order="<?php echo $this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['arFilter']['ascdesc']); ?>');
<?php } ?>
+ function wpsg_setFilterStatus(state)
+ {
+
+ jQuery('#filterstatus').val(state);
+
+ jQuery('#seite').val(1);
+ jQuery('#filter_form').submit();
+
+ return false;
+
+ }
+
function goPage(page)
{
@@ -158,5 +170,29 @@ } // function goPage(page)
+ jQuery(document).ready(function() {
+
+ jQuery('.wpsg-order-tab-mods').bind('click', function() {
+
+ if (jQuery(this).hasClass('active'))
+ {
+
+ jQuery(this).removeClass('active');
+ jQuery('.' + jQuery(this).attr("id")).slideUp(250);
+
+ }
+ else
+ {
+
+ jQuery(this).addClass('active');
+ jQuery('.' + jQuery(this).attr("id")).slideDown(250);
+
+ }
+
+ return false;
+
+ } );
+
+ } );
/* ]]> */</script>
\ No newline at end of file diff --git a/views/mods/mod_gutschein/settings_edit.phtml b/views/mods/mod_gutschein/settings_edit.phtml index 9688428..9ffdbd2 100644 --- a/views/mods/mod_gutschein/settings_edit.phtml +++ b/views/mods/mod_gutschein/settings_edit.phtml @@ -6,5 +6,4 @@ ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_size', __('Länge der Gutscheincodes', 'wpsg'), $this->get_option('wpsg_mod_gutschein_size'), array ('help' => 'wpsg_mod_gutschein_size')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_perPage', __('Gutscheine pro Seite (Backend)', 'wpsg'), $this->get_option('wpsg_mod_gutschein_perPage'), array ('help' => 'wpsg_mod_gutschein_perPage')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_gutschein_active', __('Nur aktive Gutscheine anzeigen (Backend)', 'wpsg'), $this->get_option('wpsg_mod_gutschein_active'), array ('help' => 'wpsg_mod_gutschein_active')); ?>
\ No newline at end of file +<?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_perPage', __('Gutscheine pro Seite (Backend)', 'wpsg'), $this->get_option('wpsg_mod_gutschein_perPage'), array ('help' => 'wpsg_mod_gutschein_perPage')); ?>
\ No newline at end of file |
