Subversion Repositories wpShopGermany4

Rev

Rev 6834 | Rev 7807 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6830 daniel 1
<?php
2
 
3
    /**
4
     * Template für die Anzeige des Abo Statuses in der Hauptbestellung
5
     */
6
 
7804 daniel 7
    $view = $this->view['wpsg_mod_abo'];
6830 daniel 8
 
9
?>
7804 daniel 10
 
6830 daniel 11
<?php foreach ($this->view['arOrderedAboProducts'] as $oOrderProduct) { ?>
12
 
13
    <?php echo wpsg_drawForm_AdminboxStart($oOrderProduct->getProduct()->getProductName()); ?>
6834 daniel 14
 
7804 daniel 15
        <?php $tExpire = strtotime($this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', Array($_REQUEST['edit_id'], $oOrderProduct->getProductKey()))); ?>
16
		<?php echo wpsg_drawForm_Text(__('Laufzeit', 'wpsg'), wpsg_formatTimestamp($tExpire), 'wpsg_mod_abo_duration', Array('class_content_wrap' => (($tExpire > time())?'wpsg_mod_abo_future_expire':'wpsg_mod_abo_expired'))); ?>
17
 
18
		<script>
6834 daniel 19
 
7804 daniel 20
            moment.locale('de');
21
 
22
            jQuery('#wpsg_mod_abo_duration').editable({
23
				type: 'combodate',
24
                success: function(response, newValue) {
25
 
26
					jQuery.ajax({
27
                        url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_abo&subaction=admin_inlineEdit&noheader=1',
28
						data: {
29
                            field: 'duration',
30
							product_key: '<?php echo $oOrderProduct->getProductKey(); ?>',
31
							order_id: '<?php echo $view['oOrder']->getId() ?>',
32
							date: newValue.format()
33
                        },
34
						success: function(response) {
35
 
36
						}
37
					})
38
 
39
                },
40
                format: 'DD.MM.YYYY HH:mm:ss',
41
                viewformat: 'DD.MM.YYYY HH:mm:ss',
42
                template: 'D MMM YYYY  HH:mm:ss',
43
                combodate: {
44
                    minYear: 2000,
45
                    maxYear: <?php echo (intval(date('Y')) + 1); ?>,
46
                    minuteStep: 1
47
                }
48
            });
49
 
50
		</script>
51
 
6834 daniel 52
        <?php echo wpsg_drawForm_Text(wpsg_translate(__('Preis (#1# Tage):', 'wpsg'), $oOrderProduct->getProduct()->wpsg_mod_abo_durration), wpsg_ff($oOrderProduct->getProduct()->wpsg_mod_abo_price, $this->get_option('wpsg_currency'))); ?>
53
 
6830 daniel 54
        <?php echo wpsg_drawForm_TextStart(); ?>
6834 daniel 55
 
6830 daniel 56
            <?php $abo_product_status = $this->callMod('wpsg_mod_abo', 'getAboProductStatus', Array($_REQUEST['edit_id'], $oOrderProduct->getProductKey())); ?>
57
 
58
            <?php if ($abo_product_status['status'] === wpsg_mod_abo::STATUS_ACTIVE) { ?>
59
 
60
                <?php echo __('Aktiv', 'wpsg'); ?>
61
 
6834 daniel 62
                &nbsp;[&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_abo&edit_id=<?php echo $_REQUEST['edit_id'] ?>&product_key=<?php echo $oOrderProduct->getProductKey(); ?>&do=stop&noheader=1"><?php echo __('Deaktivieren'); ?></a>&nbsp;]
63
 
6830 daniel 64
            <?php } else if ($abo_product_status['status'] === wpsg_mod_abo::STATUS_STOPPED) { ?>
65
 
6834 daniel 66
                <?php echo __('Inaktiv', 'wpsg'); ?>
6830 daniel 67
 
6834 daniel 68
                &nbsp;[&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_abo&edit_id=<?php echo $_REQUEST['edit_id'] ?>&product_key=<?php echo $oOrderProduct->getProductKey(); ?>&do=run&noheader=1"><?php echo __('Aktivieren'); ?></a>&nbsp;]
6830 daniel 69
 
70
            <?php } ?>
71
 
72
        <?php echo wpsg_drawForm_TextEnd(__('Verlängerung')); ?>
6834 daniel 73
 
6830 daniel 74
    <?php echo wpsg_drawForm_AdminboxEnd(); ?>
75
 
76
<?php } ?>