summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/admin/index.phtml2
-rw-r--r--views/admin/licence.phtml83
-rw-r--r--views/admin/news.phtml7
3 files changed, 84 insertions, 8 deletions
diff --git a/views/admin/index.phtml b/views/admin/index.phtml
index fc0ecb9..746a1af 100644
--- a/views/admin/index.phtml
+++ b/views/admin/index.phtml
@@ -28,7 +28,7 @@
<li role="presentation" class="<?php echo (($this->view['actionName'] == 'news')?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=news">
<?php echo __('Aktuelles', 'wpsg'); ?>
<?php $wpsg_news_unread = wpsg_news::countUnreadNews(); if (wpsg_isSizedInt($wpsg_news_unread)) { ?>
- <span class="badge" style="background-color:#D9534F;"><?php echo sizeof($wpsg_news_unread); ?></span>
+ <span class="badge" style="background-color:#D9534F;"><?php echo $wpsg_news_unread; ?></span>
<?php } ?>
</a></li>
</ul>
diff --git a/views/admin/licence.phtml b/views/admin/licence.phtml
index 98fc279..37828c2 100644
--- a/views/admin/licence.phtml
+++ b/views/admin/licence.phtml
@@ -29,7 +29,7 @@
<li role="presentation" class="<?php echo (($this->view['actionName'] == 'news')?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=news">
<?php echo __('Aktuelles', 'wpsg'); ?>
<?php $wpsg_news_unread = wpsg_news::countUnreadNews(); if (wpsg_isSizedInt($wpsg_news_unread)) { ?>
- <span class="badge" style="background-color:#D9534F;"><?php echo sizeof($wpsg_news_unread); ?></span>
+ <span class="badge" style="background-color:#D9534F;"><?php echo $wpsg_news_unread; ?></span>
<?php } ?>
</a></li>
</ul>
@@ -182,7 +182,86 @@
<br />
- <?php include dirname(__FILE__).'/modulelist.phtml'; ?>
+ <?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 } ?>
diff --git a/views/admin/news.phtml b/views/admin/news.phtml
index 25fdcf9..e08aea3 100644
--- a/views/admin/news.phtml
+++ b/views/admin/news.phtml
@@ -15,13 +15,10 @@
<?php
$temp = '<a target="_blank" onclick="setTimeout(function() { location.href = location.href; }, 1000); return true;" href="'.WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=news&read='.rawurlencode($news['id']).'&noheader=1">'.wpsg_hspc(wpsg_formatTimestamp($news['date'], true).' - '.$news['title']).'</a>';
- echo wpsg_drawForm_AdminboxStart(__($temp, 'wpsg'));
+ echo wpsg_drawForm_AdminboxStart(__($temp, 'wpsg'), '', array('panel-body-class' => ((wpsg_news::isRead($news['id']))?'bg-success':'bg-info')));
?>
-
- <div class="markRead">
- <?php echo __('gelesen', 'wpsg'); ?> <img src="<?php echo $this->getRessourceURL('gfx/tick.png'); ?>" title="<?php echo __('gelesen', 'wpsg'); ?>" alt="<?php echo __('gelesen', 'wpsg'); ?>" />
- </div>
+
<div class="wpsg_news_content"><?php echo wpsg_news::prepareContent($news); ?></div>
<?php echo wpsg_drawForm_AdminboxEnd(); ?>