aboutsummaryrefslogtreecommitdiff
path: root/templates/gui-database.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2014-10-14 23:24:40 +0200
committerChristian Weiske <cweiske@cweiske.de>2014-10-14 23:24:40 +0200
commit6c8ad60e9888fa5625dad2460ca073f93ac1ae0d (patch)
treeb68bddc4eed7071b62ca3c88e5820b9247290079 /templates/gui-database.php
parent2cb2fae10d986db73bb0ad517df8c5334cab713c (diff)
downloadgrauphel-6c8ad60e9888fa5625dad2460ca073f93ac1ae0d.tar.gz
grauphel-6c8ad60e9888fa5625dad2460ca073f93ac1ae0d.zip
Add database management page
Diffstat (limited to 'templates/gui-database.php')
-rw-r--r--templates/gui-database.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/templates/gui-database.php b/templates/gui-database.php
new file mode 100644
index 0000000..6fc057a
--- /dev/null
+++ b/templates/gui-database.php
@@ -0,0 +1,40 @@
+<link rel="stylesheet" href="<?php p(OCP\Util::linkTo('grauphel','grauphel.css')); ?>" type="text/css"/>
+
+<?php /** @var $l OC_L10N */ ?>
+<?php $_['appNavigation']->printPage(); ?>
+
+<script type="text/javascript" src="<?php p(OCP\Util::linkTo('grauphel','js/grauphel.js')); ?>"></script>
+
+<div id="app-content" class="content">
+ <h1>Manage database</h1>
+ <p>
+ In case something went seriously wrong during synchronization, you may reset your
+ database.
+ It will delete all your notes and the synchronization status - as if you
+ never synced to this server before.
+ </p>
+
+ <?php isset($_['stats']) && $_['stats']->printPage(); ?>
+
+ <h2>Reset database</h2>
+ <?php if ($_['reset'] === true) { ?>
+ <p class="success">
+ Database has been reset!
+ </p>
+ <?php } else if ($_['reset'] === false) { ?>
+ <p class="error">
+ Database has <b>not</b> been reset!
+ </p>
+ <?php } ?>
+
+ <p>
+ To reset the database, enter your user name and click "reset database":
+ </p>
+ <form method="POST" action="<?php p(OCP\Util::linkToRoute('grauphel.gui.databaseReset')); ?>">
+ <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>"/>
+ <p>
+ <label>Username: <input type="text" name="username" value="" autocomplete="off" /></label>
+ <button type="submit">Reset database</button>
+ </p>
+ </form>
+</div>