index.phtml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php $this->partial('aside_subscription'); ?>
  2. <div class="post ">
  3. <div class="link-back-wrapper">
  4. <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
  5. </div>
  6. <form method="post" action="<?= _url('importExport', 'import') ?>" enctype="multipart/form-data">
  7. <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
  8. <legend><?= _t('sub.import_export.import') ?></legend>
  9. <div class="form-group">
  10. <label class="group-name" for="file">
  11. <?= extension_loaded('zip') ? _t('sub.import_export.file_to_import') : _t('sub.import_export.file_to_import_no_zip') ?>
  12. </label>
  13. <div class="group-controls">
  14. <input type="file" name="file" id="file" />
  15. </div>
  16. </div>
  17. <div class="form-group form-actions">
  18. <div class="group-controls">
  19. <button type="submit" class="btn btn-important"><?= _t('gen.action.import') ?></button>
  20. </div>
  21. </div>
  22. </form>
  23. <?php if (count($this->feeds) > 0) { ?>
  24. <form method="post" action="<?= _url('importExport', 'export') ?>">
  25. <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
  26. <legend><?= _t('sub.import_export.export') ?></legend>
  27. <div class="form-group">
  28. <div class="group-controls">
  29. <label class="checkbox" for="export_opml">
  30. <input type="checkbox" name="export_opml" id="export_opml" value="1" checked="checked" />
  31. <?= _t('sub.import_export.export_opml') ?>
  32. </label>
  33. <label class="checkbox" for="export_labelled">
  34. <input type="checkbox" name="export_labelled" id="export_labelled" value="1" <?= extension_loaded('zip') ? 'checked="checked"' : '' ?> />
  35. <?= _t('sub.import_export.export_labelled') ?>
  36. </label>
  37. <label class="checkbox" for="export_starred">
  38. <input type="checkbox" name="export_starred" id="export_starred" value="1" <?= extension_loaded('zip') ? 'checked="checked"' : '' ?> />
  39. <?= _t('sub.import_export.export_starred') ?>
  40. </label>
  41. <?php
  42. $select_args = '';
  43. if (extension_loaded('zip')) {
  44. $select_args = ' size="' . min(10, count($this->feeds)) .'" multiple="multiple"';
  45. }
  46. ?>
  47. <select name="export_feeds[]"<?= $select_args ?> size="10">
  48. <?= extension_loaded('zip') ? '' : '<option></option>' ?>
  49. <?php foreach ($this->feeds as $feed) { ?>
  50. <option value="<?= $feed->id() ?>"><?= $feed->name() ?></option>
  51. <?php } ?>
  52. </select>
  53. </div>
  54. </div>
  55. <div class="form-group form-actions">
  56. <div class="group-controls">
  57. <button type="submit" class="btn btn-important"><?= _t('gen.action.export') ?></button>
  58. </div>
  59. </div>
  60. </form>
  61. <?php } ?>
  62. </div>