@@ -10,26 +10,26 @@ discard block |
||
| 10 | 10 | { |
| 11 | 11 | public function register() |
| 12 | 12 | { |
| 13 | - Menu::macro('back', function () { |
|
| 13 | + Menu::macro('back', function() { |
|
| 14 | 14 | return Menu::new() |
| 15 | 15 | ->setActiveClass('-active') |
| 16 | 16 | ->setActiveFromRequest('/blender'); |
| 17 | 17 | }); |
| 18 | 18 | |
| 19 | - Menu::macro('moduleGroup', function ($title) { |
|
| 19 | + Menu::macro('moduleGroup', function($title) { |
|
| 20 | 20 | return Menu::back() |
| 21 | 21 | ->addParentClass('menu__group') |
| 22 | 22 | ->setParentAttribute('data-menu-group', fragment("back.nav.{$title}")) |
| 23 | - ->registerFilter(function (Link $link) { |
|
| 23 | + ->registerFilter(function(Link $link) { |
|
| 24 | 24 | $link->addParentClass('menu__group__item'); |
| 25 | 25 | }); |
| 26 | 26 | }); |
| 27 | 27 | |
| 28 | - Menu::macro('module', function (string $action, string $name) { |
|
| 28 | + Menu::macro('module', function(string $action, string $name) { |
|
| 29 | 29 | return $this->action("Back\\{$action}", fragment("back.{$name}")); |
| 30 | 30 | }); |
| 31 | 31 | |
| 32 | - Menu::macro('backMain', function () { |
|
| 32 | + Menu::macro('backMain', function() { |
|
| 33 | 33 | return Menu::back() |
| 34 | 34 | ->addClass('menu__groups') |
| 35 | 35 | ->setAttribute('data-menu-groups') |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | ->module('StatisticsController@index', 'statistics.menuTitle')); |
| 51 | 51 | }); |
| 52 | 52 | |
| 53 | - Menu::macro('backUser', function () { |
|
| 53 | + Menu::macro('backUser', function() { |
|
| 54 | 54 | |
| 55 | 55 | $avatar = Html::avatar(current_user(), '-small'). |
| 56 | 56 | el('span.:response-desktop-only', current_user()->email); |
@@ -60,9 +60,9 @@ discard block |
||
| 60 | 60 | ->html(view('back.auth._partials.logoutForm')); |
| 61 | 61 | }); |
| 62 | 62 | |
| 63 | - Menu::macro('breadcrumbs', function (array $breadcrumbs) { |
|
| 64 | - return Menu::build($breadcrumbs, function (Menu $menu, $actionWithParameters, $label) { |
|
| 65 | - if (! is_array($actionWithParameters)) { |
|
| 63 | + Menu::macro('breadcrumbs', function(array $breadcrumbs) { |
|
| 64 | + return Menu::build($breadcrumbs, function(Menu $menu, $actionWithParameters, $label) { |
|
| 65 | + if (!is_array($actionWithParameters)) { |
|
| 66 | 66 | $actionWithParameters = [$actionWithParameters]; |
| 67 | 67 | } |
| 68 | 68 | |
@@ -36,11 +36,11 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | protected function registerFragmentBreadcrumbs() |
| 38 | 38 | { |
| 39 | - BreadCrumbsManager::register('fragmentsBack', function ($breadcrumbs) { |
|
| 39 | + BreadCrumbsManager::register('fragmentsBack', function($breadcrumbs) { |
|
| 40 | 40 | $breadcrumbs->push(fragment('back.fragments.title'), action('Back\FragmentsController@index')); |
| 41 | 41 | }); |
| 42 | 42 | |
| 43 | - BreadCrumbsManager::register('fragmentsDetailBack', function ($breadcrumbs, $string) { |
|
| 43 | + BreadCrumbsManager::register('fragmentsDetailBack', function($breadcrumbs, $string) { |
|
| 44 | 44 | $breadcrumbs->parent('fragmentsBack'); |
| 45 | 45 | $breadcrumbs->push($string->name, action('Back\FragmentsController@edit', $string->id)); |
| 46 | 46 | }); |
@@ -48,30 +48,30 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | protected function registerUserBreadcrumbs() |
| 50 | 50 | { |
| 51 | - BreadCrumbsManager::register('administratorsListBack', function ($breadcrumbs) { |
|
| 51 | + BreadCrumbsManager::register('administratorsListBack', function($breadcrumbs) { |
|
| 52 | 52 | $breadcrumbs->push(fragment('back.administrators.title'), action('Back\AdministratorsController@index')); |
| 53 | 53 | }); |
| 54 | 54 | |
| 55 | - BreadCrumbsManager::register('administratorsCreateBack', function ($breadcrumbs) { |
|
| 55 | + BreadCrumbsManager::register('administratorsCreateBack', function($breadcrumbs) { |
|
| 56 | 56 | $breadcrumbs->parent('administratorsListBack'); |
| 57 | 57 | $breadcrumbs->push(fragment('back.administrators.new'), action('Back\AdministratorsController@create')); |
| 58 | 58 | }); |
| 59 | 59 | |
| 60 | - BreadCrumbsManager::register('administratorsEditBack', function ($breadcrumbs, $user) { |
|
| 60 | + BreadCrumbsManager::register('administratorsEditBack', function($breadcrumbs, $user) { |
|
| 61 | 61 | $breadcrumbs->parent('administratorsListBack', $user); |
| 62 | 62 | $breadcrumbs->push($user->name, action('Back\AdministratorsController@edit', $user->id)); |
| 63 | 63 | }); |
| 64 | 64 | |
| 65 | - BreadCrumbsManager::register('membersListBack', function ($breadcrumbs) { |
|
| 65 | + BreadCrumbsManager::register('membersListBack', function($breadcrumbs) { |
|
| 66 | 66 | $breadcrumbs->push(fragment('back.members.title'), action('Back\MembersController@index')); |
| 67 | 67 | }); |
| 68 | 68 | |
| 69 | - BreadCrumbsManager::register('membersNewBack', function ($breadcrumbs) { |
|
| 69 | + BreadCrumbsManager::register('membersNewBack', function($breadcrumbs) { |
|
| 70 | 70 | $breadcrumbs->parent('membersListBack'); |
| 71 | 71 | $breadcrumbs->push(fragment('back.members.new'), action('Back\MembersController@create')); |
| 72 | 72 | }); |
| 73 | 73 | |
| 74 | - BreadCrumbsManager::register('membersEditBack', function ($breadcrumbs, $user) { |
|
| 74 | + BreadCrumbsManager::register('membersEditBack', function($breadcrumbs, $user) { |
|
| 75 | 75 | $breadcrumbs->parent('membersListBack', $user); |
| 76 | 76 | $breadcrumbs->push($user->name, action('Back\MembersController@edit', $user->id)); |
| 77 | 77 | }); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | BreadCrumbsManager::register( |
| 85 | 85 | "{$name}ListBack", |
| 86 | - function ($breadcrumbs) use ($name, $controller) { |
|
| 86 | + function($breadcrumbs) use ($name, $controller) { |
|
| 87 | 87 | $breadcrumbs->push( |
| 88 | 88 | fragment("back.{$name}.title"), |
| 89 | 89 | action("{$controller}@index") |
@@ -93,12 +93,11 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | BreadCrumbsManager::register( |
| 95 | 95 | "{$name}Back", |
| 96 | - function ($breadcrumbs, $model) use ($name, $controller) { |
|
| 96 | + function($breadcrumbs, $model) use ($name, $controller) { |
|
| 97 | 97 | $breadcrumbs->parent("{$name}ListBack"); |
| 98 | 98 | |
| 99 | 99 | $breadcrumbs->push( |
| 100 | - $model->isDraft() ? fragment("back.{$name}.new") : |
|
| 101 | - (isset($model->name) ? $model->name : ucfirst(fragment('back.change'))), |
|
| 100 | + $model->isDraft() ? fragment("back.{$name}.new") : (isset($model->name) ? $model->name : ucfirst(fragment('back.change'))), |
|
| 102 | 101 | action("{$controller}@index") |
| 103 | 102 | ); |
| 104 | 103 | } |