diff --git a/config/zentaopms.php b/config/zentaopms.php index aac06dcc4f..e70d6e42df 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -442,7 +442,7 @@ $config->objectTables['privrelation'] = TABLE_PRIVRELATION; $config->objectTables['scene'] = TABLE_SCENE; $config->objectTables['prompt'] = TABLE_PROMPT; -$config->newFeatures = array('introduction', 'tutorial', 'youngBlueTheme', 'visions'); +$config->newFeatures = array('aiPrompts', 'promptDesign', 'promptExec'); $config->disabledFeatures = ''; $config->closedFeatures = ''; diff --git a/module/index/control.php b/module/index/control.php index b4f6cef1e2..d7b1d4dd70 100644 --- a/module/index/control.php +++ b/module/index/control.php @@ -39,8 +39,16 @@ class index extends control $latestVersionList = array(); if(isset($this->config->global->latestVersionList)) $latestVersionList = json_decode($this->config->global->latestVersionList); + $showFeatures = false; + foreach($this->config->newFeatures as $feature) + { + $accounts = zget($this->config->global, 'skip' . ucfirst($feature), ''); + if(strpos(",$accounts,", $this->app->user->account) === false) $showFeatures = true; + } + $this->view->title = $this->lang->index->common; $this->view->open = helper::safe64Decode($open); + $this->view->showFeatures = $showFeatures; $this->view->latestVersionList = $latestVersionList; $this->display(); diff --git a/module/index/css/index.css b/module/index/css/index.css index c01012df2e..46676464f1 100644 --- a/module/index/css/index.css +++ b/module/index/css/index.css @@ -114,7 +114,6 @@ body.menu-hide {padding-left: 0;} .version-detail {color: #8a8a8a;} .upgrade-now {float: right;} .color-primary {color: #3280fc;} -.showFeatures .modal-body{max-height: 550px !important;} @media screen and (max-height: 768px) { diff --git a/module/index/js/index.js b/module/index/js/index.js index 78e30a1286..168429df9d 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -1,5 +1,11 @@ (function() { + if(showFeatures && vision == 'rnd') + { + /* Show features dialog. */ + new $.zui.ModalTrigger({url: $.createLink('misc', 'features'), type: 'iframe', width: 900, className: 'showFeatures', showHeader: false, backdrop: 'static'}).show(); + } + /* Init variables */ var openedApps = {}; // Key-value to save appCode-app pairs var appsMap = {}; // Key-value to save opened appCode-app pairs diff --git a/module/index/view/index.html.php b/module/index/view/index.html.php index e67c0e8787..2e754e0cc6 100644 --- a/module/index/view/index.html.php +++ b/module/index/view/index.html.php @@ -23,6 +23,7 @@ js::set('manualText', $lang->manual); js::set('manualUrl', ((!empty($config->isINT)) ? $config->manualUrl['int'] : $config->manualUrl['home']) . '&theme=' . $_COOKIE['theme']); js::set('isAdminUser', $this->app->user->admin); js::set('isIntranet', helper::isIntranet()); +js::set('showFeatures', $showFeatures); ?>