Subversion Repositories wpShopGermany4

Rev

Rev 5934 | 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 erweiteren Kundendaten
5
	 */
6
 
7
?>
5439 daniel 8
 
4194 daniel 9
<?php if (wpsg_isSizedArray($this->view['pflicht']['custom'])) { ?>
5439 daniel 10
<div id="wpsg_kv_code_dialog" style="display:none;"><div class="wpsg_dialog"></div></div>
1126 daniel 11
 
5439 daniel 12
<table class="wpsg_customfields table">
13
	<thead>
14
		<tr>
15
			<th class="col0"><?php echo __('Index', 'wpsg'); ?></th>
16
			<th class="col1"><?php echo __('Kundenvariablen', 'wpsg'); ?></th>
17
			<th class="col2"><?php echo __('Pflichtfeld', 'wpsg'); ?></th>
18
			<th class="col3"><?php echo __('Typ', 'wpsg'); ?></th>
19
			<th class="col4"></th>
5447 daniel 20
			<th class="col5"></th>
5439 daniel 21
		</tr>
22
	</thead>
23
	<tbody>
6008 hartmut 24
		<?php
25
		$arShow = array('0' => __('Ja', 'wpsg'), '1' => __('Nein', 'wpsg'), '2' => __('Nicht zeigen', 'wpsg'));
26
		$arTyp = array('0' => __('Textfeld', 'wpsg'), '1' => __('Auswahlfeld', 'wpsg'), '2' => __('Checkbox', 'wpsg'));
27
		foreach ($this->view['pflicht']['custom'] as $c_id => $c) { ?>
5439 daniel 28
		<tr class="wpsg_customervar_row_<?php echo $c_id; ?>">
29
			<td class="col0"><?php echo $c_id; ?></td>
5922 hartmut 30
			<td class="col1"><span class="wpsg_editable" id="kundenvariable_name_<?php echo $c_id; ?>"><?php echo wpsg_hspc($c['name']); ?></span></td>
31
			<td class="col2">
6008 hartmut 32
				<span id="kundenvariable_show_<?php echo $c_id; ?>"><?php echo $arShow[$c['show']]; ?></span>
33
 
5439 daniel 34
			</td>
35
			<td class="col3">
6008 hartmut 36
				<span id="kundenvariable_typ_<?php echo $c_id; ?>"><?php echo $arTyp[$c['typ']]; ?></span>
5439 daniel 37
			</td>
5454 daniel 38
			<td class="col4">
5439 daniel 39
 
5454 daniel 40
				<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('HTML Code generieren', 'wpsg'); ?>" onclick="return wpsg_genKVCode(<?php echo $c_id; ?>);"><span class="glyphicon glyphicon-modal-window"></span></a>
41
 
42
				<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Kundenvariable löschen', 'wpsg'); ?>" onclick="return wpsg_removeCustomField(<?php echo $c_id; ?>);"><span class="glyphicon glyphicon-trash"></span></a>
5439 daniel 43
 
5488 daniel 44
				<script type="text/javascript">/* <![CDATA[ */
1126 daniel 45
 
6008 hartmut 46
					jQuery(document).ready(function() {
47
						jQuery('#kundenvariable_name_<?php echo $c_id; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=inlinedit&noheader=1', {
48
							submitdata: {
49
					    		field: 'name',
50
					    		field_id: '<?php echo $c_id; ?>'
51
							},
52
							submit  : '<?php echo __('Speichern', 'wpsg'); ?>',
53
							placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
54
							indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
55
					    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
56
						});
5439 daniel 57
 
6008 hartmut 58
	                    jQuery('#kundenvariable_show_<?php echo $c_id; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=inlinedit&noheader=1', {
59
	                        submitdata: {
60
	                            field: 'show',
61
	                            field_id: '<?php echo $c_id; ?>'
62
	                        },
63
	                        submit: '<?php echo __('Speichern', 'wpsg'); ?>',
64
	                        data: <?php echo wpsg_prepare_for_inlineEdit(array('0' => __('Ja', 'wpsg'), '1' => __('Nein', 'wpsg'), '2' => __('Nicht zeigen', 'wpsg'))); ?>,
65
	                        type: 'select',
66
	                        placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
67
	                        indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
68
	                        tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
69
	                        callback: function(el) {
70
	                            if (el == '<?php echo __('Auswahl', 'wpsg'); ?>')
71
	                            {
72
	                                jQuery('#row_auswahl_<?php echo $c_id; ?>').show();
73
	                            }
74
	                            else
75
	                            {
76
	                                jQuery('#row_auswahl_<?php echo $c_id; ?>').hide();
77
	                            }
78
	                        }
79
	                    });
80
 
81
	                    jQuery('#kundenvariable_typ_<?php echo $c_id; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=inlinedit&noheader=1', {
82
	                        submitdata: {
83
	                            field: 'typ',
84
	                            field_id: '<?php echo $c_id; ?>'
85
	                        },
86
	                        submit: '<?php echo __('Speichern', 'wpsg'); ?>',
87
	                        data: <?php echo wpsg_prepare_for_inlineEdit(array('0' => __('Textfeld', 'wpsg'), '1' => __('Auswahlfeld', 'wpsg'), '2' => __('Checkbox', 'wpsg'))); ?>,
88
	                        type: 'select',
89
	                        placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
90
	                        indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
91
	                        tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
92
	                        callback: function(el) {
93
	                            if (el == '<?php echo __('Auswahl', 'wpsg'); ?>')
94
	                            {
95
	                                jQuery('#row_auswahl_<?php echo $c_id; ?>').show();
96
	                            }
97
	                            else
98
	                            {
99
	                                jQuery('#row_auswahl_<?php echo $c_id; ?>').hide();
100
	                            }
101
	                        }
102
	                    });
5439 daniel 103
 
6008 hartmut 104
						jQuery('#kundenvariable_auswahl_<?php echo $c_id; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=kundendaten&do=inlinedit&noheader=1', {
105
							submitdata: {
106
					    		field: 'auswahl',
107
					    		field_id: '<?php echo $c_id; ?>'
108
							},
109
							submit  : '<?php echo __('Speichern', 'wpsg'); ?>',
110
							placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
111
							indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
112
					    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
113
						});
114
 
115
					} );
116
 
117
				/* ]]> */</script>
5439 daniel 118
 
119
			</td>
120
		</tr>
5447 daniel 121
		<tr class="wpsg_customervar_row2 wpsg_customervar_row_<?php echo $c_id; ?>" id="row_auswahl_<?php echo $c_id; ?>" style="<?php echo (($c['typ'] == '1')?'':'display:none;'); ?>">
5439 daniel 122
			<td class="col0"></td>
123
			<td class="col1"><?php echo __('Auswahlmöglichkeiten ("|" als Trenner)', 'wpsg'); ?></td>
5454 daniel 124
			<td class="col234" colspan="3">
6008 hartmut 125
				<span class="wpsg_editable editable editable-click" id="kundenvariable_auswahl_<?php echo $c_id; ?>"><?php echo wpsg_hspc($c['auswahl']); ?></span>
5439 daniel 126
			</td>
127
		</tr>
128
		<?php } ?>
129
	</tbody>
130
</table>
131
 
1067 daniel 132
<br />
5439 daniel 133
<?php echo wpsg_drawForm_Checkbox('wpsg_kundenvariablen_show', __('Kundenvariablen direkt abfragen', 'wpsg'), $this->get_option('wpsg_kundenvariablen_show'), array('fullWidth' => true)); ?>
1067 daniel 134
<?php } else { ?>
135
<p><?php echo __('Keine benutzerdefinierten Kundenfelder angelegt.', 'wpsg'); ?>
136
<?php } ?>