summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/config/about.php3
-rw-r--r--app/Template/config/upload_db.php18
2 files changed, 21 insertions, 0 deletions
diff --git a/app/Template/config/about.php b/app/Template/config/about.php
index 3f078c3d..23a3e6c0 100644
--- a/app/Template/config/about.php
+++ b/app/Template/config/about.php
@@ -69,6 +69,9 @@
<?= t('(Gzip compressed Sqlite file)') ?>
</li>
<li>
+ <?= $this->url->link(t('Upload the database'), 'ConfigController', 'uploadDb', array(), false, 'js-modal-medium') ?>
+ </li>
+ <li>
<?= $this->url->link(t('Optimize the database'), 'ConfigController', 'optimizeDb', array(), true) ?>&nbsp;
<?= t('(VACUUM command)') ?>
</li>
diff --git a/app/Template/config/upload_db.php b/app/Template/config/upload_db.php
new file mode 100644
index 00000000..4d02c9a8
--- /dev/null
+++ b/app/Template/config/upload_db.php
@@ -0,0 +1,18 @@
+<div class="page-header">
+ <h2><?= t('Upload the Sqlite database') ?></h2>
+</div>
+
+<div class="alert">
+ <ul>
+ <li><?= t('You can upload Gzip compressed Sqlite database you previously downloaded') ?></li>
+ </ul>
+</div>
+
+<form action="<?= $this->url->href('ConfigController', 'uploadDbSave') ?>" method="post" enctype="multipart/form-data">
+ <?= $this->form->csrf() ?>
+
+ <?= $this->form->label(t('Database file'), 'file') ?>
+ <?= $this->form->file('file') ?>
+
+ <?= $this->modal->submitButtons(array('submitLabel' => t('Upload'))) ?>
+</form>