1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-18 10:51:21 +02:00

feat(admin-plugin): update navigation state in all controllers #211

This commit is contained in:
Awilum
2020-01-31 21:38:20 +03:00
parent 63d8bd36bc
commit d8e7ce5798
7 changed files with 16 additions and 22 deletions

View File

@@ -84,8 +84,7 @@ class ApiController extends Controller
'buttons' => [
'api_tokens_add' => [
'link' => $this->router->pathFor('admin.api_tokens.add') . '?api=' . $api,
'title' => __('admin_create_new_' . $api . '_token'),
'attributes' => ['class' => 'navigation-top-primary__item'],
'title' => __('admin_create_new_' . $api . '_token')
],
],
]

View File

@@ -361,7 +361,7 @@ class EntriesController extends Controller
'entries_type' => [
'link' => $this->router->pathFor('admin.entries.type') . '?id=' . $this->getEntryID($query),
'title' => __('admin_type'),
'attributes' => ['class' => 'btn active']
'active' => true
]
]
]
@@ -467,7 +467,7 @@ class EntriesController extends Controller
'entries_move' => [
'link' => $this->router->pathFor('admin.entries.move'),
'title' => __('admin_move'),
'attributes' => ['class' => 'btn active']
'active' => true
]
]
]
@@ -544,7 +544,7 @@ class EntriesController extends Controller
'entries_type' => [
'link' => $this->router->pathFor('admin.entries.rename') . '?id=' . $this->getEntryID($query),
'title' => __('admin_rename'),
'attributes' => ['class' => 'btn active']
'active' => true
]
]
]
@@ -691,14 +691,14 @@ class EntriesController extends Controller
'edit_entry_source' => [
'link' => $this->router->pathFor('admin.entries.edit') . '?id=' . $this->getEntryID($query) . '&type=source',
'title' => __('admin_source'),
'attributes' => ['class' => 'btn active']
'active' => true
],
],
'buttons' => [
'save_entry' => [
'link' => 'javascript:;',
'title' => __('admin_save'),
'attributes' => ['class' => 'js-save-form-submit btn']
'type' => 'action'
],
]
]
@@ -733,7 +733,6 @@ class EntriesController extends Controller
'edit_entry_source' => [
'link' => $this->router->pathFor('admin.entries.edit') . '?id=' . $this->getEntryID($query) . '&type=source',
'title' => __('admin_source'),
],
]
]
@@ -759,30 +758,27 @@ class EntriesController extends Controller
'links' => [
'entries' => [
'link' => $this->router->pathFor('admin.entries.index') . '?id=' . implode('/', array_slice(explode("/", $this->getEntryID($query)), 0, -1)),
'title' => __('admin_entries'),
'title' => __('admin_entries')
],
'edit_entry' => [
'link' => $this->router->pathFor('admin.entries.edit') . '?id=' . $this->getEntryID($query) . '&type=editor',
'title' => __('admin_editor'),
'attributes' => ['class' => 'btn active']
'active' => true
],
'edit_entry_media' => [
'link' => $this->router->pathFor('admin.entries.edit') . '?id=' . $this->getEntryID($query) . '&type=media',
'title' => __('admin_media'),
'title' => __('admin_media')
],
'edit_entry_source' => [
'link' => $this->router->pathFor('admin.entries.edit') . '?id=' . $this->getEntryID($query) . '&type=source',
'title' => __('admin_source'),
'title' => __('admin_source')
],
],
'buttons' => [
'save_entry' => [
'link' => 'javascript:;',
'title' => __('admin_save'),
'attributes' => ['class' => 'js-save-form-submit btn']
'type' => 'action'
],
]
]

View File

@@ -109,7 +109,7 @@ class SettingsController extends Controller
'save' => [
'link' => 'javascript:;',
'title' => __('admin_save'),
'attributes' => ['class' => 'js-save-form-submit btn'],
'type' => 'action'
],
],
]

View File

@@ -138,7 +138,7 @@ class SnippetsController extends Controller
'save_snippet' => [
'link' => 'javascript:;',
'title' => __('admin_save'),
'attributes' => ['class' => 'js-save-form-submit btn'],
'type' => 'action',
],
],
]

View File

@@ -179,7 +179,7 @@ class TemplatesController extends Controller
'save_template' => [
'link' => 'javascript:;',
'title' => __('admin_save'),
'attributes' => ['class' => 'js-save-form-submit btn'],
'type' => 'action',
],
],
]

View File

@@ -48,7 +48,7 @@ class ThemesController extends Controller
'themes_get_more' => [
'link' => 'https://github.com/flextype/themes',
'title' => __('admin_get_more_themes'),
'attributes' => ['class' => 'btn', 'target' => '_blank'],
'target' => '_blank',
],
],
]
@@ -250,7 +250,7 @@ class ThemesController extends Controller
'save_theme_settings' => [
'link' => 'javascript:;',
'title' => __('admin_save'),
'attributes' => ['class' => 'js-save-form-submit btn'],
'type' => 'action',
],
],
]

View File

@@ -113,7 +113,6 @@ class ToolsController extends Controller
'id' => 'clear-cache-all',
'link' => $this->router->pathFor('admin.tools.clearCacheAllProcess'),
'title' => __('admin_clear_cache_all'),
],
],
]