فهرست منبع

Show Add New link in sub-view with add support

Vijayakrishnan Krishnan 5 سال پیش
والد
کامیت
b74306a5a4
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      app/Console/Commands/GenerateTreeCommand.php
  2. 1 1
      resources/views/pro/my_clients_SINGLE/SUB_notes.blade.php

+ 1 - 1
app/Console/Commands/GenerateTreeCommand.php

@@ -462,7 +462,7 @@ class GenController {
         $text = str_replace("_LAYOUT_", "{$controller->root}.{$controller->parentControllerName}.view", $text);
         $text = str_replace("_NAME_", $this->camelToTitleCase($this->snakeToTitleCase($method->name)), $text);
 
-        if(count($method->data) > 1 && $method->data[1] === 'add_new') {
+        if(count($method->data) > 1 && strpos($method->data[1], 'add_new') === 0) {
             $addLink = '<a class="btn btn-primary btn-sm" ' .
                     'href="{{route(\'' . $method->childAddRoute . '\', [\'uid\' => $record->uid])}}">' .
                 "<i class='fa fa-plus-circle' aria-hidden='true'></i> Add New</a>";

+ 1 - 1
resources/views/pro/my_clients_SINGLE/SUB_notes.blade.php

@@ -6,7 +6,7 @@
         <h4 class='my-3 d-flex'>
             <div>Notes</div>
             <div class="ml-auto">
-                <!-- _ADD_NEW_LINK_ -->
+                <a class="btn btn-primary btn-sm" href="{{route('my_clients_SINGLE-ACTION_notesAddNew', ['uid' => $record->uid])}}"><i class='fa fa-plus-circle' aria-hidden='true'></i> Add New</a>
             </div>
         </h4>