Subversion Repositories wpShopGermany4

Rev

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

Rev Author Line No. Line
1067 daniel 1
<?php
2
 
3
	/**
4
	 * Template für die Länderverwaltung
5
	 */
6
 
7
?>
8
<div class="wpsg_admin_submenu">
9
 
5455 thomas 10
	<div class="list-group">
11
		<span class="list-group-head list-group-item"><?php echo __('Konfiguration'); ?></span>
12
		<?php foreach ($this->view['arSubAction'] as $k => $v) { ?>
13
		<a class="list-group-item <?php echo (($k == $this->view['subAction'])?'active':''); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $k; ?>"><?php echo $v['Menutext']; ?></a>
1067 daniel 14
		<?php } ?>
5455 thomas 15
	</div>
1067 daniel 16
 
17
</div>
18
 
5562 daniel 19
<div class="modal fade" id="Modal_wpsg_country_edit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
20
	<div class="modal-dialog" role="document">
21
		<div class="modal-content">
22
			<div class="modal-header">
23
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
24
				<h4 class="modal-title" id="myModalLabel"><?php echo __('Land anlegen/bearbeiten', 'wpsg'); ?></h4>
25
			</div>
26
			<div class="modal-body">
27
 
28
			</div>
29
			<div class="modal-footer">
30
				<button type="button" class="btn btn-default" onclick="return wpsg_country_save();" data-dismiss="modal"><?php echo __('Speichern und schließen', 'wpsg'); ?></button>
31
			</div>
32
		</div>
33
	</div>
34
</div>
35
 
1067 daniel 36
<div class="wpsg_admin_content">
4057 daniel 37
 
5562 daniel 38
	<form name="form1" method="post" enctype="multipart/form-data" action="<?php echo wpsg_hspc(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=laender&noheader=1'); ?>">
39
 
40
		<?php echo wpsg_drawForm_AdminboxStart(__('Länderverwaltung', 'wpsg')); ?>
41
 
42
		<div id="wpsg_country_list">
43
 
5748 daniel 44
            <?php echo $this->render(WPSG_PATH_VIEW.'/admin/laender_list.phtml'); ?>
5562 daniel 45
 
46
		</div>
47
 
48
		<br />
49
 
50
	</form>
51
 
5748 daniel 52
	<a href="#" onclick="return wpsg_country_add();"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Land anlegen.', 'wpsg'); ?></a><br />
5825 daniel 53
    <a href="#" onclick="return wpsg_country_import();"><span class="wpsg-glyphicon glyphicon glyphicon-import"></span><?php echo __('Standardländer importieren.', 'wpsg'); ?></a><br />
54
     <a href="#" onclick="return wpsg_country_importEU();"><span class="wpsg-glyphicon glyphicon glyphicon-import"></span><?php echo __('EU-Länder importieren.', 'wpsg'); ?></a><br />
5748 daniel 55
 
56
    <br />
57
 
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>
5532 daniel 59
 
60
	<?php echo wpsg_drawForm_AdminboxEnd(); ?>
61
 
5562 daniel 62
	<script type="text/javascript">/* <![CDATA[ */
63
 
64
	    function wpsg_country_check_all() { jQuery('td.col_check input').each(function() { jQuery(this).prop('checked', !jQuery(this).prop('checked')); } ); }
65
 
6306 hartmut 66
		function wpsg_country_remove(land_id)
67
		{
68
 
69
			if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
70
 
71
			jQuery.ajax( {
72
				url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=remove&noheader=1',
73
				data: {
74
					land_id: land_id
75
				},
76
				success: function(data) {
77
 
78
					if (data === "1") jQuery('#wpsg_laenderrow_' + land_id).remove();
79
					else alert(data);
80
 
81
				}
82
			} );
83
 
84
			return false;
85
 
86
		}
87
 
5562 daniel 88
		function wpsg_country_add()
89
		{
90
 
91
			jQuery('#Modal_wpsg_country_edit .modal-body').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
92
			jQuery('#Modal_wpsg_country_edit').modal('show');
93
 
94
			jQuery.ajax( {
95
				url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=add&noheader=1',
96
				success: function(data) { jQuery('#Modal_wpsg_country_edit .modal-body').html(data); }
97
			} );
98
 
99
			return false;
100
 
101
		} // function wpsg_country_add()
102
 
5748 daniel 103
        function wpsg_country_import()
104
        {
105
 
106
            if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
107
 
108
            jQuery('#wpsg_country_list').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
109
 
110
            jQuery.ajax( {
111
                url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=import&noheader=1',
112
                success: function(data) {
113
 
114
                    jQuery('#wpsg_country_list').html(data);
115
 
116
                }
117
            } );
118
 
119
            return false;
120
 
121
        } // function wpsg_country_import()
122
 
123
        function wpsg_country_importEU()
124
        {
125
 
126
            if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;
127
 
128
            jQuery('#wpsg_country_list').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
129
 
130
            jQuery.ajax( {
131
                url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=eu_import&noheader=1',
132
                success: function(data) {
133
 
134
                    jQuery('#wpsg_country_list').html(data);
135
 
136
                }
137
            } );
138
 
139
            return false;
140
 
141
        } // function wpsg_country_importEU()
142
 
5562 daniel 143
		function wpsg_country_save()
144
		{
145
 
146
			jQuery('#wpsg_country_list').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
147
 
148
			jQuery.ajax( {
149
				url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=save&noheader=1',
150
				data: {
151
					form_data: jQuery('#wpsg_land_edit_form_edit').serialize()
152
				},
153
				success: function(data) {
154
 
155
					jQuery('#wpsg_country_list').html(data);
156
 
157
				}
158
			} );
159
 
160
		} // function wpsg_country_save()
161
 
162
		function wpsg_country_edit(land_id)
163
		{
164
 
165
			jQuery('#Modal_wpsg_country_edit .modal-body').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
166
			jQuery('#Modal_wpsg_country_edit').modal('show');
167
 
168
			jQuery.ajax( {
5748 daniel 169
				url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=edit&noheader=1&land_id=' + land_id,
5562 daniel 170
				success: function(data) { jQuery('#Modal_wpsg_country_edit .modal-body').html(data); }
171
			} );
172
 
173
			return false;
174
 
175
		} // function wpsg_country_edit(edit_id)
176
 
177
	/* ]]> */</script>
178
 
1067 daniel 179
</div>