1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
<?php
/**
* Template für die Kundengruppenübersicht im Backend
*/
?>
<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>
<?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>
</form>
</span>
</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[ */
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>
|