index.phtml 2.6 KB

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