Subversion Repositories wpShopGermany4

Rev

Rev 5439 | Rev 5945 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1068 daniel 1
<?php
2
 
3
	/**
4
	 * Template für die Liste der Versandarten
5
	 */
6
 
7
?>
8
<?php if (!is_array($this->view['data']) || sizeof($this->view['data']) <= 0) { ?>
9
<?php echo __('Bisher keine Versandarten angelegt.', 'wpsg'); ?>
10
<?php } else { ?>
11
<table class="va_table">
12
	 <colgroup>
13
    	<col class="wpsg_label" />
3441 daniel 14
    	<col class="wpsg_value" />
1068 daniel 15
    	<col class="wpsg_delcol" />
16
  	</colgroup>
17
	<?php $i = 0; foreach ($this->view['data'] as $va) { $i ++; ?>
18
	<tr>
1406 daniel 19
		<td class="wpsg_label"><?php echo __('ID', 'wpsg'); ?>:</td>
3441 daniel 20
		<td class="wpsg_value"><?php echo $va['id']; ?></td>
1068 daniel 21
		<td class="wpsg_delcol">
5934 hartmut 22
			<a class="wpsg_glyphicon_right glyphicon glyphicon-minus-sign" href="#" title="<?php echo __('Versandart löschen', 'wpsg'); ?>" onclick="return wpsg_removeVA(<?php echo $va['id']; ?>);"></a>
2946 david 23
			<?php foreach ($this->view['arVZ'] as $k=>$vz) { $arVzNamen[$k] = $vz['name']; } ?>
1068 daniel 24
			<script type="text/javascript">
25
 
26
				jQuery(document).ready(function() {
27
 
5934 hartmut 28
					jQuery('#va_<?php echo $va['id']; ?>_name').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
1068 daniel 29
						submitdata: {
30
				    		field: 'name',
31
				    		va_id: '<?php echo $va['id']; ?>'
32
						},
1598 daniel 33
						submit  : '<?php echo __('Speichern', 'wpsg'); ?>',
1068 daniel 34
						placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
35
						indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
36
				    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
37
					});
1288 daniel 38
 
5934 hartmut 39
					jQuery('#va_<?php echo $va['id']; ?>_kosten').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
1068 daniel 40
						submitdata: {
41
				    		field: 'kosten',
42
				    		va_id: '<?php echo $va['id']; ?>'
43
						},
1598 daniel 44
						submit  : '<?php echo __('Speichern', 'wpsg'); ?>',
1068 daniel 45
						placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
46
						indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
47
				    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
1292 daniel 48
					});
1068 daniel 49
 
5934 hartmut 50
					jQuery('#va_<?php echo $va['id']; ?>_hint').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
1406 daniel 51
						submitdata: {
52
				    		field: 'hint',
53
				    		va_id: '<?php echo $va['id']; ?>'
54
						},
1598 daniel 55
						submit  : '<?php echo __('Speichern', 'wpsg'); ?>',
1406 daniel 56
						placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
57
						indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
58
				    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
59
					});
60
 
5934 hartmut 61
					jQuery('#va_<?php echo $va['id']; ?>_typ').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
1068 daniel 62
						submitdata: {
63
							field: 'typ',
64
							va_id: '<?php echo $va['id']; ?>'
65
						},
1598 daniel 66
						submit  : '<?php echo __('Speichern', 'wpsg'); ?>',
1068 daniel 67
						data   : '<?php echo json_encode($this->view['arTypen']); ?>',
68
						type   : 'select',
69
						placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
70
						indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
71
				    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
1406 daniel 72
					});
1068 daniel 73
 
5934 hartmut 74
					jQuery('#va_<?php echo $va['id']; ?>_vz').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
1406 daniel 75
						submitdata: {
76
							field: 'vz',
77
							va_id: '<?php echo $va['id']; ?>'
78
						},
1598 daniel 79
						submit: '<?php echo __('Speichern', 'wpsg'); ?>',
2946 david 80
						data   : '<?php echo json_encode($arVzNamen) ?>',
1406 daniel 81
						type   : 'select',
82
						placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
83
						indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
2946 david 84
				    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
85
				    	callback: function(data)
86
				    	{
87
							location.reload();
88
				    	}
89
 
1406 daniel 90
					} );
91
 
5934 hartmut 92
					jQuery('#va_<?php echo $va['id']; ?>_mwst').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
1068 daniel 93
						submitdata: {
4057 daniel 94
							field: 'mwst_key',
1068 daniel 95
							va_id: '<?php echo $va['id']; ?>'
96
						},
1598 daniel 97
						submit: '<?php echo __('Speichern', 'wpsg'); ?>',
4057 daniel 98
						data: '<?php echo json_encode(wpsg_tax_groups()); ?>',
1068 daniel 99
						type: 'select',
100
						placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
101
						indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
102
				    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
1416 daniel 103
					});
104
 
5934 hartmut 105
					jQuery('#va2_<?php echo $va['id']; ?>_mwst').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
106
						submitdata: {
107
							field: 'mwst_key',
108
							va_id: '<?php echo $va['id']; ?>'
109
						},
110
						submit: '<?php echo __('Speichern', 'wpsg'); ?>',
111
						data: '{"value":0,"text":"anteilig"},{"value":"a","text":"A"}',
112
						type: 'select',
113
						placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
114
						indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
115
				    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
116
					});
117
 
1416 daniel 118
					jQuery('#va_<?php echo $va['id']; ?>_aktiv').bind('change', function() {
119
 
120
						var value = 0;
121
 
122
						if (jQuery(this).attr("checked") == "checked") value = 1;
123
 
124
						jQuery.ajax( {
125
							url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1',
126
							data: {
127
								field: 'aktiv',
128
								va_id: '<?php echo $va['id']; ?>',
129
								value: value
130
							}
131
						} );
132
 
133
					} );
1068 daniel 134
 
135
				} );
136
 
137
			</script>
138
 
139
		</td>
140
	</tr>
141
	<tr>
1406 daniel 142
		<td class="wpsg_label"><?php echo __('Bezeichnung', 'wpsg'); ?>:</td>
3441 daniel 143
		<td class="wpsg_value wpsg_editable" id="va_<?php echo $va['id']; ?>_name"><?php echo wpsg_hspc($va['name']); ?></td>
144
		<td class="wpsg_delcol">
5934 hartmut 145
			<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_name" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_name"></a>
3441 daniel 146
		</td>
1406 daniel 147
	</tr>
148
	<tr>
1416 daniel 149
		<td class="wpsg_label"><label for="va_<?php echo $va['id']; ?>_aktiv"><?php echo __('Aktiv', 'wpsg'); ?>:</label></td>
3441 daniel 150
		<td class="wpsg_value">
1416 daniel 151
			<input type="checkbox" value="1" <?php echo (($va['aktiv'] === '1')?'checked="checked"':''); ?> id="va_<?php echo $va['id']; ?>_aktiv" />
3441 daniel 152
		</td>
153
		<td class="wpsg_delcol">
5934 hartmut 154
			<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_activ" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_activ"></a>
1416 daniel 155
		</td>
156
	</tr>
157
	<tr>
1406 daniel 158
		<td class="wpsg_label"><?php echo __('Hinweistext', 'wpsg'); ?>:</td>
3441 daniel 159
		<td class="wpsg_value wpsg_editable" id="va_<?php echo $va['id']; ?>_hint" ><?php echo wpsg_hspc($va['hint']); ?></td>
160
		<td class="wpsg_delcol">
5934 hartmut 161
			<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_hint" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_hint"></a>
3441 daniel 162
		</td>
1406 daniel 163
	</tr>
164
	<tr>
1068 daniel 165
		<td class="wpsg_label"><?php echo __('Grundlage', 'wpsg'); ?>:</td>
3441 daniel 166
		<td id="va_<?php echo $va['id']; ?>_typ" class="wpsg_value wpsg_editable"><?php echo wpsg_hspc($this->view['arTypen'][$va['typ']]); ?></td>
167
		<td class="wpsg_delcol">
5934 hartmut 168
			<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_grundlage" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_grundlage"></a>
3441 daniel 169
		</td>
1406 daniel 170
	</tr>
171
	<tr>
172
		<td class="wpsg_label"><?php echo __('Versandzone', 'wpsg'); ?>:</td>
3441 daniel 173
		<td id="va_<?php echo $va['id']; ?>_vz" class="wpsg_value wpsg_editable">
1406 daniel 174
			<?php if ($va['vz'] > 0) { ?>
2946 david 175
			<?php echo wpsg_hspc($this->view['arVZ'][$va['vz']]['name']); ?>
1406 daniel 176
			<?php } else { ?>
177
			<?php echo __('Alle Versandzonen', 'wpsg'); ?>
178
			<?php } ?>
179
		</td>
3441 daniel 180
		<td class="wpsg_delcol">
5934 hartmut 181
			<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_versandzone" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_versandzone"></a>
3441 daniel 182
		</td>
1068 daniel 183
	</tr>
184
	<tr>
185
		<td class="wpsg_label"><?php echo __('Kostenschlüssel', 'wpsg'); ?>:</td>
3441 daniel 186
		<td class="wpsg_value wpsg_editable" id="va_<?php echo $va['id']; ?>_kosten"><?php echo wpsg_hspc($va['kosten']); ?></td>
187
		<td class="wpsg_delcol">
5934 hartmut 188
			<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_kostenschluessel" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_kostenschluessel"></a>
3441 daniel 189
		</td>
1068 daniel 190
	</tr>
2949 daniel 191
	<?php if (wpsg_isSizedArray($this->view['arVZ'][$va['vz']]['arPLZ'])) { ?>
192
	<?php $index = 1; foreach ((array)$this->view['arVZ'][$va['vz']]['arPLZ'] as $plz_key => $plz) { ?>
1068 daniel 193
	<tr>
2946 david 194
		<td class="wpsg_label"><?php echo __('Kostenschlüssel PLZ', 'wpsg'); ?> [ <?php echo $plz ?> ]:</td>
3441 daniel 195
		<td class="wpsg_value wpsg_editable" id="va_<?php echo $va['id'] ?>_plz_<?php echo $index ?>"><?php echo wpsg_hspc($va['kosten_plz'][$plz_key]); ?></td>
196
		<td class="wpsg_delcol">
197
			<script type="text/javascript">
2949 daniel 198
 
3441 daniel 199
				jQuery(document).ready(function() {
200
 
5934 hartmut 201
					jQuery('#va_<?php echo $va['id']; ?>_plz_<?php echo $index ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
3441 daniel 202
						submitdata: {
203
				    		field: 'kosten_plz',
204
				    		va_id: '<?php echo $va['id']; ?>',
205
				    		key: '<?php echo $index; ?>'
206
						},
207
						submit  : '<?php echo __('Speichern', 'wpsg'); ?>',
208
						placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
209
						indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
210
				    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
211
				    	callback: function(data)
212
				    	{
213
				    		//location.reload();
214
				    	}
215
					} );
216
 
2949 daniel 217
				} );
3441 daniel 218
 
219
			</script>
220
		</td>
2946 david 221
	</tr>
222
	<?php $index++; } ?>
3441 daniel 223
	<?php } ?>
2946 david 224
	<tr>
3441 daniel 225
		<td class="wpsg_label"><?php echo __('Steuersatz', 'wpsg'); ?>:</td>
4057 daniel 226
		<td id="va_<?php echo $va['id']; ?>_mwst" class="wpsg_value wpsg_editable"><?php
227
 
228
			$tax_groups = wpsg_tax_groups();
229
			echo wpsg_hspc($tax_groups[$va['mwst_key']]);
230
 
231
		?></td>
3441 daniel 232
		<td class="wpsg_delcol">
5934 hartmut 233
			<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwst" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwst"></a>
3441 daniel 234
		</td>
235
	</tr>
236
	<tr>
237
		<td class="wpsg_label"><?php echo __('Keine MwSt. wenn Land steuerfrei', 'wpsg'); ?>:</td>
238
		<td class="wpsg_value">
1068 daniel 239
			<input onchange="wpsg_saveVAMwSt(this, <?php echo $va['id']; ?>);" <?php echo (($va['mwst_laender'] == '1')?'checked="checked"':''); ?> type="checkbox" value="1" />
3441 daniel 240
		</td>
241
		<td class="wpsg_delcol">
5934 hartmut 242
			<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwstland"></a>
3441 daniel 243
		</td>
244
	</tr>
5934 hartmut 245
 
246
	<tr>
247
		<td class="wpsg_label"><?php echo __('Steuersatz', 'wpsg'); ?>:</td>
248
		<td id="va2_<?php echo $va['id']; ?>_mwst" class="wpsg_value wpsg_editable"><?php
249
 
250
			$tax_groups = wpsg_tax_groups();
251
			//echo wpsg_hspc($tax_groups[$va['mwst_key']]);
252
			echo $tax_groups[$va['mwst_key']];
253
 
254
		?></td>
255
		<td class="wpsg_delcol">
256
			<a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwst" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=wpsg_shippay_mwst"></a>
257
		</td>
258
	</tr>
259
 
260
 
261
 
3915 daniel 262
	<?php $this->callMods('wpsg_mod_versandarten_listrow', array(&$va)); ?>
1068 daniel 263
	<?php if ($i < sizeof($this->view['data'])) { ?>
3441 daniel 264
	<tr class="wpsg_spacer"><td colspan="3"><hr /></td></tr>
1068 daniel 265
	<?php } ?>
266
	<?php } ?>
267
</table>
5439 daniel 268
<?php } ?>