summaryrefslogtreecommitdiff
path: root/app/Template/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template/plugin')
-rw-r--r--app/Template/plugin/directory.php30
-rw-r--r--app/Template/plugin/layout.php9
-rw-r--r--app/Template/plugin/show.php31
-rw-r--r--app/Template/plugin/sidebar.php11
4 files changed, 81 insertions, 0 deletions
diff --git a/app/Template/plugin/directory.php b/app/Template/plugin/directory.php
new file mode 100644
index 00000000..82b9a441
--- /dev/null
+++ b/app/Template/plugin/directory.php
@@ -0,0 +1,30 @@
+<div class="page-header">
+ <h2><?= t('Plugin Directory') ?></h2>
+</div>
+
+<?php if (empty($plugins)): ?>
+ <p class="alert"><?= t('There is no plugin available.') ?></p>
+<?php else: ?>
+ <table class="table-stripped">
+ <tr>
+ <th class="column-20"><?= t('Name') ?></th>
+ <th class="column-20"><?= t('Author') ?></th>
+ <th class="column-10"><?= t('Version') ?></th>
+ <th><?= t('Description') ?></th>
+ <th><?= t('Action') ?></th>
+ </tr>
+
+ <?php foreach ($plugins as $plugin): ?>
+ <tr>
+ <td>
+ <a href="<?= $plugin['homepage'] ?>" target="_blank" rel="noreferrer"><?= $this->text->e($plugin['title']) ?></a>
+ </td>
+ <td><?= $this->text->e($plugin['author']) ?></td>
+ <td><?= $this->text->e($plugin['version']) ?></td>
+ <td><?= $this->text->e($plugin['description']) ?></td>
+ <td>
+ </td>
+ </tr>
+ <?php endforeach ?>
+ </table>
+<?php endif ?>
diff --git a/app/Template/plugin/layout.php b/app/Template/plugin/layout.php
new file mode 100644
index 00000000..6eafa593
--- /dev/null
+++ b/app/Template/plugin/layout.php
@@ -0,0 +1,9 @@
+<section id="main">
+ <section class="sidebar-container" id="config-section">
+ <?= $this->render($sidebar_template) ?>
+
+ <div class="sidebar-content">
+ <?= $content_for_sublayout ?>
+ </div>
+ </section>
+</section>
diff --git a/app/Template/plugin/show.php b/app/Template/plugin/show.php
new file mode 100644
index 00000000..8358fb2a
--- /dev/null
+++ b/app/Template/plugin/show.php
@@ -0,0 +1,31 @@
+<div class="page-header">
+ <h2><?= t('Installed Plugins') ?></h2>
+</div>
+
+<?php if (empty($plugins)): ?>
+ <p class="alert"><?= t('There is no plugin loaded.') ?></p>
+<?php else: ?>
+ <table class="table-stripped">
+ <tr>
+ <th class="column-20"><?= t('Name') ?></th>
+ <th class="column-20"><?= t('Author') ?></th>
+ <th class="column-10"><?= t('Version') ?></th>
+ <th><?= t('Description') ?></th>
+ </tr>
+
+ <?php foreach ($plugins as $plugin): ?>
+ <tr>
+ <td>
+ <?php if ($plugin->getPluginHomepage()): ?>
+ <a href="<?= $plugin->getPluginHomepage() ?>" target="_blank" rel="noreferrer"><?= $this->text->e($plugin->getPluginName()) ?></a>
+ <?php else: ?>
+ <?= $this->text->e($plugin->getPluginName()) ?>
+ <?php endif ?>
+ </td>
+ <td><?= $this->text->e($plugin->getPluginAuthor()) ?></td>
+ <td><?= $this->text->e($plugin->getPluginVersion()) ?></td>
+ <td><?= $this->text->e($plugin->getPluginDescription()) ?></td>
+ </tr>
+ <?php endforeach ?>
+ </table>
+<?php endif ?>
diff --git a/app/Template/plugin/sidebar.php b/app/Template/plugin/sidebar.php
new file mode 100644
index 00000000..e1b47632
--- /dev/null
+++ b/app/Template/plugin/sidebar.php
@@ -0,0 +1,11 @@
+<div class="sidebar">
+ <h2><?= t('Actions') ?></h2>
+ <ul>
+ <li <?= $this->app->checkMenuSelection('PluginController', 'show') ?>>
+ <?= $this->url->link(t('Installed Plugins'), 'PluginController', 'show') ?>
+ </li>
+ <li <?= $this->app->checkMenuSelection('PluginController', 'directory') ?>>
+ <?= $this->url->link(t('Plugin Directory'), 'PluginController', 'directory') ?>
+ </li>
+ </ul>
+</div>