summaryrefslogtreecommitdiff
path: root/views/order/view.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'views/order/view.phtml')
-rw-r--r--views/order/view.phtml124
1 files changed, 38 insertions, 86 deletions
diff --git a/views/order/view.phtml b/views/order/view.phtml
index 3a3c6d0..8248b86 100644
--- a/views/order/view.phtml
+++ b/views/order/view.phtml
@@ -48,34 +48,37 @@
<?php $i = 0; foreach ($this->view['arSubAction'] as $k => $v) { $i ++; ?>
<a class="list-group-item <?php echo ((wpsg_getStr($_COOKIE['wpsg_order_view_tab'], 'general') == $k)?'active':''); ?>" wpsg-data-target="<?php echo $k; ?>" href="#"><?php echo $v['title']; ?></a>
<?php } ?>
+
</div>
- <a href="" id="LinkProduktNeu" onclick="return WPSG_BE_Product.addProduct();"><span class="glyphicon glyphicon-plus"></span>
- <?php echo __("Neues Produkt", "wpsg"); ?>
- </a><div class="wpsg_clear"></div>
-
- <?php if ($this->hasMod('wpsg_mod_gutschein')) { ?>
- <?php if (((array_key_exists('gs', $this->view['basket'])) && ($this->view['basket']['gs']['value'] == 0))) { ?>
- <a href="" id="LinkGutscheinNeu" onclick="return wpsg_addVoucher(<?php echo $_REQUEST['edit_id']; ?>);"><span class="glyphicon glyphicon-plus"></span>
- <?php echo __("Gutschein bearbeiten", "wpsg"); ?>
- </a><div class="wpsg_clear"></div>
- <?php } ?>
- <?php } ?>
-
- <div class="wpsg_clear"></div>
- <?php if ($this->hasMod('wpsg_mod_discount')) { ?>
- <a href="" id="LinkRabattNeu" onclick="return WPSG_BE_Discount.editDiscount(<?php echo $_REQUEST['edit_id']; ?>);"><span class="glyphicon glyphicon-plus"></span>
- <?php echo __("Rabatt bearbeiten", "wpsg"); ?>
+ <div class="tag_actions orderdata_action">
+
+ <a href="" id="LinkProduktNeu" onclick="return WPSG_BE_Product.addProduct();"><span class="glyphicon glyphicon-plus"></span>
+ <?php echo __("Neues Produkt", "wpsg"); ?>
</a><div class="wpsg_clear"></div>
- <?php } ?>
-
+
+ <?php if ($this->hasMod('wpsg_mod_gutschein')) { ?>
+ <a href="" id="LinkGutscheinNeu" onclick="return WPSG_BE_Voucher.editVoucher(<?php echo $_REQUEST['edit_id']; ?>);"><span class="glyphicon glyphicon-plus"></span>
+ <?php echo __("Gutschein bearbeiten", "wpsg"); ?>
+ </a><div class="wpsg_clear"></div>
+ <?php } ?>
+
+ <div class="wpsg_clear"></div>
+ <?php if ($this->hasMod('wpsg_mod_discount')) { ?>
+ <a href="" id="LinkRabattNeu" onclick="return WPSG_BE_Discount.editDiscount(<?php echo $_REQUEST['edit_id']; ?>);"><span class="glyphicon glyphicon-plus"></span>
+ <?php echo __("Rabatt bearbeiten", "wpsg"); ?>
+ </a><div class="wpsg_clear"></div>
+ <?php } ?>
- <a href="" id="LinkSendMail" onclick="return wpsg_sendMail(<?php echo $_REQUEST['edit_id']; ?>);"><span class="glyphicon glyphicon-envelope"></span>
- <?php echo __("Bestellbestätigung", "wpsg"); ?><br /><?php echo __("erneut versenden", "wpsg"); ?>
- </a><br />
+ <a href="" id="LinkSendMail" onclick="return WPSG_BE_Mail.sendCustomerMail(<?php echo $_REQUEST['edit_id']; ?>);"><span class="glyphicon glyphicon-envelope"></span>
+ <?php echo __("Bestellbestätigung", "wpsg"); ?><br /><?php echo __("erneut versenden", "wpsg"); ?>
+ </a><br />
+
+ </div>
<div id='wpsg_kv_list'>
</div>
+
</div>
<div class="wpsg_admin_content form-horizontal">
@@ -92,9 +95,8 @@
</div>
-<script type="text/javascript">/* <![CDATA[ */
-
-
+<script type="text/javascript">
+
/**
* Sendet eine eMail
*/
@@ -114,68 +116,17 @@
} // function wpsg_sendMail()
- /**
- * Fügt einen neuen Rabatt hinzu (nur wenn keiner da ist)
- */
- function wpsg_addDiscount(oid)
- {
- jQuery('#wpsg_produkte_table').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
- jQuery.ajax( {
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&subaction=discountData&do=add&edit_id=' + oid + '&noheader=1',
- success: function(data) {
-
- jQuery('#wpsg_produkte_table').replaceWith(data);
- jQuery('#LinkRabattNeu').hide();
-
- }
- } );
-
- return false;
-
- } // function wpsg_addDiscount()
-
-
- /**
- * Fügt einen neuen Gutschein hinzu (nur wenn keiner da ist)
- */
- function wpsg_addVoucher(oid)
- {
- jQuery('#wpsg_produkte_table').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
- jQuery.ajax( {
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&subaction=voucherData&do=add&edit_id=' + oid + '&noheader=1',
- success: function(data) {
- jQuery('#wpsg_produkte_table').replaceWith(data);
- jQuery('#LinkGutscheinNeu').hide();
- //jQuery('#wpsg_kv_list').html(data);
- //location.href = location.href;
- //jQuery('#wpsg_kv_list').html('');
- }
- } );
-
- return false;
-
- } // function wpsg_addVoucher()
-
-
-
jQuery(document).ready(function() {
- wpsg_view_orderdata_hide();
-
jQuery('#wpsg_order_view_tabs a.list-group-item').bind('click', function() {
jQuery('#wpsg_order_view_tabs a').removeClass('active');
jQuery('.wpsg_order_view_tab_content').hide();
- tab = jQuery(this).attr('wpsg-data-target');
- if (tab == 'orderdata') {
- wpsg_view_orderdata_show();
- } else {
- wpsg_view_orderdata_hide();
- }
- jQuery(this).addClass('active');
+ jQuery('.tag_actions').hide(); //ordertab_action
+ jQuery('.' + jQuery(this).attr('wpsg-data-target') + '_action').show();
+
+ jQuery(this).addClass('active');
jQuery('#tab' + jQuery(this).attr('wpsg-data-target')).show();
jQuery.cookie('wpsg_order_view_tab', jQuery(this).attr('wpsg-data-target'));
@@ -183,17 +134,18 @@
} );
- co = jQuery.cookie('wpsg_order_view_tab');
+ var co = jQuery.cookie('wpsg_order_view_tab');
+
if (co === undefined) {
+
jQuery("[wpsg-data-target='general']").trigger("click");
+
} else {
+
jQuery("[wpsg-data-target='" + co + "']").trigger("click");
+
}
- //jQuery('#wpsg_order_view_tabs a').removeClass('active');
- //jQuery('.wpsg_order_view_tab_content').hide();
- //jQuery('#tabgeneral').show();
- //jQuery("[wpsg-data-target='general']").addClass('active');
-
+
} );
-/* ]]> */</script>
+</script>