Initial commit

This commit is contained in:
root
2026-01-19 17:44:46 +01:00
commit 823af8b11d
8721 changed files with 1130846 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<?php
namespace Espo\Modules\LinkButton\Api;
use Espo\Core\Api\Action;
use Espo\Core\Api\Request;
use Espo\Core\Api\Response;
use Espo\Core\Api\ResponseComposer;
use Espo\Core\ORM\EntityManager;
use Espo\Modules\Advanced\Entities\Workflow;
class WorkflowCheck implements Action
{
private $entityManager;
public function __construct(EntityManager $entityManager)
{
$this->entityManager = $entityManager;
}
public function process(Request $request): Response
{
$id = $request->getRouteParams('id');
$workflow = $this->entityManager->getRDBRepository('Workflow')
->where([
'id' => $id,
'type' => Workflow::TYPE_MANUAL,
'isActive' => true,
])
->findOne();
if (!$workflow) {
$responseComposer = new ResponseComposer();
return $responseComposer->json(['isManual' => false]);
}
$responseComposer = new ResponseComposer();
return $responseComposer->json(['isManual' => true]);
}
}

View File

@@ -0,0 +1,31 @@
<?php
namespace Espo\Modules\LinkButton\Classes\AppParams;
use Espo\Core\ORM\EntityManager;
use Espo\Entities\Extension;
use Espo\Tools\App\AppParam;
class CheckAdvancedPack implements AppParam
{
private $entityManager;
public function __construct(EntityManager $entityManager)
{
$this->entityManager = $entityManager;
}
public function get(): bool
{
/** @var ?Extension $advancedPack */
$advancedPack = $this->entityManager
->getRDBRepository(Extension::ENTITY_TYPE)
->where([
'name' => 'Advanced Pack',
'isInstalled' => true,
])
->findOne();
return $advancedPack !== null;
}
}

View File

@@ -0,0 +1,59 @@
{
"fieldTypes": {
"link-button": "Schaltfläche-Link"
},
"fields": {
"iconLeft": "Icon links",
"iconRight": "Icon rechts",
"mode": "Modus",
"buttonLabel": "Beschriftung",
"placeholder": "Platzhalter Wert",
"hideLabel": "Label ausblenden",
"buttonSize": "Größe der Schaltfläche",
"style": "Stil",
"title": "Titel",
"confirmationDialog": "Bestätigungsdialog",
"confirmationText": "Bestätigungstext",
"hideOriginalWorkflowAction": "Original Workflow-Aktion ausblenden",
"popupHeight": "Popup-Höhe",
"popupWidth": "Popup-Breite"
},
"options": {
"style": {
"default": "Standard",
"primary": "Primär",
"secondary": "Sekundär",
"success": "Erfolgreich",
"danger": "Gefahr",
"warning": "Warnung",
"info": "Info",
"dark": "Dunkel",
"light": "Hell",
"outline-primary": "Umrandung: Primär",
"outline-secondary": "Umrandung: Sekundär",
"outline-success": "Umrandung: Erfolgreich",
"outline-danger": "Umrandung: Gefahr",
"outline-warning": "Umrandung: Warnung",
"outline-info": "Umrandung: Info",
"outline-dark": "Umrandung: Dunkel",
"outline-light": "Umrandung: Hell"
},
"buttonSize": {
"btn-sm": "Klein",
"btn-md": "Mittel",
"btn-lg": "Groß",
"btn-sm btn-block": "Block Klein",
"btn-md btn-block": "Block Mittel",
"btn-lg btn-block": "Block Groß"
},
"mode": {
"openNewTab": "In neuem Tab öffnen",
"openUrl": "Im gleichen Fenster öffnen",
"openPopup": "Popup öffnen",
"openModal": "Modal öffnen",
"openEspoModal": "Espo Modal öffnen",
"quickCreate": "Schnelles Erstellen",
"runEspoWorkflow": "Workflow ausführen"
}
}
}

View File

@@ -0,0 +1,9 @@
{
"fieldInfo": {
"link-button": "Eine konfigurierbare Schaltfläche, die eine URL speichern kann."
},
"tooltips": {
"hideLabel": "Wenn aktiv, sollten Sie auch die Inline-Bearbeitung deaktivieren, falls Sie planen die Schaltflächengröße Block zu verwenden.",
"placeholder": "Der Text, der als Hinweis angezeigt wird, wenn das Feld keinen Wert enthält."
}
}

View File

@@ -0,0 +1,59 @@
{
"fieldTypes": {
"link-button": "Link Button"
},
"fields": {
"iconLeft": "Left Icon",
"iconRight": "Right Icon",
"mode": "Mode",
"buttonLabel": "Button Label",
"placeholder": "Placeholder Value",
"hideLabel": "Hide Label",
"buttonSize": "Button Size",
"style": "Style",
"title": "Title",
"confirmationDialog": "Confirmation Dialog",
"confirmationText": "Confirmation Text",
"hideOriginalWorkflowAction": "Hide Original Workflow Action",
"popupHeight": "Popup Height",
"popupWidth": "Popup Width"
},
"options": {
"style": {
"default": "default",
"primary": "Primary",
"secondary": "Secondary",
"success": "Success",
"danger": "Danger",
"warning": "Warning",
"info": "info",
"dark": "Dark",
"light": "Light",
"outline-primary": "Outline Primary",
"outline-secondary": "Outline Secondary",
"outline-success": "Outline Success",
"outline-danger": "Outline Danger",
"outline-warning": "Outline Warning",
"outline-info": "Outline info",
"outline-dark": "Outline Dark",
"outline-light": "Outline Light"
},
"buttonSize": {
"btn-sm": "Small",
"btn-md": "Medium",
"btn-lg": "Large",
"btn-sm btn-block": "Block Small",
"btn-md btn-block": "Block Medium",
"btn-lg btn-block": "Block Large"
},
"mode": {
"openNewTab": "Open New Tab",
"openUrl": "Open URL",
"openPopup": "Open Popup",
"openModal": "Open Modal",
"openEspoModal": "Open Espo Modal",
"quickCreate": "Quick Create",
"runEspoWorkflow": "Run Workflow"
}
}
}

View File

@@ -0,0 +1,9 @@
{
"fieldInfo": {
"link-button": "A customizable button that can store an url."
},
"tooltips": {
"hideLabel": "If active consider disabling inline edit as well if you plan to use block button size.",
"placeholder": "Text to be shown as a hint when there is no value in the field."
}
}

View File

@@ -0,0 +1,59 @@
{
"fieldTypes": {
"link-button": "Bottone Link"
},
"fields": {
"iconLeft": "Icona Sinistra",
"iconRight": "Icona Destra",
"mode": "Modalità",
"buttonLabel": "Etichetta Bottone",
"placeholder": "Testo Segnaposto",
"hideLabel": "Nascondi Etichetta",
"buttonSize": "Dimensione Bottone",
"style": "Stile",
"title": "Titolo",
"confirmationDialog": "Richiedi Conferma",
"confirmationText": "Testo Conferma",
"hideOriginalWorkflowAction": "Nascondi Azione Workflow Originale",
"popupHeight": "Altezza Popup",
"popupWidth": "Larghezza Popup"
},
"options": {
"style": {
"default": "Predefinito",
"primary": "Primario",
"secondary": "Secondario",
"success": "Successo",
"danger": "Pericolo",
"warning": "Avvertimento",
"info": "info",
"dark": "Scuro",
"light": "Chiaro",
"outline-primary": "Contorno Primario",
"outline-secondary": "Contorno Secondario",
"outline-success": "Contorno Successo",
"outline-danger": "Contorno Pericolo",
"outline-warning": "Contorno Avvertimento",
"outline-info": "Contorno info",
"outline-dark": "Contorno Scuro",
"outline-light": "Contorno Chiaro"
},
"buttonSize": {
"btn-sm": "Piccolo",
"btn-md": "Medio",
"btn-lg": "Grande",
"btn-sm btn-block": "Blocco Piccolo",
"btn-md btn-block": "Blocco Medio",
"btn-lg btn-block": "Blocco Grande"
},
"mode": {
"openNewTab": "Apri Nuova Scheda",
"openUrl": "Apri URL",
"openPopup": "Apri Popup",
"openModal": "Apri Modal",
"openEspoModal": "Apri Espo Modal",
"quickCreate": "Creazione Rapida",
"runEspoWorkflow": "Avvia Workflow"
}
}
}

View File

@@ -0,0 +1,9 @@
{
"fieldInfo": {
"link-button": "Un bottone personalizzabile contentente un link."
},
"tooltips": {
"hideLabel": "Se attivo, prendere in considerazione anche la disattivazione della modifica in linea se si intende utilizzare la dimensione del pulsante di tipo blocco.",
"placeholder": "Testo da mostrare come suggerimento quando non vi è nessun valore nel campo."
}
}

View File

@@ -0,0 +1,59 @@
{
"fieldTypes": {
"link-button": "Botão de link"
},
"fields": {
"iconLeft": "Ícone à esquerda",
"iconRight": "Ícone à direita",
"mode": "Modo",
"buttonLabel": "Etiqueta",
"placeholder": "Valor do Placeholder",
"hideLabel": "Ocultar rótulo",
"buttonSize": "Tamanho do botão",
"style": "Estilo",
"title": "Título",
"confirmationDialog": "Confirmation Dialog",
"confirmationText": "Confirmation Text",
"hideOriginalWorkflowAction": "Hide Original Workflow Action",
"popupHeight": "Popup Height",
"popupWidth": "Popup Width"
},
"options": {
"style": {
"default": "Padrão",
"primary": "Primário",
"secondary": "Secundário",
"success": "Bem sucedido",
"danger": "Perigo",
"warning": "Aviso",
"info": "Info",
"dark": "Escuro",
"light": "Claro",
"outline-primary": "Esboço: Primário",
"outline-secondary": "Esboço: Secundário",
"outline-success": "Esboço: Bem sucedido",
"outline-danger": "Esboço: Perigo",
"outline-warning": "Esboço: Aviso",
"outline-info": "Esboço: Info",
"outline-dark": "Contorno: Escuro",
"outline-light": "Contorno: Claro"
},
"buttonSize": {
"btn-sm": "Pequeno",
"btn-md": "Médio",
"btn-lg": "Grande",
"btn-sm btn-block": "Bloco Pequeno",
"btn-md btn-block": "Bloco Médio",
"btn-lg btn-block": "Bloco Grande"
},
"mode": {
"openNewTab": "abrir em uma nova aba",
"openUrl": "abrir na mesma janela",
"openPopup": "abrir pop-up",
"openModal": "abrir Modal",
"openEspoModal": "abrir Espo Modal",
"quickCreate": "Criação rápida",
"runEspoWorkflow": "Executar Workflow"
}
}
}

View File

@@ -0,0 +1,9 @@
{
"fieldInfo": {
"link-button": "Um botão configurável que pode salvar uma URL."
},
"tooltips": {
"hideLabel": "Se estiver ativo, você também deve desativar a edição embutida se planeja usar o formato Bloco do botão.",
"placeholder": "Texto a ser mostrado como uma dica quando não houver valor no campo."
}
}

View File

@@ -0,0 +1,5 @@
{
"isAdvancedPackInstalled": {
"className": "Espo\\Modules\\LinkButton\\Classes\\AppParams\\CheckAdvancedPack"
}
}

View File

@@ -0,0 +1,10 @@
{
"developerModeCssList": [
"__APPEND__",
"client/custom/modules/link-button/css/buttons.css"
],
"cssList": [
"__APPEND__",
"client/custom/modules/link-button/css/buttons.css"
]
}

View File

@@ -0,0 +1,141 @@
{
"params": [
{
"name": "buttonLabel",
"type": "varchar"
},
{
"name": "placeholder",
"type": "varchar",
"tooltip": true
},
{
"name": "title",
"type": "varchar"
},
{
"name": "hideLabel",
"type": "bool",
"tooltip": true,
"default": false
},
{
"name": "required",
"type": "bool",
"default": false
},
{
"name": "mode",
"type": "enum",
"default": "openNewTab",
"options": [
"openNewTab",
"openUrl",
"openPopup",
"openModal",
"openEspoModal",
"quickCreate"
],
"view": "link-button:views/admin/field-manager/fields/mode"
},
{
"name": "hideOriginalWorkflowAction",
"type": "bool",
"view": "link-button:views/admin/field-manager/fields/confirmation-dialog"
},
{
"name": "confirmationDialog",
"type": "bool",
"view": "link-button:views/admin/field-manager/fields/confirmation-dialog"
},
{
"name": "confirmationText",
"type": "text",
"view": "link-button:views/admin/field-manager/fields/confirmation-text"
},
{
"name": "popupHeight",
"type": "int",
"default": 800,
"disableFormatting": true,
"view": "link-button:views/admin/field-manager/fields/popup"
},
{
"name": "popupWidth",
"type": "int",
"default": 600,
"disableFormatting": true,
"view": "link-button:views/admin/field-manager/fields/popup"
},
{
"name": "style",
"type": "enum",
"default": "default",
"options": [
"default",
"primary",
"secondary",
"success",
"danger",
"warning",
"info",
"dark",
"light",
"outline-primary",
"outline-secondary",
"outline-success",
"outline-danger",
"outline-warning",
"outline-info",
"outline-dark",
"outline-light"
]
},
{
"name": "buttonSize",
"type": "enum",
"default": "btn-md",
"options": [
"btn-sm",
"btn-md",
"btn-lg",
"btn-sm btn-block",
"btn-md btn-block",
"btn-lg btn-block"
]
},
{
"name": "iconLeft",
"type": "varchar",
"default": null,
"view": "views/admin/entity-manager/fields/icon-class"
},
{
"name": "iconRight",
"type": "varchar",
"default": null,
"view": "views/admin/entity-manager/fields/icon-class"
},
{
"name": "default",
"type": "varchar"
},
{
"name": "audited",
"type": "bool"
},
{
"name": "readOnly",
"type": "bool"
},
{
"name": "readOnlyAfterCreate",
"type": "bool"
}
],
"filter": true,
"fieldDefs": {
"type": "varchar"
},
"view": "link-button:views/fields/link-button"
}

View File

@@ -0,0 +1,3 @@
{
"order": 5100
}

View File

@@ -0,0 +1,10 @@
[
{
"route": "/LinkButton/WorkflowCheck/:id",
"method": "get",
"actionClassName": "Espo\\Modules\\LinkButton\\Api\\WorkflowCheck",
"params": {
"id": ":id"
}
}
]