mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-12-29 11:50:48 +01:00
Merge branch 'develop' into feature/work-on-languages-workflow
Conflicts: classes/controller.php
This commit is contained in:
@@ -590,7 +590,7 @@ class Admin
|
||||
$name = $page->modular() ? str_replace('modular/', '', $data['type']) : $data['type'];
|
||||
$page->name($name . '.md');
|
||||
$page->header($header);
|
||||
$page->frontmatter(Yaml::dump((array)$page->header()));
|
||||
$page->frontmatter(Yaml::dump((array)$page->header(), 10, 2, false));
|
||||
} else {
|
||||
// Find out the type by looking at the parent.
|
||||
$type = $parent->childType() ? $parent->childType() : $parent->blueprints()->get('child_type',
|
||||
@@ -642,7 +642,14 @@ class Admin
|
||||
*/
|
||||
public static function route()
|
||||
{
|
||||
return dirname('/' . Grav::instance()['admin']->route);
|
||||
$pages = Grav::instance()['pages'];
|
||||
$route = '/' . ltrim(Grav::instance()['admin']->route, '/');
|
||||
|
||||
$page = $pages->dispatch($route);
|
||||
$parent = $page->parent();
|
||||
$parent_route = $parent->rawRoute();
|
||||
|
||||
return $parent_route;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -267,6 +267,7 @@ en:
|
||||
DISABLED: Disabled
|
||||
ITEMS: Items
|
||||
ORDER_BY: Order By
|
||||
ORDER: Order
|
||||
FOLDER: Folder
|
||||
TITLE: Title
|
||||
DATE: Date
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{% if field.form %}form="{{ field.form }}"{% endif %}
|
||||
>
|
||||
{% for key, text in field.options %}
|
||||
<option {% if key == value or text in value %}selected="selected"{% endif %} value="{{ field.multiple ? text : key }}">{{ text|tu }}</option>
|
||||
<option {% if key == value %}selected="selected"{% endif %} value="{{ field.multiple ? text : key }}">{{ text|tu }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user