@@ -30,9 +30,9 @@ |
||
| 30 | 30 | if (Any::isArray($notify) && count($notify) > 0) { |
| 31 | 31 | foreach ($notify as $type => $messages) { |
| 32 | 32 | foreach ($messages as $message) { |
| 33 | - echo '<p class="alert ' . type2html($type) . '"> |
|
| 33 | + echo '<p class="alert '.type2html($type).'"> |
|
| 34 | 34 | <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>' |
| 35 | - . \Ffcms\Core\App::$Security->strip_tags($message) . '</p>'; |
|
| 35 | + . \Ffcms\Core\App::$Security->strip_tags($message).'</p>'; |
|
| 36 | 36 | } |
| 37 | 37 | } |
| 38 | 38 | } |
@@ -28,38 +28,38 @@ discard block |
||
| 28 | 28 | <div class="panel panel-info"> |
| 29 | 29 | <div class="panel-heading"> |
| 30 | 30 | <?php |
| 31 | - if ((int)$record->readed !== 1) { |
|
| 31 | + if ((int) $record->readed !== 1) { |
|
| 32 | 32 | echo '<i class="fa fa-bell"></i> '; |
| 33 | 33 | } |
| 34 | 34 | ?> |
| 35 | 35 | <?= __('Message sent') ?>: <?= Date::convertToDatetime($record->created_at, Date::FORMAT_TO_HOUR) ?>. |
| 36 | 36 | <?php |
| 37 | - if ((int)$record->closed !== 1) { |
|
| 38 | - echo '<span class="label label-success">' . __('Opened') . '</span>'; |
|
| 37 | + if ((int) $record->closed !== 1) { |
|
| 38 | + echo '<span class="label label-success">'.__('Opened').'</span>'; |
|
| 39 | 39 | } else { |
| 40 | - echo '<span class="label label-danger">' . __('Closed') . '</span>'; |
|
| 40 | + echo '<span class="label label-danger">'.__('Closed').'</span>'; |
|
| 41 | 41 | } |
| 42 | 42 | ?> |
| 43 | 43 | </div> |
| 44 | 44 | <div class="panel-body"> |
| 45 | 45 | <?php |
| 46 | - if ((int)$record->closed !== 0) { |
|
| 47 | - echo '<p class="alert alert-warning">' . __('The feedback request is closed! Thread in only-read mode') . '.</p>'; |
|
| 46 | + if ((int) $record->closed !== 0) { |
|
| 47 | + echo '<p class="alert alert-warning">'.__('The feedback request is closed! Thread in only-read mode').'.</p>'; |
|
| 48 | 48 | } |
| 49 | 49 | ?> |
| 50 | 50 | <p><?= Str::replace("\n", "<br />", $record->message) ?></p> |
| 51 | 51 | <hr /> |
| 52 | 52 | <?php |
| 53 | 53 | // show "mark as read" button if message is not readed |
| 54 | - if ((int)$record->readed !== 1) { |
|
| 55 | - echo Url::link(['feedback/turn', 'read', $record->id], __('Mark as read'), ['class' => 'label label-success']) . ' '; |
|
| 54 | + if ((int) $record->readed !== 1) { |
|
| 55 | + echo Url::link(['feedback/turn', 'read', $record->id], __('Mark as read'), ['class' => 'label label-success']).' '; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | // show close/open button depend of current status |
| 59 | - if ((int)$record->closed === 0) { |
|
| 60 | - echo Url::link(['feedback/turn', 'close', $record->id], __('Close'), ['class' => 'label label-warning']) . ' '; |
|
| 59 | + if ((int) $record->closed === 0) { |
|
| 60 | + echo Url::link(['feedback/turn', 'close', $record->id], __('Close'), ['class' => 'label label-warning']).' '; |
|
| 61 | 61 | } else { |
| 62 | - echo Url::link(['feedback/turn', 'open', $record->id], __('Open'), ['class' => 'label label-info']) . ' '; |
|
| 62 | + echo Url::link(['feedback/turn', 'open', $record->id], __('Open'), ['class' => 'label label-info']).' '; |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | ?> |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | <div class="panel-body"> |
| 77 | 77 | <?php |
| 78 | 78 | $uInfo = 'no'; |
| 79 | - if ((int)$record->user_id > 0) { |
|
| 79 | + if ((int) $record->user_id > 0) { |
|
| 80 | 80 | $user = \App::$User->identity($record->user_id); |
| 81 | 81 | if ($user !== null && $user->getId() > 0) { |
| 82 | 82 | $uInfo = Url::link(['user/update', $user->getId()], $user->profile->getNickname()); |
@@ -101,9 +101,9 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | <?php if ($record->answers->count() > 0): ?> |
| 103 | 103 | <?php foreach ($record->answers as $answer): ?> |
| 104 | - <div class="panel <?= (int)$answer->is_admin === 1 ? 'panel-success' : 'panel-default' ?>"> |
|
| 104 | + <div class="panel <?= (int) $answer->is_admin === 1 ? 'panel-success' : 'panel-default' ?>"> |
|
| 105 | 105 | <div class="panel-heading"> |
| 106 | - <?= __('From') ?>: <?= $answer->name . '(' . $answer->email . ')' . ((int)$answer->user_id > 0 ? Url::link(['user/update', $answer->user_id], '[id' . $answer->user_id . ']') : null) ?>, |
|
| 106 | + <?= __('From') ?>: <?= $answer->name.'('.$answer->email.')'.((int) $answer->user_id > 0 ? Url::link(['user/update', $answer->user_id], '[id'.$answer->user_id.']') : null) ?>, |
|
| 107 | 107 | <?= Date::convertToDatetime($answer->created_at, Date::FORMAT_TO_HOUR) ?> |
| 108 | 108 | <span class="pull-right"> |
| 109 | 109 | <?= Url::link(['feedback/update', 'answer', $answer->id], __('Edit'), ['class' => 'label label-primary']) ?> |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | <h1><?= __('Feedback list') ?></h1> |
| 24 | 24 | <hr /> |
| 25 | 25 | <?php if ($records === null || $records->count() < 1) { |
| 26 | - echo '<p class="alert alert-warning">' . __('Feedback requests is empty now!') . '</p>'; |
|
| 26 | + echo '<p class="alert alert-warning">'.__('Feedback requests is empty now!').'</p>'; |
|
| 27 | 27 | return; |
| 28 | 28 | } |
| 29 | 29 | |
@@ -31,17 +31,16 @@ discard block |
||
| 31 | 31 | foreach ($records as $item) { |
| 32 | 32 | /** @var \Apps\ActiveRecord\FeedbackPost $item*/ |
| 33 | 33 | $items[] = [ |
| 34 | - ['text' => $item->id . ((int)$item->readed !== 1 ? ' <i class="fa fa-bell alert-info"></i>' : null), 'html' => true], |
|
| 34 | + ['text' => $item->id.((int) $item->readed !== 1 ? ' <i class="fa fa-bell alert-info"></i>' : null), 'html' => true], |
|
| 35 | 35 | ['text' => Url::link(['feedback/read', $item->id], Text::snippet($item->message, 40, false)), 'html' => true], |
| 36 | 36 | ['text' => $item->answers->count()], |
| 37 | 37 | ['text' => $item->email], |
| 38 | 38 | ['text' => |
| 39 | - (int)$item->closed === 1 ? |
|
| 40 | - '<span class="label label-danger">' . __('Closed') . '</span>' : |
|
| 41 | - '<span class="label label-success">' . __('Opened') . '</span>', |
|
| 39 | + (int) $item->closed === 1 ? |
|
| 40 | + '<span class="label label-danger">'.__('Closed').'</span>' : '<span class="label label-success">'.__('Opened').'</span>', |
|
| 42 | 41 | 'html' => true, '!secure' => true], |
| 43 | 42 | ['text' => Date::convertToDatetime($item->updated_at, Date::FORMAT_TO_HOUR)], |
| 44 | - ['text' => Url::link(['feedback/read', $item->id], '<i class="fa fa-list fa-lg"></i> ') . |
|
| 43 | + ['text' => Url::link(['feedback/read', $item->id], '<i class="fa fa-list fa-lg"></i> '). |
|
| 45 | 44 | Url::link(['feedback/delete', 'post', $item->id], '<i class="fa fa-trash-o fa-lg"></i>'), |
| 46 | 45 | 'html' => true, 'property' => ['class' => 'text-center']] |
| 47 | 46 | ]; |
@@ -10,4 +10,4 @@ |
||
| 10 | 10 | ['type' => 'link', 'text' => __('Settings'), 'link' => ['feedback/settings']] |
| 11 | 11 | ], |
| 12 | 12 | 'activeOrder' => 'action' |
| 13 | -]);?> |
|
| 14 | 13 | \ No newline at end of file |
| 14 | +]); ?> |
|
| 15 | 15 | \ No newline at end of file |
@@ -27,11 +27,11 @@ |
||
| 27 | 27 | foreach ($records as $profile) { |
| 28 | 28 | $items[] = [ |
| 29 | 29 | ['text' => $profile->id], |
| 30 | - ['text' => $profile->user->login . '/' . $profile->user->email], |
|
| 30 | + ['text' => $profile->user->login.'/'.$profile->user->email], |
|
| 31 | 31 | ['text' => $profile->nick], |
| 32 | 32 | ['text' => Str::startsWith('0000-', $profile->birthday) ? __('None') : Date::convertToDatetime($profile->birthday)], |
| 33 | - ['text' => ($profile->rating > 0 ? '+' : null) . $profile->rating], |
|
| 34 | - ['text' => Url::link(['profile/update', $profile->id], '<i class="fa fa-pencil fa-lg"></i> ') . |
|
| 33 | + ['text' => ($profile->rating > 0 ? '+' : null).$profile->rating], |
|
| 34 | + ['text' => Url::link(['profile/update', $profile->id], '<i class="fa fa-pencil fa-lg"></i> '). |
|
| 35 | 35 | Url::link(['user/delete', $profile->user->id], '<i class="fa fa-trash-o fa-lg"></i>'), |
| 36 | 36 | 'html' => true, 'property' => ['class' => 'text-center']] |
| 37 | 37 | ]; |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | <hr /> |
| 23 | 23 | <div class="row"> |
| 24 | 24 | <div class="col-md-12"> |
| 25 | - <?= Url::link(['profile/fieldupdate', 0], '<i class="fa fa-plus"></i> ' . __('Add field'), ['class' => 'btn btn-primary pull-right']) ?> |
|
| 25 | + <?= Url::link(['profile/fieldupdate', 0], '<i class="fa fa-plus"></i> '.__('Add field'), ['class' => 'btn btn-primary pull-right']) ?> |
|
| 26 | 26 | </div> |
| 27 | 27 | </div> |
| 28 | 28 | <?php if ($records->count() > 0): |
@@ -37,10 +37,10 @@ discard block |
||
| 37 | 37 | $items[] = [ |
| 38 | 38 | ['text' => $row->id], |
| 39 | 39 | ['text' => $row->getLocaled('name')], |
| 40 | - ['text' => '<span class="' . $labelClass . '">' . $row->type . '</span>', 'html' => true], |
|
| 41 | - ['text' => '<code>' . ($row->reg_cond == 0 ? '!' : null) . 'preg_match("' . $row->reg_exp . '", input)' . '</code>', 'html' => true], |
|
| 40 | + ['text' => '<span class="'.$labelClass.'">'.$row->type.'</span>', 'html' => true], |
|
| 41 | + ['text' => '<code>'.($row->reg_cond == 0 ? '!' : null).'preg_match("'.$row->reg_exp.'", input)'.'</code>', 'html' => true], |
|
| 42 | 42 | [ |
| 43 | - 'text' => Url::link(['profile/fieldupdate', $row->id], '<i class="fa fa-pencil fa-lg"></i> ', ['html' => true]) . |
|
| 43 | + 'text' => Url::link(['profile/fieldupdate', $row->id], '<i class="fa fa-pencil fa-lg"></i> ', ['html' => true]). |
|
| 44 | 44 | Url::link(['profile/fielddelete', $row->id], '<i class="fa fa-trash-o fa-lg"></i>', ['html' => true]), |
| 45 | 45 | 'html' => true, |
| 46 | 46 | 'property' => ['class' => 'text-center'] |
@@ -65,6 +65,9 @@ |
||
| 65 | 65 | ] |
| 66 | 66 | ]); |
| 67 | 67 | ?> |
| 68 | -<?php else: ?> |
|
| 68 | +<?php else { |
|
| 69 | + : ?> |
|
| 69 | 70 | <p class="alert alert-warning"><?= __('No additional fields is add yet!') ?></p> |
| 70 | -<?php endif; ?> |
|
| 71 | 71 | \ No newline at end of file |
| 72 | +<?php endif; |
|
| 73 | +} |
|
| 74 | +?> |
|
| 72 | 75 | \ No newline at end of file |
@@ -79,7 +79,7 @@ |
||
| 79 | 79 | |
| 80 | 80 | <br /> |
| 81 | 81 | |
| 82 | -<?php if($model->checkAll()): ?> |
|
| 82 | +<?php if ($model->checkAll()): ?> |
|
| 83 | 83 | <div class="row"> |
| 84 | 84 | <div class="col-xs-3" style="padding-top: 5px;padding-left: 25px;"> |
| 85 | 85 | <input type="checkbox" id="agree-license" /> <label for="agree-license"><?= __('Accept license') ?></label> |
@@ -88,9 +88,12 @@ |
||
| 88 | 88 | <a href="#license" class="btn btn-success btn-block" id="install-link" disabled="disabled"><?= __('Start install') ?></a> |
| 89 | 89 | </div> |
| 90 | 90 | </div> |
| 91 | -<?php else: ?> |
|
| 91 | +<?php else { |
|
| 92 | + : ?> |
|
| 92 | 93 | <?= \Ffcms\Core\Helper\Url::link('main/index', __('Check again'), ['class' => 'btn btn-warning btn-block']) ?> |
| 93 | -<?php endif; ?> |
|
| 94 | +<?php endif; |
|
| 95 | +} |
|
| 96 | +?> |
|
| 94 | 97 | <script> |
| 95 | 98 | $(document).ready(function () { |
| 96 | 99 | $('#agree-license').change(function () { |
@@ -52,12 +52,12 @@ |
||
| 52 | 52 | throw new \Exception('Wrong definition for loader. You shoud use front, admin, api'); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - $namespace = 'Apps\Model\\' . $loader . '\\' . $controller; |
|
| 55 | + $namespace = 'Apps\Model\\'.$loader.'\\'.$controller; |
|
| 56 | 56 | $tpl = File::read('/Private/Carcase/Model.tphp'); |
| 57 | 57 | $code = Str::replace(['%namespace%', '%name%'], [$namespace, $name], $tpl); |
| 58 | - $path = '/Apps/Model/' . $loader . '/' . $controller . '/' . $name . '.php'; |
|
| 58 | + $path = '/Apps/Model/'.$loader.'/'.$controller.'/'.$name.'.php'; |
|
| 59 | 59 | File::write($path, $code); |
| 60 | - $output->writeln('Model are successful created: ' . $path); |
|
| 60 | + $output->writeln('Model are successful created: '.$path); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | } |
| 64 | 64 | \ No newline at end of file |
@@ -41,8 +41,8 @@ |
||
| 41 | 41 | $tpl = File::read('/Private/Carcase/ActiveRecord.tphp'); |
| 42 | 42 | $code = Str::replace('%name%', $name, $tpl); |
| 43 | 43 | |
| 44 | - $path = '/Apps/ActiveRecord/' . $name . '.php'; |
|
| 44 | + $path = '/Apps/ActiveRecord/'.$name.'.php'; |
|
| 45 | 45 | File::write($path, $code); |
| 46 | - $output->writeln('ActiveRecord are successful created: ' . $path); |
|
| 46 | + $output->writeln('ActiveRecord are successful created: '.$path); |
|
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | \ No newline at end of file |