Passed
Push — master ( afc50f...67ec34 )
by Mihail
04:58
created
Apps/View/Admin/default/content/index.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
                     <span class="sr-only">Toggle Dropdown</span>
36 36
                 </button>
37 37
                 <ul class="dropdown-menu" role="menu">
38
-                    <li><?= Url::link(['content/index', null, null, ['type' => 'all']], '<i class="fa fa-list"></i> ' . __('All')) ?></li>
39
-                    <li><?= Url::link(['content/index', null, null, ['type' => 'moderate']], '<i class="fa fa-exclamation"></i> ' . __('Moderate')) ?></li>
40
-                    <li><?= Url::link(['content/index', null, null, ['type' => 'trash']], '<i class="fa fa-trash"></i> ' . __('Trash')) ?></li>
38
+                    <li><?= Url::link(['content/index', null, null, ['type' => 'all']], '<i class="fa fa-list"></i> '.__('All')) ?></li>
39
+                    <li><?= Url::link(['content/index', null, null, ['type' => 'moderate']], '<i class="fa fa-exclamation"></i> '.__('Moderate')) ?></li>
40
+                    <li><?= Url::link(['content/index', null, null, ['type' => 'trash']], '<i class="fa fa-trash"></i> '.__('Trash')) ?></li>
41 41
                     <li>
42 42
                         <a class="trigger right-caret"><i class="fa fa-table"></i> <?= __('Categories') ?></a>
43 43
                         <ul class="dropdown-menu sub-menu">
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
         </div>
52 52
         <?php
53 53
         if ($type === 'trash') {
54
-            echo Url::link(['content/clear'], '<i class="fa fa-minus"></i> ' . __('Remove all'), ['class' => 'btn btn-danger pull-right']);
54
+            echo Url::link(['content/clear'], '<i class="fa fa-minus"></i> '.__('Remove all'), ['class' => 'btn btn-danger pull-right']);
55 55
         } else {
56
-            echo Url::link(['content/update', 0], '<i class="fa fa-plus"></i> ' . __('Add content'), ['class' => 'btn btn-primary pull-right']);
56
+            echo Url::link(['content/update', 0], '<i class="fa fa-plus"></i> '.__('Add content'), ['class' => 'btn btn-primary pull-right']);
57 57
         }
58 58
         ?>
59 59
     </div>
@@ -62,23 +62,23 @@  discard block
 block discarded – undo
62 62
 <?php
63 63
 
64 64
 if ($records->count() < 1) {
65
-    echo '<p class="alert alert-warning">' . __('Content is not found') . '</p>';
65
+    echo '<p class="alert alert-warning">'.__('Content is not found').'</p>';
66 66
     return;
67 67
 }
68 68
 
69 69
 $items = [];
70 70
 $moderate = false;
71 71
 foreach ($records as $content) {
72
-    $frontLink = \App::$Alias->scriptUrl . '/content/read';
72
+    $frontLink = \App::$Alias->scriptUrl.'/content/read';
73 73
     $frontPath = null;
74 74
     if (!Str::likeEmpty($content->getCategory()->path)) {
75
-        $frontLink .= '/' . $content->getCategory()->path;
76
-        $frontPath .= '/' . $content->getCategory()->path;
75
+        $frontLink .= '/'.$content->getCategory()->path;
76
+        $frontPath .= '/'.$content->getCategory()->path;
77 77
     }
78
-    $frontLink .= '/' . $content->path;
79
-    $frontPath .= '/' . $content->path;
78
+    $frontLink .= '/'.$content->path;
79
+    $frontPath .= '/'.$content->path;
80 80
     $frontPath = Str::sub($frontPath, 0, 30);
81
-    $actionIcons = '<a href="' . $frontLink . '" target="_blank"><i class="fa fa-eye fa-lg"></i></a> ';
81
+    $actionIcons = '<a href="'.$frontLink.'" target="_blank"><i class="fa fa-eye fa-lg"></i></a> ';
82 82
     $actionIcons .= Url::link(['content/update', $content->id], '<i class="fa fa-pencil fa-lg"></i> ');
83 83
     if ($type === 'trash') {
84 84
         $actionIcons .= Url::link(['content/restore', $content->id], '<i class="fa fa-refresh fa-lg"></i>');
@@ -86,16 +86,16 @@  discard block
 block discarded – undo
86 86
         $actionIcons .= Url::link(['content/delete', $content->id], '<i class="fa fa-trash-o fa-lg"></i>');
87 87
     }
88 88
 
89
-    if (!(bool)$content->display) {
89
+    if (!(bool) $content->display) {
90 90
         $moderate = true;
91 91
     }
92 92
 
93 93
     $items[] = [
94
-        'property' => ['class' => 'checkbox-row' . (!(bool)$content->display ? ' alert-warning' : null)],
94
+        'property' => ['class' => 'checkbox-row'.(!(bool) $content->display ? ' alert-warning' : null)],
95 95
         1 => ['text' => $content->id, 'html' => true, '!secure' => true],
96
-        2 => ['text' => (!(bool)$content->display ? '<i class="fa fa-exclamation text-warning"></i> ' : null) . Url::link(['content/update', $content->id], Serialize::getDecodeLocale($content->title)), 'html' => true],
96
+        2 => ['text' => (!(bool) $content->display ? '<i class="fa fa-exclamation text-warning"></i> ' : null).Url::link(['content/update', $content->id], Serialize::getDecodeLocale($content->title)), 'html' => true],
97 97
         3 => ['text' => Serialize::getDecodeLocale($content->getCategory()->title)],
98
-        4 =>['text' => '<a href="' . $frontLink . '" target="_blank">' . $frontPath . '</a>', 'html' => true],
98
+        4 =>['text' => '<a href="'.$frontLink.'" target="_blank">'.$frontPath.'</a>', 'html' => true],
99 99
         5 => ['text' => Date::convertToDatetime($content->updated_at, Date::FORMAT_TO_SECONDS)],
100 100
         6 => ['text' => $actionIcons, 'html' => true, 'property' => ['class' => 'text-center']]
101 101
     ];
Please login to merge, or discard this patch.