mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-15 09:46:06 +01:00
@@ -9,6 +9,7 @@ warnings:
|
|||||||
delete_page: true
|
delete_page: true
|
||||||
edit_mode: normal
|
edit_mode: normal
|
||||||
show_beta_msg: true
|
show_beta_msg: true
|
||||||
|
google_fonts: true
|
||||||
enable_auto_updates_check: true
|
enable_auto_updates_check: true
|
||||||
popularity:
|
popularity:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
@@ -57,6 +57,18 @@ form:
|
|||||||
expert: Expert
|
expert: Expert
|
||||||
help: Auto will use blueprint if available, if none found, it will use "Expert" mode.
|
help: Auto will use blueprint if available, if none found, it will use "Expert" mode.
|
||||||
|
|
||||||
|
google_fonts:
|
||||||
|
type: toggle
|
||||||
|
label: Use Google Fonts
|
||||||
|
highlight: 1
|
||||||
|
default: 1
|
||||||
|
options:
|
||||||
|
1: Enabled
|
||||||
|
0: Disabled
|
||||||
|
validate:
|
||||||
|
type: bool
|
||||||
|
help: Use Google custom fonts. Disable this to use Helvetica. Useful when using Cyrillic and other languages with unsupported characters.
|
||||||
|
|
||||||
show_beta_msg:
|
show_beta_msg:
|
||||||
type: toggle
|
type: toggle
|
||||||
label: Show Beta Message
|
label: Show Beta Message
|
||||||
|
|||||||
@@ -667,6 +667,11 @@ class AdminController
|
|||||||
|
|
||||||
$this->preparePage($page, true);
|
$this->preparePage($page, true);
|
||||||
$page->header();
|
$page->header();
|
||||||
|
|
||||||
|
// Add theme template paths to Twig loader
|
||||||
|
$template_paths = $this->grav['locator']->findResources('theme://templates');
|
||||||
|
$loader_chain = $this->grav['twig']->twig->getLoader()->addLoader(new \Twig_Loader_Filesystem($template_paths));
|
||||||
|
|
||||||
$html = $page->content();
|
$html = $page->content();
|
||||||
|
|
||||||
$this->admin->json_response = ['status' => 'success', 'message' => $html];
|
$this->admin->json_response = ['status' => 'success', 'message' => $html];
|
||||||
@@ -993,7 +998,8 @@ class AdminController
|
|||||||
$obj->language($this->grav['session']->admin_lang);
|
$obj->language($this->grav['session']->admin_lang);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->setRedirect(($multilang ? ('/' . $obj->language()) : '') . '/admin/' . $this->view . $obj->route());
|
|
||||||
|
$this->setRedirect('/' . ($multilang ? ($obj->language()) : '') . $this->grav['uri']->route());
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -1180,9 +1186,9 @@ class AdminController
|
|||||||
|
|
||||||
$this->admin->setMessage($this->admin->translate('PLUGIN_ADMIN.SUCCESSFULLY_SWITCHED_LANGUAGE'), 'info');
|
$this->admin->setMessage($this->admin->translate('PLUGIN_ADMIN.SUCCESSFULLY_SWITCHED_LANGUAGE'), 'info');
|
||||||
|
|
||||||
$this->setRedirect('/' . $language .'/admin/' . $redirect);
|
$admin_route = $this->grav['config']->get('plugins.admin.route');
|
||||||
|
$this->setRedirect('/' . $language . $admin_route . '/' . $redirect);
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -434,6 +434,7 @@ en:
|
|||||||
OVERRIDE_LOCALE_HELP: Override the locale setting in PHP based on the current language
|
OVERRIDE_LOCALE_HELP: Override the locale setting in PHP based on the current language
|
||||||
REDIRECT: Page redirect
|
REDIRECT: Page redirect
|
||||||
REDIRECT_HELP: Enter a page route or external URL for this page to redirect to. e.g. `/some/route` or `http://somesite.com`
|
REDIRECT_HELP: Enter a page route or external URL for this page to redirect to. e.g. `/some/route` or `http://somesite.com`
|
||||||
|
PLUGIN_STATUS: Plugin status
|
||||||
es:
|
es:
|
||||||
PLUGIN_ADMIN:
|
PLUGIN_ADMIN:
|
||||||
ADMIN_BETA_MSG: ¡Está es una versión Beta! Utilízala bajo tu propio riesgo...
|
ADMIN_BETA_MSG: ¡Está es una versión Beta! Utilízala bajo tu propio riesgo...
|
||||||
@@ -857,6 +858,7 @@ es:
|
|||||||
NO_USER_ACCOUNTS: No se encuentraron cuentas de usuario, por favor crear una...
|
NO_USER_ACCOUNTS: No se encuentraron cuentas de usuario, por favor crear una...
|
||||||
REDIRECT_TRAILING_SLASH: Redirigir barra final
|
REDIRECT_TRAILING_SLASH: Redirigir barra final
|
||||||
REDIRECT_TRAILING_SLASH_HELP: Realice una redirección 301 en lugar de manejo transparente barra final
|
REDIRECT_TRAILING_SLASH_HELP: Realice una redirección 301 en lugar de manejo transparente barra final
|
||||||
|
PLUGIN_STATUS: Estado plugin
|
||||||
|
|
||||||
it:
|
it:
|
||||||
PLUGIN_ADMIN:
|
PLUGIN_ADMIN:
|
||||||
@@ -1289,6 +1291,7 @@ it:
|
|||||||
OVERRIDE_LOCALE_HELP: Sovrascrivi l'impostazione locale in PHP basato sulla tua lingua corrente
|
OVERRIDE_LOCALE_HELP: Sovrascrivi l'impostazione locale in PHP basato sulla tua lingua corrente
|
||||||
REDIRECT: Pagina di reindirizzamento
|
REDIRECT: Pagina di reindirizzamento
|
||||||
REDIRECT_HELP: Inserisci la route alla pagina oppure un URL esterno per questa pagina. Esempio: `/some/route` or `http://somesite.com`
|
REDIRECT_HELP: Inserisci la route alla pagina oppure un URL esterno per questa pagina. Esempio: `/some/route` or `http://somesite.com`
|
||||||
|
PLUGIN_STATUS: Stato plugin
|
||||||
|
|
||||||
de:
|
de:
|
||||||
PLUGIN_ADMIN:
|
PLUGIN_ADMIN:
|
||||||
@@ -1706,6 +1709,7 @@ de:
|
|||||||
USERNAME_HELP: Username should be between 3 and 16 characters, including lowercase letters, numbers, underscores, and hyphens. Uppercase letters, spaces, and special characters are not allowed
|
USERNAME_HELP: Username should be between 3 and 16 characters, including lowercase letters, numbers, underscores, and hyphens. Uppercase letters, spaces, and special characters are not allowed
|
||||||
FULLY_UPDATED: Fully Updated
|
FULLY_UPDATED: Fully Updated
|
||||||
SAVE_LOCATION: Save location
|
SAVE_LOCATION: Save location
|
||||||
|
PLUGIN_STATUS: Plugin status
|
||||||
|
|
||||||
ja:
|
ja:
|
||||||
PLUGIN_ADMIN:
|
PLUGIN_ADMIN:
|
||||||
@@ -2143,6 +2147,7 @@ ja:
|
|||||||
OVERRIDE_LOCALE_HELP: 現在の言語設定でPHPのロケール設定を上書きします
|
OVERRIDE_LOCALE_HELP: 現在の言語設定でPHPのロケール設定を上書きします
|
||||||
REDIRECT: ページリダイレクト
|
REDIRECT: ページリダイレクト
|
||||||
REDIRECT_HELP: ページルート、もしくは外部URLを入力します。 例 `/some/route` or `http://somesite.com`
|
REDIRECT_HELP: ページルート、もしくは外部URLを入力します。 例 `/some/route` or `http://somesite.com`
|
||||||
|
PLUGIN_STATUS: プラグインの状態
|
||||||
|
|
||||||
ru:
|
ru:
|
||||||
PLUGIN_ADMIN:
|
PLUGIN_ADMIN:
|
||||||
@@ -2580,3 +2585,4 @@ ru:
|
|||||||
OVERRIDE_LOCALE_HELP: Переопределите языковой локали в PHP на основе текущего языка
|
OVERRIDE_LOCALE_HELP: Переопределите языковой локали в PHP на основе текущего языка
|
||||||
REDIRECT: Страница редиректа
|
REDIRECT: Страница редиректа
|
||||||
REDIRECT_HELP: Введите адрес страницы или внешний URL для страницы сайта, чтобы перенаправить например, '/some/route' или 'http://somesite.com'
|
REDIRECT_HELP: Введите адрес страницы или внешний URL для страницы сайта, чтобы перенаправить например, '/some/route' или 'http://somesite.com'
|
||||||
|
PLUGIN_STATUS: Статус плагина
|
||||||
@@ -160,6 +160,12 @@ h1, h2, h3, h4, h5, h6 {
|
|||||||
text-rendering: optimizeLegibility;
|
text-rendering: optimizeLegibility;
|
||||||
letter-spacing: -0px; }
|
letter-spacing: -0px; }
|
||||||
|
|
||||||
|
body.simple-fonts {
|
||||||
|
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important; }
|
||||||
|
body.simple-fonts h1, body.simple-fonts h2, body.simple-fonts h3, body.simple-fonts h4, body.simple-fonts h5, body.simple-fonts h6, body.simple-fonts #admin-menu li, body.simple-fonts .button, body.simple-fonts .tab-bar, body.simple-fonts .badge, body.simple-fonts #admin-main .grav-mdeditor-preview, body.simple-fonts .form .note,
|
||||||
|
body.simple-fonts .form-tabs, body.simple-fonts input, body.simple-fonts select, body.simple-fonts textarea, body.simple-fonts button, body.simple-fonts .selectize-input, body.simple-fonts .form-order-wrapper ul#ordering li {
|
||||||
|
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important; }
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 3.2rem; }
|
font-size: 3.2rem; }
|
||||||
@media only all and (max-width: 47.938em) {
|
@media only all and (max-width: 47.938em) {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -97,11 +97,13 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
ArrayField.prototype.remove = function(event) {
|
ArrayField.prototype.remove = function(event) {
|
||||||
if ($(event.target).closest('[data-grav-array-type="row"]').siblings().length == 0) {
|
var row = $(event.target).closest('[data-grav-array-type="row"]');
|
||||||
//disable for the last item
|
if (row.siblings().length == 0) {
|
||||||
|
//on the last item we just clear its values
|
||||||
|
row.find('input').val('');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$(event.target).closest('[data-grav-array-type="row"]').remove();
|
row.remove();
|
||||||
if (this.isValueOnly()) {
|
if (this.isValueOnly()) {
|
||||||
this.refreshAll();
|
this.refreshAll();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -230,8 +230,9 @@
|
|||||||
if (!$this.buttons[button]) return;
|
if (!$this.buttons[button]) return;
|
||||||
|
|
||||||
var title = $this.buttons[button].title ? $this.buttons[button].title : button;
|
var title = $this.buttons[button].title ? $this.buttons[button].title : button;
|
||||||
|
var buttonClass = $this.buttons[button].class ? 'class="' + $this.buttons[button].class + '"' : '';
|
||||||
|
|
||||||
bar.push('<li><a data-mdeditor-button="'+button+'" title="'+title+'" data-uk-tooltip>'+$this.buttons[button].label+'</a></li>');
|
bar.push('<li><a data-mdeditor-button="'+button+'" title="'+title+'" '+buttonClass+' data-uk-tooltip>'+$this.buttons[button].label+'</a></li>');
|
||||||
});
|
});
|
||||||
|
|
||||||
this.toolbar.html(bar.join('\n'));
|
this.toolbar.html(bar.join('\n'));
|
||||||
|
|||||||
@@ -12,6 +12,16 @@ h1, h2, h3, h4, h5, h6 {
|
|||||||
letter-spacing: -0px;
|
letter-spacing: -0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Simple fonts for Cyrillic and other fonts.
|
||||||
|
body.simple-fonts {
|
||||||
|
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6, #admin-menu li, .button, .tab-bar, .badge, #admin-main .grav-mdeditor-preview, .form .note,
|
||||||
|
.form-tabs, input, select, textarea, button, .selectize-input, .form-order-wrapper ul#ordering li {
|
||||||
|
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-size: $h1-font-size;
|
font-size: $h1-font-size;
|
||||||
@include breakpoint(mobile-only) {
|
@include breakpoint(mobile-only) {
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body {% if not config.plugins.admin.google_fonts %}class="simple-fonts"{% endif %}>
|
||||||
{% block page %}
|
{% block page %}
|
||||||
<div class="remodal-bg">
|
<div class="remodal-bg">
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
{% include 'partials/messages.html.twig' %}
|
{% include 'partials/messages.html.twig' %}
|
||||||
|
|
||||||
<form method="post" action="{{ uri.url }}">
|
<form method="post" action="{{ base_url_relative }}">
|
||||||
{% block form %}{% endblock %}
|
{% block form %}{% endblock %}
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user