mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-03 20:05:53 +01:00
added messages to dashboard in proper place
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -195,7 +195,7 @@ $update-height: 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.admin-block .grav-update {
|
||||
.admin-block .grav-update, .admin-block .alert {
|
||||
margin-top: -2rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user