Subversion Repositories wpShopGermany4

Rev

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

Rev 7031 Rev 7486
Line 15... Line 15...
15
			</div>
15
			</div>
16
			<div class="collapse navbar-collapse" id="bs-customer-navbar-collapse-1">
16
			<div class="collapse navbar-collapse" id="bs-customer-navbar-collapse-1">
17
				<ul class="nav navbar-nav">
17
				<ul class="nav navbar-nav">
18
					<li role="presentation" class="wpsg-voucher-tab-a active"><a href="#" onclick="return false;"><?php echo __("Gutscheinverwaltung", "wpsg"); ?></a></li>
18
					<li role="presentation" class="wpsg-voucher-tab-a active"><a href="#" onclick="return false;"><?php echo __("Gutscheinverwaltung", "wpsg"); ?></a></li>
19
					<li role="presentation" class="wpsg-voucher-tab-a wpsg_showhide_filter <?php echo ((($this->view['hasFilter']) && (wpsg_getStr($this->view['arFilter']['s']) != ''))?'active':''); ?>" id="wpsg-voucher-tab-0"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
19
					<li role="presentation" class="wpsg-voucher-tab-a wpsg_showhide_filter <?php echo ((($this->view['hasFilter']) && (wpsg_getStr($this->view['arFilter']['s']) != ''))?'active':''); ?>" id="wpsg-voucher-tab-0"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
20
                    <li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'add'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&action=add"><span class="glyphicon glyphicon-plus"></span><?php echo __("Hinzufügen", "wpsg"); ?></a></li>
20
                    <li role="presentation" class="wpsg-voucher-add" onclick="return false;"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&action=add"><span class="glyphicon glyphicon-plus"></span><?php echo __("Hinzufügen", "wpsg"); ?></a></li>
21
				</ul>
21
				</ul>
22
				<ul class="nav navbar-nav navbar-right">
22
				<ul class="nav navbar-nav navbar-right">
23
                    <li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'import'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&action=import&noheader=1"><span class="glyphicon glyphicon-import"></span><?php echo __("Import", "wpsg"); ?></a></li>
23
                    <li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'import'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&action=import&noheader=1"><span class="glyphicon glyphicon-import"></span><?php echo __("Import", "wpsg"); ?></a></li>
24
					<?php if (wpsg_isSizedArray($this->view['arData'])) { ?>
24
					<?php if (wpsg_isSizedArray($this->view['arData'])) { ?>
25
					<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'export'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&action=export&noheader=1"><span class="glyphicon glyphicon-export"></span><?php echo __("Export", "wpsg"); ?></a></li>
25
					<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'export'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&action=export&noheader=1"><span class="glyphicon glyphicon-export"></span><?php echo __("Export", "wpsg"); ?></a></li>
Line 88... Line 88...
88
 
88
 
89
                            </td>
89
                            </td>
90
                            <?php /* <td class="col_code"><?php echo $oVoucher->code; ?></td> */ ?>                            
90
                            <?php /* <td class="col_code"><?php echo $oVoucher->code; ?></td> */ ?>                            
91
                            <td class="col_code">
91
                            <td class="col_code">
92
 
92
 
93
                                <a title="<?php echo __('Gutschein bearbeiten', 'wpsg'); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&action=edit&edit_id=<?php echo $oVoucher->id; ?>"><?php echo $oVoucher->code; ?></a>
93
								<span><?php echo $oVoucher->code; ?></span><br />
94
                                
94
                                
95
                                <?php if ($this->hasMod('wpsg_mod_voucherproduct') && $oVoucher->isAutoCreated()) { ?>
95
                                <?php if ($this->hasMod('wpsg_mod_voucherproduct') && $oVoucher->isAutoCreated()) { ?>
96
                                &nbsp;[&nbsp;<a href="<?php echo WPSG_URL_WP . 'wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_voucherproduct&gs_id='.$oVoucher->id.'&order_id='.$oVoucher->autocreate_order.'&noheader=1&cmd=getVoucher'; ?>"><?php echo __('PDF', 'wpsg'); ?></a>&nbsp;]
96
                                &nbsp;[&nbsp;<a href="<?php echo WPSG_URL_WP . 'wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_voucherproduct&gs_id='.$oVoucher->id.'&order_id='.$oVoucher->autocreate_order.'&noheader=1&cmd=getVoucher'; ?>"><?php echo __('PDF', 'wpsg'); ?></a>&nbsp;]
97
                                <?php } ?>
97
                                <?php } ?>
-
 
98
 
-
 
99
								<div class="actions">
-
 
100
									<span class="edit"><a title="<?php echo __("Diesen Gutschein bearbeiten", "wpsg"); ?>" href="#" class="wpsg_voucher_edit" onclick="return false;" data-voucher_id="<?php echo $oVoucher->getId(); ?>"><?php echo __("Bearbeiten", "wpsg"); ?></a></span>
-
 
101
									|
-
 
102
									<span class="delete"><a onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass Sie diesen Gutschein löschen möchten?', 'wpsg'); ?>');" title="<?php echo __('Diese Gutschein löschen', 'wpsg'); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_gutschein&subaction=delete&noheader=1&voucher_id=<?php echo $oVoucher->getId(); ?>"><?php echo __('Löschen', 'wpsg'); ?></a></span>
-
 
103
								</div>
98
                                                        
104
                                                        
99
                            </td>                            
105
                            </td>                            
100
                            <td class="col_start"><?php echo wpsg_formatTimestamp($oVoucher->start_date); ?></td>
106
                            <td class="col_start"><?php echo wpsg_formatTimestamp($oVoucher->start_date, true); ?></td>
101
                            <td class="col_end"><?php echo wpsg_formatTimestamp($oVoucher->end_date); ?></td>
107
                            <td class="col_end"><?php echo wpsg_formatTimestamp($oVoucher->end_date, true); ?></td>
102
                            <td class="col_value"><?php
108
                            <td class="col_value"><span><?php
103
 
109
 
104
                                if ($oVoucher->calc_typ == 'w') echo wpsg_ff($oVoucher->value, $this->get_option('wpsg_currency'));
110
                                if ($oVoucher->calc_typ == 'w') echo wpsg_ff($oVoucher->value, $this->get_option('wpsg_currency'));
105
                                else if ($oVoucher->calc_typ == 'p') echo wpsg_ff($oVoucher->value, '%');
111
                                else if ($oVoucher->calc_typ == 'p') echo wpsg_ff($oVoucher->value, '%');
106
 
112
 
107
                            ?></td>
113
                            ?></span><?php 
-
 
114
							
-
 
115
								if ($oVoucher->isCoupon()) {
-
 
116
									
-
 
117
									echo '<br />'.__('Wertgutschein', 'wpsg');
-
 
118
									
-
 
119
								}
-
 
120
								
-
 
121
							?></td>
108
                            <td class="col_status">
122
                            <td class="col_status">
109
 
123
 
110
                                <?php $comment = $oVoucher->comment; if (wpsg_isSizedString($comment)) { ?>
124
                                <?php $comment = $oVoucher->comment; if (wpsg_isSizedString($comment)) { ?>
111
                                <a title="<?php echo __("Kommentar (Admin): ", "wpsg").htmlspecialchars($comment); ?>" onclick="return false;" class="glyphicon glyphicon-question-sign admincomment" href="#"></a>
125
                                <a title="<?php echo __("Kommentar (Admin): ", "wpsg").htmlspecialchars($comment); ?>" onclick="return false;" class="glyphicon glyphicon-question-sign admincomment" href="#"></a>
112
                                <?php } ?>
126
                                <?php } ?>
Line 121... Line 135...
121
                                <span title="<?php echo __('Mehrfach benutzbar', 'wpsg'); ?>">&nbsp;[M]</span>
135
                                <span title="<?php echo __('Mehrfach benutzbar', 'wpsg'); ?>">&nbsp;[M]</span>
122
                                <?php } ?>
136
                                <?php } ?>
123
 
137
 
124
                            </td>
138
                            </td>
125
                        </tr>
139
                        </tr>
126
                        <?php } ?>
140
                        <?php } ?>					
127
                    </tbody>
141
                    </tbody>
128
                </table>
142
                </table>
129
 
143
 
130
                 <div class="alignleft actions">
144
                 <div class="alignleft actions">
131
 
145
 
132
                    <input onclick="if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;" type="submit" value="<?php echo __('Markierte Gutscheine löschen', 'wpsg'); ?>" class="button-secondary action" id="doaction" name="submit-multidelete" />
146
                    <input onclick="if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;" type="submit" value="<?php echo __('Markierte Gutscheine löschen', 'wpsg'); ?>" class="button-secondary action" id="doaction" name="submit-multidelete" />
133
 
147
 
134
                </div>
148
                </div>
135
			</form>
149
			</form>
136
        
150
        
137
 
-
 
138
        <?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
151
        	<?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
139
 
152
 
140
        <?php } else { ?>
153
        <?php } else { ?>
-
 
154
 
-
 
155
			<div class="table wpsg_clear">
-
 
156
            
-
 
157
				<?php echo wpsg_drawForm_AdminboxStart(); ?>
-
 
158
    			<?php echo __('Keine Gutscheine in der Datenbank.', 'wpsg'); ?>
-
 
159
            	<?php echo wpsg_drawForm_AdminboxEnd(); ?>
141
 
160
 
142
            <?php echo wpsg_drawForm_AdminboxStart(); ?>
-
 
143
    		<?php echo __('Keine Gutscheine in der Datenbank.', 'wpsg'); ?>
-
 
144
            <?php echo wpsg_drawForm_AdminboxEnd(); ?>
161
			</div>
145
 
162
 
146
        <?php } ?>
163
        <?php } ?>
147
 
164
 
148
    </div>
165
    </div>
149
 
166
 
150
</div>
167
</div>
151
 
168
 
-
 
169
<!-- Modaldialog für Gutscheine -->
-
 
170
<div class="modal fade" id="wpsg_voucher_dialog" tabindex="-1" role="dialog">
-
 
171
	<div class="modal-dialog" role="document">
-
 
172
		<div class="modal-content">
-
 
173
			<div class="modal-header">
-
 
174
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-
 
175
				<h4 class="modal-title" id="myModalLabel"><?php echo __('Gutschein hinzufügen/bearbeiten', 'wpsg'); ?></h4>
-
 
176
			</div>
-
 
177
			<div class="modal-body"></div>
-
 
178
			<div class="modal-footer">
-
 
179
				<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Abbrechen', 'wpsg'); ?></button>
-
 
180
				<button type="button" class="btn btn-primary wpsg-voucher-save" onclick="return false;"><?php echo __('OK', 'wpsg'); ?></button>
-
 
181
			</div>
-
 
182
		</div>
-
 
183
	</div>
-
 
184
</div>
-
 
185
 
152
<script type="text/javascript">/* <![CDATA[ */
186
<script type="text/javascript">/* <![CDATA[ */
153
 
187
 
154
    <?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
188
    <?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
155
    jQuery('th[data-order="<?php echo $this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['arFilter']['ascdesc']); ?>');
189
    jQuery('th[data-order="<?php echo $this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['arFilter']['ascdesc']); ?>');
156
    <?php } ?>
190
    <?php } ?>
-
 
191
	
-
 
192
	jQuery('.wpsg-voucher-add').on('click', function() {
-
 
193
 
-
 
194
		jQuery('#wpsg_voucher_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
 
195
		jQuery('#wpsg_voucher_dialog').modal( { } ).modal('show');
157
 
196
 
-
 
197
		jQuery.ajax({
-
 
198
			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_gutschein&subaction=addedit&noheader=1',
-
 
199
			success: function(data) {
-
 
200
 
-
 
201
				jQuery('#wpsg_voucher_dialog .modal-body').html(data);
-
 
202
				
-
 
203
			}
-
 
204
		});
-
 
205
		
-
 
206
		return false;
-
 
207
		
-
 
208
	}).attr("onclick", null);
-
 
209
 
-
 
210
	jQuery('.wpsg_voucher_edit').on('click', function() {
-
 
211
 
-
 
212
		jQuery('#wpsg_voucher_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
 
213
		jQuery('#wpsg_voucher_dialog').modal( { } ).modal('show');
-
 
214
 
-
 
215
		jQuery.ajax({
-
 
216
			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_gutschein&subaction=addedit&noheader=1&voucher_id=' + jQuery(this).data("voucher_id"),
-
 
217
			success: function(data) {
-
 
218
 
-
 
219
				jQuery('#wpsg_voucher_dialog .modal-body').html(data);
-
 
220
 
-
 
221
			}
-
 
222
		});
-
 
223
 
-
 
224
		return false;
-
 
225
		
-
 
226
	}).attr("onclick", null);
-
 
227
	
-
 
228
	jQuery('.wpsg-voucher-save').on('click', function() {
-
 
229
 
-
 
230
		//jQuery('#wpsg_voucher_dialog .modal-body').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
 
231
		//jQuery('#wpsg_voucher_dialog').modal('hide');
-
 
232
		
-
 
233
		wpsg_loading('#wpsg_voucher_dialog .modal-body');
-
 
234
		
-
 
235
		jQuery.ajax({
-
 
236
			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_gutschein&subaction=save&noheader=1',
-
 
237
			data: {
-
 
238
				form_data: jQuery('#wpsg_voucher_form').serialize()
-
 
239
			},
-
 
240
			success: function(data) {
-
 
241
 
-
 
242
				wpsg_loading_done('#wpsg_voucher_dialog .modal-body');
-
 
243
								
-
 
244
				if (data !== "1") alert(data);
-
 
245
				else {
-
 
246
				
-
 
247
					location.reload();
-
 
248
					
-
 
249
				}
-
 
250
 
-
 
251
			}
-
 
252
		});
-
 
253
		
-
 
254
		return false;
-
 
255
		
-
 
256
	}).attr("onclick", null);
-
 
257
	
158
	function wpsg_setFilterStatus(state)
258
	function wpsg_setFilterStatus(state)
159
	{
259
	{
160
 
260
 
161
		jQuery('#filterstatus').val(state);
261
		jQuery('#filterstatus').val(state);
162
 
262