|
@@ -242,7 +242,7 @@ class GenerateTreeCommand extends Command
|
|
|
else if(strpos($line, "!col:") === 0) { // !col:
|
|
|
if (!empty($currentMethod)) {
|
|
|
$currentMethod->setColumnSpec(substr($line, 5), $exitURL,
|
|
|
- $currentMethod->name === 'SUB_dashboard' ? 'record' : 'subRecord'
|
|
|
+ $currentMethod->dashboard ? 'record' : 'subRecord'
|
|
|
);
|
|
|
}
|
|
|
}
|
|
@@ -256,6 +256,11 @@ class GenerateTreeCommand extends Command
|
|
|
$currentMethod->addColumnAction(substr($line, 5), $exitURL);
|
|
|
}
|
|
|
}
|
|
|
+ else if(strpos($line, "!nal:") === 0) { // !nal:
|
|
|
+ if (!empty($currentMethod)) {
|
|
|
+ $currentMethod->noActionLinks = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
else if(!empty($currentMethod)) {
|
|
|
$currentMethod->data[] = $line;
|
|
|
if($exitURL) {
|
|
@@ -735,12 +740,12 @@ class GenController {
|
|
|
echo "Generated " . resource_path("views/{$controller->root}/{$controller->name}/{$method->name}.blade.php") . "\n";
|
|
|
}
|
|
|
public function generateSubContent(GenController $controller, GenControllerMethod $method, $text) {
|
|
|
- if($method->name === 'SUB_dashboard') {
|
|
|
+ if($method->dashboard) {
|
|
|
if(!isset($method->groups) || !count($method->groups)) {
|
|
|
- $html = file_get_contents(base_path('generatecv/tree-templates/dashboard.template.blade.php'));
|
|
|
+ $html = file_get_contents(base_path('generatecv/tree-templates/dashboard' . ($method->noActionLinks ? '-nal' : '') . '.template.blade.php'));
|
|
|
}
|
|
|
else {
|
|
|
- $html = file_get_contents(base_path('generatecv/tree-templates/dashboard-grouped.template.blade.php'));
|
|
|
+ $html = file_get_contents(base_path('generatecv/tree-templates/dashboard-grouped' . ($method->noActionLinks ? '-nal' : '') . '.template.blade.php'));
|
|
|
$groupsHtml = [];
|
|
|
$groupTemplate = file_get_contents(base_path('generatecv/tree-templates/dashboard-group.template.blade.php'));
|
|
|
foreach ($method->groups as $group) {
|
|
@@ -1025,6 +1030,8 @@ class GenControllerMethod {
|
|
|
public $columns = [];
|
|
|
public $columnActions = [];
|
|
|
public $groups = [];
|
|
|
+ public $dashboard = false;
|
|
|
+ public $noActionLinks = false;
|
|
|
public function __construct($name, $route)
|
|
|
{
|
|
|
$this->name = $name;
|
|
@@ -1066,6 +1073,7 @@ class GenControllerMethod {
|
|
|
"name" => $parts[0],
|
|
|
"fields" => explode(",", $parts[1])
|
|
|
];
|
|
|
+ $this->dashboard = true;
|
|
|
}
|
|
|
public function addColumnAction($line, $link) {
|
|
|
// is_active:Deactivate:deactivate:edit:if:is_active
|