1144 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die Übersicht der Gutschein
|
|
|
5 |
*/
|
|
|
6 |
|
|
|
7 |
?>
|
|
|
8 |
|
5753 |
daniel |
9 |
<div class="wpsg_voucher" id="wpsg-bs">
|
5552 |
thomas |
10 |
|
5753 |
daniel |
11 |
<nav class="navbar navbar-default">
|
1676 |
daniel |
12 |
|
5552 |
thomas |
13 |
<div class="container-fluid">
|
|
|
14 |
<div class="navbar-header">
|
|
|
15 |
<a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
|
|
|
16 |
</div>
|
5753 |
daniel |
17 |
<div class="collapse navbar-collapse" id="bs-customer-navbar-collapse-1">
|
5552 |
thomas |
18 |
<ul class="nav navbar-nav">
|
6675 |
hartmut |
19 |
<?php
|
|
|
20 |
$cnt = 0;
|
|
|
21 |
if (is_array($this->view['arData']) && sizeof($this->view['arData']) > 0) {
|
|
|
22 |
foreach ($this->view['arData'] as $oVoucher) {
|
|
|
23 |
if (($this->get_option('wpsg_mod_gutschein_active') == '1') && ($oVoucher->getStatus() > 0)) $cnt=$cnt;
|
|
|
24 |
else $cnt++;
|
|
|
25 |
}
|
|
|
26 |
}
|
|
|
27 |
?>
|
|
|
28 |
<li role="presentation" class="wpsg-voucher-tab-a active"><a href="#" onclick="return false;"><?php echo wpsg_translate(__("Gutscheinverwaltung (#1# Gutscheine)", "wpsg"), $cnt); ?></a></li>
|
5753 |
daniel |
29 |
<li role="presentation" class="wpsg-voucher-tab-a wpsg_showhide_filter <?php echo (($this->view['hasFilter'])?'active':''); ?>" id="wpsg-voucher-tab-0"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
|
|
|
30 |
<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>
|
5552 |
thomas |
31 |
</ul>
|
|
|
32 |
<ul class="nav navbar-nav navbar-right">
|
5753 |
daniel |
33 |
<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>
|
|
|
34 |
<?php if (wpsg_isSizedArray($this->view['arData'])) { ?>
|
|
|
35 |
<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>
|
|
|
36 |
<?php } ?>
|
|
|
37 |
</ul>
|
5552 |
thomas |
38 |
</div>
|
|
|
39 |
</div>
|
5753 |
daniel |
40 |
|
|
|
41 |
<div class="wpsg-filter wpsg-customer-tab wpsg-voucher-tab-0 container-fluid form-horizontal" style="display:<?php echo (($this->view['hasFilter'] === true)?'block':'none'); ?>;">
|
|
|
42 |
<div class="row">
|
5552 |
thomas |
43 |
<div class="col-lg-4">
|
|
|
44 |
<form method="post" id="filter_form">
|
5753 |
daniel |
45 |
|
|
|
46 |
<input id="wpsg_seite" type="hidden" name="filter[page]" value="<?php echo @$this->view['page']; ?>" class="current-page" />
|
|
|
47 |
<input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo @$this->view['arFilter']['order']; ?>" />
|
|
|
48 |
<input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo @$this->view['arFilter']['ascdesc']; ?>" />
|
|
|
49 |
|
|
|
50 |
<?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
|
|
|
51 |
|
|
|
52 |
<?php echo wpsg_drawForm_SubmitButton(__('Gutscheine suchen')); ?><br />
|
|
|
53 |
|
|
|
54 |
</form>
|
5552 |
thomas |
55 |
</div>
|
5753 |
daniel |
56 |
</div>
|
|
|
57 |
</div>
|
|
|
58 |
|
|
|
59 |
</nav>
|
|
|
60 |
|
6444 |
daniel |
61 |
<div class="wpsg_clear"></div>
|
|
|
62 |
|
|
|
63 |
<?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
|
5753 |
daniel |
64 |
|
|
|
65 |
<div class="content">
|
1676 |
daniel |
66 |
|
5753 |
daniel |
67 |
<?php if (is_array($this->view['arData']) && sizeof($this->view['arData']) > 0) { ?>
|
1924 |
daniel |
68 |
|
5753 |
daniel |
69 |
<form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Voucher&action=index&noheader=1">
|
|
|
70 |
<table class="table wpsg-table-order table-bordered table-hover table-striped wpsg-table-customer">
|
|
|
71 |
<thead>
|
|
|
72 |
<tr>
|
|
|
73 |
<th class="col_checkbox"><input type="checkbox" onclick="jQuery('.col_set_checkbox').each(function() { jQuery(this).prop('checked', !jQuery(this).prop('checked')); } );" /></th>
|
|
|
74 |
<th class="wpsg_order col_code" data-order="code"><?php echo __("Code", 'wpsg'); ?></th>
|
|
|
75 |
<th class="wpsg_order col_start" data-order="start_date"><?php echo __("Start", 'wpsg'); ?></th>
|
|
|
76 |
<th class="wpsg_order col_end" data-order="end_date"><?php echo __("Ende", 'wpsg'); ?></th>
|
|
|
77 |
<th class="wpsg_order col_value" data-order="value"><?php echo __("Wert", 'wpsg'); ?></th>
|
|
|
78 |
<th class="wpsg_order col_status" data-order="status"><?php echo __("Status", 'wpsg'); ?></th>
|
|
|
79 |
</tr>
|
|
|
80 |
</thead>
|
|
|
81 |
<tbody>
|
|
|
82 |
<?php foreach ($this->view['arData'] as $oVoucher) { ?>
|
6675 |
hartmut |
83 |
<?php if (($this->get_option('wpsg_mod_gutschein_active') == '1') && ($oVoucher->getStatus() > 0)) continue; ?>
|
5753 |
daniel |
84 |
<tr>
|
|
|
85 |
<td class="col_checkbox">
|
|
|
86 |
|
|
|
87 |
<input class="col_set_checkbox" value="<?php echo $oVoucher->id; ?>" name="wpsg_multido[]" type="checkbox" />
|
|
|
88 |
|
|
|
89 |
</td>
|
|
|
90 |
<td class="col_code"><?php echo $oVoucher->code; ?></td>
|
|
|
91 |
<td class="col_start"><?php echo wpsg_formatTimestamp($oVoucher->start_date); ?></td>
|
|
|
92 |
<td class="col_end"><?php echo wpsg_formatTimestamp($oVoucher->end_date); ?></td>
|
|
|
93 |
<td class="col_value"><?php
|
|
|
94 |
|
|
|
95 |
if ($oVoucher->calc_typ == 'w') echo wpsg_ff($oVoucher->value, $this->get_option('wpsg_currency'));
|
|
|
96 |
else if ($oVoucher->calc_typ == 'p') echo wpsg_ff($oVoucher->value, '%');
|
|
|
97 |
|
|
|
98 |
?></td>
|
|
|
99 |
<td class="col_status">
|
|
|
100 |
|
|
|
101 |
<?php $comment = $oVoucher->comment; if (wpsg_isSizedString($comment)) { ?>
|
6005 |
hartmut |
102 |
<a title="<?php echo __("Kommentar (Admin): ", "wpsg").htmlspecialchars($comment); ?>" onclick="return false;" class="glyphicon glyphicon-question-sign admincomment" href="#"></a>
|
5753 |
daniel |
103 |
<?php } ?>
|
|
|
104 |
|
|
|
105 |
<?php echo $oVoucher->getStatusLabel(); ?>
|
|
|
106 |
|
|
|
107 |
<?php $used = $oVoucher->getUsed(); if (wpsg_isSizedInt($used)) { ?>
|
|
|
108 |
<?php echo wpsg_translate(__('#1# mal benutzt.', 'wpsg'), $used); ?>
|
|
|
109 |
<?php } ?>
|
|
|
110 |
|
|
|
111 |
<?php if ($oVoucher->multi === '1') { ?>
|
|
|
112 |
<span title="<?php echo __('Mehrfach benutzbar', 'wpsg'); ?>"> [M]</span>
|
|
|
113 |
<?php } ?>
|
|
|
114 |
|
|
|
115 |
</td>
|
|
|
116 |
</tr>
|
|
|
117 |
<?php } ?>
|
|
|
118 |
</tbody>
|
|
|
119 |
</table>
|
|
|
120 |
|
|
|
121 |
<div class="alignleft actions">
|
|
|
122 |
|
|
|
123 |
<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" />
|
|
|
124 |
|
|
|
125 |
</div>
|
|
|
126 |
|
|
|
127 |
</div>
|
|
|
128 |
|
6444 |
daniel |
129 |
<?php $this->render(WPSG_PATH_VIEW.'/admin/pager.phtml'); ?>
|
5753 |
daniel |
130 |
|
|
|
131 |
<?php } else { ?>
|
|
|
132 |
|
|
|
133 |
<?php echo wpsg_drawForm_AdminboxStart(); ?>
|
|
|
134 |
<?php echo __('Keine Gutscheine in der Datenbank.', 'wpsg'); ?>
|
|
|
135 |
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
|
|
|
136 |
|
|
|
137 |
<?php } ?>
|
|
|
138 |
|
|
|
139 |
</div>
|
|
|
140 |
|
1599 |
daniel |
141 |
</div>
|
|
|
142 |
|
1676 |
daniel |
143 |
<script type="text/javascript">/* <![CDATA[ */
|
1599 |
daniel |
144 |
|
5753 |
daniel |
145 |
<?php if (wpsg_isSizedString($this->view['arFilter']['order']) && wpsg_isSizedString($this->view['arFilter']['ascdesc'])) { ?>
|
|
|
146 |
jQuery('th[data-order="<?php echo $this->view['arFilter']['order']; ?>"]').addClass('wpsg_order_<?php echo strtolower($this->view['arFilter']['ascdesc']); ?>');
|
|
|
147 |
<?php } ?>
|
|
|
148 |
|
|
|
149 |
function goPage(page)
|
1599 |
daniel |
150 |
{
|
|
|
151 |
|
6152 |
thomas |
152 |
//if (page <= 0 || page == <?php echo $this->view['arFilter']['page']; ?> || page > <?php echo $this->view['pages']; ?>) return;
|
1599 |
daniel |
153 |
|
5753 |
daniel |
154 |
jQuery('#wpsg_seite').val(page);
|
|
|
155 |
jQuery('#filter_form').submit();
|
1599 |
daniel |
156 |
|
5753 |
daniel |
157 |
return false;
|
|
|
158 |
|
|
|
159 |
} // function goPage(page)
|
|
|
160 |
|
|
|
161 |
|
1676 |
daniel |
162 |
/* ]]> */</script>
|