소스 검색

Source templates cleanup

Vijayakrishnan Krishnan 5 년 전
부모
커밋
89231ffc99

+ 4 - 2
app/Console/Commands/GenerateTreeCommand.php

@@ -301,7 +301,9 @@ class GenController {
                 $display = $this->snakeToTitleCase(substr($meth->name, 4));
                 $subLinks[] = "<a " .
                     "href='/{$controller->parentControllerName}/view/<?= \$record->uid ?>/{$meth->name}' " .
-                    "class='d-block p-3 py-2 border-bottom'>$display</a>";
+                    "class='d-block p-3 py-2 border-bottom " .
+                    "{{ request()->route()->getActionMethod() === '{$meth->name}' ? 'bg-secondary text-white' : '' }}"
+                    . "'>$display</a>";
             }
             file_put_contents($subLinksView, implode("\n", $subLinks));
 //            echo "Generated " . $subLinksView . "\n";
@@ -316,7 +318,7 @@ class GenController {
                 $display = $this->camelToTitleCase(substr($meth->name, 7));
                 $actionLinks[] = "<a " .
                     "href='/{$controller->parentControllerName}/view/<?= \$record->uid ?>/{$meth->name}' " .
-                    "class='d-block btn btn-sm btn-default m-3'>$display</a>";
+                    "class='d-block btn btn-sm btn-default mb-3'>$display</a>";
             }
             file_put_contents($actionLinksView, implode("\n", $actionLinks));
 //            echo "Generated " . $actionLinksView . "\n";

+ 5 - 3
generatecv/tree-templates/dashboard.template.blade.php

@@ -1,8 +1,10 @@
 <div class="row">
-    <div class="col-6 border-right">
-        <pre><?= print_r($record); ?></pre>
+    <div class="col-6">
+        <pre class="m-0"><?= print_r($record); ?></pre>
     </div>
     <div class="col-6">
-        @include('_ACTION_LINKS_VIEW_')
+        <div class="border-left h-100 pt-3 px-3">
+            @include('_ACTION_LINKS_VIEW_')
+        </div>
     </div>
 </div>

+ 4 - 2
generatecv/tree-templates/show.template.blade.php

@@ -13,8 +13,10 @@
 
     <div class="card">
         <div class="row">
-            <div class="col-3 border-right">
-                @include('_SUB_LINKS_VIEW_')
+            <div class="col-3">
+                <div class="border-right h-100">
+                    @include('_SUB_LINKS_VIEW_')
+                </div>
             </div>
             <div class="col-9">
                 @yield('content-inner')