Subversion Repositories wpShopGermany4

Rev

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

Rev Author Line No. Line
1144 daniel 1
<?php
2
 
3
	/**
4
	 * Template für die Übersicht der Gutschein
5
	 */
6
 
7
?>
8
<div class="wrap wpsg_mod_gutschein">
9
	<div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
10
	<h2>
11
		<?php echo __('Gutscheinverwaltung', 'wpsg'); ?>
12
		<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&amp;action=add" class="button add-new-h2"><?php echo __("Hinzufügen", "wpsg"); ?></a>
13
	</h2>
14
 
15
	<?php echo $this->writeBackendMessage(); ?>
16
 
1599 daniel 17
	<form method="POST" id="#gs_form" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&noheader=1">
1144 daniel 18
 
19
		<div class="tablenav top">
20
 
21
			<?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
22
			<table class="widefat post fixed vouchertable">
23
				<thead>
24
					<tr>
1599 daniel 25
						<th class="manage-column column-checkbox"><input title="<?php echo __("Alle markieren", "wpsg"); ?>" type="checkbox" onclick="markAll(this);"/></th>
1144 daniel 26
						<th class="manage-column column-nr"><?php echo __('Nr.', 'wpsg'); ?></th>
27
						<th class="manage-column column-code"><?php echo __("Code", 'wpsg'); ?></th>
28
						<th class="manage-column column-start"><?php echo __("Start", 'wpsg'); ?></th>
29
						<th class="manage-column column-end"><?php echo __("End", 'wpsg'); ?></th>
30
						<th class="manage-column column-value"><?php echo __("Wert", 'wpsg'); ?></th>
31
						<th class="manage-column column-status"><?php echo __('Status', 'wpsg'); ?></th>
32
					</tr>
33
				</thead>
34
				<tbody>
35
					<?php foreach ($this->view['data'] as $g) { ?>
36
					<tr>
1599 daniel 37
						<td class="column-checkbox"><input type="checkbox" value="<?php echo $g['id']; ?>"  class="wpsg_mod_gs_cb" name="wpsg_gs_cb[]" /></td>
1144 daniel 38
						<td class="column-nr"><?php echo wpsg_hspc($g['id']); ?>.</td>
39
						<td class="column-code"><?php echo wpsg_hspc($g['code']); ?></td>
40
						<td class="column-start"><?php echo date('d.m.Y H:i', strtotime($g['start_date'])); ?></td>
41
						<td class="column-end"><?php echo date('d.m.Y H:i', strtotime($g['end_date'])); ?></td>
42
						<td class="column-value">
43
							<?php if ($g['calc_typ'] == 'w') { ?>
44
								<?php echo wpsg_ff($g['value'], $this->get_option('wpsg_currency')); ?>
45
							<?php } else { ?>
46
								<?php echo wpsg_ff($g['value'], '%'); ?>
47
							<?php } ?>
48
						</td>
49
						<td class="column-status">
50
							<?php echo wpsg_hspc($g['status']); ?>
51
							<?php if ($g['multi'] == '1') { ?>
52
							<span class="wpsg_mod_gutschein_multi">&nbsp;[M]</span>
53
							<?php } ?>
54
						</td>
55
					</tr>
56
					<?php } ?>
57
				</tbody>
58
				<tfoot>
59
					<tr>
1599 daniel 60
						<th class="manage-column column-checkbox"><input title="<?php echo __("Alle markieren", "wpsg"); ?>" type="checkbox" onclick="markAll(this);"/></th>
1144 daniel 61
						<th class="manage-column column-nr"><?php echo __('Nr.', 'wpsg'); ?></th>
62
						<th class="manage-column column-code"><?php echo __("Code", 'wpsg'); ?></th>
63
						<th class="manage-column column-start"><?php echo __("Start", 'wpsg'); ?></th>
64
						<th class="manage-column column-end"><?php echo __("End", 'wpsg'); ?></th>
65
						<th class="manage-column column-value"><?php echo __("Wert", 'wpsg'); ?></th>
66
						<th class="manage-column column-status"><?php echo __('Status', 'wpsg'); ?></th>
67
					</tr>
68
				</tfoot>
69
			</table>
1599 daniel 70
			<br />
71
 
72
			<input type="submit" onclick="if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false;" name="wpshopgermany-submit-gs_del" value="<?php echo __("Markierte löschen", "wpsg"); ?>" />&nbsp;
73
			<input type="submit" onclick="" name="wpshopgermany-submit-csv" value="<?php echo __("CSV Export", "wpsg"); ?>" />
74
			<br /><br />
1144 daniel 75
			<?php } else { ?>
76
			<p><?php echo __('Keine Gutscheine in der Datenbank.', 'wpsg'); ?></p>
77
			<?php } ?>
78
		</div>
79
 
80
	</form>
1599 daniel 81
</div>
82
 
83
<script type="text/javascript">
84
 
85
	function markAll(el)
86
	{
87
 
88
		var arCB = jQuery(".wpsg_mod_gs_cb");
89
 
90
		for (var i = 0; i < arCB.length; i ++)
91
		{
92
			if (el.checked)
93
			{
94
				jQuery(arCB[i]).attr('checked', true);
95
			}
96
			else
97
			{
98
				jQuery(arCB[i]).attr('checked', false);
99
			}
100
		}
101
 
102
	} // function markAll(el)
103
 
104
</script>