diff options
| author | 2024-10-23 21:55:52 +0200 | |
|---|---|---|
| committer | 2024-10-23 21:55:52 +0200 | |
| commit | 7a5ce0fe20d63746b7f5b435ba5eef0a9b7db2d6 (patch) | |
| tree | 090cff8c9852ecc4636feaa1c5a75304c23fad27 /app/views/importExport/index.phtml | |
| parent | 60dd22d3b3916f5113954fc1472b1658c3c4245f (diff) | |
Web export SQLite (#6931)
* Web export SQLite
https://github.com/FreshRSS/FreshRSS/discussions/6930
* Implement download
* Fix operator precedence
* Set Last-Modified
* Sort by time, newest first
* Fix Last-Modified
* Use DateTimeInterface::RFC7231
* Add not_applicable message
Diffstat (limited to 'app/views/importExport/index.phtml')
| -rw-r--r-- | app/views/importExport/index.phtml | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/app/views/importExport/index.phtml b/app/views/importExport/index.phtml index dfcdc8404..1f32acfcb 100644 --- a/app/views/importExport/index.phtml +++ b/app/views/importExport/index.phtml @@ -65,7 +65,7 @@ $select_args = ' size="' . min(10, count($this->feeds)) . '" multiple="multiple"'; } ?> - <select name="export_feeds[]"<?= $select_args ?> size="10"> + <select name="export_feeds[]"<?= $select_args ?>> <?= extension_loaded('zip') ? '' : '<option></option>' ?> <?php foreach ($this->feeds as $feed) { ?> <option value="<?= $feed->id() ?>"><?= $feed->name() ?></option> @@ -81,4 +81,33 @@ </div> </form> <?php } ?> + + <h2><?= _t('sub.import_export.export.sqlite') ?></h2> + <?php if (count($this->sqliteArchives ?? []) === 0): ?> + <p class="alert alert-warn"> + <?= _t('gen.short.not_applicable') ?> + </p> + <?php else: ?> + <form method="post" action="<?= _url('importExport', 'sqlite') ?>"> + <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" /> + <div class="form-group"> + <div class="group-controls"> + <select name="sqlite"> + <?php foreach ($this->sqliteArchives ?? [] as $sqliteArchive): ?> + <option value="<?= htmlspecialchars($sqliteArchive['name'], ENT_COMPAT, 'UTF-8') ?>"> + <?= htmlspecialchars($sqliteArchive['name'], ENT_NOQUOTES, 'UTF-8') ?> + <small>(<?= format_bytes($sqliteArchive['size']) ?> ยท <?= date('c', $sqliteArchive['mtime']) ?>)</small> + </option> + <?php endforeach; ?> + </select> + </div> + </div> + + <div class="form-group form-actions"> + <div class="group-controls"> + <button type="submit" class="btn btn-important"><?= _t('gen.action.download') ?></button> + </div> + </div> + </form> + <?php endif; ?> </main> |
