Subversion Repositories wpShopGermany4

Rev

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

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