diff options
| author | Daniel Schmitzer <noreply@maennchen1.de> | 2019-01-28 09:27:20 +0000 |
|---|---|---|
| committer | Daniel Schmitzer <noreply@maennchen1.de> | 2019-01-28 09:27:20 +0000 |
| commit | 455dda8ba4aac15c7dcd17992f55748ebcc19b2d (patch) | |
| tree | 561086c823831e7143ad4c681b11f2fabf0940f7 /views | |
| parent | f2c67a7c5e5c30e1efccd37ce478578f9091e464 (diff) | |
- Filteransicht für Produktgruppen in Bestellverwaltung (Optional)
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7269 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views')
| -rw-r--r-- | views/mods/mod_productgroups/settings_edit.phtml | 6 | ||||
| -rw-r--r-- | views/order/index.phtml | 33 |
2 files changed, 37 insertions, 2 deletions
diff --git a/views/mods/mod_productgroups/settings_edit.phtml b/views/mods/mod_productgroups/settings_edit.phtml index 90aaba1..6dfc6fd 100644 --- a/views/mods/mod_productgroups/settings_edit.phtml +++ b/views/mods/mod_productgroups/settings_edit.phtml @@ -12,4 +12,8 @@ 'buyed' => __('Anzahl Verkäufe', 'wpsg'),
'erstellungsdatum' => __('Erstellungsdatum', 'wpsg'),
'preis' => __('Preis', 'wpsg')
-), $this->get_option('wpsg_productgroups_order'), array('help' => 'wpsg_mod_productgroups_order')); ?>
\ No newline at end of file +), $this->get_option('wpsg_productgroups_order'), array('help' => 'wpsg_mod_productgroups_order')); ?>
+
+<br />
+
+<?php echo wpsg_drawForm_Checkbox('wpsg_mod_productgroups_order_filter', __('Filter in Bestellverwaltung aktivieren', 'wpsg'), $this->get_option('wpsg_mod_productgroups_order_filter')); ?>
diff --git a/views/order/index.phtml b/views/order/index.phtml index 1a7850d..afa5697 100644 --- a/views/order/index.phtml +++ b/views/order/index.phtml @@ -53,7 +53,7 @@ <?php } */ ?>
- <?php if ($this->hasMod('wpsg_mod_productgroups')) { ?>
+ <?php if ($this->hasMod('wpsg_mod_productgroups') && $this->get_option('wpsg_mod_productgroups_order_filter') === '1') { ?>
<?php $arProductgroups = $this->callMod('wpsg_mod_productgroups', 'getAllProductGroups'); ?>
<?php echo wpsg_drawForm_Select('filter[productgroup_id]', __('Bestellungen mit Produkten aus Produktgruppe'), ['0' => __('Alle', 'wpsg')] + $arProductgroups, wpsg_getStr($this->view['arFilter']['productgroup_id'])); ?>
@@ -184,7 +184,25 @@ </nav>
<div class="wpsg_msg_wrap"><hr class="wp-header-end wpsg-wp-header-end"/></div>
+
+ <?php if ($this->hasMod('wpsg_mod_productgroups') && $this->get_option('wpsg_mod_productgroups_order_filter') === '1') { $arPG = $this->callMod('wpsg_mod_productgroups', 'getAllProductGroups', [true]); ?>
+ <div class="container-fluid">
+ <div class="row">
+ <div class="pagination_wrap wpsg_status_link_wrap">
+
+ <ul class="pagination">
+ <?php foreach ($arPG as $pg_id => $pg_name) { ?>
+ <li class="<?php echo ((wpsg_getStr($this->view['arFilter']['productgroup_id']) == $pg_id)?'active':''); ?>"><a href="#" onclick="return wpsg_setFilterProductgroup('<?php echo $pg_id; ?>');"><?php echo $pg_name; ?></a></li>
+ <?php } ?>
+ </ul>
+
+ </div>
+ </div>
+ </div>
+
+ <?php } ?>
+
<div class="pagination_wrap wpsg_status_link_wrap">
<ul class="pagination">
@@ -405,7 +423,20 @@ jQuery('.col_set_checkbox').each(function() { jQuery(this).prop('checked', !jQuery(this).prop('checked')); } );
}
+
+ <?php if ($this->hasMod('wpsg_mod_productgroups') && $this->get_option('wpsg_mod_productgroups_order_filter') === '1') { ?>
+ function wpsg_setFilterProductgroup(pgroup_id) {
+
+ jQuery('#filterproductgroup_id').val(pgroup_id);
+
+ jQuery('#seite').val(1);
+ jQuery('#filter_form').submit();
+ return false;
+
+ }
+ <?php } ?>
+
function wpsg_setFilterStatus(state)
{
|
