Skip to content

Commit

Permalink
Fixes getgrav#30
Browse files Browse the repository at this point in the history
  • Loading branch information
Sommerregen committed Aug 7, 2015
1 parent fc5837b commit 9acde18
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
14 changes: 14 additions & 0 deletions pages/admin/logout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Dashboard Logout

form:
fields:
- name: username
type: text
placeholder: Username
autofocus: true

- name: password
type: password
placeholder: Password
---
17 changes: 17 additions & 0 deletions themes/grav/templates/logout.html.twig
Original file line number Diff line number Diff line change
@@ -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 %}

0 comments on commit 9acde18

Please sign in to comment.