Subversion Repositories wpShopGermany4

Rev

Rev 5748 | Rev 6306 | 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
 
66
		function wpsg_country_add()
67
		{
68
 
69
			jQuery('#Modal_wpsg_country_edit .modal-body').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
70
			jQuery('#Modal_wpsg_country_edit').modal('show');
71
 
72
			jQuery.ajax( {
73
				url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=add&noheader=1',
74
				success: function(data) { jQuery('#Modal_wpsg_country_edit .modal-body').html(data); }
75
			} );
76
 
77
			return false;
78
 
79
		} // function wpsg_country_add()
80
 
5748 daniel 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
 
5562 daniel 121
		function wpsg_country_save()
122
		{
123
 
124
			jQuery('#wpsg_country_list').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
125
 
126
			jQuery.ajax( {
127
				url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender&do=save&noheader=1',
128
				data: {
129
					form_data: jQuery('#wpsg_land_edit_form_edit').serialize()
130
				},
131
				success: function(data) {
132
 
133
					jQuery('#wpsg_country_list').html(data);
134
 
135
				}
136
			} );
137
 
138
		} // function wpsg_country_save()
139
 
140
		function wpsg_country_edit(land_id)
141
		{
142
 
143
			jQuery('#Modal_wpsg_country_edit .modal-body').html('<img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" />');
144
			jQuery('#Modal_wpsg_country_edit').modal('show');
145
 
146
			jQuery.ajax( {
5748 daniel 147
				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 148
				success: function(data) { jQuery('#Modal_wpsg_country_edit .modal-body').html(data); }
149
			} );
150
 
151
			return false;
152
 
153
		} // function wpsg_country_edit(edit_id)
154
 
155
	/* ]]> */</script>
156
 
1067 daniel 157
</div>