@@ -4,18 +4,18 @@ |
||
4 | 4 | <div class="alert alert-<?= $msg['status']; ?> alert-dismissable"> |
5 | 5 | <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> |
6 | 6 | <strong><?php |
7 | - switch ($msg['status']) { |
|
8 | - case 'success': |
|
7 | + switch ($msg['status']) { |
|
8 | + case 'success': |
|
9 | 9 | echo 'Успех!'; |
10 | - break; |
|
11 | - case 'danger': |
|
10 | + break; |
|
11 | + case 'danger': |
|
12 | 12 | case 'warning': |
13 | 13 | echo 'Внимание!'; |
14 | - break; |
|
15 | - default: |
|
14 | + break; |
|
15 | + default: |
|
16 | 16 | echo 'Информация.'; |
17 | - } |
|
18 | - ?></strong> <?= $msg['text']; ?> |
|
17 | + } |
|
18 | + ?></strong> <?= $msg['text']; ?> |
|
19 | 19 | </div> |
20 | 20 | <?php |
21 | 21 | } |
@@ -43,7 +43,7 @@ |
||
43 | 43 | Tools::redirect('/admin', 'У вас нет прав доступа для просмотра этого объекта', 'danger'); |
44 | 44 | } |
45 | 45 | $item = $fullModelName::get($pk); |
46 | - $this->view->setTitle(($fullModelName::$objectName ? $fullModelName::$objectName : $fullModelName) . ($item ? ( ' - ' . $item->name()) : '')); |
|
46 | + $this->view->setTitle(($fullModelName::$objectName ? $fullModelName::$objectName : $fullModelName) . ($item ? (' - ' . $item->name()) : '')); |
|
47 | 47 | if (!empty($_POST['comment'])) { |
48 | 48 | $comment = new Dashboard\Comment(); |
49 | 49 | $comment->text = $_POST['comment']; |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <div class="row"> |
2 | 2 | <div class="col-lg-12"> |
3 | 3 | <?php |
4 | - $dataManager = new Ui\DataManager('Apps\App', 'setup'); |
|
5 | - $dataManager->draw(); |
|
6 | - ?> |
|
4 | + $dataManager = new Ui\DataManager('Apps\App', 'setup'); |
|
5 | + $dataManager->draw(); |
|
6 | + ?> |
|
7 | 7 | </div> |
8 | 8 | <div class="col-lg-12"> |
9 | 9 | <?php |
@@ -24,7 +24,8 @@ |
||
24 | 24 | $code .= '$' . $this->name . ' = '; |
25 | 25 | if (is_array($this->value)) { |
26 | 26 | $code .= \CodeGenerator::genArray($this->value); |
27 | - } else { |
|
27 | + } |
|
28 | + else { |
|
28 | 29 | $code .= '"' . str_replace('"', '\"', $this->value) . '";'; |
29 | 30 | } |
30 | 31 | return $code; |
@@ -147,9 +147,11 @@ discard block |
||
147 | 147 | public function resolveTemplate() { |
148 | 148 | if ($this->template !== 'inherit') { |
149 | 149 | return $this->template; |
150 | - } elseif ($this->template == 'inherit' && $this->category) { |
|
150 | + } |
|
151 | + elseif ($this->template == 'inherit' && $this->category) { |
|
151 | 152 | return $this->category->resolveTemplate(true); |
152 | - } else { |
|
153 | + } |
|
154 | + else { |
|
153 | 155 | return 'current'; |
154 | 156 | } |
155 | 157 | } |
@@ -157,9 +159,11 @@ discard block |
||
157 | 159 | public function resolveViewer() { |
158 | 160 | if ($this->viewer !== 'inherit') { |
159 | 161 | return $this->viewer; |
160 | - } elseif ($this->viewer == 'inherit' && $this->category) { |
|
162 | + } |
|
163 | + elseif ($this->viewer == 'inherit' && $this->category) { |
|
161 | 164 | return $this->category->resolveViewer(true); |
162 | - } else { |
|
165 | + } |
|
166 | + else { |
|
163 | 167 | return 'default'; |
164 | 168 | } |
165 | 169 | } |
@@ -24,7 +24,8 @@ |
||
24 | 24 | $code .= '$' . $this->name . ' = '; |
25 | 25 | if (is_array($this->value)) { |
26 | 26 | $code .= \CodeGenerator::genArray($this->value); |
27 | - } else { |
|
27 | + } |
|
28 | + else { |
|
28 | 29 | $code .= '"' . str_replace('"', '\"', $this->value) . '";'; |
29 | 30 | } |
30 | 31 | return $code; |
@@ -24,7 +24,8 @@ |
||
24 | 24 | $code .= '$' . $this->name . ' = '; |
25 | 25 | if (is_array($this->value)) { |
26 | 26 | $code .= \CodeGenerator::genArray($this->value); |
27 | - } else { |
|
27 | + } |
|
28 | + else { |
|
28 | 29 | $code .= '"' . str_replace('"', '\"', $this->value) . '";'; |
29 | 30 | } |
30 | 31 | return $code; |
@@ -147,9 +147,11 @@ discard block |
||
147 | 147 | public function resolveTemplate() { |
148 | 148 | if ($this->template !== 'inherit') { |
149 | 149 | return $this->template; |
150 | - } elseif ($this->template == 'inherit' && $this->category) { |
|
150 | + } |
|
151 | + elseif ($this->template == 'inherit' && $this->category) { |
|
151 | 152 | return $this->category->resolveTemplate(true); |
152 | - } else { |
|
153 | + } |
|
154 | + else { |
|
153 | 155 | return 'current'; |
154 | 156 | } |
155 | 157 | } |
@@ -157,9 +159,11 @@ discard block |
||
157 | 159 | public function resolveViewer() { |
158 | 160 | if ($this->viewer !== 'inherit') { |
159 | 161 | return $this->viewer; |
160 | - } elseif ($this->viewer == 'inherit' && $this->category) { |
|
162 | + } |
|
163 | + elseif ($this->viewer == 'inherit' && $this->category) { |
|
161 | 164 | return $this->category->resolveViewer(true); |
162 | - } else { |
|
165 | + } |
|
166 | + else { |
|
163 | 167 | return 'default'; |
164 | 168 | } |
165 | 169 | } |
@@ -94,7 +94,8 @@ |
||
94 | 94 | public function value($default = '') { |
95 | 95 | if ($this->option->type != 'select') { |
96 | 96 | return $this->value; |
97 | - } elseif ($this->optionItem) { |
|
97 | + } |
|
98 | + elseif ($this->optionItem) { |
|
98 | 99 | return $this->optionItem->value; |
99 | 100 | } |
100 | 101 | return $default; |