diff options
| author | Daniel Schmitzer <noreply@maennchen1.de> | 2016-01-14 14:55:36 +0000 |
|---|---|---|
| committer | Daniel Schmitzer <noreply@maennchen1.de> | 2016-01-14 14:55:36 +0000 |
| commit | ad405c7045c6e242080ec9d3ce4c9e586b517c4f (patch) | |
| tree | b41905f4d27f3eaaabd5bad3a39f8d3873540b46 /views/mods/mod_statistics/chartturnoverperhour/data.phtml | |
- Testweise 4
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5261 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods/mod_statistics/chartturnoverperhour/data.phtml')
| -rw-r--r-- | views/mods/mod_statistics/chartturnoverperhour/data.phtml | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/views/mods/mod_statistics/chartturnoverperhour/data.phtml b/views/mods/mod_statistics/chartturnoverperhour/data.phtml new file mode 100644 index 0000000..3e98ee4 --- /dev/null +++ b/views/mods/mod_statistics/chartturnoverperhour/data.phtml @@ -0,0 +1,103 @@ +<?php foreach ($this->view['chart']['data'] as $index => $data) { ?>
+<?php if (is_numeric($index)) { ?>
+<div class="wpsg-table-data-wrapper">
+ <table style="width:auto !important;" class="widefat fixed tags" border="0" cellspacing="0" cellpadding="0">
+ <thead>
+ <tr>
+ <th colspan="3">
+ <?php
+
+ $i = 0;
+
+ foreach ((array)$data['records'] as $record)
+ {
+ if ($i == 0)
+ {
+ echo wpsg_hspc($data['label']);
+ }
+ $i++;
+ }
+ ?>
+ </th>
+ </tr>
+ <tr>
+ <th class="manage-column">
+ <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="/">
+ <span><?php echo __('Uhrzeit', 'wpsg')?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column th-right">
+ <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="/">
+ <span><?php echo __('Umsatz in', 'wpsg').' '.$this->get_option('wpsg_currency'); ?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ <th class="manage-column th-right">
+ <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="/">
+ <span><?php echo __('Bestellungen', 'wpsg')?></span>
+ <span class="sorting-indicator"></span>
+ </a>
+ </th>
+ </tr>
+ </thead>
+ <tbody class="the-list">
+ <?php
+
+ $i = 0;
+
+ foreach ((array)$data['records'] as $record)
+ {
+ if ($i%2 == 0) { $class = 'alternate'; } else { $class = ''; }
+ ?>
+ <tr class="<?php echo $class; ?>">
+ <td><strong><?php echo wpsg_hspc($record['hour']); ?></strong></td>
+ <td class="td-right"><?php echo wpsg_ff($record['total']); ?></td>
+ <td class="td-right"><?php echo (($record['orders'] > 0)?wpsg_hspc($record['orders']):'0'); ?></td>
+ </tr>
+ <?php
+ $i++;
+ }
+ ?>
+ </tbody>
+ </table>
+</div>
+<?php } ?>
+<?php } ?>
+
+<div class="clearer"></div>
+
+<script type="text/javascript">
+
+jQuery(document).ready(function(){
+
+ jQuery('.sortable').bind('click', function(){
+
+ var order = '';
+ if(jQuery(this).hasClass('orderup'))
+ {
+ jQuery('#wpsg_statistics_order').val('orderup');
+ }
+ else
+ {
+ jQuery('#wpsg_statistics_order').val('orderdown');
+ }
+
+ jQuery('#wpsg_statistics_sort').val(jQuery(this).attr('id'));
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_statistics&noheader=1&do=sorting',
+ type: 'post',
+ data: jQuery('#wpsg_statistics_form').serialize(),
+ success: function(data) {
+ jQuery('#table-data').html(data);
+
+ }
+ } );
+
+ return false;
+ });
+
+});
+
+</script>
\ No newline at end of file |
