mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-07-13 16:23:22 +02:00
Fix site title issue when installing a theme/plugin, title was "Plugin: | Grav" or "Theme: | Grav"
This commit is contained in:
@@ -5,19 +5,21 @@
|
||||
{% if plugin_slug %}
|
||||
{% set installing = plugin_slug starts with 'install' %}
|
||||
|
||||
{# Try installed packages first, then remote #}
|
||||
{% set package = admin.plugins(true)[plugin_slug] %}
|
||||
{% if (not package) %}
|
||||
{# Remote #}
|
||||
{% set package = admin.plugins(false)[plugin_slug] %}
|
||||
{% set installed = false %}
|
||||
{% if installing %}
|
||||
{% set title = "PLUGIN_ADMIN.PLUGINS"|tu %}
|
||||
{% else %}
|
||||
{# Local #}
|
||||
{% set installed = true %}
|
||||
{% endif %}
|
||||
|
||||
{% set plugin = package.toArray() %}
|
||||
{% set title = "PLUGIN_ADMIN.PLUGIN"|tu ~ ": " ~ plugin.name|e %}
|
||||
{# Try installed packages first, then remote #}
|
||||
{% set package = admin.plugins(true)[admin.route] %}
|
||||
{% if (not package) %}
|
||||
{% set package = admin.plugins(false)[admin.route] %}
|
||||
{% set installed = false %}
|
||||
{% endif %}
|
||||
|
||||
{% set plugin = package.toArray() %}
|
||||
{% set title = "PLUGIN_ADMIN.PLUGIN"|tu ~ ": " ~ plugin.name|e %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% set title = "PLUGIN_ADMIN.PLUGINS"|tu %}
|
||||
{% endif %}
|
||||
|
||||
@@ -2,17 +2,22 @@
|
||||
|
||||
{% if admin.route %}
|
||||
{% set installing = admin.route starts with 'install' %}
|
||||
{% set installed = true %}
|
||||
|
||||
{# Try installed packages first, then remote #}
|
||||
{% set package = admin.themes(true)[admin.route] %}
|
||||
{% if (not package) %}
|
||||
{% set package = admin.themes(false)[admin.route] %}
|
||||
{% set installed = false %}
|
||||
{% if installing %}
|
||||
{% set title = "PLUGIN_ADMIN.THEMES"|tu %}
|
||||
{% else %}
|
||||
{% set installed = true %}
|
||||
|
||||
{# Try installed packages first, then remote #}
|
||||
{% set package = admin.themes(true)[admin.route] %}
|
||||
{% if (not package) %}
|
||||
{% set package = admin.themes(false)[admin.route] %}
|
||||
{% set installed = false %}
|
||||
{% endif %}
|
||||
|
||||
{% set theme = package.toArray() %}
|
||||
{% set title = "PLUGIN_ADMIN.THEME"|tu ~ ": " ~ theme.name|e %}
|
||||
{% endif %}
|
||||
|
||||
{% set theme = package.toArray() %}
|
||||
{% set title = "PLUGIN_ADMIN.THEME"|tu ~ ": " ~ theme.name|e %}
|
||||
{% else %}
|
||||
{% set title = "PLUGIN_ADMIN.THEMES"|tu %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user