diff options
| author | 2017-12-06 21:04:45 +0100 | |
|---|---|---|
| committer | 2017-12-06 21:04:45 +0100 | |
| commit | 3902d3f43330504945e78627b4c49e67ae88aea9 (patch) | |
| tree | 6b86f0c0bd9563f3cb7ffc8756b6eef0d18025f6 /app/views | |
| parent | 4f06b17e005456515768f46b3cc3130428f579bf (diff) | |
Show existing extensions in admin panel (#1708)
* first draft
* display installed extension state
* fixed whitespace vs tabs
* added translation in all languages
* added error checks and log messages
* fixed tabs vs whitespace
* another try in fixing whitespaces
* another try in fixing whitespaces
* improved extension list translations
* using JSON from official extension repo
* improved version compare
* updated translations
* French translation
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/extension/index.phtml | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/app/views/extension/index.phtml b/app/views/extension/index.phtml index 7cb16bfff..6439a0333 100644 --- a/app/views/extension/index.phtml +++ b/app/views/extension/index.phtml @@ -26,13 +26,46 @@ } ?> <?php - } + } - if (empty($this->extension_list['system']) && empty($this->extension_list['user'])) { + if (empty($this->extension_list['system']) && empty($this->extension_list['user'])) { ?> <p class="alert alert-warn"><?php echo _t('admin.extensions.empty_list'); ?></p> <?php } ?> </form> + + <?php if (!empty($this->available_extensions)) { ?> + <h2><?php echo _t('admin.extensions.community'); ?></h2> + <table> + <tr> + <th><?php echo _t('admin.extensions.name'); ?></th> + <th><?php echo _t('admin.extensions.version'); ?></th> + <th><?php echo _t('admin.extensions.author'); ?></th> + <th><?php echo _t('admin.extensions.description'); ?></th> + </tr> + <?php foreach ($this->available_extensions as $ext) { ?> + <tr> + <td><a href="<?php echo $ext['url']; ?>" target="_blank"><?php echo $ext['name']; ?></a></td> + <td><?php echo $ext['version']; ?></td> + <td><?php echo $ext['author']; ?></td> + <td> + <?php echo $ext['description']; ?> + <?php if (isset($this->extensions_installed[$ext['name']])) { ?> + <?php if (version_compare($this->extensions_installed[$ext['name']], $ext['version']) >= 0) { ?> + <span class="alert alert-success"> + <?php echo _t('admin.extensions.latest'); ?> + </span> + <?php } else if ($this->extensions_installed[$ext['name']] != $ext['version']) { ?> + <span class="alert alert-warn"> + <?php echo _t('admin.extensions.update'); ?> + </span> + <?php } ?> + <?php } ?> + </td> + </tr> + <?php } ?> + </table> + <?php } ?> </div> <?php $class = isset($this->extension) ? ' class="active"' : ''; ?> |
