Subversion Repositories wpShopGermany4

Rev

Rev 5562 | Rev 5825 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5562 Rev 5748
Line 39... Line 39...
39
 
39
 
40
		<?php echo wpsg_drawForm_AdminboxStart(__('Länderverwaltung', 'wpsg')); ?>
40
		<?php echo wpsg_drawForm_AdminboxStart(__('Länderverwaltung', 'wpsg')); ?>
41
 
41
 
42
		<div id="wpsg_country_list">
42
		<div id="wpsg_country_list">
43
 
43
 
44
			<?php if (wpsg_isSizedArray($this->view['data'])) { ?>
-
 
45
			<table class="table wpsg_table_country">
-
 
46
 
-
 
47
				<tr>
-
 
48
					<th class="col_check"><input type="checkbox" onclick="return wpsg_country_check_all();" style="margin-top:-2px;" /></th>
-
 
49
					<th class="col_name"><?php echo __('Ländername', 'wpsg'); ?></th>
-
 
50
					<th class="col_vz"><?php echo __('Versandzone', 'wpsg'); ?></th>
-
 
51
					<th class="col_mwstsetting"><?php echo __('MwSt.', 'wpsg'); ?></th>
-
 
52
					<th class="col_mwst"><?php echo __('MwSt. A', 'wpsg'); ?></th>
-
 
53
					<th class="col_mwst"><?php echo __('MwSt. B', 'wpsg'); ?></th>
-
 
54
					<th class="col_mwst"><?php echo __('MwSt. C', 'wpsg'); ?></th>
-
 
55
					<th class="col_mwst"><?php echo __('MwSt. D', 'wpsg'); ?></th>
-
 
56
					<th class="col_action"></th>
-
 
57
				</tr>
-
 
58
 
-
 
59
				<?php foreach ($this->view['data'] as $l) { ?>
-
 
60
				<tr id="<?php echo $l['id']; ?>">
-
 
61
					<td class="col_check"><input type="checkbox" value="1" name="arDelete[<?php echo $l['id']; ?>]" /></td>
-
 
62
					<td class="col_name"><?php echo wpsg_hspc($l['name'].((wpsg_isSizedString($l['kuerzel']))?' ('.$l['kuerzel'].')':'')); ?></td>
-
 
63
					<td class="col_vz">
-
 
64
						<?php if (wpsg_isSizedInt($l['vz']) && wpsg_isSizedString($this->view['vz'][$l['vz']])) { ?>
-
 
65
						<?php echo wpsg_hspc($this->view['vz'][$l['vz']]); ?>
-
 
66
						<?php } ?>
-
 
67
					</td>
-
 
68
					<td class="col_mwstsetting">
-
 
69
						<?php if ($l['mwst'] == '2') { ?>
-
 
70
						<?php echo __('keine MwSt. bei USt.IdNr.', 'wpsg'); ?>
44
            <?php echo $this->render(WPSG_PATH_VIEW.'/admin/laender_list.phtml'); ?>
71
						<?php } else if ($l['mwst'] == '1') { ?>
-
 
72
						<?php echo __('keine MwSt.', 'wpsg'); ?>
-
 
73
						<?php } else { ?>
-
 
74
						<?php echo __('mit MwSt.', 'wpsg'); ?>
-
 
75
						<?php } ?>
-
 
76
					</td>
-
 
77
					<td class="col_mwst"><?php if (wpsg_tf($l['mwst_a']) != NULL) { ?>
-
 
78
						<?php echo wpsg_ff(wpsg_tf($l['mwst_a']), '%'); ?>
-
 
79
					<?php } ?></td>
-
 
80
					<td class="col_mwst"><?php if (wpsg_tf($l['mwst_b']) != NULL) { ?>
-
 
81
						<?php echo wpsg_ff(wpsg_tf($l['mwst_b']), '%'); ?>
-
 
82
					<?php } ?></td>
-
 
83
					<td class="col_mwst"><?php if (wpsg_tf($l['mwst_c']) != NULL) { ?>
-
 
84
						<?php echo wpsg_ff(wpsg_tf($l['mwst_c']), '%'); ?>
-
 
85
					<?php } ?></td>
-
 
86
					<td class="col_mwst"><?php if (wpsg_tf($l['mwst_d']) != NULL) { ?>
-
 
87
						<?php echo wpsg_ff(wpsg_tf($l['mwst_d']), '%'); ?>
-
 
88
					<?php } ?></td>
-
 
89
					<td class="col_action">
-
 
90
 
-
 
91
						<a href="#" onclick="return wpsg_country_edit('<?php echo $l['id']; ?>');" class="glyphicon glyphicon-pencil"></a>
-
 
92
						<a href="#" class="glyphicon glyphicon-trash"></a>
-
 
93
 
-
 
94
					</td>
-
 
95
				</tr>
-
 
96
				<?php } ?>
-
 
97
 
-
 
98
				<tr>
-
 
99
 
-
 
100
					<td class="col_check"><span class="glyphicon glyphicon-trash"></span></td>
-
 
101
					<td colspan="8">
-
 
102
 
-
 
103
						<input type="submit" name="submit" onclick="return confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>');" class="button btn-xs" value="<?php echo __('Markierte Länder löschen', 'wpsg'); ?>" />
-
 
104
 
-
 
105
					</td>
-
 
106
 
-
 
107
				</tr>
-
 
108
 
-
 
109
			</table>
-
 
110
			<?php } else { ?>
-
 
111
			<p><?php echo __('Noch keine Länder angelegt.', 'wpsg'); ?></p>
-
 
112
			<?php } ?>
-
 
113
 
45
 
114
		</div>
46
		</div>
115
 
47
 
116
		<br />
48
		<br />
117
 
49
 
118
	</form>
50
	</form>
119
 
51
 
120
	<a href="#" onclick="return wpsg_country_add();"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Land anlegen.', 'wpsg'); ?></a><br /><br />
52
	<a href="#" onclick="return wpsg_country_add();"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Land anlegen.', 'wpsg'); ?></a><br />
-
 
53
    <a href="#" onclick="return wpsg_country_import();"><span class="wpsg-glyphicon glyphicon glyphicon-import"></span><? echo __('Standardländer importieren.', 'wpsg'); ?></a><br />
-
 
54
     <a href="#" onclick="return wpsg_country_importEU();"><span class="wpsg-glyphicon glyphicon glyphicon-import"></span><? echo __('EU-Länder importieren.', 'wpsg'); ?></a><br />
-
 
55
 
-
 
56
    <br />
-
 
57
 
121
	<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo __('Zur Versandzonenverwaltung', 'wpsg'); ?></a>
58
    <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=vz"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo __('Zur Versandzonenverwaltung', 'wpsg'); ?></a>
122
	
59
	
123
	<?php echo wpsg_drawForm_AdminboxEnd(); ?>
60
	<?php echo wpsg_drawForm_AdminboxEnd(); ?>
124
 
61
 
125
	<script type="text/javascript">/* <![CDATA[ */
62
	<script type="text/javascript">/* <![CDATA[ */
126
 
63
 
Line 139... Line 76...
139
			
76
			
140
			return false;
77
			return false;
141
 
78
 
142
		} // function wpsg_country_add()
79
		} // function wpsg_country_add()
143
 
80
 
-
 
81
        function wpsg_country_import()
-
 
82
        {
-
 
83
 
-
 
84
            if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
-
 
85
 
-
 
86
            jQuery('#wpsg_country_list').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
-
 
87
 
-
 
88
            jQuery.ajax( {
-
 
89
                url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=import&noheader=1',
-
 
90
                success: function(data) {
-
 
91
 
-
 
92
                    jQuery('#wpsg_country_list').html(data);
-
 
93
 
-
 
94
                }
-
 
95
            } );
-
 
96
 
-
 
97
            return false;
-
 
98
 
-
 
99
        } // function wpsg_country_import()
-
 
100
 
-
 
101
        function wpsg_country_importEU()
-
 
102
        {
-
 
103
 
-
 
104
            if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
-
 
105
 
-
 
106
            jQuery('#wpsg_country_list').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
-
 
107
 
-
 
108
            jQuery.ajax( {
-
 
109
                url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=eu_import&noheader=1',
-
 
110
                success: function(data) {
-
 
111
 
-
 
112
                    jQuery('#wpsg_country_list').html(data);
-
 
113
 
-
 
114
                }
-
 
115
            } );
-
 
116
 
-
 
117
            return false;
-
 
118
 
-
 
119
        } // function wpsg_country_importEU()
-
 
120
 
144
		function wpsg_country_save()
121
		function wpsg_country_save()
145
		{
122
		{
146
 
123
 
147
			jQuery('#wpsg_country_list').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
124
			jQuery('#wpsg_country_list').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
148
 
125
 
Line 165... Line 142...
165
 
142
 
166
			jQuery('#Modal_wpsg_country_edit .modal-body').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
143
			jQuery('#Modal_wpsg_country_edit .modal-body').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
167
			jQuery('#Modal_wpsg_country_edit').modal('show');
144
			jQuery('#Modal_wpsg_country_edit').modal('show');
168
 
145
 
169
			jQuery.ajax( {
146
			jQuery.ajax( {
170
				url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=edit&noheader=1&land_id' + land_id,
147
				url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=edit&noheader=1&land_id=' + land_id,
171
				success: function(data) { jQuery('#Modal_wpsg_country_edit .modal-body').html(data); }
148
				success: function(data) { jQuery('#Modal_wpsg_country_edit .modal-body').html(data); }
172
			} );
149
			} );
173
 
150
 
174
			return false;
151
			return false;
175
 
152
 
176
		} // function wpsg_country_edit(edit_id)
153
		} // function wpsg_country_edit(edit_id)
177
 
154
 
178
	/* ]]> */</script>
155
	/* ]]> */</script>
179
 
156
 
180
 
-
 
181
 
-
 
182
 
-
 
183
 
-
 
184
	<div class="wpsg_admin_box">	
-
 
185
		
-
 
186
		<h3>
-
 
187
			<?php echo __('Neues Land hinzufügen', 'wpsg'); ?>
-
 
188
			<a target="_blank" href="http://wpshopgermany.maennchen1.de/?p=839037" class="wpsg_form_help_notip"></a>	
-
 
189
		</h3>
-
 
190
		
-
 
191
		<?php echo $this->render(WPSG_PATH_VIEW.'/admin/laender_edit.phtml'); ?>
-
 
192
		
-
 
193
		<h3><?php echo __('Bestehende Länder', 'wpsg'); ?></h3>
-
 
194
	
-
 
195
		<?php if (wpsg_isSizedArray($this->view['data'])) { ?>
-
 
196
		<table class="wpsg_admin_laender_list wpsg_admin_table" cellpadding="0" cellspacing="0">
-
 
197
			<tr>
-
 
198
				<th class="col_name"><?php echo __('Ländername', 'wpsg'); ?></th>
-
 
199
				<th class="col_vz"><?php echo __('Versandzone', 'wpsg'); ?></th>
-
 
200
				<th class="col_mwstsetting"><?php echo __('MwSt.', 'wpsg'); ?></th>
-
 
201
				<th class="col_mwst"><?php echo __('MwSt. A', 'wpsg'); ?></th>
-
 
202
				<th class="col_mwst"><?php echo __('MwSt. B', 'wpsg'); ?></th>
-
 
203
				<th class="col_mwst"><?php echo __('MwSt. C', 'wpsg'); ?></th>
-
 
204
				<th class="col_mwst"><?php echo __('MwSt. D', 'wpsg'); ?></th>				
-
 
205
				<th class="col_action"></th>
-
 
206
			</tr>
-
 
207
			<?php $i = 0; foreach ($this->view['data'] as $l) { $i ++; ?>
-
 
208
			<tr id="wpsg_laenderrow_<?php echo $l['id']; ?>" class="<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
-
 
209
				<td class="col_name data_name"><?php echo wpsg_hspc($l['name'].((wpsg_isSizedString($l['kuerzel']))?' ('.$l['kuerzel'].')':'')); ?></td>
-
 
210
				<td class="col_vz data_vz">
-
 
211
					<?php if (wpsg_isSizedInt($l['vz']) && wpsg_isSizedString($this->view['vz'][$l['vz']])) { ?>
-
 
212
					<?php echo wpsg_hspc($this->view['vz'][$l['vz']]); ?>
-
 
213
					<?php } ?>
-
 
214
				</td>
-
 
215
				<td class="col_mwstsetting data_mwst">
-
 
216
					<?php if ($l['mwst'] == '2') { ?>
-
 
217
					<?php echo __('keine MwSt. bei USt.IdNr.', 'wpsg'); ?>
-
 
218
					<?php } else if ($l['mwst'] == '1') { ?>
-
 
219
					<?php echo __('keine MwSt.', 'wpsg'); ?>
-
 
220
					<?php } else { ?>
-
 
221
					<?php echo __('mit MwSt.', 'wpsg'); ?>
-
 
222
					<?php } ?>
-
 
223
				</td>
-
 
224
				<td class="col_mwst data_mwst_a">
-
 
225
					<?php if (wpsg_tf($l['mwst_a']) != NULL) { ?>
-
 
226
						<?php echo wpsg_ff(wpsg_tf($l['mwst_a']), '%'); ?>
-
 
227
					<?php } ?>					
-
 
228
				</td>
-
 
229
				<td class="col_mwst data_mwst_b">
-
 
230
					<?php if (wpsg_tf($l['mwst_b']) != NULL) { ?>
-
 
231
						<?php echo wpsg_ff(wpsg_tf($l['mwst_b']), '%'); ?>
-
 
232
					<?php } ?>					
-
 
233
				</td>
-
 
234
				<td class="col_mwst data_mwst_c">
-
 
235
					<?php if (wpsg_tf($l['mwst_c']) != NULL) { ?>
-
 
236
						<?php echo wpsg_ff(wpsg_tf($l['mwst_c']), '%'); ?>
-
 
237
					<?php } ?>					
-
 
238
				</td>
-
 
239
				<td class="col_mwst data_mwst_d">
-
 
240
					<?php if (wpsg_tf($l['mwst_d']) != NULL) { ?>
-
 
241
						<?php echo wpsg_ff(wpsg_tf($l['mwst_d']), '%'); ?>
-
 
242
					<?php } ?>					
-
 
243
				</td>
-
 
244
				<td class="col_action">
-
 
245
					
-
 
246
					<a class="wpsg_icon wpsg_icon_edit" href="#" onclick="return wpsg_laender_edit(<?php echo $l['id']; ?>);"></a> 
-
 
247
					<a class="wpsg_icon wpsg_icon_remove" href="#" onclick="return wpsg_laender_remove(<?php echo $l['id']; ?>);"></a>
-
 
248
					
-
 
249
				</td>
-
 
250
			</tr>
-
 
251
			<?php } ?>
-
 
252
		</table>
-
 
253
		<?php } else { ?>
-
 
254
		<p><?php echo __('Noch keine Länder angelegt.', 'wpsg'); ?>
-
 
255
		<?php } ?>
-
 
256
		
-
 
257
		<br /><br />
-
 
258
		
-
 
259
		<input type="button" onclick="return wpsg_laender_import();" value="<?php echo __('Standardländer importieren', 'wpsg'); ?>" class="button" />
-
 
260
		<input type="button" onclick="return wpsg_eu_laender_import();" value="<?php echo __('Standard EU-Länder importieren', 'wpsg'); ?>" class="button" />
-
 
261
	
-
 
262
		<script type="text/javascript">/* <![CDATA[ */
-
 
263
 
-
 
264
			var land_load = false;
-
 
265
 
-
 
266
			function wpsg_laender_import()
-
 
267
			{
-
 
268
 
-
 
269
				if (!confirm('<?php echo __('Sind sie sich sicher ?', 'wpsg'); ?>')) return false;
-
 
270
 
-
 
271
				location.href = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=import&noheader=1";
-
 
272
				
-
 
273
				return false;
-
 
274
				
-
 
275
			}
-
 
276
 
-
 
277
			function wpsg_eu_laender_import()
-
 
278
			{
-
 
279
 
-
 
280
				if (!confirm('<?php echo __('Sind sie sich sicher ?', 'wpsg'); ?>')) return false;
-
 
281
 
-
 
282
				location.href = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=eu_import&noheader=1";
-
 
283
				
-
 
284
				return false;
-
 
285
				
-
 
286
			}
-
 
287
 
-
 
288
			function wpsg_laender_save()
-
 
289
			{
-
 
290
 
-
 
291
				jQuery.ajax( {
-
 
292
					url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=saveEdit&noheader=1',
-
 
293
					data: {
-
 
294
						form_data: jQuery('#wpsg_land_edit_form_edit').serialize()
-
 
295
					},
-
 
296
					success: function(data) {
-
 
297
 
-
 
298
						if (typeof data === 'object')
-
 
299
						{
-
 
300
 
-
 
301
							land_load = true;
-
 
302
 
-
 
303
							for (var i in data)
-
 
304
							{
-
 
305
 
-
 
306
								jQuery('#wpsg_laenderrow_' + data['id']).find('.data_' + i).html(data[i]);
-
 
307
								
-
 
308
							}
-
 
309
							
-
 
310
							jQuery('#wpsg_laenderrow_edit > td > div').slideUp(100, function() {
-
 
311
 
-
 
312
								jQuery('#wpsg_laenderrow_edit').remove();
-
 
313
								land_load = false;
-
 
314
								
-
 
315
							} );
-
 
316
							 
-
 
317
						}
-
 
318
						else alert(data);
-
 
319
						
-
 
320
					}
-
 
321
				} );
-
 
322
 
-
 
323
				return false;
-
 
324
				
-
 
325
			}
-
 
326
	        
-
 
327
			function wpsg_laender_edit(land_id)
-
 
328
			{
-
 
329
 
-
 
330
				if (land_load == true) return; land_load = true;
-
 
331
 
-
 
332
				var edit_timeout = 0;
-
 
333
 				
-
 
334
				if (jQuery('#wpsg_laenderrow_edit > td > div').is(':visible'))
-
 
335
				{
-
 
336
 
-
 
337
					edit_timeout = 150;
-
 
338
 					
-
 
339
					jQuery('#wpsg_laenderrow_edit > td > div').slideUp(100, function() {
-
 
340
 
-
 
341
						jQuery('#wpsg_laenderrow_edit').remove();
-
 
342
						
-
 
343
					} );
-
 
344
					
-
 
345
				}
-
 
346
 
-
 
347
				window.setTimeout(function() {
-
 
348
 
-
 
349
					jQuery('#wpsg_laenderrow_' + land_id).after('<tr id="wpsg_laenderrow_edit"><td colspan="8"><img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" /><div style="display:none;"></div></td></tr>');
-
 
350
				
-
 
351
					jQuery.ajax( {
-
 
352
						url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=edit&noheader=1',
-
 
353
						data: {
-
 
354
							land_id: land_id
-
 
355
						},
-
 
356
						success: function(data) {
-
 
357
													
-
 
358
							jQuery('#wpsg_laenderrow_edit > td > div').html(data);
-
 
359
							jQuery('#wpsg_laenderrow_edit > td > img').hide();
-
 
360
							jQuery('#wpsg_laenderrow_edit > td > div').slideDown(300, function() { land_load = false; } );
-
 
361
							
-
 
362
						}
-
 
363
					} );
-
 
364
 
-
 
365
				}, edit_timeout);
-
 
366
 
-
 
367
				return false;
-
 
368
				
-
 
369
			}
-
 
370
 
-
 
371
			function wpsg_laender_remove(land_id)
-
 
372
			{
-
 
373
 
-
 
374
				if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
-
 
375
 
-
 
376
				jQuery.ajax( {
-
 
377
					url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=remove&noheader=1',
-
 
378
					data: {
-
 
379
						land_id: land_id
-
 
380
					},
-
 
381
					success: function(data) {
-
 
382
												 
-
 
383
						if (data === "1") jQuery('#wpsg_laenderrow_' + land_id).remove();
-
 
384
						else alert(data);
-
 
385
						
-
 
386
					}
-
 
387
				} );
-
 
388
				
-
 
389
				return false;
-
 
390
 
-
 
391
			}
-
 
392
        
-
 
393
		/* ]]> */</script>
-
 
394
	
-
 
395
	</div>
-
 
396
 
-
 
397
</div>
157
</div>
398
158