index.phtml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?php
  2. /** @var FreshRSS_View $this */
  3. $this->partial('aside_configure');
  4. ?>
  5. <main class="post">
  6. <div class="link-back-wrapper">
  7. <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
  8. </div>
  9. <h1><?= _t('admin.extensions.title') ?></h1>
  10. <form id="form-extension" method="post">
  11. <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
  12. <?php if (!empty($this->extension_list['system'])) { ?>
  13. <h2><?= _t('admin.extensions.system') ?></h2>
  14. <ul class="manage-list">
  15. <?php
  16. foreach ($this->extension_list['system'] as $ext) {
  17. $this->ext_details = $ext; ?>
  18. <li>
  19. <?php $this->renderHelper('extension/details'); ?>
  20. </li>
  21. <?php } ?>
  22. </ul>
  23. <?php } ?>
  24. <?php if (!empty($this->extension_list['user'])) { ?>
  25. <h2><?= _t('admin.extensions.user') ?></h2>
  26. <ul class="manage-list">
  27. <?php
  28. foreach ($this->extension_list['user'] as $ext) {
  29. $this->ext_details = $ext; ?>
  30. <li>
  31. <?php $this->renderHelper('extension/details'); ?>
  32. </li>
  33. <?php } ?>
  34. </ul>
  35. <?php }
  36. if (empty($this->extension_list['system']) && empty($this->extension_list['user'])) {
  37. ?>
  38. <p class="alert alert-warn"><?= _t('admin.extensions.empty_list') ?></p>
  39. <?php } ?>
  40. </form>
  41. <?php if (!empty($this->available_extensions)) { ?>
  42. <h2><?= _t('admin.extensions.community') ?></h2>
  43. <div class="table-wrapper">
  44. <table>
  45. <tr>
  46. <th><?= _t('admin.extensions.name') ?></th>
  47. <th><?= _t('admin.extensions.version') ?></th>
  48. <th><?= _t('admin.extensions.author') ?></th>
  49. <th><?= _t('admin.extensions.description') ?></th>
  50. </tr>
  51. <?php foreach ($this->available_extensions as $ext) { ?>
  52. <tr>
  53. <td><a href="<?= $ext['url'] ?>" target="_blank"><?= $ext['name'] ?></a></td>
  54. <td><?= $ext['version'] ?></td>
  55. <td><?= $ext['author'] ?></td>
  56. <td>
  57. <?= $ext['description'] ?>
  58. <?php if (isset($this->extensions_installed[$ext['name']])) { ?>
  59. <?php if (version_compare($this->extensions_installed[$ext['name']], $ext['version']) >= 0) { ?>
  60. <span class="alert alert-success">
  61. <?= _t('admin.extensions.latest') ?>
  62. </span>
  63. <?php } elseif ($this->extensions_installed[$ext['name']] != $ext['version']) { ?>
  64. <span class="alert alert-warn">
  65. <?= _t('admin.extensions.update') ?>
  66. </span>
  67. <?php } ?>
  68. <?php } ?>
  69. </td>
  70. </tr>
  71. <?php } ?>
  72. </table>
  73. </div>
  74. <?php } ?>
  75. </main>
  76. <?php $class = isset($this->extension) ? ' active' : ''; ?>
  77. <aside id="slider" class="scrollbar-thin<?= $class ?>">
  78. <?php
  79. if (isset($this->extension)) {
  80. $this->renderHelper('extension/configure');
  81. }
  82. ?>
  83. </aside>
  84. <a href="#" id="close-slider" class="<?= $class ?>">
  85. <?= _i('close') ?>
  86. </a>