3656 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
3999 |
thomas |
4 |
* Template für die Kundengruppenübersicht im Backend
|
3656 |
daniel |
5 |
*/
|
|
|
6 |
|
|
|
7 |
?>
|
|
|
8 |
|
5751 |
daniel |
9 |
<div class="wpsg_customergroup" id="wpsg-bs">
|
|
|
10 |
|
|
|
11 |
<nav class="navbar navbar-default">
|
|
|
12 |
|
|
|
13 |
<div class="container-fluid">
|
|
|
14 |
<div class="navbar-header">
|
|
|
15 |
<a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
|
3656 |
daniel |
16 |
</div>
|
5751 |
daniel |
17 |
<div class="collapse navbar-collapse" id="bs-customergroup-navbar-collapse-1">
|
|
|
18 |
<ul class="nav navbar-nav">
|
6133 |
thomas |
19 |
<li role="presentation" class="wpsg-customergroup-tab-a active"><a href="#" onclick="return false;"><?php echo wpsg_translate(__("Kundengruppenverwaltung (#1# Kundengruppen)", "wpsg"), $this->view['countAll']); ?></a></li>
|
5751 |
daniel |
20 |
<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>
|
|
|
21 |
<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>
|
|
|
22 |
</ul>
|
|
|
23 |
<ul class="nav navbar-nav navbar-right">
|
|
|
24 |
|
|
|
25 |
</ul>
|
|
|
26 |
</div>
|
3656 |
daniel |
27 |
</div>
|
5751 |
daniel |
28 |
|
|
|
29 |
<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'); ?>;">
|
|
|
30 |
<div class="row">
|
|
|
31 |
<div class="col-lg-4">
|
|
|
32 |
<form method="post" id="filter_form">
|
|
|
33 |
|
|
|
34 |
<input id="wpsg_seite" type="hidden" name="filter[page]" value="<?php echo @$this->view['page']; ?>" class="current-page" />
|
|
|
35 |
|
|
|
36 |
<input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo @$this->view['arFilter']['order']; ?>" />
|
|
|
37 |
<input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo @$this->view['arFilter']['ascdesc']; ?>" />
|
|
|
38 |
|
|
|
39 |
<?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
|
|
|
40 |
|
|
|
41 |
<?php echo wpsg_drawForm_SubmitButton(__('Kundengruppen suchen')); ?><br />
|
|
|
42 |
|
3656 |
daniel |
43 |
</form>
|
5751 |
daniel |
44 |
</div>
|
3656 |
daniel |
45 |
</div>
|
5751 |
daniel |
46 |
</div>
|
3656 |
daniel |
47 |
|
5751 |
daniel |
48 |
</nav>
|
|
|
49 |
|
6009 |
hartmut |
50 |
<?php if ($this->view['pages'] > $this->get_option('wpsg_mod_kundenverwaltung_group_perpage')) { ?>
|
5751 |
daniel |
51 |
<nav class="pagination_wrap">
|
|
|
52 |
<ul class="pagination">
|
|
|
53 |
<?php if ($this->view['arFilter']['page'] > 1) { ?>
|
|
|
54 |
<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>
|
|
|
55 |
<?php } ?>
|
|
|
56 |
<?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
|
|
|
57 |
<li class="<?php echo (($i == $this->view['arFilter']['page'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
|
|
|
58 |
<?php } ?>
|
|
|
59 |
<?php if ($this->view['arFilter']['page'] + 1 <= $this->view['pages']) { ?>
|
|
|
60 |
<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>
|
|
|
61 |
<?php } ?>
|
|
|
62 |
</ul>
|
|
|
63 |
</nav>
|
|
|
64 |
<?php } ?>
|
|
|
65 |
|
|
|
66 |
<div class="wpsg_clear"></div>
|
|
|
67 |
|
|
|
68 |
<div class="content">
|
|
|
69 |
|
|
|
70 |
<?php if (is_array($this->view['arData']) && sizeof($this->view['arData']) > 0) { ?>
|
|
|
71 |
|
|
|
72 |
<table class="table wpsg-table-order table-bordered table-hover table-striped wpsg-table-customer">
|
|
|
73 |
<thead>
|
|
|
74 |
<tr>
|
|
|
75 |
<th class="wpsg_order manage-column col-name" data-order="name"><?php echo __('Name', 'wpsg'); ?></th>
|
|
|
76 |
<th class="wpsg_order col-price" data-order="customercount"><?php echo __("Preisanzeige", 'wpsg'); ?></th>
|
|
|
77 |
<th class="wpsg_order col_customer" data-order="calculation"><?php echo __("Kunden", 'wpsg'); ?></th>
|
|
|
78 |
</tr>
|
|
|
79 |
</thead>
|
|
|
80 |
<tbody>
|
|
|
81 |
<?php foreach ($this->view['arData'] as $oCustomerGroup) { ?>
|
|
|
82 |
<tr>
|
|
|
83 |
<td class="col-name">
|
|
|
84 |
<?php echo wpsg_hspc($oCustomerGroup->name); ?>
|
|
|
85 |
<div class="row-actions">
|
|
|
86 |
<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>
|
|
|
87 |
|
|
|
|
88 |
<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>
|
|
|
89 |
|
|
|
|
90 |
<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>
|
|
|
91 |
</div>
|
|
|
92 |
</td>
|
|
|
93 |
<td class="col-price">
|
|
|
94 |
<?php if ($oCustomerGroup->calculation == WPSG_BRUTTO) { ?>
|
|
|
95 |
<?php echo __('Brutto Preise', 'wpsg'); ?>
|
|
|
96 |
<?php } else if ($oCustomerGroup->calculation == WPSG_NETTO) { ?>
|
|
|
97 |
<?php echo __('Netto Preise', 'wpsg'); ?>
|
|
|
98 |
<?php } else { ?>
|
|
|
99 |
<?php echo __('Standard', 'wpsg'); ?>
|
|
|
100 |
<?php } ?>
|
|
|
101 |
</td>
|
|
|
102 |
<td class="col-customer">
|
|
|
103 |
<?php echo wpsg_hspc($oCustomerGroup->customercount); ?>
|
|
|
104 |
</td>
|
|
|
105 |
</tr>
|
|
|
106 |
<?php } ?>
|
|
|
107 |
</tbody>
|
|
|
108 |
</table>
|
|
|
109 |
|
6009 |
hartmut |
110 |
<?php if ($this->view['pages'] > $this->get_option('wpsg_mod_kundenverwaltung_group_perpage')) { ?>
|
5751 |
daniel |
111 |
<nav class="pagination_wrap pagination_wrap_bottom">
|
|
|
112 |
<ul class="pagination">
|
|
|
113 |
<?php if ($this->view['arFilter']['page'] > 1) { ?>
|
|
|
114 |
<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>
|
|
|
115 |
<?php } ?>
|
|
|
116 |
<?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
|
|
|
117 |
<li class="<?php echo (($i == $this->view['arFilter']['page'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
|
|
|
118 |
<?php } ?>
|
|
|
119 |
<?php if ($this->view['arFilter']['page'] + 1 <= $this->view['pages']) { ?>
|
|
|
120 |
<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>
|
|
|
121 |
<?php } ?>
|
|
|
122 |
</ul>
|
|
|
123 |
</nav>
|
|
|
124 |
<?php } ?>
|
|
|
125 |
|
|
|
126 |
<?php } else { ?>
|
5753 |
daniel |
127 |
|
|
|
128 |
<?php echo wpsg_drawForm_AdminboxStart(); ?>
|
|
|
129 |
<?php echo __('Keine Kundengruppen in der Datenbank.', 'wpsg'); ?>
|
|
|
130 |
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
|
|
|
131 |
|
5751 |
daniel |
132 |
<?php } ?>
|
|
|
133 |
|
|
|
134 |
</div>
|
|
|
135 |
|
|
|
136 |
</div>
|
|
|
137 |
|
|
|
138 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
139 |
|
|
|
140 |
<?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
|
|
|
141 |
jQuery('th[data-order="<?php echo $this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['arFilter']['ascdesc']); ?>');
|
|
|
142 |
<?php } ?>
|
|
|
143 |
|
|
|
144 |
function goPage(page)
|
|
|
145 |
{
|
|
|
146 |
|
6152 |
thomas |
147 |
//if (page <= 0 || page == <?php echo $this->view['arFilter']['page']; ?> || page > <?php echo $this->view['pages']; ?>) return;
|
5751 |
daniel |
148 |
|
|
|
149 |
jQuery('#wpsg_seite').val(page);
|
|
|
150 |
jQuery('#filter_form').submit();
|
|
|
151 |
|
|
|
152 |
return false;
|
|
|
153 |
|
|
|
154 |
} // function goPage(page)
|
|
|
155 |
|
|
|
156 |
/* ]]> */</script>
|