diff options
| -rw-r--r-- | views/admin/index.phtml | 2 | ||||
| -rw-r--r-- | views/admin/pager.phtml | 43 | ||||
| -rw-r--r-- | views/css/admin.css | 4 | ||||
| -rw-r--r-- | views/mods/mod_gutschein/index.phtml | 40 | ||||
| -rw-r--r-- | views/mods/mod_kundenverwaltung/index.phtml | 34 | ||||
| -rw-r--r-- | views/order/index.phtml | 34 | ||||
| -rw-r--r-- | views/produkt/index.phtml | 122 |
7 files changed, 109 insertions, 170 deletions
diff --git a/views/admin/index.phtml b/views/admin/index.phtml index 15e9278..8dbb82c 100644 --- a/views/admin/index.phtml +++ b/views/admin/index.phtml @@ -9,8 +9,6 @@ <div class="wpsg_admin" id="wpsg-bs">
- <hr class="wp-header-end" />
-
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
diff --git a/views/admin/pager.phtml b/views/admin/pager.phtml new file mode 100644 index 0000000..bba8cc3 --- /dev/null +++ b/views/admin/pager.phtml @@ -0,0 +1,43 @@ +<?php
+
+ /**
+ * Template für die Pager im Backend
+ */
+
+?>
+
+<?php if ($this->view['pages'] > 1) { ?>
+ <nav class="pagination_wrap">
+ <ul class="pagination">
+
+ <?php $offset = 5; ?>
+
+ <?php if ($this->view['arFilter']['page'] > 2) { $offset --; ?>
+ <li><a onclick="return goPage(1);" href="#" aria-label="<?php echo __('Erste Seite'); ?>"><span aria-hidden="true"><i class="glyphicon glyphicon-step-backward"></i></span></a></li>
+ <?php } ?>
+
+ <?php if ($this->view['arFilter']['page'] > 1) { $offset --; ?>
+ <li><a onclick="return goPage(<?php echo $this->view['arFilter']['page'] - 1; ?>);" href="#" aria-label="<?php echo __('Vorherige Seite'); ?>"><span aria-hidden="true"><i class="glyphicon glyphicon-backward"></i></span></a></li>
+ <?php } ?>
+
+ <?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
+
+ <?php if ($i > $this->view['arFilter']['page'] - $offset && $i < $this->view['arFilter']['page'] + $offset) { ?>
+ <li class="<?php echo (($i == $this->view['arFilter']['page'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
+ <?php } else if ($i == $this->view['arFilter']['page'] - $offset || $i == $this->view['arFilter']['page'] + $offset) { ?>
+ <li class=""><span class="more">..</span></li>
+ <?php } ?>
+
+ <?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"><i class="glyphicon glyphicon-play"></i></span></a></li>
+ <?php } ?>
+
+ <?php if ($this->view['arFilter']['page'] + 2 <= $this->view['pages']) { ?>
+ <li><a onclick="return goPage(<?php echo $this->view['pages']; ?>);" href="#" aria-label="<?php echo __('Letzte Seite'); ?>"><span aria-hidden="true"><i class="glyphicon glyphicon-step-forward"></i></span></a></li>
+ <?php } ?>
+
+ </ul>
+ </nav>
+<?php } ?>
diff --git a/views/css/admin.css b/views/css/admin.css index 9ff2da4..77f73a8 100644 --- a/views/css/admin.css +++ b/views/css/admin.css @@ -8,7 +8,9 @@ #wpsg-bs { margin-top:20px; min-width:1000px; }
#wpsg-bs .updated,
#wpsg-bs .error,
-#wpsg-bs .notice { margin-left:0px; margin-right:20px; width:auto; margin-bottom:1.5rem; }
+#wpsg-bs .notice { margin-left:0px; margin-right:0px; width:auto; margin-bottom:1.5rem; }
+#wpsg-bs .flex { display:flex; }
+#wpsg-bs .flex-100 { width:100%; justify-content:space-between; }
#wpsg-bs nav.navbar { margin-right:20px; }
#wpsg-bs nav.navbar li { margin-bottom:0px; }
#wpsg-bs nav.navbar .active { margin-right:2px; }
diff --git a/views/mods/mod_gutschein/index.phtml b/views/mods/mod_gutschein/index.phtml index be7f668..e311152 100644 --- a/views/mods/mod_gutschein/index.phtml +++ b/views/mods/mod_gutschein/index.phtml @@ -49,25 +49,11 @@ </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">«</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">»</span></a></li>
- <?php } ?>
- </ul>
- </nav>
- <?php } ?>
-
- <div class="wpsg_clear"></div>
-
- <?php echo $this->writeBackendMessage(); ?>
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <div class="wpsg_clear"></div>
+
+ <?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
<div class="content">
@@ -132,21 +118,7 @@ </div>
- <?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">«</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">»</span></a></li>
- <?php } ?>
- </ul>
- </nav>
- <?php } ?>
+ <?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
<?php } else { ?>
diff --git a/views/mods/mod_kundenverwaltung/index.phtml b/views/mods/mod_kundenverwaltung/index.phtml index 766426a..e04bd2b 100644 --- a/views/mods/mod_kundenverwaltung/index.phtml +++ b/views/mods/mod_kundenverwaltung/index.phtml @@ -49,21 +49,7 @@ </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">«</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">»</span></a></li>
- <?php } ?>
- </ul>
- </nav>
- <?php } ?>
+ <?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
<div class="wpsg_clear"></div>
@@ -122,21 +108,9 @@ </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">«</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">»</span></a></li>
- <?php } ?>
- </ul>
- </nav>
- <?php } ?>
+ <div style="margin-right:-15px;">
+ <?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
+ </div>
<?php } else { ?>
diff --git a/views/order/index.phtml b/views/order/index.phtml index b6b55dc..941709b 100644 --- a/views/order/index.phtml +++ b/views/order/index.phtml @@ -112,21 +112,7 @@ </div>
- <?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">«</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">»</span></a></li>
- <?php } ?>
- </ul>
- </nav>
- <?php } ?>
+ <?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
<div class="wpsg_clear"></div>
@@ -282,21 +268,9 @@ </div>
- <?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">«</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">»</span></a></li>
- <?php } ?>
- </ul>
- </nav>
- <?php } ?>
+ <div style="margin-right:-15px;">
+ <?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
+ </div>
<div class="wpsg_clear"></div>
diff --git a/views/produkt/index.phtml b/views/produkt/index.phtml index 878dba4..b671c5f 100644 --- a/views/produkt/index.phtml +++ b/views/produkt/index.phtml @@ -85,66 +85,54 @@ </nav>
- <?php if ($this->hasMod('wpsg_mod_productgroups')) { $arProductgroupSelect = wpsg_productgroup::getProductgroupSelect($this->view['arFilter']); ?>
- <?php if (wpsg_isSizedArray($arProductgroupSelect)) { ?>
- <div class="pagination_wrap wpsg_productgroup_link_wrap">
-
- <?php $filterAll = $this->view['arFilter'];
- unset($filterAll['productgroup_ids']);
- unset($filterAll['productcategory_ids']);
- ?>
-
- <ul class="pagination">
- <li class="<?php echo ((wpsg_getStr($this->view['arFilter']['productgroup_ids']) == '-1' || !isset($this->view['arFilter']['productgroup_ids']))?'active':''); ?>"><a href="#" onclick="jQuery('#filterproductgroup_ids').val('-1'); jQuery('#filter_form').submit(); return false;"><?php echo wpsg_translate(__('Alle (#1#)', 'wpsg'), wpsg_product::count($filterAll)); ?></a></li>
- <?php foreach ($arProductgroupSelect as $pg_id => $pg_name) { ?>
- <li class="<?php echo ((wpsg_getStr($this->view['arFilter']['productgroup_ids']) == $pg_id)?'active':''); ?>"><a href="#" onclick="jQuery('#filterproductgroup_ids').val('<?php echo $pg_id; ?>'); jQuery('#wpsg_seite').val('1'); jQuery('#filter_form').submit(); return false;"><?php echo $pg_name; ?></a></li>
- <?php } ?>
- </ul>
-
- </div>
- <div class="wpsg_clear"></div>
+ <?php echo $this->writeBackendMessage(); ?>
+
+ <div class="flex flex-100">
+
+ <?php if ($this->hasMod('wpsg_mod_productgroups')) { $arProductgroupSelect = wpsg_productgroup::getProductgroupSelect($this->view['arFilter']); ?>
+ <?php if (wpsg_isSizedArray($arProductgroupSelect)) { ?>
+ <div class="pagination_wrap wpsg_productgroup_link_wrap">
+
+ <?php $filterAll = $this->view['arFilter'];
+ unset($filterAll['productgroup_ids']);
+ unset($filterAll['productcategory_ids']);
+ ?>
+
+ <ul class="pagination">
+ <li class="<?php echo ((wpsg_getStr($this->view['arFilter']['productgroup_ids']) == '-1' || !isset($this->view['arFilter']['productgroup_ids']))?'active':''); ?>"><a href="#" onclick="jQuery('#filterproductgroup_ids').val('-1'); jQuery('#filter_form').submit(); return false;"><?php echo wpsg_translate(__('Alle (#1#)', 'wpsg'), wpsg_product::count($filterAll)); ?></a></li>
+ <?php foreach ($arProductgroupSelect as $pg_id => $pg_name) { ?>
+ <li class="<?php echo ((wpsg_getStr($this->view['arFilter']['productgroup_ids']) == $pg_id)?'active':''); ?>"><a href="#" onclick="jQuery('#filterproductgroup_ids').val('<?php echo $pg_id; ?>'); jQuery('#wpsg_seite').val('1'); jQuery('#filter_form').submit(); return false;"><?php echo $pg_name; ?></a></li>
+ <?php } ?>
+ </ul>
+
+ </div>
+ <div class="wpsg_clear"></div>
+ <?php } ?>
<?php } ?>
- <?php } ?>
-
- <?php if ($this->hasMod('wpsg_mod_produktartikel')) { $arProductcategorySelect = $this->callMod('wpsg_mod_produktartikel', 'getProductcategorySelect', array($this->view['arFilter'])); ?>
- <?php if (wpsg_isSizedArray($arProductcategorySelect)) { ?>
- <div class="pagination_wrap wpsg_productgroup_link_wrap">
-
- <?php $filterAll = $this->view['arFilter'];
- unset($filterAll['productgroup_ids']);
- unset($filterAll['productcategory_ids']);
- ?>
-
- <ul class="pagination">
- <li class="<?php echo ((wpsg_getStr($this->view['arFilter']['productcategory_ids']) == '-1' || !isset($this->view['arFilter']['productcategory_ids']))?'active':''); ?>"><a href="#" onclick="jQuery('#filterproductcategory_ids').val('-1'); jQuery('#filter_form').submit(); return false;"><?php echo wpsg_translate(__('Alle (#1#)', 'wpsg'), wpsg_product::count($filterAll)); ?></a></li>
- <?php foreach ($arProductcategorySelect as $pk_id => $pk) { ?>
- <li class="<?php echo ((wpsg_getInt($this->view['arFilter']['productcategory_ids'], -2) == $pk['term_id'])?'active':''); ?>"><a href="#" onclick="jQuery('#filterproductcategory_ids').val('<?php echo $pk['term_id']; ?>'); jQuery('#wpsg_seite').val('1'); jQuery('#filter_form').submit(); return false;"><?php echo $pk['label']; ?></a></li>
- <?php } ?>
- </ul>
-
- </div>
- <div class="wpsg_clear"></div>
+
+ <?php if ($this->hasMod('wpsg_mod_produktartikel')) { $arProductcategorySelect = $this->callMod('wpsg_mod_produktartikel', 'getProductcategorySelect', array($this->view['arFilter'])); ?>
+ <?php if (wpsg_isSizedArray($arProductcategorySelect)) { ?>
+ <div class="pagination_wrap wpsg_productgroup_link_wrap">
+
+ <?php $filterAll = $this->view['arFilter'];
+ unset($filterAll['productgroup_ids']);
+ unset($filterAll['productcategory_ids']);
+ ?>
+
+ <ul class="pagination">
+ <li class="<?php echo ((wpsg_getStr($this->view['arFilter']['productcategory_ids']) == '-1' || !isset($this->view['arFilter']['productcategory_ids']))?'active':''); ?>"><a href="#" onclick="jQuery('#filterproductcategory_ids').val('-1'); jQuery('#filter_form').submit(); return false;"><?php echo wpsg_translate(__('Alle (#1#)', 'wpsg'), wpsg_product::count($filterAll)); ?></a></li>
+ <?php foreach ($arProductcategorySelect as $pk_id => $pk) { ?>
+ <li class="<?php echo ((wpsg_getInt($this->view['arFilter']['productcategory_ids'], -2) == $pk['term_id'])?'active':''); ?>"><a href="#" onclick="jQuery('#filterproductcategory_ids').val('<?php echo $pk['term_id']; ?>'); jQuery('#wpsg_seite').val('1'); jQuery('#filter_form').submit(); return false;"><?php echo $pk['label']; ?></a></li>
+ <?php } ?>
+ </ul>
+
+ </div>
+ <?php } ?>
<?php } ?>
- <?php } ?>
-
-
- <?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">«</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">»</span></a></li>
- <?php } ?>
- </ul>
- </nav>
- <?php } ?>
-
- <?php echo $this->writeBackendMessage(); ?>
+
+ <?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
+
+ </div>
<div class="content">
<?php if (is_array($this->view['arData']) && sizeof($this->view['arData']) > 0) { ?>
@@ -255,21 +243,9 @@ </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">«</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">»</span></a></li>
- <?php } ?>
- </ul>
- </nav>
- <?php } ?>
+ <div style="margin-right:-15px;">
+ <?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
+ </div>
<div class="clearer"></div>
|
