Subversion Repositories wpShopGermany4

Rev

Rev 4943 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2461 robert 1
<?php foreach ($this->view['chart']['data'] as $index => $data) { ?>
2
<?php if (is_numeric($index)) { ?>
3
<div class="wpsg-table-data-wrapper">
4
	<table style="width:auto !important;" class="widefat fixed tags" border="0" cellspacing="0" cellpadding="0">
5
		<thead>
6
			<tr>
7
				<th colspan="3">
8
				<?php
9
 
10
				$i = 0;
11
 
12
				foreach ((array)$data['records'] as $record)
13
				{
14
					if ($i == 0)
15
					{
16
						echo wpsg_hspc($data['label']);
17
					}
2350 robert 18
					$i++;
2461 robert 19
				}
20
				?>
21
				</th>
22
			</tr>
23
			<tr>
2662 robert 24
				<th class="manage-column">
25
					<a id="tstamp" class="sortable <?php if($this->view['filter']['sort'] == 'tstamp' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'tstamp' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
2461 robert 26
						<span><?php echo __('Uhrzeit', 'wpsg')?></span>
27
						<span class="sorting-indicator"></span>
28
					</a>
29
				</th>
2662 robert 30
				<th class="manage-column th-right">
31
					<a id="total" class="sortable <?php if($this->view['filter']['sort'] == 'total' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'total' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
2461 robert 32
						<span><?php echo __('Umsatz in', 'wpsg').' '.$this->get_option('wpsg_currency'); ?></span>
33
						<span class="sorting-indicator"></span>
34
					</a>
35
				</th>
2662 robert 36
				<th class="manage-column th-right">
37
					<a id="orders" class="sortable <?php if($this->view['filter']['sort'] == 'orders' && $this->view['filter']['order'] == 'orderup') { echo 'active orderdown'; } elseif($this->view['filter']['sort'] == 'orders' && $this->view['filter']['order'] == 'orderdown'){ echo 'active orderup'; } ?>" href="/">
2461 robert 38
						<span><?php echo __('Bestellungen', 'wpsg')?></span>
39
						<span class="sorting-indicator"></span>
40
					</a>
41
				</th>
42
			</tr>
43
		</thead>
44
		<tbody class="the-list">
45
			<?php
46
 
47
			$i = 0;
48
 
49
			foreach ((array)$data['records'] as $record)
50
			{
51
				if ($i%2 == 0) { $class = 'alternate'; } else { $class = ''; }
52
			?>
53
			<tr class="<?php echo $class; ?>">
54
				<td><strong><?php echo wpsg_hspc($record['hour']); ?></strong></td>
55
				<td class="td-right"><?php echo wpsg_ff($record['total']); ?></td>
56
				<td class="td-right"><?php echo (($record['orders'] > 0)?wpsg_hspc($record['orders']):'0'); ?></td>
57
			</tr>
58
			<?php
59
				$i++;
2350 robert 60
			}
2461 robert 61
			?>
62
		</tbody>
63
	</table>
64
</div>
65
<?php } ?>
66
<?php } ?>
2350 robert 67
 
2461 robert 68
<div class="clearer"></div>
69
 
2350 robert 70
<script type="text/javascript">
71
 
2662 robert 72
jQuery(document).ready(function(){
73
 
74
	jQuery('.sortable').bind('click', function(){
75
 
76
		var order = '';
77
		if(jQuery(this).hasClass('orderup'))
78
		{
79
			jQuery('#wpsg_statistics_order').val('orderup');
80
		}
81
		else
82
		{
83
			jQuery('#wpsg_statistics_order').val('orderdown');
84
		}
85
 
86
		jQuery('#wpsg_statistics_sort').val(jQuery(this).attr('id'));
87
 
88
		jQuery.ajax( {
89
			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_statistics&noheader=1&do=sorting',
90
			type: 'post',
91
			data: jQuery('#wpsg_statistics_form').serialize(),
92
			success: function(data) {
93
				jQuery('#table-data').html(data);
94
 
95
			}
96
		} );
97
 
98
		return false;
99
	});
100
 
2350 robert 101
});
102
 
103
</script>