summaryrefslogtreecommitdiff
path: root/views/admin/modulelist.phtml
blob: b91963cf038fe10ccd28ba2761fe426d5b162208 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<?php

    /**
     * Template für die Liste der Module
     * wird in der Modulverwaltungsübersicht und in der Lizenzverwaltung verwendet
     */

    $wpsg_update_data = wpsg_get_update_data();

    if (get_class($this) === "wpsg_ShopController") 
    {
    
        $source = 'module';
        @$this->shop = &$this;

    }
    else
    {

        $source = 'licence';

    }

?>

<?php if (wpsg_isSizedArray($wpsg_update_data['modulinfo'])) { ?>
  
    <?php /* foreach ($wpsg_update_data['modulinfo'] as $modul_key => $modul_info) { if ($modul_info['active'] !== true) unset($wpsg_update_data['modulinfo'][$modul_key]); }  */ ?>
    
    <table class="table modultable">
        <thead>
            <tr>
                <th><?php echo __('Modulname', 'wpsg'); ?></th>
                <th><?php echo __('Version', 'wpsg'); ?></th>
                <th><?php echo __('Lizenz', 'wpsg');  ?></th>
                <th><?php echo __('verfügbare Version', 'wpsg'); ?></th>
            </tr>
        </thead>
        <tbody>
            <?php foreach ($wpsg_update_data['modulinfo'] as $modul_key => $modul_info) { ?>
            <tr style="font-style:normal;" class="<?php 
            
                if ($modul_info['free'] === true) echo 'active';
				else if ($modul_info['active'] === true) echo 'success'; 
                else echo 'info'; 
                ?>">
                <td>
                
                    <?php if ($this->shop->hasModInstalled($modul_key)) { ?>
                    <a href="<?php echo  WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=<?php echo $modul_key; ?>">
                    <?php } ?>
                    
                    <?php echo $modul_info['label']; ?> 
                
                    <?php if ($this->shop->hasModInstalled($modul_key)) { ?>
                    </a>    
                    <?php } ?>
                        
                </td>
                <td>
                    
                    <?php if ($this->shop->hasModInstalled($modul_key)) { ?>
                        <?php echo $this->shop->arAllModule[$modul_key]->version; ?>
                    <?php } ?>
                    
                </td>								
                <td>
                    
                    <?php if ($modul_info['free'] === true) { ?>
                        <?php echo __('kostenlos', 'wpsg'); ?>
                    <?php } else if ($modul_info['active'] === true) { ?>
                        <?php echo __('enthalten', 'wpsg'); ?>
                    <?php } else { ?>
                        
                        <?php if (wpsg_isSizedString($modul_info['shop_url'])) { ?>
                        <a href="<?php echo $modul_info['shop_url']; ?>" target="_blank"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a>
                        <?php } else { ?>
                        <a href="https://shop.maennchen1.de" target="_blank"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a>
                        <?php } ?>
                        
                    <?php } ?>
                    
                    <?php if (!$this->shop->hasModInstalled($modul_key)) { ?>
                    
                        <br />
                        <?php if ($modul_info['active'] === true || $modul_info['free'] === true) { ?>
                            <?php echo wpsg_translate(__('<a href="#1#">Version installieren</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=installModul&modul='.$modul_key.'&source='.$source); ?>
                        <?php } else { ?>
                            <?php echo wpsg_translate(__('<a href="#1#">Demo installieren</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=installModul&modul='.$modul_key.'&source='.$source); ?>
                        <?php } ?>
                        
                    <?php } ?>
                    
                </td>
                <td><?php 
                                         
                    if ($modul_info['active'] === true && $modul_info['version'] != $modul_info['version_latest'] && version_compare($modul_info['version_latest'], $this->shop->arAllModule[$modul_key]->version) < 0)
                    {
                        
                        echo $modul_info['version_latest'];
                         
                        echo ' - <strong class="wpsg_error">'.__('neue Version verfügbar', 'wpsg').'</strong>';
                        echo '<br />';
                        echo wpsg_translate(__('<a href="#1#">Version installieren</a>.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=installModul&modul='.$modul_key.'&source='.$source);
                        
                        echo '<br /><br />';
                        
                    }
                    
                    echo $modul_info['version'];
                    
                    if ($this->shop->hasModInstalled($modul_key) && $modul_info['version'] === $this->shop->arAllModule[$modul_key]->version)
                    {
                        
                        echo ' - <strong class="wpsg_message_ok">'.__('aktuell', 'wpsg').'</strong>';
                        
                    }
                    else if (version_compare($modul_info['version'], WPSG_VERSION) > 0) 
                    {
                        
                        echo ' - <strong class="wpsg_error">'.__('neue Version verfügbar', 'wpsg').'</strong><br />'.wpsg_translate(__('<a href="#1#">wpShopGermany Update</a> notwendig', 'wpsg'), WPSG_URL_WP.'wp-admin/plugins.php');
                        
                    }
                    else if (version_compare($modul_info['version'], $this->shop->arAllModule[$modul_key]->version) > 0) 
                    {
                        
                        echo ' - <strong class="wpsg_error">'.__('neue Version verfügbar', 'wpsg').'</strong>';
                        
                        if ($modul_info['active'] === true) 
                        {
                        
                            echo '<br />';
                            echo wpsg_translate(__('<a href="#1#">Version installieren</a>.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=installModul&modul='.$modul_key.'&source='.$source);
                            
                        }
                        
                    }
                    
                ?></td>
            </tr>
            <?php } ?>
        </tbody>
    </table>
            
<?php } else { ?>

    <?php echo __('Mit einer Lizenz (Pro, Enterprise) machst du aus deinem wpShopGermany mehr.', 'wpsg'); ?><br /><br />
    <?php echo __('Du erhältst neben kostenlosem Support (per Mail oder Forum, 1 Jahr Updates frei) auch die Möglichkeit, die Vielzahl der zusätzlich erhältlichen wpShopGermany Module zu nutzen.', 'wpsg'); ?>

    <a href="https://shop.maennchen1.de/produkte/wpshopgermany-lizenzkey/" target="_blank"><?php echo __('wpShopGermany im Shop ansehen', 'wpsg'); ?></a>


<?php } ?>