diff options
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/config/sidebar.php | 5 | ||||
-rw-r--r-- | app/Template/header.php | 4 | ||||
-rw-r--r-- | app/Template/plugin/directory.php | 30 | ||||
-rw-r--r-- | app/Template/plugin/layout.php | 9 | ||||
-rw-r--r-- | app/Template/plugin/show.php (renamed from app/Template/config/plugins.php) | 5 | ||||
-rw-r--r-- | app/Template/plugin/sidebar.php | 11 |
6 files changed, 58 insertions, 6 deletions
diff --git a/app/Template/config/sidebar.php b/app/Template/config/sidebar.php index dd51bc74..a2a5a6cb 100644 --- a/app/Template/config/sidebar.php +++ b/app/Template/config/sidebar.php @@ -4,9 +4,6 @@ <li <?= $this->app->checkMenuSelection('config', 'index') ?>> <?= $this->url->link(t('About'), 'config', 'index') ?> </li> - <li <?= $this->app->checkMenuSelection('config', 'plugins') ?>> - <?= $this->url->link(t('Plugins'), 'config', 'plugins') ?> - </li> <li <?= $this->app->checkMenuSelection('config', 'application') ?>> <?= $this->url->link(t('Application settings'), 'config', 'application') ?> </li> @@ -36,4 +33,4 @@ </li> <?= $this->hook->render('template:config:sidebar') ?> </ul> -</div>
\ No newline at end of file +</div> diff --git a/app/Template/header.php b/app/Template/header.php index 23906a9e..428cf477 100644 --- a/app/Template/header.php +++ b/app/Template/header.php @@ -83,6 +83,10 @@ <?= $this->url->link(t('Groups management'), 'GroupListController', 'index') ?> </li> <li> + <i class="fa fa-cubes" aria-hidden="true"></i> + <?= $this->url->link(t('Plugins'), 'PluginController', 'show') ?> + </li> + <li> <i class="fa fa-cog fa-fw"></i> <?= $this->url->link(t('Settings'), 'config', 'index') ?> </li> 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/config/plugins.php b/app/Template/plugin/show.php index 04b3f095..8358fb2a 100644 --- a/app/Template/config/plugins.php +++ b/app/Template/plugin/show.php @@ -1,5 +1,5 @@ <div class="page-header"> - <h2><?= t('Plugins') ?></h2> + <h2><?= t('Installed Plugins') ?></h2> </div> <?php if (empty($plugins)): ?> @@ -27,4 +27,5 @@ <td><?= $this->text->e($plugin->getPluginDescription()) ?></td> </tr> <?php endforeach ?> -<?php endif ?>
\ No newline at end of file + </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> |