This commit is contained in:
Sommerregen
2015-08-07 20:32:58 +02:00
parent 2bd83fb22f
commit 5a7c07dd89
3 changed files with 32 additions and 1 deletions

View File

@@ -180,7 +180,7 @@ class AdminPlugin extends Plugin
// Replace page service with admin. // Replace page service with admin.
$this->grav['page'] = function () use ($self) { $this->grav['page'] = function () use ($self) {
$page = new Page; $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)); $page->slug(basename($self->template));
return $page; return $page;
}; };

14
pages/admin/logout.md Normal file
View File

@@ -0,0 +1,14 @@
---
title: Dashboard Logout
form:
fields:
- name: username
type: text
placeholder: Username
autofocus: true
- name: password
type: password
placeholder: Password
---

View File

@@ -0,0 +1,17 @@
{% extends 'partials/base.html.twig' %}
{% block head %}
{{ parent() }}
<meta http-equiv="refresh" content="5; URL={{ base_url_relative }}">
{% endblock %}
{% block page %}
<section id="admin-login" class="default-glow-shadow">
<h1>
{{ title }}
</h1>
<div class="info alert">{{ 'LOGGED_OUT'|t }}</div>
{% include 'partials/messages.html.twig' %}
</section>
{% endblock %}