Subversion Repositories wpShopGermany4

Rev

Rev 7576 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6723 daniel 1
<?php
2
 
3
    /*
4
     * Template für die Auswahl der Kunden für die Kundenzusammenfassung
5
     */
6
 
7
?>
8
 
9
<div class="wpsg_customer" id="wpsg-bs">
10
    <div class="content">
11
 
12
        <form method="POST">
13
 
7576 daniel 14
			<?php echo wpsg_formNounce('Customer', 'search'); ?>
15
 
6723 daniel 16
            <input type="hidden" name="wpsg_do" value="setAccount" />
17
 
18
            <div class="wpsg_customer" id="wpsg-bs">
19
 
20
                <nav class="navbar navbar-default">
21
 
22
                    <div class="container-fluid">
23
                        <div class="navbar-header">
24
                            <a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
25
                        </div>
26
                        <div class="collapse navbar-collapse" id="bs-customer-navbar-collapse-1">
27
                            <ul class="nav navbar-nav">
28
                                <li role="presentation" class=""><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer"><?php echo __("Kundenverwaltung (Übersicht)", "wpsg"); ?></a></li>
29
                            </ul>
30
                        </div>
31
                    </div>
32
 
33
                    <div class="wpsg-filter wpsg-customer-tab wpsg-customer-tab-0 container-fluid form-horizontal">
34
                        <div class="row">
35
                            <div class="col-lg-4">
36
 
37
                                <?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld (Zielkunde)', 'wpsg'), wpsg_getStr($_REQUEST['filter']['s'])); ?>
38
                                <?php echo wpsg_drawForm_SubmitButton(__('Kunden suchen')); ?><br />
39
 
40
                            </div>
41
                        </div>
42
                    </div>
43
 
44
                </nav>
45
 
46
                <div class="wpsg_msg_wrap"><hr class="wp-header-end wpsg-wp-header-end"></div>
47
 
48
            </div>
49
 
50
            <div class="content">
51
                <div class="row">
52
 
53
                    <div class="col-lg-6">
54
 
55
                        <fieldset>
56
 
57
                            <legend><?php echo __('Kundenkonto, in das die Kunden überführt werden sollen:', 'wpsg'); ?></legend>
58
 
59
                            <?php if (!wpsg_isSizedArray($this->view['targetCustomer'])) { ?>
60
 
61
                                <p>
62
                                    <?php echo __('Es konnte kein passender Kunde gefunden werden.', 'wpsg'); ?>
63
                                </p>
64
 
65
                            <?php } else { ?>
66
 
67
                                <table class="table wpsg-table-order table-bordered table-hover table-striped wpsg-table-customer">
68
                                    <thead>
69
                                    <tr>
70
                                        <th class="manage-column column-title wpsg_pic_col"></th>
71
                                        <th class="wpsg_order col_name" data-order="nr"><?php echo __("Nr/Name", 'wpsg'); ?></th>
72
                                        <th class="wpsg_order col_adress" data-order="adress"><?php echo __("Anschrift", 'wpsg'); ?></th>
73
                                        <th class="wpsg_order col_status" data-order="status"><?php echo __("Status", 'wpsg'); ?></th>
74
                                    </tr>
75
                                    </thead>
76
                                    <tbody>
77
                                    <?php foreach ($this->view['targetCustomer'] as $c) { ?>
78
                                        <tr>
79
                                            <td class="wpsg_pic_col">
80
 
81
                                                <img src="https://www.gravatar.com/avatar/<?php echo md5(strtolower(trim($c->getEMail()))); ?>?s=40&d=mm" alt=""" />
82
                                                <input type="radio" name="set_target" value="<?php echo $c->id; ?>" />
83
 
84
                                            </td>
85
                                            <td class="col_name column-title">
7612 daniel 86
                                                <strong><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php
87
 
88
													echo wpsg_admin_url('Customer', 'edit', ['edit_id' => $c->id]);
89
 
90
												?>" class="row-title"><?php echo trim($c->GetNr().' '.$c->getLabel()); ?></a></strong>
6723 daniel 91
                                                <?php if (strlen($c->getEMail()) > 0) { ?>
92
                                                    <a style="margin-bottom:3px; display:block;" href="mailto:<?php echo $c->getEMail(); ?>" title="<?php echo __('Dem Kunden eine E-Mail schreiben.', 'wpsg'); ?>"><?php echo $c->getEMail();  ?></a>
93
                                                <?php } ?>
94
 
95
                                                <?php $passwort_saltmd5 = $c->passwort_saltmd5; if (!wpsg_isSizedString($passwort_saltmd5)) { ?>
96
                                                <strong class="wpsg_error"><?php echo __('Gastzugang', 'wpsg'); ?></strong>
97
                                                <?php } ?>
98
 
99
                                            </td>
100
                                            <td class="col_adress">
101
                                                <?php echo ((strlen($c->getCompany()) > 0)?$c->getCompany().'<br />':''); ?>
102
                                                <?php echo $c->getStreet(); ?><br />
103
                                                <?php echo trim($c->getZip().' '.$c->getCity()); ?><br />
104
                                            </td>
105
                                            <td class="col_status">
106
                                                <?php echo wpsg_translate(__('#1# Bestellungen', 'wpsg'), $c->getOrderCount()); ?><br />
107
                                                <?php echo wpsg_translate(__('Umsatz: #1#', 'wpsg'), wpsg_ff($c->getOrderAmount(), $this->get_option('wpsg_currency'))); ?>
108
                                                <?php if ($c->getOrderCount() > 0) { ?>
109
                                                    <br />
110
                                                    <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>
111
                                                <?php } ?>
112
                                            </td>
113
                                        </tr>
114
                                    <?php } ?>
115
                                    </tbody>
116
                                </table>
117
 
118
                                <br />
119
 
120
                                <input type="submit" name="submit_do" class="button" value="<?php echo __('Kundenkonten zusammenfügen', 'wpsg'); ?>" />
121
 
122
                            <?php } ?>
123
 
124
                        </fieldset>
125
 
126
                    </div>
127
                    <div class="col-lg-6">
128
 
129
                        <fieldset>
130
 
131
                            <legend><?php echo __('Gewählte Kunden (Diese werden gelöscht)', 'wpsg'); ?></legend>
132
 
133
                            <table class="table wpsg-table-order table-bordered table-hover table-striped wpsg-table-customer">
134
                                <thead>
135
                                <tr>
136
                                    <th class="manage-column column-title wpsg_pic_col"></th>
137
                                    <th class="wpsg_order col_name" data-order="nr"><?php echo __("Nr/Name", 'wpsg'); ?></th>
138
                                    <th class="wpsg_order col_adress" data-order="adress"><?php echo __("Anschrift", 'wpsg'); ?></th>
139
                                    <th class="wpsg_order col_status" data-order="status"><?php echo __("Status", 'wpsg'); ?></th>
140
                                </tr>
141
                                </thead>
142
                                <tbody>
143
                                <?php foreach (@$_REQUEST['customer'] as $customer_id) { $c = wpsg_customer::getInstance($customer_id); ?>
144
                                    <tr>
145
                                        <td class="wpsg_pic_col">
146
                                            <img src="https://www.gravatar.com/avatar/<?php echo md5(strtolower(trim($c->getEMail()))); ?>?s=40&d=mm" alt=""" />
147
                                            <input type="hidden" value="<?php echo $c->id; ?>" name="customer[]" />
148
                                        </td>
149
                                        <td class="col_name column-title">
7612 daniel 150
                                            <strong><a title="<?php echo __("Diesen Kunden bearbeiten", "wpsg"); ?>" href="<?php
151
 
152
												echo wpsg_admin_url('Customer', 'edit', ['edit_id' => $c->id]);
153
 
154
											?>" class="row-title"><?php echo trim($c->GetNr().' '.$c->getLabel()); ?></a></strong>
6723 daniel 155
                                            <?php if (strlen($c->getEMail()) > 0) { ?>
156
                                                <a href="mailto:<?php echo $c->getEMail(); ?>" title="<?php echo __('Dem Kunden eine E-Mail schreiben.', 'wpsg'); ?>"><?php echo $c->getEMail();  ?></a>
157
                                            <?php } ?>
158
                                        </td>
159
                                        <td class="col_adress">
160
                                            <?php echo ((strlen($c->getCompany()) > 0)?$c->getCompany().'<br />':''); ?>
161
                                            <?php echo $c->getStreet(); ?><br />
162
                                            <?php echo trim($c->getZip().' '.$c->getCity()); ?><br />
163
                                        </td>
164
                                        <td class="col_status">
165
                                            <?php echo wpsg_translate(__('#1# Bestellungen', 'wpsg'), $c->getOrderCount()); ?><br />
166
                                            <?php echo wpsg_translate(__('Umsatz: #1#', 'wpsg'), wpsg_ff($c->getOrderAmount(), $this->get_option('wpsg_currency'))); ?>
167
                                            <?php if ($c->getOrderCount() > 0) { ?>
168
                                                <br />
169
                                                <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>
170
                                            <?php } ?>
171
                                        </td>
172
                                    </tr>
173
                                <?php } ?>
174
                                </tbody>
175
                            </table>
176
 
177
                        </fieldset>
178
 
179
                    </div>
180
 
181
                </div>
182
            </div>
183
 
184
        </form>
185
 
186
        <?php // wpsg_debug($_REQUEST); ?>
187
 
188
    </div>
189
 
190
</div>
191