1067 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die Kundenübersichtsseite im Backend
|
|
|
5 |
*/
|
|
|
6 |
|
|
|
7 |
?>
|
5750 |
daniel |
8 |
<div class="wpsg_customer" id="wpsg-bs">
|
1924 |
daniel |
9 |
|
5750 |
daniel |
10 |
<nav class="navbar navbar-default">
|
1924 |
daniel |
11 |
|
5552 |
thomas |
12 |
<div class="container-fluid">
|
|
|
13 |
<div class="navbar-header">
|
5750 |
daniel |
14 |
<a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
|
5552 |
thomas |
15 |
</div>
|
5750 |
daniel |
16 |
<div class="collapse navbar-collapse" id="bs-customer-navbar-collapse-1">
|
|
|
17 |
<ul class="nav navbar-nav">
|
6559 |
thomas |
18 |
<li role="presentation" class="<?php echo ((!isset($_REQUEST['action']))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer" onclick="return false;"><?php echo wpsg_translate(__("Kundenverwaltung (#1# Kunden)", "wpsg"), $this->view['countAll']); ?></a></li>
|
7024 |
daniel |
19 |
<li role="presentation" class="wpsg-customer-tab-a wpsg_showhide_filter <?php echo ((wpsg_isTrue($this->view['hasFilter']))?'active':''); ?>" id="wpsg-customer-tab-0"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
|
7562 |
daniel |
20 |
<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'add'))?'active':''); ?>"><a href="<?php
|
|
|
21 |
|
|
|
22 |
echo wpsg_admin_url('Customer', 'add');
|
|
|
23 |
|
|
|
24 |
?>"><span class="glyphicon glyphicon-plus"></span><?php echo __("Hinzufügen", "wpsg");
|
|
|
25 |
|
|
|
26 |
?></a></li>
|
6447 |
daniel |
27 |
|
|
|
28 |
<?php /* Integration Exportprofile */ ?>
|
|
|
29 |
<?php if ($this->hasMod('wpsg_mod_export')) { $arProfile = $this->callMod('wpsg_mod_export', 'getProfile', array(wpsg_mod_export::TYPE_CUSTOMER)); ?>
|
|
|
30 |
<?php if (wpsg_isSizedArray($arProfile)) { ?>
|
|
|
31 |
<li role="presentation" class="wpsg_showhide_export"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-export"></span><?php echo __('Kundenexport (Exportprofile)', 'wpsg'); ?></a></li>
|
|
|
32 |
<?php } ?>
|
|
|
33 |
<?php } ?>
|
|
|
34 |
|
5750 |
daniel |
35 |
</ul>
|
|
|
36 |
<ul class="nav navbar-nav navbar-right">
|
7562 |
daniel |
37 |
<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'import'))?'active':''); ?>"><a href="<?php
|
|
|
38 |
|
|
|
39 |
echo wpsg_admin_url('Customer', 'import', [], ['noheader' => '1']);
|
|
|
40 |
|
|
|
41 |
?>"><span class="glyphicon glyphicon-import"></span><?php echo __("Daten-Import", "wpsg"); ?></a></li>
|
6081 |
hartmut |
42 |
<?php if (wpsg_isSizedArray($this->view['arData'])) { ?>
|
7562 |
daniel |
43 |
<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'export'))?'active':''); ?>"><a href="<?php
|
|
|
44 |
|
|
|
45 |
echo wpsg_admin_url('Customer', 'export', [], ['noheader' => '1']);
|
|
|
46 |
|
|
|
47 |
?>"><span class="glyphicon glyphicon-export"></span><?php echo __("Daten-Export", "wpsg"); ?></a></li>
|
5552 |
thomas |
48 |
<?php } ?>
|
|
|
49 |
</ul>
|
|
|
50 |
</div>
|
|
|
51 |
</div>
|
5750 |
daniel |
52 |
|
7024 |
daniel |
53 |
<div class="wpsg-filter wpsg-customer-tab wpsg-customer-tab-0 container-fluid form-horizontal" style="display:<?php echo ((wpsg_isTrue($this->view['hasFilter']))?'block':'none'); ?>;">
|
5750 |
daniel |
54 |
<div class="row">
|
5552 |
thomas |
55 |
<div class="col-lg-4">
|
|
|
56 |
<form method="post" id="filter_form">
|
5750 |
daniel |
57 |
|
7561 |
daniel |
58 |
<?php echo wpsg_formNounce('Customer', 'search'); ?>
|
|
|
59 |
|
6383 |
hartmut |
60 |
<input id="wpsg_seite" type="hidden" name="filter[page]" value="<?php echo @$this->view['arFilter']['page']; ?>" class="current-page" />
|
5750 |
daniel |
61 |
|
5751 |
daniel |
62 |
<input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo @$this->view['arFilter']['order']; ?>" />
|
|
|
63 |
<input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo @$this->view['arFilter']['ascdesc']; ?>" />
|
5750 |
daniel |
64 |
|
5751 |
daniel |
65 |
<?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
|
7024 |
daniel |
66 |
|
|
|
67 |
<?php if ($this->hasMod('wpsg_mod_customergroup')) { ?>
|
|
|
68 |
|
|
|
69 |
<?php echo wpsg_drawForm_Select('filter[group_id]', __('Kundengruppe', 'wpsg'), wpsg_array_merge([0 => __('Alle Kundengruppen', 'wpsg')], $this->callMod('wpsg_mod_customergroup', 'getCustomerGroupArray')), wpsg_getStr($this->view['arFilter']['group_id'])); ?>
|
|
|
70 |
|
|
|
71 |
<?php } ?>
|
5750 |
daniel |
72 |
|
6366 |
hartmut |
73 |
<?php echo wpsg_drawForm_SubmitButton(__('Kunden suchen')); ?><br />
|
5750 |
daniel |
74 |
|
5552 |
thomas |
75 |
</form>
|
|
|
76 |
</div>
|
|
|
77 |
</div>
|
5750 |
daniel |
78 |
</div>
|
|
|
79 |
|
6447 |
daniel |
80 |
<?php /* Integration Exportprofile */ ?>
|
|
|
81 |
<?php if ($this->hasMod('wpsg_mod_export')) { $arProfile = $this->callMod('wpsg_mod_export', 'getProfile', array(wpsg_mod_export::TYPE_CUSTOMER)); ?>
|
|
|
82 |
<?php if (wpsg_isSizedArray($arProfile)) { ?>
|
|
|
83 |
<div class="wpsg-export container-fluid form-horizontal" style="display:none;">
|
|
|
84 |
|
|
|
85 |
<form class="container-fluid form-horizontal" target="_blank" method="post" action="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=handleExport&noheader=1" onsubmit="wpsg_mod_export_serializefilter();">
|
|
|
86 |
|
|
|
87 |
<div class="row">
|
|
|
88 |
<div class="col-lg-4">
|
|
|
89 |
|
|
|
90 |
<?php foreach ($arProfile as $p) { ?>
|
|
|
91 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_export_profile[]', $p['name'], false, array('value' => $p['id'], 'noHidden' => true)); ?>
|
|
|
92 |
<?php } ?>
|
|
|
93 |
|
|
|
94 |
<br /><?php echo wpsg_drawForm_SubmitButton(__('Export starten')); ?>
|
|
|
95 |
|
|
|
96 |
</div>
|
|
|
97 |
</div>
|
|
|
98 |
|
|
|
99 |
<input type="hidden" name="filter" id="wpsg_mod_export_filter" value="" />
|
|
|
100 |
|
|
|
101 |
</form>
|
|
|
102 |
|
|
|
103 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
104 |
|
|
|
105 |
function wpsg_mod_export_serializefilter()
|
|
|
106 |
{
|
|
|
107 |
|
|
|
108 |
jQuery('#wpsg_mod_export_filter').val(jQuery('#filter_form').serialize());
|
|
|
109 |
|
|
|
110 |
}
|
|
|
111 |
|
|
|
112 |
jQuery(document).ready(function() {
|
|
|
113 |
|
|
|
114 |
jQuery('.wpsg_showhide_export').off('click').on('click', function() {
|
|
|
115 |
|
|
|
116 |
jQuery(this).toggleClass('active');
|
|
|
117 |
jQuery('.wpsg-export').toggle(250);
|
|
|
118 |
|
|
|
119 |
return false;
|
|
|
120 |
|
|
|
121 |
} );
|
|
|
122 |
|
|
|
123 |
} );
|
|
|
124 |
|
|
|
125 |
/* ]]> */</script>
|
|
|
126 |
|
|
|
127 |
</div>
|
|
|
128 |
<?php } ?>
|
|
|
129 |
<?php } ?>
|
|
|
130 |
|
5750 |
daniel |
131 |
</nav>
|
|
|
132 |
|
6723 |
daniel |
133 |
<div class="wpsg_msg_wrap"><hr class="wp-header-end wpsg-wp-header-end"></div>
|
7549 |
daniel |
134 |
|
|
|
135 |
<div class="wpsg_clear"></div>
|
|
|
136 |
|
6444 |
daniel |
137 |
<?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
|
5750 |
daniel |
138 |
|
|
|
139 |
<div class="wpsg_clear"></div>
|
|
|
140 |
|
6723 |
daniel |
141 |
<form method="POST">
|
|
|
142 |
<div class="content">
|
|
|
143 |
|
|
|
144 |
<?php if (is_array($this->view['arData']) && sizeof($this->view['arData']) > 0) { ?>
|
|
|
145 |
|
|
|
146 |
<table class="table wpsg-table-order table-bordered table-hover table-striped wpsg-table-customer">
|
|
|
147 |
<thead>
|
|
|
148 |
<tr>
|
7387 |
daniel |
149 |
<th class="manage-column column-title wpsg_pic_col wpsg_order col_id" data-order="id">
|
|
|
150 |
|
|
|
151 |
<input style="margin-right:30px;" type="checkbox" value="1" id="wpsg_check_all" onclick="return wpsg_customer_checkAll();" name="" />
|
|
|
152 |
|
6723 |
daniel |
153 |
</th>
|
|
|
154 |
<th class="wpsg_order col_name" data-order="nr"><?php echo __("Nr/Name", 'wpsg'); ?></th>
|
|
|
155 |
<th class="wpsg_order col_adress" data-order="adress"><?php echo __("Anschrift", 'wpsg'); ?></th>
|
|
|
156 |
<th class="wpsg_order col_status" data-order="status"><?php echo __("Status", 'wpsg'); ?></th>
|
|
|
157 |
</tr>
|
|
|
158 |
</thead>
|
|
|
159 |
<tbody>
|
|
|
160 |
<?php foreach ($this->view['arData'] as $c) { ?>
|
7299 |
florian |
161 |
<?php if(wpsg_isSizedInt($_REQUEST['customergroup']) && $_REQUEST['customergroup'] !== $c->group_id) continue; ?>
|
6723 |
daniel |
162 |
<tr>
|
|
|
163 |
<td class="wpsg_pic_col">
|
|
|
164 |
|
|
|
165 |
<img src="https://www.gravatar.com/avatar/<?php echo md5(strtolower(trim($c->getEMail()))); ?>?s=40&d=mm" alt=""" />
|
|
|
166 |
|
|
|
167 |
<input class="col_set_checkbox" type="checkbox" value="<?php echo $c->id; ?>" name="customer[]" />
|
|
|
168 |
|
|
|
169 |
</td>
|
|
|
170 |
<td class="col_name column-title">
|
7570 |
daniel |
171 |
<strong><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php
|
|
|
172 |
|
|
|
173 |
echo wpsg_admin_url('Customer', 'edit', ['edit_id' => $c->getId()]);
|
|
|
174 |
|
|
|
175 |
?>" class="row-title"><?php echo trim($c->GetNr().' '.$c->getLabel()); ?></a></strong>
|
6723 |
daniel |
176 |
<?php if (strlen($c->getEMail()) > 0) { ?>
|
|
|
177 |
<a href="mailto:<?php echo $c->getEMail(); ?>" title="<?php echo __('Dem Kunden eine E-Mail schreiben.', 'wpsg'); ?>"><?php echo $c->getEMail(); ?></a>
|
|
|
178 |
<?php } ?>
|
|
|
179 |
<div class="row-actions">
|
7562 |
daniel |
180 |
<span class="edit"><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php
|
|
|
181 |
|
|
|
182 |
echo wpsg_admin_url('Customer', 'edit', ['edit_id' => $c->getId()]);
|
|
|
183 |
|
|
|
184 |
?>"><?php echo __("Bearbeiten", "wpsg"); ?></a></span>
|
6723 |
daniel |
185 |
|
|
7562 |
daniel |
186 |
<span class="del"><a onclick="if (!confirm('<?php echo __("Sind Sie sicher, dass Sie den Kunden löschen wollen?", "wpsg"); ?>')) return false;" title="<?php echo __("Diesen Kunden löschen", "wpsg"); ?>" href="<?php
|
|
|
187 |
|
|
|
188 |
echo wpsg_admin_url('Customer', 'del', ['edit_id' => $c->id]);
|
|
|
189 |
|
|
|
190 |
?>&noheader=1"><?php echo __("Löschen", "wpsg"); ?></a></span>
|
6723 |
daniel |
191 |
|
|
7562 |
daniel |
192 |
|
7159 |
daniel |
193 |
<?php if ($c->status !== '-1') { ?>
|
6723 |
daniel |
194 |
|
|
7562 |
daniel |
195 |
<span class="order"><a href="<?php
|
|
|
196 |
|
|
|
197 |
echo wpsg_admin_url('Admin', 'module', ['modul' => 'wpsg_mod_kundenverwaltung', 'be_ajax' => 'su_index', 'k_id' => $c->getId()], ['noheader' => '1']);
|
|
|
198 |
|
|
|
199 |
?>"><?php echo __('Kundenlogin simulieren', 'wpsg'); ?></a></span>
|
7159 |
daniel |
200 |
<?php } ?>
|
|
|
201 |
|
6723 |
daniel |
202 |
</div>
|
|
|
203 |
</td>
|
|
|
204 |
<td class="col_adress">
|
|
|
205 |
<?php echo ((strlen($c->getCompany()) > 0)?$c->getCompany().'<br />':''); ?>
|
|
|
206 |
<?php echo $c->getStreet(); ?><br />
|
|
|
207 |
<?php echo trim($c->getZip().' '.$c->getCity()); ?>
|
|
|
208 |
<?php /*echo $c->plz.' '.$c->ort.' '.$c->land_kuerzel; */?><br />
|
|
|
209 |
</td>
|
|
|
210 |
<td class="col_status">
|
|
|
211 |
<?php echo wpsg_translate(__('#1# Bestellungen', 'wpsg'), $c->getOrderCount()); ?><br />
|
|
|
212 |
<?php echo wpsg_translate(__('Umsatz: #1#', 'wpsg'), wpsg_ff($c->getOrderAmount(), $this->get_option('wpsg_currency'))); ?>
|
|
|
213 |
<?php if ($c->getOrderCount() > 0) { ?>
|
|
|
214 |
<br />
|
|
|
215 |
<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&filter[k_id]=<?php echo $c->id; ?>"><?php echo __('Bestellungen einsehen', 'wpsg'); ?></a>
|
|
|
216 |
<?php } ?>
|
|
|
217 |
</td>
|
|
|
218 |
</tr>
|
|
|
219 |
<?php } ?>
|
|
|
220 |
</tbody>
|
|
|
221 |
</table>
|
|
|
222 |
|
|
|
223 |
<div class="tablenav bottom">
|
|
|
224 |
<div class="alignleft actions">
|
|
|
225 |
<select name="wpsg_do" id="wpsg_do">
|
|
|
226 |
<option value="-1"><?php echo __('Aktion wählen', 'wpsg'); ?></option>
|
|
|
227 |
<option value="setAccount"><?php echo __('Kundenkonto zuordnen', 'wpsg'); ?></option>
|
|
|
228 |
</select>
|
|
|
229 |
<input type="submit" class="button-secondary" id="doaction" value="<?php echo __('Ausführen', 'wpsg'); ?>" name="wpsg_doaction" />
|
|
|
230 |
</div>
|
|
|
231 |
</div>
|
|
|
232 |
|
|
|
233 |
<div style="margin-right:-15px;">
|
|
|
234 |
<?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
|
|
|
235 |
</div>
|
|
|
236 |
|
|
|
237 |
<?php } else { ?>
|
|
|
238 |
|
|
|
239 |
<?php echo wpsg_drawForm_AdminboxStart(); ?>
|
|
|
240 |
<?php echo __('Keine Kunden in der Datenbank.', 'wpsg'); ?>
|
|
|
241 |
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
|
|
|
242 |
|
|
|
243 |
<?php } ?>
|
|
|
244 |
|
|
|
245 |
</div>
|
|
|
246 |
</form>
|
5750 |
daniel |
247 |
|
|
|
248 |
</div>
|
5751 |
daniel |
249 |
|
5750 |
daniel |
250 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
251 |
|
5751 |
daniel |
252 |
<?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
|
|
|
253 |
jQuery('th[data-order="<?php echo $this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['arFilter']['ascdesc']); ?>');
|
5750 |
daniel |
254 |
<?php } ?>
|
|
|
255 |
|
6723 |
daniel |
256 |
function wpsg_customer_checkAll()
|
|
|
257 |
{
|
|
|
258 |
|
|
|
259 |
jQuery('.col_set_checkbox').each(function() { jQuery(this).prop('checked', !jQuery(this).prop('checked')); } );
|
7633 |
daniel |
260 |
|
|
|
261 |
return false;
|
6723 |
daniel |
262 |
|
|
|
263 |
}
|
|
|
264 |
|
|
|
265 |
function goPage(page)
|
5750 |
daniel |
266 |
{
|
|
|
267 |
|
6152 |
thomas |
268 |
//if (page <= 0 || page == <?php echo $this->view['arFilter']['page']; ?> || page > <?php echo $this->view['pages']; ?>) return;
|
5750 |
daniel |
269 |
|
|
|
270 |
jQuery('#wpsg_seite').val(page);
|
|
|
271 |
jQuery('#filter_form').submit();
|
|
|
272 |
|
|
|
273 |
return false;
|
|
|
274 |
|
|
|
275 |
} // function goPage(page)
|
|
|
276 |
|
|
|
277 |
/* ]]> */</script>
|