Merge branch 'develop' into feature/work-on-languages-workflow

Conflicts:
	classes/controller.php
This commit is contained in:
Andy Miller
2015-08-20 18:15:09 -06:00
3 changed files with 11 additions and 3 deletions

View File

@@ -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;
}
/**

View File

@@ -267,6 +267,7 @@ en:
DISABLED: Disabled
ITEMS: Items
ORDER_BY: Order By
ORDER: Order
FOLDER: Folder
TITLE: Title
DATE: Date

View File

@@ -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>