Subversion Repositories wpShopGermany4

Rev

Rev 4943 | Rev 5439 | 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">
22
			<a class="wpsg_icon wpsg_icon_remove" 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
 
28
					jQuery('#va_<?php echo $va['id']; ?>_name').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
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
 
1068 daniel 39
					jQuery('#va_<?php echo $va['id']; ?>_kosten').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
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
 
1406 daniel 50
					jQuery('#va_<?php echo $va['id']; ?>_hint').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
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
 
1068 daniel 61
					jQuery('#va_<?php echo $va['id']; ?>_typ').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
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
 
1406 daniel 74
					jQuery('#va_<?php echo $va['id']; ?>_vz').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
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
 
1068 daniel 92
					jQuery('#va_<?php echo $va['id']; ?>_mwst').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
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
 
105
					jQuery('#va_<?php echo $va['id']; ?>_aktiv').bind('change', function() {
106
 
107
						var value = 0;
108
 
109
						if (jQuery(this).attr("checked") == "checked") value = 1;
110
 
111
						jQuery.ajax( {
112
							url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1',
113
							data: {
114
								field: 'aktiv',
115
								va_id: '<?php echo $va['id']; ?>',
116
								value: value
117
							}
118
						} );
119
 
120
					} );
1068 daniel 121
 
122
				} );
123
 
124
			</script>
125
 
126
		</td>
127
	</tr>
128
	<tr>
1406 daniel 129
		<td class="wpsg_label"><?php echo __('Bezeichnung', 'wpsg'); ?>:</td>
3441 daniel 130
		<td class="wpsg_value wpsg_editable" id="va_<?php echo $va['id']; ?>_name"><?php echo wpsg_hspc($va['name']); ?></td>
131
		<td class="wpsg_delcol">
132
			<a class="wpsg_form_help" 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>
133
		</td>
1406 daniel 134
	</tr>
135
	<tr>
1416 daniel 136
		<td class="wpsg_label"><label for="va_<?php echo $va['id']; ?>_aktiv"><?php echo __('Aktiv', 'wpsg'); ?>:</label></td>
3441 daniel 137
		<td class="wpsg_value">
1416 daniel 138
			<input type="checkbox" value="1" <?php echo (($va['aktiv'] === '1')?'checked="checked"':''); ?> id="va_<?php echo $va['id']; ?>_aktiv" />
3441 daniel 139
		</td>
140
		<td class="wpsg_delcol">
141
			<a class="wpsg_form_help" 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 142
		</td>
143
	</tr>
144
	<tr>
1406 daniel 145
		<td class="wpsg_label"><?php echo __('Hinweistext', 'wpsg'); ?>:</td>
3441 daniel 146
		<td class="wpsg_value wpsg_editable" id="va_<?php echo $va['id']; ?>_hint" ><?php echo wpsg_hspc($va['hint']); ?></td>
147
		<td class="wpsg_delcol">
148
			<a class="wpsg_form_help" 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>
149
		</td>
1406 daniel 150
	</tr>
151
	<tr>
1068 daniel 152
		<td class="wpsg_label"><?php echo __('Grundlage', 'wpsg'); ?>:</td>
3441 daniel 153
		<td id="va_<?php echo $va['id']; ?>_typ" class="wpsg_value wpsg_editable"><?php echo wpsg_hspc($this->view['arTypen'][$va['typ']]); ?></td>
154
		<td class="wpsg_delcol">
155
			<a class="wpsg_form_help" 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>
156
		</td>
1406 daniel 157
	</tr>
158
	<tr>
159
		<td class="wpsg_label"><?php echo __('Versandzone', 'wpsg'); ?>:</td>
3441 daniel 160
		<td id="va_<?php echo $va['id']; ?>_vz" class="wpsg_value wpsg_editable">
1406 daniel 161
			<?php if ($va['vz'] > 0) { ?>
2946 david 162
			<?php echo wpsg_hspc($this->view['arVZ'][$va['vz']]['name']); ?>
1406 daniel 163
			<?php } else { ?>
164
			<?php echo __('Alle Versandzonen', 'wpsg'); ?>
165
			<?php } ?>
166
		</td>
3441 daniel 167
		<td class="wpsg_delcol">
168
			<a class="wpsg_form_help" 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>
169
		</td>
1068 daniel 170
	</tr>
171
	<tr>
172
		<td class="wpsg_label"><?php echo __('Kostenschlüssel', 'wpsg'); ?>:</td>
3441 daniel 173
		<td class="wpsg_value wpsg_editable" id="va_<?php echo $va['id']; ?>_kosten"><?php echo wpsg_hspc($va['kosten']); ?></td>
174
		<td class="wpsg_delcol">
175
			<a class="wpsg_form_help" 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>
176
		</td>
1068 daniel 177
	</tr>
2949 daniel 178
	<?php if (wpsg_isSizedArray($this->view['arVZ'][$va['vz']]['arPLZ'])) { ?>
179
	<?php $index = 1; foreach ((array)$this->view['arVZ'][$va['vz']]['arPLZ'] as $plz_key => $plz) { ?>
1068 daniel 180
	<tr>
2946 david 181
		<td class="wpsg_label"><?php echo __('Kostenschlüssel PLZ', 'wpsg'); ?> [ <?php echo $plz ?> ]:</td>
3441 daniel 182
		<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>
183
		<td class="wpsg_delcol">
184
			<script type="text/javascript">
2949 daniel 185
 
3441 daniel 186
				jQuery(document).ready(function() {
187
 
188
					jQuery('#va_<?php echo $va['id']; ?>_plz_<?php echo $index ?>').editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_versandarten&do=inlinedit&noheader=1', {
189
						submitdata: {
190
				    		field: 'kosten_plz',
191
				    		va_id: '<?php echo $va['id']; ?>',
192
				    		key: '<?php echo $index; ?>'
193
						},
194
						submit  : '<?php echo __('Speichern', 'wpsg'); ?>',
195
						placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
196
						indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
197
				    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
198
				    	callback: function(data)
199
				    	{
200
				    		//location.reload();
201
				    	}
202
					} );
203
 
2949 daniel 204
				} );
3441 daniel 205
 
206
			</script>
207
		</td>
2946 david 208
	</tr>
209
	<?php $index++; } ?>
3441 daniel 210
	<?php } ?>
2946 david 211
	<tr>
3441 daniel 212
		<td class="wpsg_label"><?php echo __('Steuersatz', 'wpsg'); ?>:</td>
4057 daniel 213
		<td id="va_<?php echo $va['id']; ?>_mwst" class="wpsg_value wpsg_editable"><?php
214
 
215
			$tax_groups = wpsg_tax_groups();
216
			echo wpsg_hspc($tax_groups[$va['mwst_key']]);
217
 
218
		?></td>
3441 daniel 219
		<td class="wpsg_delcol">
220
			<a class="wpsg_form_help" 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>
221
		</td>
222
	</tr>
223
	<tr>
224
		<td class="wpsg_label"><?php echo __('Keine MwSt. wenn Land steuerfrei', 'wpsg'); ?>:</td>
225
		<td class="wpsg_value">
1068 daniel 226
			<input onchange="wpsg_saveVAMwSt(this, <?php echo $va['id']; ?>);" <?php echo (($va['mwst_laender'] == '1')?'checked="checked"':''); ?> type="checkbox" value="1" />
3441 daniel 227
		</td>
228
		<td class="wpsg_delcol">
229
			<a class="wpsg_form_help" 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>
230
		</td>
231
	</tr>
3915 daniel 232
	<?php $this->callMods('wpsg_mod_versandarten_listrow', array(&$va)); ?>
1068 daniel 233
	<?php if ($i < sizeof($this->view['data'])) { ?>
3441 daniel 234
	<tr class="wpsg_spacer"><td colspan="3"><hr /></td></tr>
1068 daniel 235
	<?php } ?>
236
	<?php } ?>
237
</table>
3441 daniel 238
<?php } ?>
239
 
240
<script type="text/javascript">/* <![CDATA[ */
241
 
242
	jQuery(document).ready(function() {
243
 
244
		jQuery('.wpsg_form_help').tipTip();
245
 
246
	} );
247
 
248
/* ]]> */</script>