diff --git a/Gruntfile.js b/Gruntfile.js index cc6482de4a..1bb9c4a2e9 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -164,6 +164,7 @@ module.exports = function (grunt) { 'custom/**', 'data/.data', 'install/**', + 'portal/**', 'vendor/**', 'html/**', 'bootstrap.php', diff --git a/application/Espo/Core/Application.php b/application/Espo/Core/Application.php index bd4dd6e4b0..2bd6ec1436 100644 --- a/application/Espo/Core/Application.php +++ b/application/Espo/Core/Application.php @@ -289,5 +289,10 @@ class Application $classLoader->register(true); } + + public function setBasePath($basePath) + { + $this->getContainer()->get('clientManager')->setBasePath($basePath); + } } diff --git a/application/Espo/Core/Utils/ClientManager.php b/application/Espo/Core/Utils/ClientManager.php index f11e22ba05..5476e3644d 100644 --- a/application/Espo/Core/Utils/ClientManager.php +++ b/application/Espo/Core/Utils/ClientManager.php @@ -41,6 +41,8 @@ class ClientManager protected $runScript = "app.start();"; + protected $basePath = ''; + public function __construct(Config $config, ThemeManager $themeManager) { $this->config = $config; @@ -57,6 +59,16 @@ class ClientManager return $this->config; } + public function setBasePath($basePath) + { + $this->basePath = $basePath; + } + + public function getBasePath() + { + return $this->basePath; + } + public function display($runScript = null, $htmlFilePath = null, $vars = array()) { if (is_null($runScript)) { @@ -66,8 +78,6 @@ class ClientManager $htmlFilePath = $this->mainHtmlFilePath; } - $basePath = ''; - if ($this->getConfig()->get('isDeveloperMode')) { if (file_exists('frontend/' . $htmlFilePath)) { $htmlFilePath = 'frontend/' . $htmlFilePath; @@ -82,7 +92,7 @@ class ClientManager $html = str_replace('{{useCache}}', $this->getConfig()->get('useCache') ? 'true' : 'false' , $html); $html = str_replace('{{stylesheet}}', $this->getThemeManager()->getStylesheet(), $html); $html = str_replace('{{runScript}}', $runScript , $html); - $html = str_replace('{{basePath}}', $basePath , $html); + $html = str_replace('{{basePath}}', $this->basePath , $html); echo $html; exit; diff --git a/application/Espo/EntryPoints/Portal.php b/application/Espo/EntryPoints/Portal.php index d70e0a2cf1..bf85c2d910 100644 --- a/application/Espo/EntryPoints/Portal.php +++ b/application/Espo/EntryPoints/Portal.php @@ -49,6 +49,7 @@ class Portal extends \Espo\Core\EntryPoints\Base } $application = new \Espo\Core\Portal\Application($id); + $application->setBasePath($this->getContainer()->get('clientManager')->getBasePath()); $application->runClient(); } } diff --git a/client/modules/crm/res/templates/calendar/calendar.tpl b/client/modules/crm/res/templates/calendar/calendar.tpl index acfe4fae6b..7e4aa69af2 100644 --- a/client/modules/crm/res/templates/calendar/calendar.tpl +++ b/client/modules/crm/res/templates/calendar/calendar.tpl @@ -1,6 +1,6 @@ - - - + + + {{#if header}}
diff --git a/client/res/templates/dashboard.tpl b/client/res/templates/dashboard.tpl index db2287cb78..c7611d9768 100644 --- a/client/res/templates/dashboard.tpl +++ b/client/res/templates/dashboard.tpl @@ -1,4 +1,4 @@ - +