summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2016-09-10 16:59:33 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2016-09-10 16:59:33 +0000
commit7141460e4adf63b9b9514f0ee5beef2cd978cbda (patch)
tree31c7331a2d9678edb95141000b32e9d5743e21ea
parent05f82065aa1056c90a887b52140c85c824af9f24 (diff)
-To Mac
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5751 0d5edaf7-2b12-4e95-93f4-047927463d4b
-rw-r--r--views/css/admin.css3
-rw-r--r--views/gfx/no_gravatar.pngbin0 -> 809 bytes
-rw-r--r--views/mods/mod_customergroup/addedit.phtml203
-rw-r--r--views/mods/mod_customergroup/index.phtml347
-rw-r--r--views/mods/mod_export/order_index_tab.phtml35
-rw-r--r--views/mods/mod_export/product_index_tab.phtml37
-rw-r--r--views/mods/mod_kundenverwaltung/index.phtml22
-rw-r--r--views/mods/mod_productgroups/index.phtml190
-rw-r--r--views/order/index.phtml45
9 files changed, 395 insertions, 487 deletions
diff --git a/views/css/admin.css b/views/css/admin.css
index b98f494..0f0a380 100644
--- a/views/css/admin.css
+++ b/views/css/admin.css
@@ -7,7 +7,8 @@
#wpsg-bs nav.navbar li { margin-bottom:0px; }
#wpsg-bs nav.navbar .active { margin-right:2px; }
#wpsg-bs nav.navbar .glyphicon { margin-right:10px; }
-#wpsg-bs .wpsg-filter { border-top:1px solid #E0E0E0; padding-top:15px; }
+#wpsg-bs .wpsg-filter-tab,
+#wpsg-bs .wpsg-filter { border-top:1px solid #E0E0E0; padding:15px; }
#wpsg-bs .pagination_wrap { text-align:right; padding-right:20px; }
#wpsg-bs .pagination_wrap_bottom { padding-right:0px; }
#wpsg-bs .pagination { margin-top:0px; margin-bottom:10px; }
diff --git a/views/gfx/no_gravatar.png b/views/gfx/no_gravatar.png
new file mode 100644
index 0000000..63675c0
--- /dev/null
+++ b/views/gfx/no_gravatar.png
Binary files differ
diff --git a/views/mods/mod_customergroup/addedit.phtml b/views/mods/mod_customergroup/addedit.phtml
index d3a2019..dc6bc68 100644
--- a/views/mods/mod_customergroup/addedit.phtml
+++ b/views/mods/mod_customergroup/addedit.phtml
@@ -5,159 +5,56 @@
*/
?>
-<div class="wrap wpsg_mod_kundenverwaltung_customergroup_addedit wpsg_customergroup_view wpsg_produkt_addedit wrap columns-2">
- <div class="icon32 icon32-posts-post" id="icon-add"><br /></div>
-
- <h2>
- <?php if ($this->view['mode'] == 'edit') { ?>
- <?php echo __('Kundengruppe bearbeiten', 'wpsg'); ?>
- <?php } else { ?>
- <?php echo __('Kundengruppe anlegen', 'wpsg'); ?>
- <?php } ?>
- </h2>
- <br />
-
- <?php echo $this->writeBackendMessage(); ?>
-
- <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=save&noheader=1" enctype="multipart/form-data">
-
- <?php if ($this->view['mode'] == 'edit') { ?>
- <input type="hidden" name="edit_id" value="<?php echo $this->view['data']->id; ?>" />
- <?php } ?>
-
- <div id="postbox" class="metabox-holder has-right-sidebar">
-
- <div id="side-info-column" class="inner-sidebar" style="width:386px;">
-
- <div id="side-sortables" class="meta-box-sortables ui-sortable" style="width:380px;">
-
- <?php $this->callMods('customergroup_edit', array(&$this->view['data'])); ?>
-
- </div>
-
+<div class="wpsg_customergroup wpsg_customergroup_add" 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 id="post-body">
-
- <div id="normal-sortables" class="meta-box-sortables" style="margin-right:400px;">
-
- <div id="wpsg_customergroup_general" class="postbox">
- <h3 class="wpsg_handlediv">
- <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
- <span><?php echo __('Allgemein', 'wpsg'); ?></span>
- </h3>
- <div class="inside">
-
- <?php echo wpsg_drawForm_Input('wpsg_mod_kundenverwaltung[name]', __('Name', 'wpsg'), $this->view['data']->name); ?>
- <?php echo wpsg_drawForm_Select('wpsg_mod_kundenverwaltung[calculation]', __('Preisangaben im Shop (Frontend)', 'wpsg'), array(
- -1 => __('Standard', 'wpsg'),
- WPSG_BRUTTO => __('Brutto (inkl. Steuer)', 'wpsg'),
- WPSG_NETTO => __('Netto (zzgl. Steuer)', 'wpsg')
- ), $this->view['data']->calculation); ?>
-
- </div>
- </div>
-
- </div>
-
- <p class="submit">
- <input type="submit" value="<?php echo __('Kundengruppe speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" />
- <input type="submit" value="<?php echo __('Kundengruppe speichern und zur Übersicht', 'wpsg'); ?>" class="button-primary" id="submit_index" name="submit_index" />
- </p>
-
+ <div class="collapse navbar-collapse" id="bs-customergroup-navbar-collapse-1">
+ <ul class="nav navbar-nav">
+ <li role="presentation" class="wpsg-customergroup-tab-a"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=index"><?php echo __("Kundengruppenverwaltung", "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-Customergroup&action=add"><span class="glyphicon glyphicon-plus"></span><?php echo __("Hinzufügen", "wpsg"); ?></a></li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+
+ </ul>
</div>
-
</div>
-
- </form>
-
-</div>
-
-<script type="text/javascript">/* <![CDATA[ */
-
- jQuery(document).ready( function() {
-
- jQuery("#normal-sortables, #side-sortables").sortable({
- connectWith: ".meta-box-sortables",
- placeholder: 'wpsg_placeholder',
- dropOnEmpty: true,
- cursor: 'move',
- handle: '.wpsg_handlediv',
- grid: [50, 20],
- forceHelperSize: true,
- forcePlaceholderSize: true,
- opacity: 0.8,
- stop: function(e,ui) {
-
- var ser = jQuery("#normal-sortables").sortable("serialize");
- ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
-
- jQuery.cookie('wpsg_customergroup_view_normal', ser);
-
- var ser = jQuery("#side-sortables").sortable("serialize");
- ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
-
- jQuery.cookie('wpsg_customergroup_view_side', ser);
-
- },
- receive: function(e, ui) {
- }
- });
-
- if (jQuery.cookie('wpsg_customergroup_view_normal') != null)
- {
-
- var divs = jQuery.cookie('wpsg_customergroup_view_normal').split(',').reverse();
-
- for (index in divs)
- {
-
- jQuery('#normal-sortables').prepend(jQuery('#wpsg_' + divs[index]));
-
- }
-
- }
-
- if (jQuery.cookie('wpsg_customergroup_view_side') != null)
- {
-
- var divs = jQuery.cookie('wpsg_customergroup_view_side').split(',').reverse();
-
- for (index in divs)
- {
-
- jQuery('#side-sortables').prepend(jQuery('#wpsg_' + divs[index]));
-
- }
-
- }
-
- jQuery('.wpsg_handlediv').bind('click', function() {
- jQuery(this).next().toggle();
-
- var arClose = new Array();
- jQuery('.wpsg_customergroup_view .postbox .inside:hidden').each(function() {
- arClose.push(jQuery(this).parent().attr("id"));
- } );
-
- jQuery.cookie('wpsg_customergroup_closed', arClose.join(','));
-
- } );
-
- if (jQuery.cookie('wpsg_customergroup_closed') != null)
- {
-
- var arClose = jQuery.cookie('wpsg_customergroup_closed').split(',');
-
- for (index in arClose)
- {
-
- jQuery('#' + arClose[index] + ' .inside').hide();
-
- }
-
- }
-
- } );
-
-/* ]]> */</script> \ No newline at end of file
+
+ </nav>
+
+ <div class="wpsg_clear"></div>
+
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <div class="content">
+
+ <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=save&noheader=1" enctype="multipart/form-data">
+ <?php echo wpsg_drawForm_AdminboxStart(__('Allgemein', 'wpsg')); ?>
+
+ <?php if ($this->view['mode'] == 'edit') { ?>
+ <input type="hidden" name="edit_id" value="<?php echo $this->view['data']->id; ?>" />
+ <?php } ?>
+
+ <?php $this->callMods('customergroup_edit', array(&$this->view['data'])); ?>
+
+ <?php echo wpsg_drawForm_Input('wpsg_mod_kundenverwaltung[name]', __('Name', 'wpsg'), @$this->view['data']->name); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_kundenverwaltung[calculation]', __('Preisangaben im Shop (Frontend)', 'wpsg'), array(
+ -1 => __('Standard', 'wpsg'),
+ WPSG_BRUTTO => __('Brutto (inkl. Steuer)', 'wpsg'),
+ WPSG_NETTO => __('Netto (zzgl. Steuer)', 'wpsg')
+ ), @$this->view['data']->calculation); ?>
+
+ <?php echo wpsg_drawForm_AdminboxEnd(); ?>
+
+ <input type="submit" value="<?php echo __('Kundengruppe speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit" />
+ <input type="submit" value="<?php echo __('Kundengruppe speichern und zur Übersicht', 'wpsg'); ?>" class="button-primary" id="submit_index" name="submit_index" />
+
+ </form>
+
+ </div>
+
+</div> \ No newline at end of file
diff --git a/views/mods/mod_customergroup/index.phtml b/views/mods/mod_customergroup/index.phtml
index 8542227..6503a76 100644
--- a/views/mods/mod_customergroup/index.phtml
+++ b/views/mods/mod_customergroup/index.phtml
@@ -5,213 +5,150 @@
*/
?>
-<div class="wrap wpsg_mod_kundenverwaltung_customergroup_index">
-
- <div class="icon32 icon32-posts-post" id="icon-edit"><br /></div>
-
- <h2>
- <?php echo __('Kundengruppenverwaltung', 'wpsg'); ?>
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=add" class="add-new-h2"><?php echo __("Hinzufügen", "wpsg"); ?></a>
- </h2>
-
- <?php echo $this->writeBackendMessage(); ?>
-
- <form method="POST" id="filter_form">
-
- <?php if (sizeof($this->view['data']) > 0) { ?>
- <p class="search-box">
- <label for="post-search-input" class="screen-reader-text"><?php echo __('Kundengruppen suchen', 'wpsg'); ?>:</label>
- <input type="text" value="<?php echo wpsg_hspc($_REQUEST['s']); ?>" name="filter[s]" id="post-search-input">
- <input type="submit" value="<?php echo __('Kundengruppen suchen', 'wpsg'); ?>" class="button" id="search-submit" name="">
- </p>
- <?php } ?>
-
- <div class="tablenav top">
-
- <?php if (sizeof($this->view['data']) > 0) { ?>
- <div class="tablenav-pages"><span class="displaying-num"><?php echo wpsg_translate(__('#1# Elemente', 'wpsg'), $this->view['count']); ?></span>
- <div class="tablenav-pages">
- <span class="pagination-links">
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=1&s=<?php echo $_REQUEST['s'].'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur ersten Seite gehen', 'wpsg'); ?>" class="first-page <?php echo (($this->view['seite'] == '1')?'disabled':''); ?>">«</a>
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=<?php echo ($this->view['seite'] - 1).'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur vorherigen Seite gehen', 'wpsg'); ?>" class="prev-page <?php echo (($this->view['seite'] <= 1)?'disabled':''); ?>">‹</a>
- <span class="paging-input"><input type="text" size="1" value="<?php echo $this->view['seite']; ?>" id="seite" name="seite" title="<?php echo __('Aktuelle Seite', 'wpsg'); ?>" class="current-page"> <?php echo __('von', 'wpsg'); ?> <span class="total-pages"><?php echo $this->view['pages']; ?></span></span>
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=<?php echo ($this->view['seite'] + 1).'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur nächsten Seite gehen', 'wpsg'); ?>" class="next-page <?php echo (($this->view['seite'] >= $this->view['pages'])?'disabled':''); ?>">›</a>
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=<?php echo $this->view['pages'].'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur letzten Seite gehen', 'wpsg'); ?>" class="last-page <?php echo (($this->view['seite'] == $this->view['pages'])?'disabled':''); ?>">»</a>
- </span>
- </div>
-
- <script type="text/javascript">
-
- jQuery('.tablenav-pages .disabled').bind('click', function() { return false; } );
-
- </script>
-
- <br class="clear" />
+
+<div class="wpsg_customergroup" 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-customergroup-navbar-collapse-1">
+ <ul class="nav navbar-nav">
+ <li role="presentation" class="wpsg-customergroup-tab-a active"><a href="#" onclick="return false;"><?php echo __("Kundengruppenverwaltung", "wpsg"); ?></a></li>
+ <li role="presentation" class="wpsg-customergroup-tab-a wpsg_showhide_filter <?php echo (($this->view['hasFilter'] === true)?'active':''); ?>" id="wpsg-customergroup-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-Customergroup&action=add"><span class="glyphicon glyphicon-plus"></span><?php echo __("Hinzufügen", "wpsg"); ?></a></li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+
+ </ul>
</div>
- <?php } ?>
-
</div>
-
- <input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo $this->view['filter']['order']; ?>" />
- <input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo $this->view['filter']['ascdesc']; ?>" />
-
- <input style="display:none;" type="submit" name="suchen" value="" />
-
- </form>
-
- <?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
- <table class="widefat post fixed">
- <thead>
- <tr>
- <th class="manage-column col-id <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'id'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
- <a href="#" onclick="return wpsg_setOrder('id');">
- <span><?php echo __("Id", 'wpsg'); ?></span>
- <span class="sorting-indicator"></span>
- </a>
- </th>
- <th class="manage-column col-name <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'name'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
- <a href="#" onclick="return wpsg_setOrder('name');">
- <span><?php echo __("Name", 'wpsg'); ?></span>
- <span class="sorting-indicator"></span>
- </a>
- </th>
- <th class="manage-column col-calculation <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'calculation'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
- <a href="#" onclick="return wpsg_setOrder('name');">
- <span><?php echo __("Preisanzeige", 'wpsg'); ?></span>
- <span class="sorting-indicator"></span>
- </a>
- </th>
- <th class="manage-column col-customercount <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'customercount'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
- <a href="#" onclick="return wpsg_setOrder('customercount');">
- <span><?php echo __("Kunden", 'wpsg'); ?></span>
- <span class="sorting-indicator"></span>
- </a>
- </th>
- </tr>
- </thead>
- <tbody>
- <?php $i = 0; foreach ($this->view['data'] as $oCustomerGroup) { ?>
- <tr class="<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
- <td class="col-id">
- <?php echo wpsg_hspc($oCustomerGroup->id); ?>
- </td>
- <td class="col-name">
- <?php echo wpsg_hspc($oCustomerGroup->name); ?>
- <div class="row-actions">
- <span class="edit"><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=edit&edit_id=<?php echo $oCustomerGroup->id; ?>"><?php echo __("Bearbeiten", "wpsg"); ?></a></span>
- |
- <span class="edit"><a title="<?php echo __("Kunden dieser Kundengruppe anzeigen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&customergroup=<?php echo $oCustomerGroup->id; ?>"><?php echo __("Kunden anzeigen", "wpsg"); ?></a></span>
- |
- <span class="del"><a onclick="if (!confirm('<?php echo __("Sind Sie sicher, dass Sie diese Kundengruppe löschen wollen?", "wpsg"); ?>')) return false;" title="<?php echo __("Diesen Kunden löschen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=del&edit_id=<?php echo $oCustomerGroup->id; ?>&noheader=1"><?php echo __("Löschen", "wpsg"); ?></a></span>
- </div>
- </td>
- <td class="col-calculation">
- <?php if ($oCustomerGroup->calculation == WPSG_BRUTTO) { ?>
- <?php echo __('Brutto Preise', 'wpsg'); ?>
- <?php } else if ($oCustomerGroup->calculation == WPSG_NETTO) { ?>
- <?php echo __('Netto Preise', 'wpsg'); ?>
- <?php } else { ?>
- <?php echo __('Standard', 'wpsg'); ?>
- <?php } ?>
- </td>
- <td class="col-customercount">
- <?php echo wpsg_hspc($oCustomerGroup->customercount); ?>
- </td>
- </tr>
- <?php $i ++; } ?>
- </tbody>
- <tfoot>
- <tr>
- <th class="manage-column col-id <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'id'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
- <a href="#" onclick="return wpsg_setOrder('id');">
- <span><?php echo __("Id", 'wpsg'); ?></span>
- <span class="sorting-indicator"></span>
- </a>
- </th>
- <th class="manage-column col-name <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'name'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
- <a href="#" onclick="return wpsg_setOrder('name');">
- <span><?php echo __("Name", 'wpsg'); ?></span>
- <span class="sorting-indicator"></span>
- </a>
- </th>
- <th class="manage-column col-calculation <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'calculation'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
- <a href="#" onclick="return wpsg_setOrder('name');">
- <span><?php echo __("Preisanzeige", 'wpsg'); ?></span>
- <span class="sorting-indicator"></span>
- </a>
- </th>
- <th class="manage-column col-customercount <?php echo ((wpsg_isSizedString($this->view['filter']['order'], 'customercount'))?'sorted':'sortable'); ?> <?php echo ((wpsg_isSizedString($this->view['filter']['ascdesc'], 'asc'))?'asc':'desc'); ?>">
- <a href="#" onclick="return wpsg_setOrder('customercount');">
- <span><?php echo __("Kunden", 'wpsg'); ?></span>
- <span class="sorting-indicator"></span>
- </a>
- </th>
- </tr>
- </tfoot>
- </table>
- <?php } ?>
-
- <div class="tablenav">
-
- <?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
-
- <div class="tablenav-pages"><span class="displaying-num"><?php echo wpsg_translate(__('#1# Elemente', 'wpsg'), $this->view['count']); ?></span>
- <div class="tablenav-pages">
- <span class="pagination-links">
- <form method="POST">
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=1&s=<?php echo $_REQUEST['s'].'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur ersten Seite gehen', 'wpsg'); ?>" class="first-page <?php echo (($this->view['seite'] == '1')?'disabled':''); ?>">«</a>
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=<?php echo ($this->view['seite'] - 1).'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur vorherigen Seite gehen', 'wpsg'); ?>" class="prev-page <?php echo (($this->view['seite'] <= 1)?'disabled':''); ?>">‹</a>
- <span class="paging-input"><input type="text" size="1" value="<?php echo $this->view['seite']; ?>" name="seite" title="<?php echo __('Aktuelle Seite', 'wpsg'); ?>" class="current-page"> <?php echo __('von', 'wpsg'); ?> <span class="total-pages"><?php echo $this->view['pages']; ?></span></span>
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=<?php echo ($this->view['seite'] + 1).'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur nächsten Seite gehen', 'wpsg'); ?>" class="next-page <?php echo (($this->view['seite'] >= $this->view['pages'])?'disabled':''); ?>">›</a>
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&seite=<?php echo $this->view['pages'].'&'.http_build_query((array)$_REQUEST['filter']); ?>" title="<?php echo __('Zur letzten Seite gehen', 'wpsg'); ?>" class="last-page <?php echo (($this->view['seite'] == $this->view['pages'])?'disabled':''); ?>">»</a>
+
+ <div class="wpsg-filter wpsg-customer-tab wpsg-customer-tab-0 container-fluid form-horizontal" style="display:<?php echo (($this->view['hasFilter'] === true)?'block':'none'); ?>;">
+ <div class="row">
+ <div class="col-lg-4">
+ <form method="post" id="filter_form">
+
+ <input id="wpsg_seite" type="hidden" name="filter[page]" value="<?php echo @$this->view['page']; ?>" class="current-page" />
+
+ <input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo @$this->view['arFilter']['order']; ?>" />
+ <input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo @$this->view['arFilter']['ascdesc']; ?>" />
+
+ <?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
+
+ <?php echo wpsg_drawForm_SubmitButton(__('Kundengruppen suchen')); ?><br />
+
</form>
- </span>
+ </div>
</div>
-
- <script type="text/javascript">
-
- jQuery('.tablenav-pages .disabled').bind('click', function() { return false; } );
-
- </script>
-
- <br class="clear">
- </div>
-
- <?php } ?>
-
- </div>
-
- <script type="text/javascript">/* <![CDATA[ */
+ </div>
- var wpsg_order = '<?php echo $this->view['filter']['order']; ?>';
- var wpsg_ascdesc = '<?php echo $this->view['filter']['ascdesc']; ?>';
-
- 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)
-
- /* ]]> */</script>
-
-</div> \ No newline at end of file
+ </nav>
+
+ <?php if ($this->view['pages'] > 1) { ?>
+ <nav class="pagination_wrap">
+ <ul class="pagination">
+ <?php if ($this->view['arFilter']['page'] > 1) { ?>
+ <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] - 1; ?>);" href="#" aria-label="<?php echo __('Vorherige Seite'); ?>"><span aria-hidden="true">&laquo;</span></a></li>
+ <?php } ?>
+ <?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
+ <li class="<?php echo (($i == $this->view['arFilter']['page'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
+ <?php } ?>
+ <?php if ($this->view['arFilter']['page'] + 1 <= $this->view['pages']) { ?>
+ <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] + 1; ?>);" href="#" aria-label="<?php echo __('Nächste Seite'); ?>"><span aria-hidden="true">&raquo;</span></a></li>
+ <?php } ?>
+ </ul>
+ </nav>
+ <?php } ?>
+
+ <div class="wpsg_clear"></div>
+
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <div class="content">
+
+ <?php if (is_array($this->view['arData']) && sizeof($this->view['arData']) > 0) { ?>
+
+ <table class="table wpsg-table-order table-bordered table-hover table-striped wpsg-table-customer">
+ <thead>
+ <tr>
+ <th class="wpsg_order manage-column col-name" data-order="name"><?php echo __('Name', 'wpsg'); ?></th>
+ <th class="wpsg_order col-price" data-order="customercount"><?php echo __("Preisanzeige", 'wpsg'); ?></th>
+ <th class="wpsg_order col_customer" data-order="calculation"><?php echo __("Kunden", 'wpsg'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($this->view['arData'] as $oCustomerGroup) { ?>
+ <tr>
+ <td class="col-name">
+ <?php echo wpsg_hspc($oCustomerGroup->name); ?>
+ <div class="row-actions">
+ <span class="edit"><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=edit&edit_id=<?php echo $oCustomerGroup->id; ?>"><?php echo __("Bearbeiten", "wpsg"); ?></a></span>
+ |
+ <span class="edit"><a title="<?php echo __("Kunden dieser Kundengruppe anzeigen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&customergroup=<?php echo $oCustomerGroup->id; ?>"><?php echo __("Kunden anzeigen", "wpsg"); ?></a></span>
+ |
+ <span class="del"><a onclick="if (!confirm('<?php echo __("Sind Sie sicher, dass Sie diese Kundengruppe löschen wollen?", "wpsg"); ?>')) return false;" title="<?php echo __("Diesen Kunden löschen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customergroup&action=del&edit_id=<?php echo $oCustomerGroup->id; ?>&noheader=1"><?php echo __("Löschen", "wpsg"); ?></a></span>
+ </div>
+ </td>
+ <td class="col-price">
+ <?php if ($oCustomerGroup->calculation == WPSG_BRUTTO) { ?>
+ <?php echo __('Brutto Preise', 'wpsg'); ?>
+ <?php } else if ($oCustomerGroup->calculation == WPSG_NETTO) { ?>
+ <?php echo __('Netto Preise', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php echo __('Standard', 'wpsg'); ?>
+ <?php } ?>
+ </td>
+ <td class="col-customer">
+ <?php echo wpsg_hspc($oCustomerGroup->customercount); ?>
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+ </table>
+
+ <?php if ($this->view['pages'] > 1) { ?>
+ <nav class="pagination_wrap pagination_wrap_bottom">
+ <ul class="pagination">
+ <?php if ($this->view['arFilter']['page'] > 1) { ?>
+ <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] - 1; ?>);" href="#" aria-label="<?php echo __('Vorherige Seite'); ?>"><span aria-hidden="true">&laquo;</span></a></li>
+ <?php } ?>
+ <?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
+ <li class="<?php echo (($i == $this->view['arFilter']['page'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
+ <?php } ?>
+ <?php if ($this->view['arFilter']['page'] + 1 <= $this->view['pages']) { ?>
+ <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] + 1; ?>);" href="#" aria-label="<?php echo __('Nächste Seite'); ?>"><span aria-hidden="true">&raquo;</span></a></li>
+ <?php } ?>
+ </ul>
+ </nav>
+ <?php } ?>
+
+ <?php } else { ?>
+ <p><?php echo __('Bisher wurden noch keine Kundengruppen angelegt.', 'wpsg'); ?></p>
+ <?php } ?>
+
+ </div>
+
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ <?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
+ jQuery('th[data-order="<?php echo $this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['arFilter']['ascdesc']); ?>');
+ <?php } ?>
+
+ function goPage(page)
+ {
+
+ if (page <= 0 || page == <?php echo $this->view['arFilter']['page']; ?> || page > <?php echo $this->view['pages']; ?>) return;
+
+ jQuery('#wpsg_seite').val(page);
+ jQuery('#filter_form').submit();
+
+ return false;
+
+ } // function goPage(page)
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/mods/mod_export/order_index_tab.phtml b/views/mods/mod_export/order_index_tab.phtml
new file mode 100644
index 0000000..870b23f
--- /dev/null
+++ b/views/mods/mod_export/order_index_tab.phtml
@@ -0,0 +1,35 @@
+<?php
+
+ /**
+ * Template für die Integration des Produktexportes in die Bestellvarwaltung im unteren Bereich
+ */
+
+?>
+<form class="container-fluid form-horizontal" method="post" action="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_export&noheader=1" onsubmit="wpsg_mod_export_serializefilter();">
+
+ <div class="row">
+ <div class="col-lg-4">
+
+ <?php foreach ($this->view['wpsg_mod_export']['arProfile'] as $p) { ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_export_profile[]', $p['name'], false, array('value' => $p['id'])); ?>
+ <?php } ?>
+
+ <br /><?php echo wpsg_drawForm_SubmitButton(__('Export starten')); ?>
+
+ </div>
+ </div>
+
+ <input type="hidden" name="filter" id="wpsg_mod_export_filter" value="" />
+
+</form>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ function wpsg_mod_export_serializefilter()
+ {
+
+ jQuery('#wpsg_mod_export_filter').val(jQuery('#filter_form').serialize());
+
+ }
+
+/* ]]> */</script>
diff --git a/views/mods/mod_export/product_index_tab.phtml b/views/mods/mod_export/product_index_tab.phtml
deleted file mode 100644
index 88672dc..0000000
--- a/views/mods/mod_export/product_index_tab.phtml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
- /**
- * Template für die Integration des Produktexportes in die Bestellvarwaltung im unteren Bereich
- */
-
-?>
-<form class="container-fluid" method="post" action="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_export&noheader=1" onsubmit="wpsg_mod_export_serializefilter();">
-
- <div class="form-group form-group-sm">
- <?php foreach ($this->view['wpsg_mod_export']['arProfile'] as $p) { ?>
- <div class="checkbox">
- <label>
- <input type="checkbox" name="wpsg_mod_export_profile[]" value="<?php echo $p['id']; ?>" />&nbsp;<?php echo $p['name']; ?>
- </label><br />
- </div>
- <?php } ?>
- </div>
-
- <br />
-
- <input class="button" type="submit" value="<?php echo __('Export starten', 'wpsg'); ?>" />
-
- <input type="hidden" name="filter" id="wpsg_mod_export_filter" value="" />
-
-</form>
-
-<script type="text/javascript">/* <![CDATA[ */
-
- function wpsg_mod_export_serializefilter()
- {
-
- jQuery('#wpsg_mod_export_filter').val(jQuery('#filter_form').serialize());
-
- }
-
-/* ]]> */</script>
diff --git a/views/mods/mod_kundenverwaltung/index.phtml b/views/mods/mod_kundenverwaltung/index.phtml
index 706ca72..3494ddb 100644
--- a/views/mods/mod_kundenverwaltung/index.phtml
+++ b/views/mods/mod_kundenverwaltung/index.phtml
@@ -33,12 +33,12 @@
<div class="col-lg-4">
<form method="post" id="filter_form">
- <input id="wpsg_seite" type="hidden" name="seite" value="<?php echo $this->view['seite']; ?>" class="current-page" />
+ <input id="wpsg_seite" type="hidden" name="filter[page]" value="<?php echo @$this->view['page']; ?>" class="current-page" />
- <input id="wpsg_order" type="hidden" name="search[order]" value="<?php echo $this->view['search']['order']; ?>" />
- <input id="wpsg_ascdesc" type="hidden" name="search[ascdesc]" value="<?php echo $this->view['search']['ascdesc']; ?>" />
+ <input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo @$this->view['arFilter']['order']; ?>" />
+ <input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo @$this->view['arFilter']['ascdesc']; ?>" />
- <?php echo wpsg_drawForm_Input('s', __('Suchfeld', 'wpsg'), wpsg_getStr($_REQUEST['s'])); ?>
+ <?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
<?php echo wpsg_drawForm_SubmitButton(__('Produkte suchen')); ?><br />
@@ -77,7 +77,7 @@
<thead>
<tr>
<th class="manage-column column-title wpsg_pic_col"></th>
- <th class="wpsg_order col_name" data-order="name"><?php echo __("Name", 'wpsg'); ?></th>
+ <th class="wpsg_order col_name" data-order="nr"><?php echo __("Nr/Name", 'wpsg'); ?></th>
<th class="wpsg_order col_adress" data-order="adress"><?php echo __("Anschrift", 'wpsg'); ?></th>
<th class="wpsg_order col_status" data-order="status"><?php echo __("Status", 'wpsg'); ?></th>
</tr>
@@ -87,9 +87,11 @@
<tr>
<td class="wpsg_pic_col">
+ <img src="https://www.gravatar.com/avatar/<?php echo md5(strtolower(trim($c->getEMail()))); ?>?s=40&d=mm" alt=""" />
+
</td>
<td class="col_name column-title">
- <strong><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id=<?php echo $c->id; ?>" class="row-title"><?php echo $c->getLabel(); ?></a></strong>
+ <strong><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id=<?php echo $c->id; ?>" class="row-title"><?php echo trim($c->GetNr().' '.$c->getLabel()); ?></a></strong>
<?php if (strlen($c->getEMail()) > 0) { ?>
<a href="mailto:<?php echo $c->getEMail(); ?>" title="<?php echo __('Dem Kunden eine E-Mail schreiben.', 'wpsg'); ?>"><?php echo $c->getEMail(); ?></a>
<?php } ?>
@@ -143,17 +145,17 @@
</div>
</div>
-<?php wpsg_debug($this->view['search']); ?>
+
<script type="text/javascript">/* <![CDATA[ */
- <?php if (wpsg_isSizedString($this->view['search']['order']) && wpsg_isSizedString($this->view['search']['ascdesc'])) { ?>
- jQuery('th[data-order="<?php echo $this->view['search']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['search']['ascdesc']); ?>');
+ <?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
+ jQuery('th[data-order="<?php echo $this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['arFilter']['ascdesc']); ?>');
<?php } ?>
function goPage(page)
{
- if (page <= 0 || page == <?php echo $this->view['seite']; ?> || page > <?php echo $this->view['pages']; ?>) return;
+ if (page <= 0 || page == <?php echo $this->view['arFilter']['page']; ?> || page > <?php echo $this->view['pages']; ?>) return;
jQuery('#wpsg_seite').val(page);
jQuery('#filter_form').submit();
diff --git a/views/mods/mod_productgroups/index.phtml b/views/mods/mod_productgroups/index.phtml
index 312e73b..881a56f 100644
--- a/views/mods/mod_productgroups/index.phtml
+++ b/views/mods/mod_productgroups/index.phtml
@@ -5,57 +5,143 @@
*/
?>
-<div class="wrap">
- <div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
- <h2>
- <?php echo __('Produktgruppenverwaltung', 'wpsg'); ?>
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=add" class="add-new-h2"><?php echo __("Hinzufügen", "wpsg"); ?></a>
- </h2>
-
- <br />
- <?php echo $this->writeBackendMessage(); ?>
-
- <?php if (!is_array($this->view['data']) || sizeof($this->view['data']) == 0) { ?>
- <p><?php echo __("Keine Produktgruppen hinterlegt.", "wpsg"); ?></p>
- <?php } else { ?>
- <div class="clear"></div>
- <table cellspacing="0" class="widefat post fixed">
- <thead>
- <tr>
- <th style="" class="manage-column column-title" id="title" scope="col"><?php echo __("Name", "wpsg"); ?></th>
- <th style="" class="manage-column column-title" id="title" scope="col"><?php echo __("Template", "wpsg"); ?></th>
- <th style="" class="manage-column column-title" id="title" scope="col"><?php echo __("Produkte", "wpsg"); ?></th>
- </tr>
- </thead>
- <tbody>
- <?php foreach ($this->view['data'] as $g) { ?>
- <tr valign="top" class="alternate author-self status-draft iedit" id="post-<?php echo $g['id']; ?>">
- <td class="post-title column-title">
- <strong><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=edit&edit_id=<?php echo $g['id']; ?>" class="row-title"><?php echo $g['name']; ?></a></strong>
- <div class="row-actions">
- <span class="edit"><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=edit&edit_id=<?php echo $g['id']; ?>"><?php echo __("Bearbeiten", "wpsg"); ?></a>
- |
- <span class="del"><a onclick="if (!confirm('<?php echo __("Sind Sie sich sicher?", "wpsg"); ?>')) return false;" title="<?php echo __("Diese Produktgruppe löschen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=del&noheader=1&edit_id=<?php echo $g['id']; ?>"><?php echo __("Löschen", "wpsg"); ?></a>
- <?php if ($g['countProdukte'] > 0) { ?>
- |
- <span class="edit"><a title="<?php echo __("Zur Produktliste", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&search[pgruppe]=<?php echo $g['id']; ?>"><?php echo __("Zur Produktliste", "wpsg"); ?></a>
- <?php } ?>
- </span>
- </td>
- <td><?php echo (($g['template_file'] == "0")?'Individuelle Produkttemplates':$g['template_file']); ?></td>
- <td><?php echo $g['countProdukte']; ?></td>
- </tr>
- <?php } ?>
- </tbody>
- <tfoot>
- <tr>
- <th style="" class="manage-column column-title" id="title" scope="col"><?php echo __("Name", "wpsg"); ?></th>
- <th style="" class="manage-column column-title" id="title" scope="col"><?php echo __("Template", "wpsg"); ?></th>
- <th style="" class="manage-column column-title" id="title" scope="col"><?php echo __("Produkte", "wpsg"); ?></th>
- </tr>
- </tfoot>
- </table>
+<div class="wpsg_productgroups" 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-customer-navbar-collapse-1">
+ <ul class="nav navbar-nav">
+ <li role="presentation" class="wpsg-customer-tab-a active"><a href="#" onclick="return false;"><?php echo __("Produktgruppenverwaltung", "wpsg"); ?></a></li>
+ <li role="presentation" class="wpsg-customer-tab-a wpsg_showhide_filter" id="wpsg-customer-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-Productgroups&action=add"><span class="glyphicon glyphicon-plus"></span><?php echo __("Hinzufügen", "wpsg"); ?></a></li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ </ul>
+ </div>
+ </div>
+
+ <div class="wpsg-filter wpsg-customer-tab wpsg-customer-tab-0 container-fluid form-horizontal" style="display:<?php echo (($this->view['hasFilter'] === true)?'block':'none'); ?>;">
+ <div class="row">
+ <div class="col-lg-4">
+ <form method="post" id="filter_form">
+
+ <input id="wpsg_seite" type="hidden" name="filter[page]" value="<?php echo @$this->view['page']; ?>" class="current-page" />
+
+ <input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo @$this->view['arFilter']['order']; ?>" />
+ <input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo @$this->view['arFilter']['ascdesc']; ?>" />
+
+ <?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
+
+ <?php echo wpsg_drawForm_SubmitButton(__('Produktgruppen suchen')); ?><br />
+
+ </form>
+ </div>
+ </div>
+ </div>
+
+ </nav>
+
+ <?php if ($this->view['pages'] > 1) { ?>
+ <nav class="pagination_wrap">
+ <ul class="pagination">
+ <?php if ($this->view['arFilter']['page'] > 1) { ?>
+ <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] - 1; ?>);" href="#" aria-label="<?php echo __('Vorherige Seite'); ?>"><span aria-hidden="true">&laquo;</span></a></li>
+ <?php } ?>
+ <?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
+ <li class="<?php echo (($i == $this->view['arFilter']['page'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
+ <?php } ?>
+ <?php if ($this->view['arFilter']['page'] + 1 <= $this->view['pages']) { ?>
+ <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] + 1; ?>);" href="#" aria-label="<?php echo __('Nächste Seite'); ?>"><span aria-hidden="true">&raquo;</span></a></li>
+ <?php } ?>
+ </ul>
+ </nav>
<?php } ?>
-
-</div> \ No newline at end of file
+
+ <div class="wpsg_clear"></div>
+
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <div class="content">
+
+ <?php if (is_array($this->view['arData']) && sizeof($this->view['arData']) > 0) { ?>
+
+ <table class="table wpsg-table-order table-bordered table-hover table-striped wpsg-table-customer">
+ <thead>
+ <tr>
+ <th class="wpsg_order col_name" data-order="nr"><?php echo __("Name", 'wpsg'); ?></th>
+ <th class="wpsg_order col_template" data-order="template"><?php echo __("Template", 'wpsg'); ?></th>
+ <th class="wpsg_order col_products" data-order="products"><?php echo __("Produkte", 'wpsg'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($this->view['arData'] as $cg) { ?>
+ <tr>
+ <td class="col_name">
+ <strong><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=edit&edit_id=<?php echo $cg->id; ?>" class="row-title"><?php echo $cg->name; ?></a></strong>
+ <div class="row-actions">
+ <span class="edit"><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=edit&edit_id=<?php echo $cg->id; ?>"><?php echo __("Bearbeiten", "wpsg"); ?></a>
+ |
+ <span class="del"><a onclick="if (!confirm('<?php echo __("Sind Sie sich sicher?", "wpsg"); ?>')) return false;" title="<?php echo __("Diese Produktgruppe löschen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=del&noheader=1&edit_id=<?php echo $cg->id; ?>"><?php echo __("Löschen", "wpsg"); ?></a>
+ <?php if ($cg->countProducts() > 0) { ?>
+ |
+ <span class="edit"><a title="<?php echo __("Zur Produktliste", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&search[pgruppe]=<?php echo $cg->id; ?>"><?php echo __("Zur Produktliste", "wpsg"); ?></a>
+ <?php } ?>
+ </div>
+ </td>
+ <td class="col_template">
+
+ </td>
+ <td class="col_products">
+
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+ </table>
+
+ <?php if ($this->view['pages'] > 1) { ?>
+ <nav class="pagination_wrap pagination_wrap_bottom">
+ <ul class="pagination">
+ <?php if ($this->view['arFilter']['page'] > 1) { ?>
+ <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] - 1; ?>);" href="#" aria-label="<?php echo __('Vorherige Seite'); ?>"><span aria-hidden="true">&laquo;</span></a></li>
+ <?php } ?>
+ <?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
+ <li class="<?php echo (($i == $this->view['arFilter']['page'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
+ <?php } ?>
+ <?php if ($this->view['arFilter']['page'] + 1 <= $this->view['pages']) { ?>
+ <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] + 1; ?>);" href="#" aria-label="<?php echo __('Nächste Seite'); ?>"><span aria-hidden="true">&raquo;</span></a></li>
+ <?php } ?>
+ </ul>
+ </nav>
+ <?php } ?>
+
+ <?php } else { ?>
+ <p><?php echo __('Es wurden keine Kunden in der Datenbank gefunden.', 'wpsg'); ?></p>
+ <?php } ?>
+
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ <?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
+ jQuery('th[data-order="<?php echo $this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['arFilter']['ascdesc']); ?>');
+ <?php } ?>
+
+ function goPage(page)
+ {
+
+ if (page <= 0 || page == <?php echo $this->view['arFilter']['page']; ?> || page > <?php echo $this->view['pages']; ?>) return;
+
+ jQuery('#wpsg_seite').val(page);
+ jQuery('#filter_form').submit();
+
+ return false;
+
+ } // function goPage(page)
+
+/* ]]> */</script> \ No newline at end of file
diff --git a/views/order/index.phtml b/views/order/index.phtml
index 7130de6..c932ec3 100644
--- a/views/order/index.phtml
+++ b/views/order/index.phtml
@@ -16,14 +16,14 @@
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li role="presentation" class="wpsg-order-tab-a active"><a href="#" onclick="return false;"><?php echo __("Bestellübersicht", "wpsg"); ?></a></li>
- <li role="presentation" class="wpsg-order-tab-a" id="wpsg-order-tab-0"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
+ <li role="presentation" class="wpsg_showhide_filter wpsg-order-tab-a <?php echo (($this->view['hasFilter'] === true)?'active':''); ?>" id="wpsg-order-tab-0"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
<?php foreach ($this->view['tabs']['left'] as $k => $tab) { ?>
<li role="presentation" class="wpsg-order-tab-a" id="wpsg-order-tab-<?php echo $k; ?>"><a href="#" onclick="return false;"><span class="<?php echo $tab['tab_icon']; ?>"></span><?php echo $tab['tab_title']; ?></a></li>
<?php } ?>
</ul>
<ul class="nav navbar-nav navbar-right">
<?php foreach ($this->view['tabs']['right'] as $k => $tab) { ?>
- <li role="presentation" class="wpsg-order-tab-a" id="wpsg-order-tab-<?php echo $k; ?>"><a href="#" onclick="return false;"><span class="<?php echo $tab['tab_icon']; ?>"></span><?php echo $tab['tab_title']; ?></a></li>
+ <li role="presentation" class="wpsg-order-tab-mods" id="wpsg-order-tab-<?php echo $k; ?>"><a href="#" onclick="return false;"><span class="<?php echo $tab['tab_icon']; ?>"></span><?php echo $tab['tab_title']; ?></a></li>
<?php } ?>
</ul>
</div>
@@ -31,7 +31,7 @@
<?php foreach ($this->view['tabs'] as $tab_positions) { ?>
<?php foreach ($tab_positions as $k => $tab) { ?>
- <div class="wpsg-filter wpsg-order-tab wpsg-order-tab-<?php echo $k ?>" style="display:none;"><?php echo $tab['tab_content']; ?></div>
+ <div class="wpsg-order-tab-mods-content wpsg-filter-tab wpsg-order-tab-<?php echo $k ?>" style="display:none;"><?php echo $tab['tab_content']; ?></div>
<?php } ?>
<?php } ?>
@@ -40,12 +40,13 @@
<div class="col-lg-4">
<form method="post" id="filter_form">
- <input id="wpsg_seite" type="hidden" name="seite" value="<?php echo $this->view['arFilter']['page']; ?>" class="current-page" />
- <input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo $this->view['arFilter']['order']; ?>" />
- <input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo $this->view['arFilter']['ascdesc']; ?>" />
+ <input id="wpsg_seite" type="hidden" name="seite" value="<?php echo @$this->view['arFilter']['page']; ?>" class="current-page" />
+ <input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo @$this->view['arFilter']['order']; ?>" />
+ <input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo @$this->view['arFilter']['ascdesc']; ?>" />
<?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
- <?php echo wpsg_drawForm_Select('filter[status]', __('Bestellstatus', 'wpsg'), wpsg_array_merge(array('-1' => __('Alle', 'wpsg')), $this->arStatus), $this->view['arFilter']['status']); ?>
+ <?php echo wpsg_drawForm_Input('filter[k_id]', __('Kunde (ID)', 'wpsg'), wpsg_getStr($this->view['arFilter']['k_id'])); ?>
+ <?php echo wpsg_drawForm_Select('filter[status]', __('Bestellstatus', 'wpsg'), wpsg_array_merge(array('-1' => __('Alle', 'wpsg')), $this->arStatus), @$this->view['arFilter']['status']); ?>
<?php echo wpsg_drawForm_TextStart(); ?>
<div class="row">
@@ -89,7 +90,7 @@
</div>
<?php echo wpsg_drawForm_TextEnd(__('Rechnungsdatum (Monat/Jahr)', 'wpsg'), array('noP' => true)); ?>
- <br /><?php echo wpsg_drawForm_SubmitButton(__('Bestellungen suchen')); ?><br />
+ <br /><?php echo wpsg_drawForm_SubmitButton(__('Bestellungen suchen')); ?>
</form>
</div>
@@ -305,7 +306,7 @@
<script type="text/javascript">/* <![CDATA[ */
<?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
- jQuery('th[data-order="<?php echo $this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['arFilter']['ascdesc']); ?>');
+ jQuery('th[data-order="<?php echo @$this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower(@$this->view['arFilter']['ascdesc']); ?>');
<?php } ?>
function wpsg_order_checkAll()
@@ -341,34 +342,20 @@
jQuery(document).ready(function() {
- jQuery('.wpsg-order-tab-a').bind('click', function() {
-
- jQuery('.wpsg-order-tab-a').removeClass('active');
- jQuery(this).addClass('active');
+ jQuery('.wpsg-order-tab-mods').bind('click', function() {
- if (jQuery('.' + jQuery(this).attr("id")).length <= 0)
+ if (jQuery(this).hasClass('active'))
{
- jQuery('.wpsg-order-tab').slideUp(250);
+ jQuery(this).removeClass('active');
+ jQuery('.' + jQuery(this).attr("id")).slideUp(250);
}
else
{
- if (jQuery('.wpsg-order-tab:visible').length > 0)
- {
-
- jQuery('.wpsg-order-tab').hide(0);
- jQuery('.' + jQuery(this).attr("id")).show(0);
-
- }
- else
- {
-
- jQuery('.wpsg-order-tab').hide(0);
- jQuery('.' + jQuery(this).attr("id")).slideDown(250);
-
- }
+ jQuery(this).addClass('active');
+ jQuery('.' + jQuery(this).attr("id")).slideDown(250);
}