From b547df29a6edadebb1faf5ec7d533a60999dcc4e Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 10 Feb 2023 18:20:57 +0100 Subject: [PATCH] many small fixes --- .gitignore | 1 + Admin/Install/Navigation.install.json | 2 +- Admin/Install/Workflow.install.json | 425 +++++++++++-------- Admin/Install/db.json | 9 +- Admin/Installer.php | 76 +++- Controller/ApiController.php | 131 +++--- Controller/BackendController.php | 2 +- Docs/Dev/en/workflow.md | 9 +- Models/WorkflowInstanceAbstractMapper.php | 1 + Models/WorkflowTemplate.php | 2 + Models/WorkflowTemplateMapper.php | 1 + Theme/Backend/workflow-dashboard.tpl.php | 2 +- Theme/Backend/workflow-instance-list.tpl.php | 2 +- Theme/Backend/workflow-template-list.tpl.php | 47 +- Theme/Backend/workflow-template.tpl.php | 105 +++++ info.json | 3 +- 16 files changed, 533 insertions(+), 285 deletions(-) create mode 100644 Theme/Backend/workflow-template.tpl.php diff --git a/.gitignore b/.gitignore index 22d0d82..abff014 100755 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ vendor +Definitions \ No newline at end of file diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index 2002d7a..33db8cb 100755 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -8,7 +8,7 @@ "uri": "{/lang}/{/app}/workflow/instance/list?{?}", "target": "self", "icon": null, - "order": 40, + "order": 90, "from": "Workflow", "permission": { "permission": 2, "category": null, "element": null }, "parent": 1003301001, diff --git a/Admin/Install/Workflow.install.json b/Admin/Install/Workflow.install.json index b152cd9..3e3a8c6 100644 --- a/Admin/Install/Workflow.install.json +++ b/Admin/Install/Workflow.install.json @@ -173,190 +173,275 @@ } ] } + } + }, + "1005500002": { + "name": "Adapter", + "description": { + "en": "Takes input data and forwards the data to another action. Check the outputs and inputs of the actions to create the correct mapping.", + "de": "Übernimmt Eingangsdaten und leitet diese an eine andere Aktion weiter. Überprüfe die Ausgaben und Eingaben der jeweiligen Aktionen um die korrekten Verknüpfungen zu erstellen." }, - "1005500002": { - "name": "Adapter", - "description": { - "en": "Takes input data and forwards the data to another action. Check the outputs and inputs of the actions to create the correct mapping.", - "de": "Übernimmt Eingangsdaten und leitet diese an eine andere Aktion weiter. Überprüfe die Ausgaben und Eingaben der jeweiligen Aktionen um die korrekten Verknüpfungen zu erstellen." - }, - "function_type": "API", - "function": "apiAdapter", - "inputs": [ - "map", - "{*}" - ], - "outputs": [ - "{*}" - ], - "settings": { - "map": { - "type": "textarea", - "subtype": null, - "default": null, - "pattern": null, - "examples": [ - "output1 -> input1\noutput1.name -> input2" - ], - "required": true, - "title": { - "en": "Adapter", - "de": "Adapter" - }, - "description": { - "en": "", - "de": "" - } + "function_type": "API", + "function": "apiAdapter", + "inputs": [ + "map", + "{*}" + ], + "outputs": [ + "{*}" + ], + "settings": { + "map": { + "type": "textarea", + "subtype": null, + "default": null, + "pattern": null, + "examples": [ + "output1 -> input1\noutput1.name -> input2" + ], + "required": true, + "title": { + "en": "Adapter", + "de": "Adapter" + }, + "description": { + "en": "", + "de": "" } } + } + }, + "1005500003": { + "name": "Listen Trigger", + "description": { + "en": "Listens to trigger", + "de": "Wartet auf Trigger" }, - "1005500003": { - "name": "Listen Trigger", - "description": { - "en": "Listens to trigger", - "de": "Wartet auf Trigger" - }, - "function_type": "API", - "function": "apiListenToTrigger", - "inputs": [ - "type", - "trigger", - "delete", - "{*}" - ], - "outputs": [ - "{*}" - ], - "settings": { - "type": { - "type": "select", - "subtype": null, - "default": "1", - "pattern": null, - "examples": [], - "required": true, - "title": { - "en": "Type", - "de": "Type" - }, - "options": [ - { - "value": "1", - "text": { - "en": "Existing Trigger", - "de": "Bestehender Trigger" - } - }, - { - "value": "2", - "text": { - "en": "New Trigger", - "de": "Neuer Trigger" - } + "function_type": "API", + "function": "apiListenToTrigger", + "inputs": [ + "type", + "trigger", + "delete", + "{*}" + ], + "outputs": [ + "{*}" + ], + "settings": { + "type": { + "type": "select", + "subtype": null, + "default": "1", + "pattern": null, + "examples": [], + "required": true, + "title": { + "en": "Type", + "de": "Type" + }, + "options": [ + { + "value": "1", + "text": { + "en": "Existing Trigger", + "de": "Bestehender Trigger" } - ], - "description": { - "en": "", - "de": "" - } - }, - "trigger": { - "type": "input", - "subtype": "text", - "default": null, - "pattern": null, - "examples": [ - "PRE:Module:Billing:bill-create", - "PRE:Module:Billing:bill-update.*", - "PRE:Module:Billing:bill-update-{$id}" - ], - "required": true, - "title": { - "en": "Trigger", - "de": "Trigger" }, - "description": { - "en": "", - "de": "" - } - }, - "delete": { - "type": "select", - "subtype": null, - "default": "1", - "pattern": null, - "examples": [], - "required": true, - "title": { - "en": "Type", - "de": "Type" - }, - "options": [ - { - "value": "1", - "text": { - "en": "Never", - "de": "Niemals" - } - }, - { - "value": "2", - "text": { - "en": "After trigger execution", - "de": "Nach Triggerausführung" - } - }, - { - "value": "3", - "text": { - "en": "After workflow execution", - "de": "Nach Workflowausführung" - } + { + "value": "2", + "text": { + "en": "New Trigger", + "de": "Neuer Trigger" } - ], - "description": { - "en": "", - "de": "" } - }, - } - }, - "1005500004": { - "name": "Run Trigger", - "description": { - "en": "Takes input data and forwards the data to another action. Check the outputs and inputs of the actions to create the correct mapping.", - "de": "Übernimmt Eingangsdaten und leitet diese an eine andere Aktion weiter. Überprüfe die Ausgaben und Eingaben der jeweiligen Aktionen um die korrekten Verknüpfungen zu erstellen." + ], + "description": { + "en": "", + "de": "" + } }, - "function_type": "API", - "function": "apiAdapter", - "inputs": [ - "map", - "{*}" - ], - "outputs": [ - "{*}" - ], - "settings": { - "map": { - "type": "textarea", - "subtype": null, - "default": null, - "pattern": null, - "examples": [ - "output1 -> input1\noutput1.name -> input2" - ], - "required": true, - "title": { - "en": "Adapter", - "de": "Adapter" + "trigger": { + "type": "input", + "subtype": "text", + "default": null, + "pattern": null, + "examples": [ + "PRE:Module:Billing:bill-create", + "PRE:Module:Billing:bill-update.*", + "PRE:Module:Billing:bill-update-{$id}" + ], + "required": true, + "title": { + "en": "Trigger", + "de": "Trigger" + }, + "description": { + "en": "", + "de": "" + } + }, + "delete": { + "type": "select", + "subtype": null, + "default": "1", + "pattern": null, + "examples": [], + "required": true, + "title": { + "en": "Type", + "de": "Type" + }, + "options": [ + { + "value": "1", + "text": { + "en": "Never", + "de": "Niemals" + } }, - "description": { - "en": "", - "de": "" + { + "value": "2", + "text": { + "en": "After trigger execution", + "de": "Nach Triggerausführung" + } + }, + { + "value": "3", + "text": { + "en": "After workflow execution", + "de": "Nach Workflowausführung" + } } + ], + "description": { + "en": "", + "de": "" } } } + }, + "1005500004": { + "name": "Run Trigger", + "description": { + "en": "Takes input data and forwards the data to another action. Check the outputs and inputs of the actions to create the correct mapping.", + "de": "Übernimmt Eingangsdaten und leitet diese an eine andere Aktion weiter. Überprüfe die Ausgaben und Eingaben der jeweiligen Aktionen um die korrekten Verknüpfungen zu erstellen." + }, + "function_type": "API", + "function": "apiRun", + "inputs": [ + "map", + "{*}" + ], + "outputs": [ + "{*}" + ], + "settings": { + "map": { + "type": "textarea", + "subtype": null, + "default": null, + "pattern": null, + "examples": [ + "output1 -> input1\noutput1.name -> input2" + ], + "required": true, + "title": { + "en": "Adapter", + "de": "Adapter" + }, + "description": { + "en": "", + "de": "" + } + } + } + }, + "1005500005": { + "name": "Timed Trigger", + "description": { + "en": "Timed trigger", + "de": "Wartet auf Trigger" + }, + "function_type": "API", + "function": "apiRun", + "inputs": [ + "interval", + "{*}" + ], + "outputs": [ + "{*}" + ], + "settings": { + "interval": { + "type": "input", + "subtype": "text", + "default": null, + "pattern": null, + "examples": [], + "required": true, + "title": { + "en": "Interval", + "de": "Interval" + }, + "description": { + "en": "", + "de": "" + } + } + } + }, + "1005500006": { + "name": "Cli Action", + "description": { + "en": "Cli action", + "de": "Konsolenbefehl" + }, + "function_type": "API", + "function": "apiRun", + "inputs": [ + "cmd", + "{*}" + ], + "outputs": [ + "{*}" + ], + "settings": { + "cmd": { + "type": "input", + "subtype": "text", + "default": null, + "pattern": null, + "examples": [], + "required": true, + "title": { + "en": "Command", + "de": "Befehl" + }, + "description": { + "en": "", + "de": "" + } + } + } + }, + "1005500007": { + "name": "Workflow Script", + "description": { + "en": "Workflow script", + "de": "Workflow Script" + }, + "function_type": "API", + "function": "apiRun", + "inputs": [ + "{*}" + ], + "outputs": [ + "{*}" + ], + "settings": { + } } } } \ No newline at end of file diff --git a/Admin/Install/db.json b/Admin/Install/db.json index 8f11597..71fe9ef 100755 --- a/Admin/Install/db.json +++ b/Admin/Install/db.json @@ -32,10 +32,17 @@ "default": null, "null": true }, + "workflow_template_schema": { + "name": "workflow_template_schema", + "type": "TEXT", + "default": null, + "null": true + }, "workflow_template_media": { "name": "workflow_template_media", "type": "INT", - "null": false, + "null": true, + "default": null, "foreignTable": "media", "foreignKey": "media_id" }, diff --git a/Admin/Installer.php b/Admin/Installer.php index 48d56d6..c592527 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -69,6 +69,13 @@ final class Installer extends InstallerAbstract \mkdir(__DIR__ . '/../../../temp'); } + if (!\is_dir(__DIR__ . '/../Definitions')) { + \mkdir(__DIR__ . '/../Definitions'); + + \file_put_contents(__DIR__ . '/../Definitions/actions.json', '[]'); + \file_put_contents(__DIR__ . '/../Definitions/triggers.json', '[]'); + } + $apiApp = new class() extends ApplicationAbstract { protected string $appName = 'Api'; @@ -81,13 +88,76 @@ final class Installer extends InstallerAbstract $apiApp->moduleManager = $app->moduleManager; $apiApp->eventManager = $app->eventManager; - foreach ($workflowData as $workflow) { - self::installWorkflow($apiApp, $workflow); - } + self::createTriggers($apiApp, $workflowData['triggers'] ?? []); + self::createActions($apiApp, $workflowData['actions'] ?? []); return []; } + /** + * Install trigger. + * + * @param ApplicationAbstract $app Application + * @param array $data Additional data + * + * @return void + * + * @since 1.0.0 + */ + private static function createTriggers(ApplicationAbstract $app, array $data) : void + { + $path = __DIR__ . '/../Definitions/triggers.json'; + if (!\is_file($path)) { + return; + } + + $installed = \file_get_contents($path); + if ($installed === false) { + return; + } + + $installedData = \json_decode($installed, true); + if ($installedData === false) { + return; + } + + $new = $installedData + $data; + + \file_put_contents($path, \json_encode($new)); + } + + /** + * Install action. + * + * @param ApplicationAbstract $app Application + * @param array $data Additional data + * + * @return void + * + * @since 1.0.0 + */ + private static function createActions(ApplicationAbstract $app, array $data) : void + { + $path = __DIR__ . '/../Definitions/actions.json'; + if (!\is_file($path)) { + return; + } + + $installed = \file_get_contents($path); + if ($installed === false) { + return; + } + + $installedData = \json_decode($installed, true); + if ($installedData === false) { + return; + } + + $new = $installedData + $data; + + \file_put_contents($path, \json_encode($new)); + } + /** * Install application page. * diff --git a/Controller/ApiController.php b/Controller/ApiController.php index db7f105..9cbb2e1 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -423,72 +423,92 @@ final class ApiController extends Controller return; } - $path = '/Modules/Workflow/' . $request->getData('name'); + $collectionId = 0; + $uploaded = []; - /** @var \Modules\Media\Models\Media[] $uploaded */ - $uploaded = $this->app->moduleManager->get('Media')->uploadFiles( - $request->getDataList('names'), - $request->getDataList('filenames'), - $uploadedFiles, - $request->header->account, - __DIR__ . '/../../../Modules/Media/Files' . $path, - $path, - pathSettings: PathSettings::FILE_PATH - ); + if ($request->hasFiles()) { + $path = '/Modules/Workflow/' . $request->getData('name'); - foreach ($uploaded as $upload) { - if ($upload instanceof NullMedia) { - continue; + /** @var \Modules\Media\Models\Media[] $uploaded */ + $uploaded = $this->app->moduleManager->get('Media')->uploadFiles( + names: $request->getDataList('names'), + fileNames: $request->getDataList('filenames'), + files: $uploadedFiles, + account: $request->header->account, + basePath: __DIR__ . '/../../../Modules/Media/Files' . $path, + virtualPath: $path, + pathSettings: PathSettings::FILE_PATH + ); + + foreach ($uploaded as $upload) { + if ($upload instanceof NullMedia) { + continue; + } + + $files[] = $upload; } - $files[] = $upload; + /** @var \Modules\Media\Models\Collection $collection */ + $collection = $this->app->moduleManager->get('Media')->createMediaCollectionFromMedia( + (string) ($request->getData('name') ?? ''), + (string) ($request->getData('description') ?? ''), + $files, + $request->header->account + ); + + if ($collection instanceof NullCollection) { + $response->header->status = RequestStatusCode::R_403; + $this->fillJsonResponse($request, $response, NotificationLevel::ERROR, 'Template', 'Couldn\'t create collection for template', null); + + return; + } + + $collection->setPath('/Modules/Media/Files/Modules/Workflow/' . ((string) ($request->getData('name') ?? ''))); + $collection->setVirtualPath('/Modules/Workflow'); + + $this->createModel($request->header->account, $collection, CollectionMapper::class, 'collection', $request->getOrigin()); + + $collectionId = $collection->getId(); } - /** @var \Modules\Media\Models\Collection $collection */ - $collection = $this->app->moduleManager->get('Media')->createMediaCollectionFromMedia( - (string) ($request->getData('name') ?? ''), - (string) ($request->getData('description') ?? ''), - $files, - $request->header->account - ); - - if ($collection instanceof NullCollection) { - $response->header->status = RequestStatusCode::R_403; - $this->fillJsonResponse($request, $response, NotificationLevel::ERROR, 'Template', 'Couldn\'t create collection for template', null); - - return; - } - - $collection->setPath('/Modules/Media/Files/Modules/Workflow/' . ((string) ($request->getData('name') ?? ''))); - $collection->setVirtualPath('/Modules/Workflow'); - - CollectionMapper::create()->execute($collection); - - $template = $this->createTemplateFromRequest($request, $collection->getId()); + $template = $this->createTemplateFromRequest($request, $collectionId); $this->createModel($request->header->account, $template, WorkflowTemplateMapper::class, 'workflow_template', $request->getOrigin()); // replace placeholders - foreach ($uploaded as $upload) { - if ($upload instanceof NullMedia) { - continue; + if ($collectionId > 0) { + foreach ($uploaded as $upload) { + if ($upload instanceof NullMedia) { + continue; + } + + $path = $upload->getAbsolutePath(); + $content = \file_get_contents($path); + if ($content === false) { + $content = ''; + } + + $content = $this->parseKeys($content, $template); + \file_put_contents($path, $content); } - $path = $upload->getAbsolutePath(); - $content = \file_get_contents($path); - if ($content === false) { - $content = ''; - } - - $content = \str_replace('{workflow_id}', (string) $template->getId(), $content); - \file_put_contents($path, $content); + $this->createDatabaseForTemplate($template); } - $this->createDatabaseForTemplate($template); - $this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Template', 'Template successfully created', $template); } + private function parseKeys(string $content, WorkflowTemplate $template) : string + { + if ($content === '') { + return ''; + } + + $content = \str_replace('{workflow_id}', (string) $template->getId(), $content); + + return $content; + } + /** * Validate template create request * @@ -501,9 +521,7 @@ final class ApiController extends Controller private function validateTemplateCreate(RequestAbstract $request) : array { $val = []; - if (($val['name'] = empty($request->getData('name'))) - || ($val['files'] = empty($request->getFiles())) - ) { + if (($val['name'] = empty($request->getData('name')))) { return $val; } @@ -525,6 +543,7 @@ final class ApiController extends Controller $workflowTemplate->name = (string) ($request->getData('name') ?? ''); $workflowTemplate->description = Markdown::parse((string) ($request->getData('description') ?? '')); $workflowTemplate->descriptionRaw = (string) ($request->getData('description') ?? ''); + $workflowTemplate->schema = $request->getDataJson('schema'); if ($collectionId > 0) { $workflowTemplate->source = new NullCollection($collectionId); @@ -554,15 +573,15 @@ final class ApiController extends Controller $files = $collection->getSources(); foreach ($files as $file) { - if (!StringUtils::endsWith($file->getPath(), 'db.json')) { + if (!StringUtils::endsWith($file->getAbsolutePath(), 'db.json')) { continue; } - if (!\is_file($file->getPath())) { + if (!\is_file($file->getAbsolutePath())) { return; } - $content = \file_get_contents($file->getPath()); + $content = \file_get_contents($file->getAbsolutePath()); if ($content === false) { return; // @codeCoverageIgnore } @@ -653,6 +672,8 @@ final class ApiController extends Controller { $controller = null; + // @todo: implement default workflow instance; + $file = $template->source->findFile('WorkflowController.php'); require_once $file->getAbsolutePath(); diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 0262004..9845bc6 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -107,7 +107,7 @@ final class BackendController extends Controller $controller = new \Modules\Workflow\Controller\WorkflowController($this->app, $template); $controller->createTemplateViewFromRequest($view, $request, $response); } else { - $view->setTemplate('/Modules/Workflow/Theme/Backend/workflow-profile'); + $view->setTemplate('/Modules/Workflow/Theme/Backend/workflow-template'); } $head = $response->get('Content')->getData('head'); diff --git a/Docs/Dev/en/workflow.md b/Docs/Dev/en/workflow.md index cd581de..c718180 100644 --- a/Docs/Dev/en/workflow.md +++ b/Docs/Dev/en/workflow.md @@ -6,15 +6,16 @@ Creating: ```mermaid graph TD; CREATE_TEMPLATE((Create))-->REGISTER_TRIGGER[Register template trigger] - REGISTER_TRIGGER-->HAS_OTHER_TRIGGER{Has other trigger} - HAS_OTHER_TRIGGER--YES-->REGISTER_TRIGGER_2[Register existing trigger] + REGISTER_TRIGGER-->CHECK_TYPE{Check type} + CHECK_TYPE--LISTENER-->REGISTER_TRIGGER_2[Register existing trigger] + CHECK_TYPE--TIMED-->REGISTER_CRON[Register cron job] ``` Running: ```mermaid graph TD; - MAIN_TRIGGER((Trigger))-->CREATE_INSTANCE[Create Instance in DB] + MAIN_TRIGGER((Trigger\nAction, Manual, Time))-->CREATE_INSTANCE[Create Instance in DB] MAIN_TRIGGER-->HAS_SUB_TRIGGERS{Has Sub Triggers} HAS_SUB_TRIGGERS--YES-->REGISTER_TRIGGER[Register sub triggers] MAIN_TRIGGER-->RUN_CODE_1[Run Code] @@ -43,5 +44,3 @@ Billing: 3. Is successful 1. yes: send email 2. no: inform sales person + deactivate benefits - - diff --git a/Models/WorkflowInstanceAbstractMapper.php b/Models/WorkflowInstanceAbstractMapper.php index 285ea3f..81dc947 100755 --- a/Models/WorkflowInstanceAbstractMapper.php +++ b/Models/WorkflowInstanceAbstractMapper.php @@ -37,6 +37,7 @@ final class WorkflowInstanceAbstractMapper extends DataMapperFactory 'workflow_instance_id' => ['name' => 'workflow_instance_id', 'type' => 'int', 'internal' => 'id'], 'workflow_instance_title' => ['name' => 'workflow_instance_title', 'type' => 'string', 'internal' => 'title'], 'workflow_instance_status' => ['name' => 'workflow_instance_status', 'type' => 'int', 'internal' => 'status'], + 'workflow_instance_data' => ['name' => 'workflow_instance_data', 'type' => 'string', 'internal' => 'data'], 'workflow_instance_template' => ['name' => 'workflow_instance_template', 'type' => 'int', 'internal' => 'template'], 'workflow_instance_created_at' => ['name' => 'workflow_instance_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], 'workflow_instance_created_by' => ['name' => 'workflow_instance_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true], diff --git a/Models/WorkflowTemplate.php b/Models/WorkflowTemplate.php index 9d07e45..98556ca 100755 --- a/Models/WorkflowTemplate.php +++ b/Models/WorkflowTemplate.php @@ -93,6 +93,8 @@ class WorkflowTemplate */ public Collection $source; + public array $schema = []; + /** * Constructor. * diff --git a/Models/WorkflowTemplateMapper.php b/Models/WorkflowTemplateMapper.php index ecaf9df..5075cb0 100755 --- a/Models/WorkflowTemplateMapper.php +++ b/Models/WorkflowTemplateMapper.php @@ -40,6 +40,7 @@ final class WorkflowTemplateMapper extends DataMapperFactory 'workflow_template_name' => ['name' => 'workflow_template_name', 'type' => 'string', 'internal' => 'name'], 'workflow_template_desc' => ['name' => 'workflow_template_desc', 'type' => 'string', 'internal' => 'description'], 'workflow_template_descRaw' => ['name' => 'workflow_template_descRaw', 'type' => 'string', 'internal' => 'descriptionRaw'], + 'workflow_template_schema' => ['name' => 'workflow_template_schema', 'type' => 'Json', 'internal' => 'schema'], 'workflow_template_media' => ['name' => 'workflow_template_media', 'type' => 'int', 'internal' => 'source'], 'workflow_template_created_at' => ['name' => 'workflow_template_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], 'workflow_template_created_by' => ['name' => 'workflow_template_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true], diff --git a/Theme/Backend/workflow-dashboard.tpl.php b/Theme/Backend/workflow-dashboard.tpl.php index 4e0b12b..5ebe636 100755 --- a/Theme/Backend/workflow-dashboard.tpl.php +++ b/Theme/Backend/workflow-dashboard.tpl.php @@ -22,7 +22,7 @@ echo $this->getData('nav')->render(); ?>
-
getHtml('instance'); ?>
+
getHtml('Instances'); ?>
getHtml('Status'); ?> diff --git a/Theme/Backend/workflow-instance-list.tpl.php b/Theme/Backend/workflow-instance-list.tpl.php index 710302e..5380316 100755 --- a/Theme/Backend/workflow-instance-list.tpl.php +++ b/Theme/Backend/workflow-instance-list.tpl.php @@ -22,7 +22,7 @@ echo $this->getData('nav')->render(); ?>
-
getHtml('instance'); ?>
+
getHtml('Instances'); ?>
-
getHtml('Status'); ?> diff --git a/Theme/Backend/workflow-template-list.tpl.php b/Theme/Backend/workflow-template-list.tpl.php index d1cf1a2..03a3f4f 100755 --- a/Theme/Backend/workflow-template-list.tpl.php +++ b/Theme/Backend/workflow-template-list.tpl.php @@ -33,38 +33,6 @@ $previous = empty($templates) ? 'workflow/template/list' : '{/lang}/{/app}/workf $next = empty($templates) ? 'workflow/template/list' : '{/lang}/{/app}/workflow/template/list?{?}&id=' . \end($templates)->getId() . '&ptype=n'; echo $this->getData('nav')->render(); ?> -
-
-
- -
-
-
-
@@ -125,20 +93,7 @@ echo $this->getData('nav')->render(); ?>
- $value) : ++$count; - $url = UriFactory::build('{/lang}/{/app}/workflow/template/list?path=' . \rtrim($value->getVirtualPath(), '/') . '/' . $value->name); - ?> -
- - printHtml($value->name); ?> - printHtml($this->renderUserName('%3$s %2$s %1$s', [$value->createdBy->name1, $value->createdBy->name2, $value->createdBy->name3, $value->createdBy->login ?? ''])); ?> - printHtml($value->createdAt->format('Y-m-d')); ?> - - $template) : ++$count; + $template) : ++$count; $url = UriFactory::build('{/lang}/{/app}/workflow/template/profile?{?}&id=' . $template->getId()); ?>