added messages to dashboard in proper place

This commit is contained in:
Andy Miller
2015-07-28 16:10:48 -06:00
parent d13da2a820
commit 47c2723827
8 changed files with 14 additions and 6 deletions

View File

@@ -153,6 +153,10 @@ class Admin
/** @var Grav $grav */
$grav = $this->grav;
$l = $this->grav['language'];
$this->setMessage($l->translate('LOGIN_LOGGED_IN'), 'info');
// $redirect_route =$this->getLoginRedirect() ?: $this->uri->route();
$redirect_route = $this->uri->route();
$grav->redirect($redirect_route);

View File

@@ -123,7 +123,7 @@ class AdminController
$l = $this->grav['language'];
if ($this->admin->authenticate($this->post)) {
$this->admin->setMessage($l->translate('LOGIN_LOGGED_IN'), 'info');
// should never reach here, redirects first
} else {
$this->admin->setMessage($l->translate('LOGIN_FAILED'), 'error');
}

View File

@@ -4,7 +4,7 @@ en:
LOGIN_BTN_FORGOT: Forgot
LOGIN_BTN_RESET: Reset Password
LOGIN_BTN_SEND_INSTRUCTIONS: Send Reset Instructions
LOGIN_LOGGED_IN: You have been logged in
LOGIN_LOGGED_IN: You have been successfully logged in
LOGIN_FAILED: Login failed
LOGGED_OUT: You have been logged out
RESET_LINK_EXPIRED: Reset link has expired, please try again

View File

@@ -912,7 +912,7 @@ tr {
padding: 0 3rem; }
#admin-main .titlebar .button-bar {
padding: 0; }
#admin-main .admin-block .grav-update {
#admin-main .admin-block .grav-update, #admin-main .admin-block .alert {
margin-top: -2rem;
margin-bottom: 2rem; }
#admin-main .grav-update {

File diff suppressed because one or more lines are too long

View File

@@ -195,7 +195,7 @@ $update-height: 3rem;
}
}
.admin-block .grav-update {
.admin-block .grav-update, .admin-block .alert {
margin-top: -2rem;
margin-bottom: 2rem;
}

View File

@@ -7,6 +7,8 @@
<h1><i class="fa fa-fw fa-th"></i> Dashboard</h1>
{% endblock %}
{% block messages %}{% endblock %}
{% block content_top %}
{% set gpm = admin.gpm() %}
@@ -105,10 +107,10 @@
</div>
</div>
</div>
{% endblock %}
{% block content %}
{% include 'partials/messages.html.twig' %}
<div id="latest">
<div class="button-bar">
<a class="button" href="{{ uri.route(true) }}/pages"><i class="fa fa-fw fa-file-text-o"></i>Manage Pages</a>

View File

@@ -80,7 +80,9 @@
<div class="content-padding">
<div>
{% block messages %}
{% include 'partials/messages.html.twig' %}
{% endblock %}
{% block content_top %}{% endblock %}
<div class="admin-block default-box-shadow">
{% block content %}{% endblock %}