From 9acde18d76e545b27b5fce1e1009de2b9b808652 Mon Sep 17 00:00:00 2001 From: Sommerregen Date: Fri, 7 Aug 2015 20:32:58 +0200 Subject: [PATCH] Fixes #30 --- admin.php | 2 +- pages/admin/logout.md | 14 ++++++++++++++ themes/grav/templates/logout.html.twig | 17 +++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 pages/admin/logout.md create mode 100644 themes/grav/templates/logout.html.twig diff --git a/admin.php b/admin.php index f6a22abb5..7c16febb4 100644 --- a/admin.php +++ b/admin.php @@ -180,7 +180,7 @@ public function onPagesInitialized() // Replace page service with admin. $this->grav['page'] = function () use ($self) { $page = new Page; - $page->init(new \SplFileInfo(__DIR__ . "/pages/admin/{$self->template}.md")); + $page->init(new \SplFileInfo(str_ireplace('task:', '',__DIR__ . "/pages/admin/{$self->template}.md"))); $page->slug(basename($self->template)); return $page; }; diff --git a/pages/admin/logout.md b/pages/admin/logout.md new file mode 100644 index 000000000..371ebd8cc --- /dev/null +++ b/pages/admin/logout.md @@ -0,0 +1,14 @@ +--- +title: Dashboard Logout + +form: + fields: + - name: username + type: text + placeholder: Username + autofocus: true + + - name: password + type: password + placeholder: Password +--- diff --git a/themes/grav/templates/logout.html.twig b/themes/grav/templates/logout.html.twig new file mode 100644 index 000000000..38a935300 --- /dev/null +++ b/themes/grav/templates/logout.html.twig @@ -0,0 +1,17 @@ +{% extends 'partials/base.html.twig' %} + +{% block head %} + {{ parent() }} + +{% endblock %} + +{% block page %} +
+

+ {{ title }} +

+ +
{{ 'LOGGED_OUT'|t }}
+ {% include 'partials/messages.html.twig' %} +
+{% endblock %}