summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2017-09-20 09:30:45 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2017-09-20 09:30:45 +0000
commit5a105225e3e9fee02255f735f6a70b8e00ba34a7 (patch)
treef9ae38aa52b4fe30520262e1ea64e36128b84f67 /views
parentadc4d56d9a9b107fd7b1cee9b11344840aa87aab (diff)
- Download der Pakete aus Base
- Modulverwaltung git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6522 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views')
-rw-r--r--views/admin/licence.phtml81
-rw-r--r--views/admin/module.phtml109
-rw-r--r--views/admin/modulelist.phtml141
3 files changed, 155 insertions, 176 deletions
diff --git a/views/admin/licence.phtml b/views/admin/licence.phtml
index 204bb47..98fc279 100644
--- a/views/admin/licence.phtml
+++ b/views/admin/licence.phtml
@@ -182,86 +182,7 @@
<br />
- <?php if (wpsg_isSizedArray($wpsg_update_data)) { ?>
-
- <?php // Ich zeige hier nur die Aktiven Module an ?>
- <?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="success">
- <td><?php echo $modul_info['label']; ?></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 } ?>
-
- </td>
- <td><?php
-
- 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]->versio) > 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);
-
- }
-
- }
-
- ?></td>
- </tr>
- <?php } ?>
- </tbody>
- </table>
-
- <?php } ?>
+ <?php include dirname(__FILE__).'/modulelist.phtml'; ?>
<?php } ?>
diff --git a/views/admin/module.phtml b/views/admin/module.phtml
index 4b790ed..dc502d5 100644
--- a/views/admin/module.phtml
+++ b/views/admin/module.phtml
@@ -116,6 +116,7 @@
<span class="wpsg_error"><?php echo __('Nicht aktiv', 'wpsg'); ?></span>
<?php } ?>
+ <?php if ($this->bLicence === true) { ?>
<?php if (wpsg_isSizedString($modul_info[$_REQUEST['modul']]['shop_url'])) { ?>
[ <a href="<?php echo $modul_info[$_REQUEST['modul']]['shop_url']; ?>"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a> ]
<?php } else { ?>
@@ -128,6 +129,9 @@
[ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=startDemo&modul=<?php echo $_REQUEST['modul']; ?>" onclick="return confirm('<?php echo __('Sind Sie sich sicher? Das Modul kann 14 Tage ab heute komplett in vollem Umfang getestet werden.', 'wpsg'); ?>');"><?php echo __('Demo Modus starten'); ?></a> ]
<?php } ?>
+ <?php } else { ?>
+ <br /><span class="wpsg_error"><?php echo __('Ohne Lizenz können Sie dieses Modul nicht verwenden.', 'wpsg'); ?></span>
+ <?php } ?>
<?php } ?>
@@ -188,6 +192,7 @@
</div>
<div class="panel-body">
+ <?php if ($this->bLicence === true) { ?>
<form method="POST" action="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=activatemodul">
<fieldset>
@@ -208,107 +213,19 @@
</fieldset>
</form>
+ <?php } else { ?>
+
+ <p><?php echo __('Modulcodes können erst verwendet werden, wenn ihre wpShopGermany Lizenz aktiviert ist.', 'wpsg'); ?>
+ <?php } ?>
+
<hr />
- <?php $wpsg_update_data = wpsg_get_update_data(); ?>
- <?php if (wpsg_isSizedArray($wpsg_update_data['modulinfo'])) { ?>
-
- <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) { ?>
- <?php echo 'active'; ?>
- <?php } else if ($modul_info['active'] === true) { ?>
- <?php echo 'success'; ?>
- <?php } else { ?>
- <?php echo 'info'; ?>
- <?php } ?>
-
- ">
- <td><?php echo $modul_info['label']; ?></td>
- <td>
-
- <?php if ($this->hasModInstalled($modul_key)) { ?>
- <?php echo $this->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 } ?>
-
- </td>
- <td><?php
-
- echo $modul_info['version'];
-
- if ($this->hasModInstalled($modul_key) && $modul_info['version'] === $this->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->arAllModule[$modul_key]->versio) > 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);
-
- }
-
- }
-
- ?></td>
- </tr>
- <?php } ?>
- </tbody>
- </table>
-
- <?php } else { ?>
-
- <p>
- <?php echo __('Bitte erwerben Sie eine Lizenz für wpShopGermany, damit sie unsere Erweiterungsmodule nutzen können.', 'wpsg'); ?>
- </p>
-
- <?php } ?>
-
+ <?php include dirname(__FILE__).'/modulelist.phtml'; ?>
+
</div>
</div>
- </div>
+ </div>
<?php } ?>
diff --git a/views/admin/modulelist.phtml b/views/admin/modulelist.phtml
new file mode 100644
index 0000000..1dfb6a1
--- /dev/null
+++ b/views/admin/modulelist.phtml
@@ -0,0 +1,141 @@
+<?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 echo $modul_info['label']; ?></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 } ?>