index.phtml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. /** @var FreshRSS_View $this */
  3. $this->partial('aside_subscription');
  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('sub.menu.import_export') ?></h1>
  10. <h2><?= _t('sub.category.dynamic_opml') ?></h2>
  11. <div class="form-group form-actions">
  12. <div class="group-controls">
  13. <ul>
  14. <li><a href="<?= _url('subscription', 'add') ?>"><?= _t('sub.title.add_dynamic_opml') ?> <?= _i('opml-dyn') ?></a></li>
  15. </ul>
  16. </div>
  17. </div>
  18. <h2><?= _t('sub.import_export.import') ?></h2>
  19. <form method="post" action="<?= _url('importExport', 'import') ?>" enctype="multipart/form-data">
  20. <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
  21. <div class="form-group">
  22. <label class="group-name" for="file">
  23. <?= extension_loaded('zip') ? _t('sub.import_export.file_to_import') : _t('sub.import_export.file_to_import_no_zip') ?>
  24. </label>
  25. <div class="group-controls">
  26. <input type="file" name="file" id="file" />
  27. </div>
  28. </div>
  29. <div class="form-group form-actions">
  30. <div class="group-controls">
  31. <button type="submit" class="btn btn-important"><?= _t('gen.action.import') ?></button>
  32. </div>
  33. </div>
  34. </form>
  35. <h2><?= _t('sub.import_export.export') ?></h2>
  36. <?php if (count($this->feeds) > 0) { ?>
  37. <form method="post" action="<?= _url('importExport', 'export') ?>">
  38. <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
  39. <div class="form-group">
  40. <div class="group-controls">
  41. <label class="checkbox" for="export_opml">
  42. <input type="checkbox" name="export_opml" id="export_opml" value="1" checked="checked" />
  43. <?= _t('sub.import_export.export_opml') ?>
  44. </label>
  45. <label class="checkbox" for="export_labelled">
  46. <input type="checkbox" name="export_labelled" id="export_labelled" value="1" <?= extension_loaded('zip') ? 'checked="checked"' : '' ?> />
  47. <?= _t('sub.import_export.export_labelled') ?>
  48. </label>
  49. <label class="checkbox" for="export_starred">
  50. <input type="checkbox" name="export_starred" id="export_starred" value="1" <?= extension_loaded('zip') ? 'checked="checked"' : '' ?> />
  51. <?= _t('sub.import_export.export_starred') ?>
  52. </label>
  53. <?php
  54. $select_args = '';
  55. if (extension_loaded('zip')) {
  56. $select_args = ' size="' . min(10, count($this->feeds)) .'" multiple="multiple"';
  57. }
  58. ?>
  59. <select name="export_feeds[]"<?= $select_args ?> size="10">
  60. <?= extension_loaded('zip') ? '' : '<option></option>' ?>
  61. <?php foreach ($this->feeds as $feed) { ?>
  62. <option value="<?= $feed->id() ?>"><?= $feed->name() ?></option>
  63. <?php } ?>
  64. </select>
  65. </div>
  66. </div>
  67. <div class="form-group form-actions">
  68. <div class="group-controls">
  69. <button type="submit" class="btn btn-important"><?= _t('gen.action.export') ?></button>
  70. </div>
  71. </div>
  72. </form>
  73. <?php } ?>
  74. </main>