Index: /mods/mod_gutschein/wpsg_voucher.php
===================================================================
--- /mods/mod_gutschein/wpsg_voucher.php	(revision 6679)
+++ /mods/mod_gutschein/wpsg_voucher.php	(revision 6680)
@@ -44,4 +44,6 @@
 			{
 				
+				if (current_time('timestamp') < strtotime($this->start_date)) return __('Wartend', 'wpsg');
+				
 				if (current_time('timestamp') < strtotime($this->start_date) || current_time('timestamp') > strtotime($this->end_date))
 				{
@@ -57,4 +59,6 @@
 			{
 				
+				if (current_time('timestamp') < strtotime($this->start_date)) return __('Wartend', 'wpsg');
+				
 				if ($this->getUsed() > 0) return __('Verbraucht', 'wpsg');
 				else
@@ -76,23 +80,27 @@
         	{
         		
+        		if (current_time('timestamp') < strtotime($this->start_date)) return 4;	// Wartend
+        		
         		if (current_time('timestamp') < strtotime($this->start_date) || current_time('timestamp') > strtotime($this->end_date))
         		{
         			
-        			if ($this->getUsed() > 0) return 2;   //('Verbraucht', 'wpsg');
-        			else return 1; 	//('Inaktiv', 'wpsg');
+        			if ($this->getUsed() > 0) return 3;   //('Verbraucht', 'wpsg');
+        			else return 2; 	//('Inaktiv', 'wpsg');
         			
         		}
-        		else return 0;	//__('Aktiv', 'wpsg');
+        		else return 1;	//__('Aktiv', 'wpsg');
         		
         	}
         	else
         	{
-        		
-        		if ($this->getUsed() > 0) return 2;	//('Verbraucht', 'wpsg');
+
+        		if (current_time('timestamp') < strtotime($this->start_date)) return 4;	// Wartend
+        		
+        		if ($this->getUsed() > 0) return 3;	//('Verbraucht', 'wpsg');
         		else
         		{
         			
-        			if (current_time('timestamp') < strtotime($this->start_date) || current_time('timestamp') > strtotime($this->end_date)) return 1; 	//('Inaktiv', 'wpsg');
-        			else return 0; 	//('Aktiv', 'wpsg');
+        			if (current_time('timestamp') < strtotime($this->start_date) || current_time('timestamp') > strtotime($this->end_date)) return 2; 	//('Inaktiv', 'wpsg');
+        			else return 1; 	//('Aktiv', 'wpsg');
         			
         		}
@@ -167,17 +175,45 @@
 				ORDER BY
 					".$strQueryORDER."		
-				".$strLimit."
+				
 			";
-
+			// ".$strLimit."
+			
 			$arID = $GLOBALS['wpsg_db']->fetchAssocField($strQuery);
 			$arReturn = array();
 
+			$cnt = array();
+			$cnt[0] = 0;	// Alle
+			$cnt[1] = 0;	// Aktiv
+			$cnt[2] = 0;	// Inaktiv
+			$cnt[3] = 0;	// Verbraucht
+			$cnt[4] = 0;	// Wartend
+			
+			$start = 0;		// Vergleich mit $arFilter['limit'][0]
+			$cntx = 0;		// Vergleich mit $arFilter['limit'][1]
 			foreach ($arID as $id)
 			{
 
-				$arReturn[$id] = self::getInstance($id);
-
+				$vv = self::getInstance($id);
+				$st = $vv->getStatus();
+				if (isset($arFilter['status'])) {
+					
+					$cnt[0]++;
+					$cnt[$st]++;
+					
+					if (($arFilter['status'] == $st) || ($arFilter['status'] == 0)) {
+						if ($start >= $arFilter['limit'][0]) {
+							if ($cntx >= $arFilter['limit'][1]) continue;
+							$arReturn[$id] = self::getInstance($id);
+							$cntx++;
+						}
+						$start++;
+					}
+					
+				}
+				
 			}
 
+			$arReturn['counts'] = $cnt;
+			
 			return $arReturn;
 
Index: /mods/wpsg_mod_gutschein.class.php
===================================================================
--- /mods/wpsg_mod_gutschein.class.php	(revision 6679)
+++ /mods/wpsg_mod_gutschein.class.php	(revision 6680)
@@ -60,5 +60,4 @@
 			$this->shop->checkDefault('wpsg_mod_gutschein_size', '10');
 			$this->shop->checkDefault('wpsg_mod_gutschein_perPage', '25');
-			$this->shop->checkDefault('wpsg_mod_gutschein_active', '1');
 			
 		} // public function install()
@@ -1139,6 +1138,25 @@
 			$_SESSION['wpsg']['backend']['voucher']['arFilter'] = $this->shop->view['arFilter'];
 
+			$this->shop->view['arStatus'] = array();
+			$this->shop->view['arStatus']['0']['label'] = __('Alle', 'wpsg');
+			$this->shop->view['arStatus']['1']['label'] = __('Aktiv', 'wpsg');
+			$this->shop->view['arStatus']['2']['label'] = __('Inaktiv', 'wpsg');
+			$this->shop->view['arStatus']['3']['label'] = __('Verbraucht', 'wpsg');
+			$this->shop->view['arStatus']['4']['label'] = __('Wartend', 'wpsg');
+			$this->shop->view['arStatus']['0']['count'] = '0';
+			$this->shop->view['arStatus']['1']['count'] = '0';
+			$this->shop->view['arStatus']['2']['count'] = '0';
+			$this->shop->view['arStatus']['3']['count'] = '0';
+			$this->shop->view['arStatus']['4']['count'] = '0';
+			
 			$this->shop->view['arData'] = wpsg_voucher::find($this->shop->view['arFilter']);
 
+			$this->shop->view['arStatus']['0']['count'] = $this->shop->view['arData']['counts'][0];
+			$this->shop->view['arStatus']['1']['count'] = $this->shop->view['arData']['counts'][1];
+			$this->shop->view['arStatus']['2']['count'] = $this->shop->view['arData']['counts'][2];
+			$this->shop->view['arStatus']['3']['count'] = $this->shop->view['arData']['counts'][3];
+			$this->shop->view['arStatus']['4']['count'] = $this->shop->view['arData']['counts'][4];
+			
+			unset($this->shop->view['arData']['counts']);
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_gutschein/index.phtml');
 
@@ -1157,5 +1175,4 @@
 			$this->shop->update_option('wpsg_mod_gutschein_size', $_REQUEST['wpsg_mod_gutschein_size']);
 			$this->shop->update_option('wpsg_mod_gutschein_perPage', $_REQUEST['wpsg_mod_gutschein_perPage']);
-			$this->shop->update_option('wpsg_mod_gutschein_active', $_REQUEST['wpsg_mod_gutschein_active']);
 			
 		} // public function settings_save()
Index: /views/css/admin.css
===================================================================
--- /views/css/admin.css	(revision 6679)
+++ /views/css/admin.css	(revision 6680)
@@ -305,4 +305,5 @@
 .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; }
 
 
Index: /views/mods/mod_gutschein/index.phtml
===================================================================
--- /views/mods/mod_gutschein/index.phtml	(revision 6679)
+++ /views/mods/mod_gutschein/index.phtml	(revision 6680)
@@ -6,5 +6,4 @@
 
 ?>
-
 <div class="wpsg_voucher" id="wpsg-bs">
 
@@ -17,15 +16,6 @@
 			<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>
@@ -39,5 +29,5 @@
 		</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">
@@ -51,4 +41,5 @@
 
 						<?php echo wpsg_drawForm_SubmitButton(__('Gutscheine suchen')); ?><br />
+						<input type="hidden" id="filterstatus" name="filter[status]" value="<?php echo @$this->view['arFilter']['status']; ?>" />
 
 					</form>
@@ -59,5 +50,15 @@
     </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'); ?>
@@ -81,5 +82,4 @@
                     <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">
@@ -124,8 +124,8 @@
 
                 </div>
+			</form>
+        
 
-            </div>
-
-            <?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
+        <?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
 
         <?php } else { ?>
@@ -147,4 +147,16 @@
     <?php } ?>
 
+	function wpsg_setFilterStatus(state)
+	{
+
+		jQuery('#filterstatus').val(state);
+
+		jQuery('#seite').val(1);
+		jQuery('#filter_form').submit();
+
+		return false;
+
+	}
+
 	function goPage(page)
 	{
@@ -159,4 +171,28 @@
 	} // 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>
Index: /views/mods/mod_gutschein/settings_edit.phtml
===================================================================
--- /views/mods/mod_gutschein/settings_edit.phtml	(revision 6679)
+++ /views/mods/mod_gutschein/settings_edit.phtml	(revision 6680)
@@ -8,3 +8,2 @@
 <?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')); ?>
