diff --git a/docs/book/index.md b/docs/book/index.md index 189ba53..b8395bd 100644 --- a/docs/book/index.md +++ b/docs/book/index.md @@ -11,7 +11,7 @@ $ composer create-project oneplace/oneplace-core my-app ``` You also need to add some 3rd party assets to make onePlace -fully work. See [Installation](/installation) +fully work. See [Installation](https://docs.1plc.ch/oneplace-core/installation/) ## Support * Issues: [github.com/oneplc/plc_x_core/issues](https://github.com/oneplc/plc_x_core/issues) diff --git a/module/Application/src/Controller/CoreController.php b/module/Application/src/Controller/CoreController.php index a6f973b..45dd0ab 100644 --- a/module/Application/src/Controller/CoreController.php +++ b/module/Application/src/Controller/CoreController.php @@ -762,4 +762,24 @@ public function getSetting($sKey) { return false; } } + + protected function checkLicense($sModule) { + if(isset(CoreController::$aGlobalSettings['license-server-url'])) { + //$sApiURL = CoreController::$aGlobalSettings['license-server-url'].'/license/api/list/0?authkey='.CoreController::$aGlobalSettings['license-server-apikey']; + $sApiURL = CoreController::$aGlobalSettings['license-server-url'].'/license/api/list/0?authkey=DEVRANDOMKEY&listmode=entity&systemkey='.CoreController::$aGlobalSettings['license-server-apikey'].'&modulename='.$sModule; + $sAnswer = file_get_contents($sApiURL); + + $oResponse = json_decode($sAnswer); + + if(is_object($oResponse)) { + if($oResponse->state == 'success') { + return true; + } + } + + return false; + } else { + return true; + } + } } \ No newline at end of file diff --git a/module/Application/src/Model/CoreEntityModel.php b/module/Application/src/Model/CoreEntityModel.php index d508550..2bd6651 100644 --- a/module/Application/src/Model/CoreEntityModel.php +++ b/module/Application/src/Model/CoreEntityModel.php @@ -264,6 +264,7 @@ protected function attachDynamicFields() { case 'text': case 'textarea': case 'email': + case 'url': case 'featuredimage': case 'tel': $this->$sFieldName = ''; diff --git a/module/Application/src/Model/CoreEntityTable.php b/module/Application/src/Model/CoreEntityTable.php index 6436148..e0bdd06 100644 --- a/module/Application/src/Model/CoreEntityTable.php +++ b/module/Application/src/Model/CoreEntityTable.php @@ -67,6 +67,7 @@ protected function attachDynamicFields(array $aData,$oObject) { case 'textarea': case 'email': case 'tel': + case 'url': $aData[$sFieldName] = $oObject->$sFieldName; break; case 'currency': diff --git a/module/Application/view/partial/basicformfield.phtml b/module/Application/view/partial/basicformfield.phtml index 96eb800..e470347 100644 --- a/module/Application/view/partial/basicformfield.phtml +++ b/module/Application/view/partial/basicformfield.phtml @@ -14,6 +14,7 @@ switch($oField->type) { /** * Text Field */ + case 'url': case 'text': ?> /> diff --git a/module/Application/view/partial/breadcrumb.phtml b/module/Application/view/partial/breadcrumb.phtml index beb6f8d..d4443b9 100644 --- a/module/Application/view/partial/breadcrumb.phtml +++ b/module/Application/view/partial/breadcrumb.phtml @@ -1,16 +1,18 @@ -aButtons) > 0) { - foreach($this->aButtons as $oBtn) { - # Get current entity ID from layout - $iItemID = (isset($this->layout()->oItem)) ? $this->layout()->oItem->getID() : 0; +
\ No newline at end of file diff --git a/module/Application/view/partial/viewformfield.phtml b/module/Application/view/partial/viewformfield.phtml index fdc5050..7f3640d 100644 --- a/module/Application/view/partial/viewformfield.phtml +++ b/module/Application/view/partial/viewformfield.phtml @@ -12,6 +12,11 @@ switch($oField->type) { case 'email': echo $this->oItem->getTextField($oField->fieldkey); break; + case 'url': + echo ''; + echo $this->oItem->getTextField($oField->fieldkey); + echo ''; + break; case 'date': if($this->oItem->getTextField($oField->fieldkey) != '0000-00-00 00:00:00' && $this->oItem->getTextField($oField->fieldkey) != '0000-00-00') { echo date('d.m.Y',strtotime($this->oItem->getTextField($oField->fieldkey)));