diff --git a/appinfo/app.php b/appinfo/app.php
index cc76ce42..465cb990 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -12,10 +12,6 @@
*
*/
-
-// --- register settings -----------------------------------------------
-\OCP\App::registerAdmin('search_elastic', 'settings/admin');
-
$mode = \OC::$server->getConfig()->getAppValue('search_elastic', 'mode', 'active');
if ($mode === 'active') {
// --- add js & css -----------------------------------------------
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 9d2c447b..ebd9bf3f 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -6,7 +6,7 @@
Commercial
ownCloud Inc.
-
+
@@ -15,5 +15,8 @@
This app uses a separate elasticsearch cluster to enable
searching in content and meta data of files.
+
+ OCA\search_elastic\AdminPanel
+
diff --git a/lib/adminpanel.php b/lib/adminpanel.php
new file mode 100644
index 00000000..31cf87b5
--- /dev/null
+++ b/lib/adminpanel.php
@@ -0,0 +1,35 @@
+
+ * @copyright (C) 2017 ownCloud GmbH
+ *
+ * This code is covered by the ownCloud Commercial License.
+ *
+ * You should have received a copy of the ownCloud Commercial License
+ * along with this program. If not, see .
+ *
+ */
+
+namespace OCA\search_elastic;
+
+use OCP\Settings\ISettings;
+
+class AdminPanel implements ISettings {
+
+ public function getPanel() {
+ return new \OCP\Template('search_elastic', 'settings/admin');
+ }
+
+ public function getSectionID() {
+ return 'search';
+ }
+
+ public function getPriority() {
+ return 50;
+ }
+
+}
+
+
diff --git a/settings/admin.php b/settings/admin.php
deleted file mode 100644
index 5f939fd5..00000000
--- a/settings/admin.php
+++ /dev/null
@@ -1,22 +0,0 @@
-
- * @copyright (C) 2014-2016 ownCloud, Inc.
- *
- * This code is covered by the ownCloud Commercial License.
- *
- * You should have received a copy of the ownCloud Commercial License
- * along with this program. If not, see .
- *
- */
-
-\OC_Util::checkAdminUser();
-
-\OCP\Util::addStyle('search_elastic', 'settings/admin');
-\OCP\Util::addScript('search_elastic', 'settings/admin');
-
-$tmpl = new \OCP\Template('search_elastic', 'settings/admin');
-
-return $tmpl->fetchPage();
diff --git a/templates/settings/admin.php b/templates/settings/admin.php
index 09abf8ab..6f9c2d88 100644
--- a/templates/settings/admin.php
+++ b/templates/settings/admin.php
@@ -1,6 +1,10 @@
+
-
t('Elasticsearch'));?>
+
t('Elasticsearch'));?>