index.phtml 2.7 KB

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