@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | $search = \Apps\ActiveRecord\App::getItem('app', $controller); |
| 84 | 84 | |
| 85 | 85 | // check what we got |
| 86 | - if ($search === null || (int)$search->id < 1) { |
|
| 86 | + if ($search === null || (int) $search->id < 1) { |
|
| 87 | 87 | throw new NotFoundException('App is not founded'); |
| 88 | 88 | } |
| 89 | 89 | |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | $search = \Apps\ActiveRecord\App::where('sys_name', '=', $controllerName) |
| 116 | 116 | ->where('type', '=', 'app') |
| 117 | 117 | ->first(); |
| 118 | - if (!$search || (int)$search->id < 1) { |
|
| 118 | + if (!$search || (int) $search->id < 1) { |
|
| 119 | 119 | throw new ForbiddenException('App is not founded'); |
| 120 | 120 | } |
| 121 | 121 | |
@@ -37,9 +37,9 @@ discard block |
||
| 37 | 37 | if (Any::isArray($route)) { |
| 38 | 38 | foreach ($route as $source => $target) { |
| 39 | 39 | $alias->row([ |
| 40 | - ['text' => '<span class="badge badge-primary">' . $source . '</span> ' . |
|
| 41 | - '→ ' . |
|
| 42 | - '<span class="badge badge-secondary">' . $target . '</span>', 'html' => true], |
|
| 40 | + ['text' => '<span class="badge badge-primary">'.$source.'</span> '. |
|
| 41 | + '→ '. |
|
| 42 | + '<span class="badge badge-secondary">'.$target.'</span>', 'html' => true], |
|
| 43 | 43 | ['text' => $env], |
| 44 | 44 | ['text' => Url::a( |
| 45 | 45 | ['main/deleteroute', null, ['type' => 'Alias', 'loader' => $env, 'path' => $source]], |
@@ -71,9 +71,9 @@ discard block |
||
| 71 | 71 | if (Any::isArray($route)) { |
| 72 | 72 | foreach ($route as $source => $target) { |
| 73 | 73 | $dynamic->row([ |
| 74 | - ['text' => '<span class="badge badge-primary">' . $source . '</span> ' . |
|
| 75 | - '→ ' . |
|
| 76 | - '<span class="badge badge-secondary">' . $target . '</span>', 'html' => true], |
|
| 74 | + ['text' => '<span class="badge badge-primary">'.$source.'</span> '. |
|
| 75 | + '→ '. |
|
| 76 | + '<span class="badge badge-secondary">'.$target.'</span>', 'html' => true], |
|
| 77 | 77 | ['text' => $env], |
| 78 | 78 | ['text' => Url::a( |
| 79 | 79 | ['main/deleteroute', null, ['type' => 'Callback', 'loader' => $env, 'path' => $source]], |
@@ -92,6 +92,6 @@ discard block |
||
| 92 | 92 | </div> |
| 93 | 93 | <?php if (!$aliasExist && !$callbackExist): ?> |
| 94 | 94 | <p class="alert alert-warning"><?= __('Custom routes is not yet found') ?></p> |
| 95 | -<?php endif ;?> |
|
| 96 | -<?= Url::a(['main/addroute'], '<i class="fa fa-plus"></i> ' . __('New route'), ['class' => 'btn btn-primary', 'html' => true]) ?> |
|
| 95 | +<?php endif; ?> |
|
| 96 | +<?= Url::a(['main/addroute'], '<i class="fa fa-plus"></i> '.__('New route'), ['class' => 'btn btn-primary', 'html' => true]) ?> |
|
| 97 | 97 | <?php $this->stop() ?> |
@@ -64,7 +64,10 @@ |
||
| 64 | 64 | echo $form->button()->submit(__('Download update'), ['class' => 'btn btn-primary']); |
| 65 | 65 | echo $form->stop(); |
| 66 | 66 | ?> |
| 67 | -<?php else: ?> |
|
| 67 | +<?php else { |
|
| 68 | + : ?> |
|
| 68 | 69 | <p class="alert alert-success"><?= __('Your system is up to date. No updates is available') ?></p> |
| 69 | -<?php endif; ?> |
|
| 70 | +<?php endif; |
|
| 71 | +} |
|
| 72 | +?> |
|
| 70 | 73 | <?php $this->stop() ?> |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | <div class="media-left"> |
| 171 | 171 | <a href="#"> |
| 172 | 172 | <?php |
| 173 | - $commentAva = \App::$Alias->scriptUrl . '/upload/user/avatar/small/default.jpg'; |
|
| 173 | + $commentAva = \App::$Alias->scriptUrl.'/upload/user/avatar/small/default.jpg'; |
|
| 174 | 174 | if ($comment->user !== null && $comment->user->id > 0) { |
| 175 | 175 | $commentAva = $comment->user->profile->getAvatarUrl('small'); |
| 176 | 176 | } |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | </li> |
| 238 | 238 | <li class="nav-item<?= (\App::$Request->getController() === 'Main' && \App::$Request->getAction() !== 'Index') ? ' active' : null ?>"> |
| 239 | 239 | <?= Url::a(['#system-dropdown'], |
| 240 | - '<i class="fa fa-fire"></i> <span class="nav-text">' . __('System') . '</span>', |
|
| 240 | + '<i class="fa fa-fire"></i> <span class="nav-text">'.__('System').'</span>', |
|
| 241 | 241 | [ |
| 242 | 242 | 'class' => 'nav-container', |
| 243 | 243 | 'data-toggle' => 'collapse', |
@@ -245,13 +245,13 @@ discard block |
||
| 245 | 245 | ]) |
| 246 | 246 | ?> |
| 247 | 247 | |
| 248 | - <?= $this->bootstrap()->nav('ul', ['class' => 'nav nav-pills nav-stacked collapse' . ((\App::$Request->getController() === 'Main' && \App::$Request->getAction() !== 'Index') ? 'in show' : null), 'id' => 'system-dropdown']) |
|
| 249 | - ->menu(['link' => ['main/settings'], 'text' => '<i class="fa fa-cogs"></i> ' . __('Settings'), 'html' => true]) |
|
| 250 | - ->menu(['link' => ['main/files'], 'text' => '<i class="fa fa-file-o"></i> ' . __('Files'), 'html' => true]) |
|
| 251 | - ->menu(['link' => ['main/antivirus'], 'text' => '<i class="fa fa-shield"></i> ' . __('Antivirus'), 'html' => true]) |
|
| 252 | - ->menu(['link' => ['main/routing'], 'text' => '<i class="fa fa-code"></i> ' . __('Routing'), 'html' => true]) |
|
| 253 | - ->menu(['link' => ['main/backup'], 'text' => '<i class="fa fa-hdd-o"></i> ' . __('Backup'), 'html' => true]) |
|
| 254 | - ->menu(['link' => ['main/updates'], 'text' => '<i class="fa fa-gavel"></i> ' . __('Updates'), 'html' => true]) |
|
| 248 | + <?= $this->bootstrap()->nav('ul', ['class' => 'nav nav-pills nav-stacked collapse'.((\App::$Request->getController() === 'Main' && \App::$Request->getAction() !== 'Index') ? 'in show' : null), 'id' => 'system-dropdown']) |
|
| 249 | + ->menu(['link' => ['main/settings'], 'text' => '<i class="fa fa-cogs"></i> '.__('Settings'), 'html' => true]) |
|
| 250 | + ->menu(['link' => ['main/files'], 'text' => '<i class="fa fa-file-o"></i> '.__('Files'), 'html' => true]) |
|
| 251 | + ->menu(['link' => ['main/antivirus'], 'text' => '<i class="fa fa-shield"></i> '.__('Antivirus'), 'html' => true]) |
|
| 252 | + ->menu(['link' => ['main/routing'], 'text' => '<i class="fa fa-code"></i> '.__('Routing'), 'html' => true]) |
|
| 253 | + ->menu(['link' => ['main/backup'], 'text' => '<i class="fa fa-hdd-o"></i> '.__('Backup'), 'html' => true]) |
|
| 254 | + ->menu(['link' => ['main/updates'], 'text' => '<i class="fa fa-gavel"></i> '.__('Updates'), 'html' => true]) |
|
| 255 | 255 | ->display(); |
| 256 | 256 | ?> |
| 257 | 257 | </li> |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | ?> |
| 270 | 270 | <li class="nav-item<?= (array_key_exists(\App::$Request->getController(), $apps) || \App::$Request->getController() === 'Application') ? ' active' : null ?>"> |
| 271 | 271 | <?= Url::a(['#apps-dropdown'], |
| 272 | - '<i class="fa fa-plug"></i> <span class="nav-text">' . __('Applications') . '</span>', |
|
| 272 | + '<i class="fa fa-plug"></i> <span class="nav-text">'.__('Applications').'</span>', |
|
| 273 | 273 | [ |
| 274 | 274 | 'class' => 'nav-container', |
| 275 | 275 | 'data-toggle' => 'collapse', |
@@ -278,18 +278,18 @@ discard block |
||
| 278 | 278 | ?> |
| 279 | 279 | |
| 280 | 280 | <?php |
| 281 | - $appMenu = $this->bootstrap()->nav('ul', ['class' => 'nav nav-pills nav-stacked collapse' . ((array_key_exists(\App::$Request->getController(), $apps) || \App::$Request->getController() === 'Application') ? 'in show' : null), 'id' => 'apps-dropdown']); |
|
| 281 | + $appMenu = $this->bootstrap()->nav('ul', ['class' => 'nav nav-pills nav-stacked collapse'.((array_key_exists(\App::$Request->getController(), $apps) || \App::$Request->getController() === 'Application') ? 'in show' : null), 'id' => 'apps-dropdown']); |
|
| 282 | 282 | foreach ($apps as $app) { |
| 283 | 283 | /** @var \Apps\ActiveRecord\App $app */ |
| 284 | - $appMenu->menu(['link' => [Str::lowerCase($app->sys_name) . '/index'], 'text' => $app->getLocaleName()]); |
|
| 284 | + $appMenu->menu(['link' => [Str::lowerCase($app->sys_name).'/index'], 'text' => $app->getLocaleName()]); |
|
| 285 | 285 | } |
| 286 | - $appMenu->menu(['link' => 'application/index', 'text' => __('All apps') . '...']); |
|
| 286 | + $appMenu->menu(['link' => 'application/index', 'text' => __('All apps').'...']); |
|
| 287 | 287 | echo $appMenu->display(); |
| 288 | 288 | ?> |
| 289 | 289 | </li> |
| 290 | 290 | <li class="nav-item<?= array_key_exists(\App::$Request->getController(), $widgets) ? ' active' : null ?>"> |
| 291 | 291 | <?= Url::a(['#widgets-dropdown'], |
| 292 | - '<i class="fa fa-puzzle-piece"></i> <span class="nav-text">' . __('Widgets') . '</span>', |
|
| 292 | + '<i class="fa fa-puzzle-piece"></i> <span class="nav-text">'.__('Widgets').'</span>', |
|
| 293 | 293 | [ |
| 294 | 294 | 'class' => 'nav-container', |
| 295 | 295 | 'data-toggle' => 'collapse', |
@@ -298,12 +298,12 @@ discard block |
||
| 298 | 298 | ?> |
| 299 | 299 | |
| 300 | 300 | <?php |
| 301 | - $widgetMenu = $this->bootstrap()->nav('ul', ['class' => 'nav nav-pills nav-stacked collapse' . (array_key_exists(\App::$Request->getController(), $widgets) ? 'in show' : null), 'id' => 'widgets-dropdown']); |
|
| 301 | + $widgetMenu = $this->bootstrap()->nav('ul', ['class' => 'nav nav-pills nav-stacked collapse'.(array_key_exists(\App::$Request->getController(), $widgets) ? 'in show' : null), 'id' => 'widgets-dropdown']); |
|
| 302 | 302 | foreach ($widgets as $widget) { |
| 303 | 303 | /** @var \Apps\ActiveRecord\App $widget */ |
| 304 | - $widgetMenu->menu(['link' => [Str::lowerCase($widget->sys_name) . '/index'], 'text' => $widget->getLocaleName()]); |
|
| 304 | + $widgetMenu->menu(['link' => [Str::lowerCase($widget->sys_name).'/index'], 'text' => $widget->getLocaleName()]); |
|
| 305 | 305 | } |
| 306 | - $widgetMenu->menu(['link' => 'widget/index', 'text' => __('All widgets') . '...']); |
|
| 306 | + $widgetMenu->menu(['link' => 'widget/index', 'text' => __('All widgets').'...']); |
|
| 307 | 307 | echo $widgetMenu->display(); |
| 308 | 308 | ?> |
| 309 | 309 | </li> |
@@ -5,6 +5,6 @@ |
||
| 5 | 5 | |
| 6 | 6 | ?> |
| 7 | 7 | <?php if (isset($controller)): ?> |
| 8 | - <a href="<?= Url::to($controller . '/index') ?>"><i class="fa fa-cogs"></i></a> |
|
| 8 | + <a href="<?= Url::to($controller.'/index') ?>"><i class="fa fa-cogs"></i></a> |
|
| 9 | 9 | <a href="<?= Url::to('application/turn', [$controller]) ?>"><i class="fa fa-power-off"></i></a> |
| 10 | 10 | <?php endif; ?> |
| 11 | 11 | \ No newline at end of file |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | [['text' => __('Name')], ['text' => $app->getLocaleName()]], |
| 30 | 30 | [['text' => __('System name')], ['text' => $app->sys_name]], |
| 31 | 31 | [['text' => __('Last update')], ['text' => Date::convertToDatetime($app->updated_at, Date::FORMAT_TO_SECONDS)]], |
| 32 | - [['text' => __('Status')], ['text' => !(bool)$app->disabled ? 'On' : 'Off'], 'properties' => ['class' => !(bool)$app->disabled ? 'alert-success' : 'alert-danger']] |
|
| 32 | + [['text' => __('Status')], ['text' => !(bool) $app->disabled ? 'On' : 'Off'], 'properties' => ['class' => !(bool) $app->disabled ? 'alert-success' : 'alert-danger']] |
|
| 33 | 33 | ])->display() ?> |
| 34 | 34 | |
| 35 | 35 | <?php $form = $this->form($model) ?> |
@@ -36,11 +36,11 @@ discard block |
||
| 36 | 36 | continue; |
| 37 | 37 | } |
| 38 | 38 | $controller = Str::lowerCase($app->sys_name); |
| 39 | - $route = $controller . '/index'; |
|
| 39 | + $route = $controller.'/index'; |
|
| 40 | 40 | $icoStatus = null; |
| 41 | 41 | $actions = $this->fetch('application/_actions', ['controller' => $controller]); |
| 42 | 42 | // set action icons based on app status |
| 43 | - if ((bool)$app->disabled) { |
|
| 43 | + if ((bool) $app->disabled) { |
|
| 44 | 44 | $icoStatus = ' <i class="fa fa-pause" style="color: #ff0000;"></i>'; |
| 45 | 45 | } elseif (!$app->checkVersion()) { |
| 46 | 46 | $icoStatus = ' <i class="fa fa-exclamation-circle" style="color: #ffbd26;"></i>'; |
@@ -50,9 +50,9 @@ discard block |
||
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | $table->row([ |
| 53 | - ['text' => $app->id . $icoStatus, 'html' => true], |
|
| 53 | + ['text' => $app->id.$icoStatus, 'html' => true], |
|
| 54 | 54 | ['text' => Url::a([$route], $app->getLocaleName()), 'html' => true], |
| 55 | - ['text' => '<a target="_blank" href="' . \App::$Alias->scriptUrl . '/' . Str::lowerCase($route) . '">' . $route . '</a>', 'html' => true], |
|
| 55 | + ['text' => '<a target="_blank" href="'.\App::$Alias->scriptUrl.'/'.Str::lowerCase($route).'">'.$route.'</a>', 'html' => true], |
|
| 56 | 56 | ['text' => $app->version], |
| 57 | 57 | ['text' => Date::convertToDatetime($app->updated_at, Date::FORMAT_TO_HOUR)], |
| 58 | 58 | ['text' => $actions, 'html' => true] |
@@ -63,5 +63,5 @@ discard block |
||
| 63 | 63 | <div class="table-responsive"> |
| 64 | 64 | <?= $table->display() ?> |
| 65 | 65 | </div> |
| 66 | -<?= Url::a(['application/install'], '<i class="fa fa-tasks"></i> ' . __('Install app'), ['class' => 'btn btn-primary', 'html' => true]) ?> |
|
| 66 | +<?= Url::a(['application/install'], '<i class="fa fa-tasks"></i> '.__('Install app'), ['class' => 'btn btn-primary', 'html' => true]) ?> |
|
| 67 | 67 | <?php $this->stop() ?> |
| 68 | 68 | \ No newline at end of file |