Merge branch 'sprint/285' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/285_tsj

This commit is contained in:
tianshujie
2023-02-09 10:54:28 +08:00
22 changed files with 488 additions and 154 deletions
+1
View File
@@ -428,6 +428,7 @@ $config->maxPriValue = '256';
$config->importWhiteList = array('user', 'task', 'story', 'bug', 'testcase', 'feedback', 'ticket');
$config->featureGroup = new stdclass();
$config->featureGroup->my = array('score');
$config->featureGroup->product = array('roadmap', 'track', 'UR');
$config->featureGroup->scrum = array();
$config->featureGroup->waterfall = array();
+37
View File
@@ -305,6 +305,43 @@ class helper extends baseHelper
{
throw EndResponseException::create($content);
}
/**
* Get date interval.
*
* @param string|int $begin
* @param string|int $end
* @param string $format %Y-%m-%d %H:%i:%s
* @static
* @access public
* @return object|string
*/
public static function getDateInterval($begin, $end = '', $format = '')
{
if(empty($end)) $end = time();
if(is_int($begin)) $begin = date('Y-m-d H:i:s', $begin);
if(is_int($end)) $end = date('Y-m-d H:i:s', $end);
$begin = date_create($begin);
$end = date_create($end);
$interval = date_diff($begin, $end);
if($format)
{
$dateInterval = $interval->format($format);
}
else
{
$dateInterval = new stdClass();
$dateInterval->year = $interval->format('%Y');
$dateInterval->month = $interval->format('%m');
$dateInterval->day = $interval->format('%d');
$dateInterval->hour = $interval->format('%H');
$dateInterval->minute = $interval->format('%i');
$dateInterval->secound = $interval->format('%s');
}
return $dateInterval;
}
}
/**
+14 -8
View File
@@ -7,11 +7,11 @@ $config->admin->log->saveDays = 30;
if(!isset($config->safe)) $config->safe = new stdclass();
if(!isset($config->safe->weak)) $config->safe->weak = '123456,password,12345,12345678,qwerty,123456789,1234,1234567,abc123,111111,123123';
$config->admin->menuGroup['system'] = array('custom|mode', 'backup', 'cron', 'action|trash', 'admin|xuanxuan', 'setting|xuanxuan', 'admin|license', 'admin|checkweak', 'admin|resetpwdsetting', 'admin|safe', 'custom|timezone', 'search|buildindex', 'admin|tableengine', 'ldap', 'custom|libreoffice');
$config->admin->menuGroup['system'] = array('custom|mode', 'backup', 'cron', 'action|trash', 'admin|xuanxuan', 'setting|xuanxuan', 'admin|license', 'admin|checkweak', 'admin|resetpwdsetting', 'admin|safe', 'custom|timezone', 'search|buildindex', 'admin|tableengine', 'ldap', 'custom|libreoffice', 'conference', 'client');
$config->admin->menuGroup['user'] = array('dept', 'company', 'user', 'group');
$config->admin->menuGroup['switch'] = array('admin|setmodule');
$config->admin->menuGroup['model'] = array('auditcl', 'stage', 'design', 'cmcl', 'reviewcl', 'custom|required', 'custom|set', 'custom|flow', 'custom|code', 'custom|estimate', 'subject', 'process');
$config->admin->menuGroup['feature'] = array('custom|set', 'custom|product', 'custom|execution', 'custom|required', 'custom|kanban', 'approvalflow', 'measurement', 'meetingroom', 'custom|browsestoryconcept', 'custom|kanban');
$config->admin->menuGroup['feature'] = array('custom|set', 'custom|product', 'custom|execution', 'custom|required', 'custom|kanban', 'approvalflow', 'measurement', 'meetingroom', 'custom|browsestoryconcept', 'custom|kanban', 'sqlbuilder');
$config->admin->menuGroup['template'] = array('custom|set', 'baseline');
$config->admin->menuGroup['message'] = array('mail', 'webhook', 'sms', 'message');
$config->admin->menuGroup['dev'] = array('dev', 'entry');
@@ -61,12 +61,18 @@ $config->admin->plugins[194]->name = '应用巡检报告';
$config->admin->plugins[194]->desc = '每日生成公司级禅道应用巡检报告,促进项目管理持续改进。';
$config->admin->plugins[194]->viewLink = 'https://www.zentao.net/extension-viewExt-194.html';
$config->admin->apiRoot = 'https://www.zentao.net/';
$config->admin->classURL = 'https://www.zentao.net/publicclass.html';
$config->admin->extensionURL = 'https://www.zentao.net/extension-browse.html';
$config->admin->patchURL = 'https://www.zentao.net/extension-browse-byModule-1218.html';
$config->admin->downloadURL = 'https://www.zentao.net/download.html';
$config->admin->liteMenuList = array('system', 'user', 'feature', 'message', 'extension', 'dev');
$config->admin->apiRoot = 'https://www.zentao.net';
$config->admin->cdnRoot = 'https://cdn.easycorp.cn/web';
$config->admin->classURL = 'https://www.zentao.net/publicclass.html';
$config->admin->dynamicURL = 'https://www.zentao.net/download.html';
$config->admin->extensionURL = 'https://www.zentao.net/extension-browse.html';
$config->admin->patchURL = 'https://www.zentao.net/extension-browse-byModule-1218.html';
$config->admin->apiSite = 'https://api.zentao.net/';
$config->admin->extAPIURL = $config->admin->apiSite . 'extension-apiGetExtensions-';
$config->admin->patchAPIURL = $config->admin->apiSite . 'extension-apiGetExtensions-bymodule-MTIxOA==-0-100-1.json';
$config->admin->downloadAPIURL = $config->admin->apiSite . 'download.json';
$config->admin->videoAPIURL = $config->admin->apiSite . 'publicclass.json';
$config->admin->liteMenuList = array('system', 'user', 'feature', 'message', 'extension', 'dev');
$config->admin->helpURL['system'] = 'https://www.zentao.net/book/zentaopms/538.html';
$config->admin->helpURL['user'] = 'https://www.zentao.net/book/zentaopms/538.html';
+7 -1
View File
@@ -37,12 +37,15 @@ class admin extends control
$hasInternet = $this->admin->checkInternet();
$clientLang = $this->app->getClientLang();
$langNotCN = common::checkNotCN();
$dateUsed = $this->admin->genDateUsed();
$this->view->title = $this->lang->admin->common;
$this->view->position[] = $this->lang->admin->index;
$this->view->plugins = $this->admin->getExtensionsByAPI('plugin', $langNotCN ? 5 : 6, $hasInternet);
$this->view->patches = $this->admin->getExtensionsByAPI('patch', 3, $hasInternet);
$this->view->patches = $this->admin->getExtensionsByAPI('patch', 5, $hasInternet);
$this->view->dateUsed = $dateUsed;
$this->view->hasInternet = $hasInternet;
$this->view->dynamics = ($hasInternet and !$langNotCN) ? $this->admin->getDynamicsByAPI(3) : array();
$this->view->publicClass = ($hasInternet and !$langNotCN) ? $this->admin->getPublicClassByAPI(3) : array();
$this->view->langNotCN = $langNotCN;
$this->display();
@@ -257,17 +260,20 @@ class admin extends control
{
foreach($this->post->module as $module => $options)
{
if($module == 'myScore') continue;
$checked = reset($options);
if(!$checked) $closedFeatures .= "$module,";
}
}
$closedFeatures = rtrim($closedFeatures, ',');
$this->loadModel('setting')->setItem('system.common.closedFeatures', $closedFeatures);
$this->loadModel('setting')->setItem('system.common.global.scoreStatus', $this->post->module['myScore'][0]);
$this->loadModel('custom')->processMeasrecordCron();
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'top'));
}
$this->view->title = $this->lang->admin->setModuleIndex;
$this->view->closedFeatures = $this->loadModel('setting')->getItem('owner=system&module=common&section=&key=closedFeatures');
$this->view->useScore = $this->loadModel('setting')->getItem('system.common.global.scoreStatus');
$this->view->disabledFeatures = $this->setting->getItem('owner=system&module=common&section=&key=disabledFeatures');
$this->display();
}
+12 -10
View File
@@ -30,16 +30,18 @@
.admin > .main {flex: 1 1 70%;}
.admin > .side {flex: 1 1 30%; margin-left: 16px; padding-right: 16px;}
.panel-title {padding: 10px 0px;}
.panel {padding: 0 0 0 16px;}
.panel {padding-left: 16px;}
.settings.panel, .plug.panel {margin-bottom: 16px;}
.main > .panel {padding-right: 8px;}
.settings-list {display: flex; flex-wrap: wrap; padding: 0 4px 16px 4px;}
.settings-list > .setting-box.btn {flex: 1 1 18%; padding: 8px; border: 1px solid rgba(227, 228, 233, 0.6); margin-right: 10px; margin-top: 16px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; white-space: unset; text-align: unset;}
.settings-list > .setting-box.btn:hover {background: unset;}
.settings-list > .setting-box.btn[disabled] {cursor: not-allowed; pointer-events: unset;}
.settings-list > .setting-box.btn[disabled] > a {pointer-events: none;}
.settings-list > .setting-box > h4 > img {padding-right: 8px; padding-bottom: 3px; width: 32px; height: 27px;}
.settings-list > .setting-box > .setting-desc {padding-bottom: 16px; color: #5E626D;}
.settings-list > .setting-box {border: unset; flex: 0 1 20%; padding: 8px;}
.settings-list > .setting-box > button.btn {padding: 16px 10px; height: 100%; width: 100%; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; white-space: unset; text-align: unset; border: 1px solid rgba(227, 228, 233, 0.6)}
.settings-list > .setting-box > .btn:hover {background: unset;}
.settings-list > .setting-box > .btn[disabled] {cursor: not-allowed; pointer-events: unset;}
.settings-list > .setting-box > .btn[disabled] > a {pointer-events: none;}
.settings-list > .setting-box > .btn > h4 > img {padding-right: 8px; padding-bottom: 3px; width: 32px; height: 27px;}
.settings-list > .setting-box > .btn > .setting-desc {padding-bottom: 16px; color: #5E626D;}
.settings-list.lite-setting > .setting-box {flex: 1 1 30%;}
.plugin-list {display: flex; flex-wrap: wrap; padding: 12px 4px 4px 4px;}
@@ -59,10 +61,9 @@
.official-content > .content {color: #838A9D; font-size: 12px; line-height: 22px; padding-top: 6px;}
.official-content > .title {color: #313C52; font-size: 13px; line-height: 14px;}
.classList {aspect-ratio: 4/1;}
.classList > .classItem {flex: 1 1 30%; margin: 5px; border: 1px solid rgba(227, 228, 233, 0.6); border-radius: 4px; padding-bottom: 16px; align-items: center;}
.classList > .classItem {flex: 1 1 30%; margin: 5px 5px 16px 5px; border: 1px solid rgba(227, 228, 233, 0.6); border-radius: 4px; padding-bottom: 5px; align-items: center;}
.classItem > .imgBack {flex: 1 1 50%;}
.classItem > .imgBack > .classImg {background-repeat: no-repeat; background-size: contain; aspect-ratio: 16 / 9; background-position: center; margin: 0px; border-top-left-radius: 4px; border-top-right-radius: 4px;}
.classItem > .imgBack > .classImg {background-repeat: no-repeat; background-size: contain; aspect-ratio: 16 / 9; background-position: center; margin: 0; border-top-left-radius: 4px; border-top-right-radius: 4px;}
.classItem > .classContent {flex: 1 1 50%; padding: 5px; font-size: 14px; color: #0B0F18; text-align: center; overflow: hidden; height: 24px; margin-bottom: 6px; font-weight: 700;}
.more {float: right; padding-right: 12px; font-weight: normal;}
.panel.publicClass {padding: 0 10px;}
@@ -78,6 +79,7 @@
.main.without-internet > .bottom > .official.panel > .main-panel {flex-direction: row-reverse;}
/* css in side */
#mainContent > .side.panel {height: 100%;}
.time-block {background: #EDEEF2; padding:2px 4px; border-radius: 4px; color: #0B0F18; font-size: 15px; margin: 0 4px;}
.dynamic-block {height: 74px; padding: 12px 16px; display: flex; justify-content: space-between; position: relative; line-height: 20px; border-top: 1px solid #E3E4E9;}
.dynamic-content {height: 50px; line-height: 25px; overflow: hidden;}
+7 -6
View File
@@ -25,6 +25,13 @@ $lang->admin->resetPWDSetting = 'Reset password Setting';
$lang->admin->tableEngine = 'Table Engine';
$lang->admin->setModuleIndex = 'Set Module';
$lang->admin->mon = 'month';
$lang->admin->day = 'day';
$lang->admin->updateDynamics = 'updateDynamics';
$lang->admin->updatePatch = 'updatePatch';
$lang->admin->upgradeRecommend = 'upgradeRecommend';
$lang->admin->zentaoUsed = '';
$lang->admin->api = 'API';
$lang->admin->log = 'Log';
$lang->admin->setting = 'Einstellungen';
@@ -170,10 +177,4 @@ $lang->admin->menuSetting['dev']['desc'] = 'Support for secondary developm
$lang->admin->menuSetting['convert']['name'] = 'Data Import';
$lang->admin->menuSetting['convert']['desc'] = 'Data import from third-party systems.';
$lang->admin->mon = 'month';
$lang->admin->day = 'day';
$lang->admin->updateDynamics = 'updateDynamics';
$lang->admin->updatePatch = 'updatePatch';
$lang->admin->upgradeRecommend = 'upgradeRecommend';
include dirname(__FILE__) . '/menu.php';
+7 -6
View File
@@ -25,6 +25,13 @@ $lang->admin->resetPWDSetting = 'Reset password Setting';
$lang->admin->tableEngine = 'Table Engine';
$lang->admin->setModuleIndex = 'Set Module';
$lang->admin->mon = 'month';
$lang->admin->day = 'day';
$lang->admin->updateDynamics = 'updateDynamics';
$lang->admin->updatePatch = 'updatePatch';
$lang->admin->upgradeRecommend = 'upgradeRecommend';
$lang->admin->zentaoUsed = '';
$lang->admin->api = 'API';
$lang->admin->log = 'Log';
$lang->admin->setting = 'Setting';
@@ -170,10 +177,4 @@ $lang->admin->menuSetting['dev']['desc'] = 'Support for secondary developm
$lang->admin->menuSetting['convert']['name'] = 'Data Import';
$lang->admin->menuSetting['convert']['desc'] = 'Data import from third-party systems.';
$lang->admin->mon = 'month';
$lang->admin->day = 'day';
$lang->admin->updateDynamics = 'updateDynamics';
$lang->admin->updatePatch = 'updatePatch';
$lang->admin->upgradeRecommend = 'upgradeRecommend';
include dirname(__FILE__) . '/menu.php';
+7 -6
View File
@@ -25,6 +25,13 @@ $lang->admin->resetPWDSetting = 'Reset password Setting';
$lang->admin->tableEngine = 'Table Engine';
$lang->admin->setModuleIndex = 'Set Module';
$lang->admin->mon = 'month';
$lang->admin->day = 'day';
$lang->admin->updateDynamics = 'updateDynamics';
$lang->admin->updatePatch = 'updatePatch';
$lang->admin->upgradeRecommend = 'upgradeRecommend';
$lang->admin->zentaoUsed = '';
$lang->admin->api = 'API';
$lang->admin->log = 'Log';
$lang->admin->setting = 'Paramétrage';
@@ -170,10 +177,4 @@ $lang->admin->menuSetting['dev']['desc'] = 'Support for secondary developm
$lang->admin->menuSetting['convert']['name'] = 'Data Import';
$lang->admin->menuSetting['convert']['desc'] = 'Data import from third-party systems.';
$lang->admin->mon = 'month';
$lang->admin->day = 'day';
$lang->admin->updateDynamics = 'updateDynamics';
$lang->admin->updatePatch = 'updatePatch';
$lang->admin->upgradeRecommend = 'upgradeRecommend';
include dirname(__FILE__) . '/menu.php';
+25 -1
View File
@@ -25,6 +25,13 @@ $lang->admin->resetPWDSetting = '重置密码设置';
$lang->admin->tableEngine = '表引擎';
$lang->admin->setModuleIndex = '系统功能配置';
$lang->admin->mon = '月';
$lang->admin->day = '天';
$lang->admin->updateDynamics = '更新动态';
$lang->admin->updatePatch = '补丁更新';
$lang->admin->upgradeRecommend = '推荐升级';
$lang->admin->zentaoUsed = '您已使用禅道';
$lang->admin->api = '接口';
$lang->admin->log = '日志';
$lang->admin->setting = '设置';
@@ -78,12 +85,14 @@ $lang->admin->setModule->optional = '可选功能';
$lang->admin->setModule->opened = '已开启';
$lang->admin->setModule->closed = '已关闭';
$lang->admin->setModule->my = '地盘';
$lang->admin->setModule->product = '产品';
$lang->admin->setModule->scrum = '敏捷项目';
$lang->admin->setModule->waterfall = '瀑布项目';
$lang->admin->setModule->assetlib = '资产库';
$lang->admin->setModule->other = '通用功能';
$lang->admin->setModule->score = '积分';
$lang->admin->setModule->repo = '代码';
$lang->admin->setModule->issue = '问题';
$lang->admin->setModule->risk = '风险';
@@ -171,9 +180,24 @@ $lang->admin->menuSetting['convert']['name'] = '数据导入';
$lang->admin->menuSetting['convert']['desc'] = '第三方系统的数据导入。';
$lang->admin->mon = '月';
$lang->admin->day = '天';
$lang->admin->day = '日';
$lang->admin->updateDynamics = '更新动态';
$lang->admin->updatePatch = '补丁更新';
$lang->admin->upgradeRecommend = '推荐升级';
$lang->admin->zentaoUsed = '您已使用禅道';
$lang->admin->openTag = '禅道';
$lang->admin->bizTag = '禅道企业版';
$lang->admin->maxTag = '禅道旗舰版';
$lang->admin->bizInfoURL = 'https://www.zentao.net/page/enterprise.html';
$lang->admin->maxInfoURL = 'https://www.zentao.net/page/max.html';
$lang->admin->productDetail = '查看详情';
$lang->admin->productFeature['biz'][] = '工时管理、甘特图、导入导出';
$lang->admin->productFeature['biz'][] = '40+内置统计报表、自定义报表功能';
$lang->admin->productFeature['biz'][] = '强大的自定义工作流、反馈管理功能';
$lang->admin->productFeature['max'][] = '瀑布模型功能更全面';
$lang->admin->productFeature['max'][] = '完整CMMI流程';
$lang->admin->productFeature['max'][] = '资产库管理';
include dirname(__FILE__) . '/menu.php';
+63 -8
View File
@@ -492,11 +492,15 @@ class adminModel extends model
{
if($hasInternet)
{
$searchType = $type == 'plugin' ? 'byUpdatedTime' : 'byModule';
$searchType = $type == 'plugin' ? 'byUpdatedTime,offcial' : 'byModule';
$param = $type == 'plugin' ? '' : 'MTIxOA==';
$extensions = $this->loadModel('extension')->getExtensionsByAPI($searchType, $param, 0, $limit);
$plugins = isset($extensions->extensions) ? (array)$extensions->extensions : array();
foreach($plugins as $plugin) $plugin->viewLink = str_replace(array('info', 'client'), '', $plugin->viewLink);
foreach($plugins as $id => $plugin)
{
$plugin->viewLink = str_replace(array('info', 'client'), '', $plugin->viewLink);
if($type == 'patch' and !isset($plugin->compatibleRelease)) unset($plugins[$id]);
}
}
else
{
@@ -533,7 +537,7 @@ class adminModel extends model
$version = $this->loadModel('upgrade')->getOpenVersion(str_replace('.', '_', $this->config->version));
$version = str_replace('_', '.', $version);
$url .= (strpos($url, '?') === false ? '?' : '&') . 'lang=' . str_replace('-', '_', $this->app->getClientLang()) . '&managerVersion=' . self::EXT_MANAGER_VERSION . '&zentaoVersion=' . $version;
$url .= (strpos($url, '?') === false ? '?' : '&') . 'lang=' . str_replace('-', '_', $this->app->getClientLang()) . '&managerVersion=' . self::EXT_MANAGER_VERSION . '&zentaoVersion=' . $version . '&edition=' . $this->config->edition;
$result = json_decode(preg_replace('/[[:cntrl:]]/mu', '', common::http($url)));
if(!isset($result->status)) return false;
@@ -550,7 +554,7 @@ class adminModel extends model
*/
public function getPublicClassByAPI($limit = 2)
{
$apiURL = $this->config->admin->apiRoot . "publicclass.json";
$apiURL = $this->config->admin->videoAPIURL;
$data = $this->fetchAPI($apiURL);
$courses = $data->videos;
@@ -558,17 +562,50 @@ class adminModel extends model
$publicClass = array();
foreach($courses as $course)
{
if($index > $limit) return $publicClass;
if($index > $limit) break;
$publicClass[$index] = new stdClass();
$publicClass[$index]->name = $course->title;
$publicClass[$index]->image = $this->config->admin->apiRoot . $course->image->list[0]->largeURL;
$publicClass[$index]->viewLink = $this->config->admin->apiRoot . 'publicclass/' . ($course->alias ? "{$course->alias}-" : '') . "{$course->id}.html";
$publicClass[$index]->image = $this->config->admin->cdnRoot . $course->image->list[0]->middleURL;
$publicClass[$index]->viewLink = $this->config->admin->apiRoot . '/publicclass/' . ($course->alias ? "{$course->alias}-" : '') . "{$course->id}.html";
$index ++;
}
return $publicClass;
}
/**
* Get dynamics by API.
*
* @param int $limit
* @access public
* @return array
*/
public function getDynamicsByAPI($limit = 2)
{
$apiURL = $this->config->admin->downloadAPIURL;
$data = $this->fetchAPI($apiURL);
$articles = $data->articles;
$index = 1;
$downloads = array();
foreach($articles as $article)
{
if($index > $limit) break;
$tagKey = $this->config->edition . 'Tag';
if(!isset($this->lang->admin->$tagKey)) break;
if(!preg_match("/{$this->lang->admin->$tagKey}\d/", $article->title)) continue;
$downloads[$index] = new stdClass();
$downloads[$index]->id = $article->id;
$downloads[$index]->title = $article->title;
$downloads[$index]->addedDate = $article->addedDate;
$downloads[$index]->link = $this->config->admin->apiRoot . "/download/{$article->alias}-{$article->id}.html";
$index ++;
}
return $downloads;
}
/**
* Check internet.
*
@@ -578,7 +615,7 @@ class adminModel extends model
public function checkInternet()
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.zentao.net/extension-apiGetExtensions.json');
curl_setopt($curl, CURLOPT_URL, $this->config->admin->apiSite);
curl_setopt($curl, CURLOPT_TIMEOUT_MS, 1000);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT_MS, 1000);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
@@ -589,4 +626,22 @@ class adminModel extends model
return (bool)$connected;
}
/**
* Get date used object.
*
* @access public
* @return object
*/
public function genDateUsed()
{
$firstUseDate = $this->dao->select('date')->from(TABLE_ACTION)
->where('date')->gt('0000-00-00')
->andWhere('actor')->eq($this->app->user->account)
->orderBy('date_asc')
->limit('1')
->fetch('date');
return helper::getDateInterval($firstUseDate);
}
}
+43 -37
View File
@@ -19,11 +19,13 @@
<div class="settings-list <?php if($config->vision == 'lite') echo 'lite-setting';?>">
<?php foreach($lang->admin->menuList as $menuKey => $menu):?>
<?php if($config->vision == 'lite' and !in_array($menuKey, $config->admin->liteMenuList)) continue;?>
<button class="setting-box btn shadow-primary-hover" <?php if($menu['disabled']) echo 'disabled';?> data-link='<?php echo $menu['link'];?>'>
<h4><img src="/static/svg/admin-<?php echo $menuKey;?>.svg"/><?php echo $menu['name'];?></h4>
<p class="text-muted setting-desc" title="<?php echo $menu['desc'];?>"><?php echo $menu['desc'];?></p>
<?php echo html::a($config->admin->helpURL[$menuKey], "<i class='icon icon-help'></i> {$lang->help}", '_blank', 'class="text-muted setting-help"');?>
</button>
<div class="setting-box">
<button class="btn shadow-primary-hover" <?php if($menu['disabled']) echo 'disabled';?> data-link='<?php echo $menu['link'];?>'>
<h4><img src="/static/svg/admin-<?php echo $menuKey;?>.svg"/><?php echo $menu['name'];?></h4>
<p class="text-muted setting-desc" title="<?php echo $menu['desc'];?>"><?php echo $menu['desc'];?></p>
<?php echo html::a($config->admin->helpURL[$menuKey], "<i class='icon icon-help'></i> {$lang->help}", '_blank', 'class="text-muted setting-help"');?>
</button>
</div>
<?php endforeach;?>
</div>
</div>
@@ -90,68 +92,72 @@
<div class="side panel" style="background: #FCFDFE">
<div class="h-56 flex align-center justify-between">
<div class="panel-title"><?php echo $lang->admin->zentaoInfo?></div>
<div class="time-count">您已使用禅道<span class="time-block">5</span><?php echo $lang->year?><span class="time-block">9</span><?php echo $lang->admin->mon?><span class="time-block">19</span><?php echo $lang->admin->day?></div>
<div class="time-count">
<?php echo $lang->admin->zentaoUsed;?>
<?php if($dateUsed->year):?>
<span class="time-block"><?php echo $dateUsed->year;?></span><?php echo $lang->year;?>
<?php endif;?>
<?php if($dateUsed->month):?>
<span class="time-block"><?php echo $dateUsed->month;?></span><?php echo $lang->admin->mon;?>
<?php endif;?>
<span class="time-block"><?php echo $dateUsed->day;?></span><?php echo $lang->admin->day;?>
</div>
</div>
<div class="border-gray mb-16 radius-4">
<div class="h-40 pl-16 flex align-center justify-between">
<div class="panel-title"><?php echo $lang->admin->updateDynamics?></div>
<?php echo html::a($config->admin->downloadURL, "{$lang->more} <i class='icon icon-caret-right pb-3'></i>", '_blank', 'class="more text-muted flex align-center"');?>
<?php echo html::a($config->admin->dynamicURL, "{$lang->more} <i class='icon icon-caret-right pb-3'></i>", '_blank', 'class="more text-muted flex align-center"');?>
</div>
<?php foreach($dynamics as $dynamic):?>
<div class="dynamic-block">
<div class="dynamic-content"><i class="icon icon-horn text-primary pr-4 font-20"></i>禅道18.0发布,新增自动化测试方案、使用帮助及全新IDE风格</div>
<div class="dynamic-time">2022-03-12</div>
</div>
<div class="dynamic-block">
<div class="dynamic-content"><i class="icon icon-horn text-primary pr-4 font-20"></i>禅道18.0发布,新增自动化测试方案、使用帮助及全新IDE风格</div>
<div class="dynamic-time">2022-03-12</div>
</div>
<div class="dynamic-block">
<div class="dynamic-content"><i class="icon icon-horn text-primary pr-4 font-20"></i>禅道18.0发布,新增自动化测试方案、使用帮助及全新IDE风格</div>
<div class="dynamic-time">2022-03-12</div>
<div class="dynamic-content"><i class="icon icon-horn text-primary pr-4 font-20"></i><?php echo html::a($dynamic->link, $dynamic->title, '_blank');?></div>
<div class="dynamic-time"><?php echo substr($dynamic->addedDate, 0, 10);?></div>
</div>
<?php endforeach;?>
</div>
<div class="border-gray mb-16 radius-4">
<div class="h-40 pl-16 flex align-center justify-between">
<div class="panel-title"><?php echo $lang->admin->updatePatch?></div>
<?php echo html::a($config->admin->patchURL, "{$lang->more} <i class='icon icon-caret-right pb-3'></i>", '_blank', 'class="more text-muted flex align-center"');?>
</div>
<?php foreach($this->view->patches as $patch):?>
<?php foreach($patches as $patch):?>
<div class="patch-block">
<div class="title flex justify-between">
<div class="panel-title"><?php echo $patch->name?></div>
<div class="title flex justify-between">
<div class="panel-title"><?php echo $patch->name?></div>
<a href="<?php echo $patch->viewLink;?>" class='ext-download flex align-center' target='_blank'><i class='icon icon-download-alt text-primary bg-primary-100 pd-3'></i></a>
</div>
<div class="patch-content">
<?php echo $patch->desc?>
</div>
<div class="patch-content"><?php echo $patch->desc?></div>
</div>
<?php endforeach;?>
</div>
<?php if($config->edition != 'max'):?>
<div class="border-gray mb-16 radius-4">
<div class="h-40 pl-16 flex align-center justify-between">
<div class="panel-title"><?php echo $lang->admin->upgradeRecommend?></div>
<?php echo html::a($config->admin->downloadURL, "{$lang->more} <i class='icon icon-caret-right pb-3'></i>", '_blank', 'class="more text-muted flex align-center"');?>
<?php echo html::a($config->admin->apiRoot, "{$lang->more} <i class='icon icon-caret-right pb-3'></i>", '_blank', 'class="more text-muted flex align-center"');?>
</div>
<?php if($config->edition != 'biz'):?>
<div class="upgrade-block">
<a class="title text-primary flex justify-between" href="<?php echo $config->admin->downloadURL;?>" target="_blank">
<div class="panel-title"><i class="icon icon-zentao text-primary pr-4 font-18"></i>禅道企业版</div>
<div class="flex align-center"><div>查看详情</div><i class="icon icon-caret-right text-primary pb-3"></i></div>
<a class="title text-primary flex justify-between" href="<?php echo $lang->admin->bizInfoURL;?>" target="_blank">
<div class="panel-title"><i class="icon icon-zentao text-primary pr-4 font-18"></i><?php echo $lang->admin->bizTag?></div>
<div class="flex align-center"><div><?php echo $lang->admin->productDetail?></div><i class="icon icon-caret-right text-primary pb-3"></i></div>
</a>
<div class="upgrade-content">工时管理、甘特图、导入导出</div>
<div class="upgrade-content">40+内置统计报表、自定义报表功能</div>
<div class="upgrade-content">强大的自定义工作流、反馈管理功能</div>
<?php foreach($lang->admin->productFeature['biz'] as $feature):?>
<div class="upgrade-content color-gray"><?php echo $feature;?></div>
<?php endforeach;?>
</div>
<?php endif;?>
<div class="upgrade-block">
<a class="title text-primary flex justify-between" href='<?php echo $config->admin->downloadURL;?>' target="_blank">
<div class="panel-title"><i class="icon icon-zentao text-primary pr-4 font-18"></i>禅道旗舰版</div>
<div class="flex align-center"><div>查看详情</div><i class="icon icon-caret-right text-primary pb-3"></i></div>
<a class="title text-primary flex justify-between" href='<?php echo $lang->admin->maxInfoURL;?>' target="_blank">
<div class="panel-title"><i class="icon icon-zentao text-primary pr-4 font-18"></i><?php echo $lang->admin->maxTag?></div>
<div class="flex align-center"><div><?php echo $lang->admin->productDetail?></div><i class="icon icon-caret-right text-primary pb-3"></i></div>
</a>
<div class="upgrade-content">工时管理、甘特图、导入导出</div>
<div class="upgrade-content">40+内置统计报表、自定义报表功能</div>
<div class="upgrade-content">强大的自定义工作流、反馈管理功能</div>
<div class="upgrade-content">工时管理、甘特图、导入导出</div>
<?php foreach($lang->admin->productFeature['max'] as $feature):?>
<div class="upgrade-content color-gray"><?php echo $feature;?></div>
<?php endforeach;?>
</div>
</div>
<?php endif;?>
</div>
<?php endif;?>
</div>
+10 -1
View File
@@ -47,7 +47,16 @@
<?php foreach($features as $feature):?>
<?php $code = $group. ucfirst($feature);?>
<?php if(strpos(",$disabledFeatures,", ",$code,") !== false) continue;?>
<?php $value = strpos(",$closedFeatures,", ",$code,") === false ? '1' : '0';?>
<?php
if($code == 'myScore')
{
$value = $useScore;
}
else
{
$value = strpos(",$closedFeatures,", ",$code,") === false ? '1' : '0';
}
?>
<div class='group-item'>
<?php echo html::checkbox("module[{$code}]", array('1' => $lang->admin->setModule->{$feature}), $value, "data-code='{$code}'", 'inline');?>
<?php echo html::hidden("module[{$code}][]", $value, $value ? 'disabled' : '');?>
+1 -1
View File
@@ -60,7 +60,7 @@ class extensionModel extends model
$version = $this->loadModel('upgrade')->getOpenVersion(str_replace('.', '_', $this->config->version));
$version = str_replace('_', '.', $version);
$url .= (strpos($url, '?') === false ? '?' : '&') . 'lang=' . str_replace('-', '_', $this->app->getClientLang()) . '&managerVersion=' . self::EXT_MANAGER_VERSION . '&zentaoVersion=' . $version;
$url .= (strpos($url, '?') === false ? '?' : '&') . 'lang=' . str_replace('-', '_', $this->app->getClientLang()) . '&managerVersion=' . self::EXT_MANAGER_VERSION . '&zentaoVersion=' . $version . '&edition=' . $this->config->edition;
$result = json_decode(common::http($url));
if(!isset($result->status)) return false;
@@ -27,4 +27,13 @@ if($config->vision != 'lite')
{
$lang->admin->menuList->system['subMenu']['xuanxuan'] = array('link' => 'Desktop|admin|xuanxuan|', 'subModule' => 'client,setting');
$lang->admin->menuList->system['menuOrder']['20'] = 'xuanxuan';
$lang->admin->menuList->system['tabMenu']['xuanxuan']['index'] = array('link' => 'Home|admin|xuanxuan|');
$lang->admin->menuList->system['tabMenu']['xuanxuan']['setting'] = array('link' => 'Parameter|setting|xuanxuan|');
if($config->edition != 'open')
{
$lang->admin->menuList->system['tabMenu']['xuanxuan']['conference'] = array('link' => 'Conference|conference|admin|');
$lang->navGroup->conference = 'admin';
}
$lang->admin->menuList->system['tabMenu']['xuanxuan']['update'] = array('link' => 'Update|client|browse|', 'subModule' => 'client');
}
@@ -27,4 +27,13 @@ if($config->vision != 'lite')
{
$lang->admin->menuList->system['subMenu']['xuanxuan'] = array('link' => 'Desktop|admin|xuanxuan|', 'subModule' => 'client,setting');
$lang->admin->menuList->system['menuOrder']['20'] = 'xuanxuan';
$lang->admin->menuList->system['tabMenu']['xuanxuan']['index'] = array('link' => 'Home|admin|xuanxuan|');
$lang->admin->menuList->system['tabMenu']['xuanxuan']['setting'] = array('link' => 'Parameter|setting|xuanxuan|');
if($config->edition != 'open')
{
$lang->admin->menuList->system['tabMenu']['xuanxuan']['conference'] = array('link' => 'Conference|conference|admin|');
$lang->navGroup->conference = 'admin';
}
$lang->admin->menuList->system['tabMenu']['xuanxuan']['update'] = array('link' => 'Update|client|browse|', 'subModule' => 'client');
}
@@ -27,4 +27,13 @@ if($config->vision != 'lite')
{
$lang->admin->menuList->system['subMenu']['xuanxuan'] = array('link' => 'Desktop|admin|xuanxuan|', 'subModule' => 'client,setting');
$lang->admin->menuList->system['menuOrder']['20'] = 'xuanxuan';
$lang->admin->menuList->system['tabMenu']['xuanxuan']['index'] = array('link' => 'Home|admin|xuanxuan|');
$lang->admin->menuList->system['tabMenu']['xuanxuan']['setting'] = array('link' => 'Parameter|setting|xuanxuan|');
if($config->edition != 'open')
{
$lang->admin->menuList->system['tabMenu']['xuanxuan']['conference'] = array('link' => 'Conference|conference|admin|');
$lang->navGroup->conference = 'admin';
}
$lang->admin->menuList->system['tabMenu']['xuanxuan']['update'] = array('link' => 'Update|client|browse|', 'subModule' => 'client');
}
@@ -25,6 +25,15 @@ $lang->admin->sizeType['G'] = 1024 * 1024 * 1024;
global $config;
if($config->vision != 'lite')
{
$lang->admin->menuList->system['subMenu']['xuanxuan'] = array('link' => '聊天|admin|xuanxuan|', 'subModule' => 'client,setting');
$lang->admin->menuList->system['subMenu']['xuanxuan'] = array('link' => '聊天|admin|xuanxuan|', 'subModule' => 'client,setting,conference');
$lang->admin->menuList->system['menuOrder']['20'] = 'xuanxuan';
$lang->admin->menuList->system['tabMenu']['xuanxuan']['index'] = array('link' => '首页|admin|xuanxuan|');
$lang->admin->menuList->system['tabMenu']['xuanxuan']['setting'] = array('link' => '参数|setting|xuanxuan|');
if($config->edition != 'open')
{
$lang->admin->menuList->system['tabMenu']['xuanxuan']['conference'] = array('link' => '音视频|conference|admin|');
$lang->navGroup->conference = 'admin';
}
$lang->admin->menuList->system['tabMenu']['xuanxuan']['update'] = array('link' => '更新|client|browse|', 'subModule' => 'client');
}
@@ -1,22 +1,5 @@
<?php
$lang->xuanxuan = new stdclass();
//$lang->admin->menu->xuanxuan['subMenu'] = new stdclass();
//$lang->admin->menu->xuanxuan['subMenu']->index = array('link' => 'Home|admin|xuanxuan');
//$lang->admin->menu->xuanxuan['subMenu']->setting = array('link' => 'Parameter|setting|xuanxuan');
//$lang->admin->menu->xuanxuan['subMenu']->update = array('link' => 'Update|client|browse', 'subModule' => 'client');
//
//$lang->admin->menu->xuanxuan['menuOrder'][0] = 'index';
//$lang->admin->menu->xuanxuan['menuOrder'][5] = 'setting';
//$lang->admin->menu->xuanxuan['menuOrder'][10] = 'update';
global $config;
//if($config->edition != 'open')
//{
// $lang->admin->menu->xuanxuan['subModule'] = 'client,setting,conference';
// $lang->admin->menu->xuanxuan['subMenu']->conference = array('link' => 'Conference|conference|admin');
// $lang->admin->menu->xuanxuan['menuOrder'][7] = 'conference';
// $lang->navGroup->conference = 'admin';
//}
$lang->navGroup->im = 'admin';
$lang->navGroup->setting = 'admin';
@@ -1,22 +1,5 @@
<?php
$lang->xuanxuan = new stdclass();
//$lang->admin->menu->xuanxuan['subMenu'] = new stdclass();
//$lang->admin->menu->xuanxuan['subMenu']->index = array('link' => 'Home|admin|xuanxuan');
//$lang->admin->menu->xuanxuan['subMenu']->setting = array('link' => 'Parameter|setting|xuanxuan');
//$lang->admin->menu->xuanxuan['subMenu']->update = array('link' => 'Update|client|browse', 'subModule' => 'client');
//
//$lang->admin->menu->xuanxuan['menuOrder'][0] = 'index';
//$lang->admin->menu->xuanxuan['menuOrder'][5] = 'setting';
//$lang->admin->menu->xuanxuan['menuOrder'][10] = 'update';
global $config;
//if($config->edition != 'open')
//{
// $lang->admin->menu->xuanxuan['subModule'] = 'client,setting,conference';
// $lang->admin->menu->xuanxuan['subMenu']->conference = array('link' => 'Conference|conference|admin');
// $lang->admin->menu->xuanxuan['menuOrder'][7] = 'conference';
// $lang->navGroup->conference = 'admin';
//}
$lang->navGroup->im = 'admin';
$lang->navGroup->setting = 'admin';
@@ -1,22 +1,5 @@
<?php
$lang->xuanxuan = new stdclass();
//$lang->admin->menu->xuanxuan['subMenu'] = new stdclass();
//$lang->admin->menu->xuanxuan['subMenu']->index = array('link' => 'Home|admin|xuanxuan');
//$lang->admin->menu->xuanxuan['subMenu']->setting = array('link' => 'Parameter|setting|xuanxuan');
//$lang->admin->menu->xuanxuan['subMenu']->update = array('link' => 'Update|client|browse', 'subModule' => 'client');
//
//$lang->admin->menu->xuanxuan['menuOrder'][0] = 'index';
//$lang->admin->menu->xuanxuan['menuOrder'][5] = 'setting';
//$lang->admin->menu->xuanxuan['menuOrder'][10] = 'update';
global $config;
//if($config->edition != 'open')
//{
// $lang->admin->menu->xuanxuan['subModule'] = 'client,setting,conference';
// $lang->admin->menu->xuanxuan['subMenu']->conference = array('link' => 'Conference|conference|admin');
// $lang->admin->menu->xuanxuan['menuOrder'][7] = 'conference';
// $lang->navGroup->conference = 'admin';
//}
$lang->navGroup->im = 'admin';
$lang->navGroup->setting = 'admin';
@@ -1,22 +1,5 @@
<?php
$lang->xuanxuan = new stdclass();
//$lang->admin->menu->xuanxuan['subMenu'] = new stdclass();
//$lang->admin->menu->xuanxuan['subMenu']->index = array('link' => '首页|admin|xuanxuan');
//$lang->admin->menu->xuanxuan['subMenu']->setting = array('link' => '参数|setting|xuanxuan');
//$lang->admin->menu->xuanxuan['subMenu']->update = array('link' => '更新|client|browse', 'subModule' => 'client');
//
//$lang->admin->menu->xuanxuan['menuOrder'][0] = 'index';
//$lang->admin->menu->xuanxuan['menuOrder'][5] = 'setting';
//$lang->admin->menu->xuanxuan['menuOrder'][10] = 'update';
global $config;
//if($config->edition != 'open')
//{
// $lang->admin->menu->xuanxuan['subModule'] = 'client,setting,conference';
// $lang->admin->menu->xuanxuan['subMenu']->conference = array('link' => '音视频|conference|admin');
// $lang->admin->menu->xuanxuan['menuOrder'][7] = 'conference';
// $lang->navGroup->conference = 'admin';
//}
$lang->navGroup->im = 'admin';
$lang->navGroup->setting = 'admin';
@@ -0,0 +1,217 @@
<?php
/**
* The admin view file of conference module of XXB.
*
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZOSL (https://zpl.pub/page/zoslv1.html)
* @author Wenrui LI <liwenrui@easycorp.ltd>
* @package conference
* @version $Id$
* @link https://xuanim.com
*/
?>
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
<div id='mainContent' class='main-row'>
<div class='side-col' id='sidebar'>
<div class='cell'>
<div class="nav list-group tab-menu">
<?php foreach($this->config->conference->owtTabList as $tabIndex):?>
<?php $active = ($type == $tabIndex || ($type == 'edit' && $tabIndex == 'server')) ? 'active' : '';?>
<a href="<?php echo '#' . $tabIndex . 'Content'?>" data-toggle="tab" class='<?php echo $active?>'><?php echo $lang->conference->$tabIndex;?></a>
<?php endforeach;?>
</div>
</div>
</div>
<div class="tab-content">
<div class="tab-pane fade <?php echo $type == 'server' || $type == 'edit' ? 'active in' : '';?>" id="serverContent">
<form method='post' id='conference-admin-form' class='form-ajax<?php if($enabled) echo ' conference-enabled';?><?php if(!empty($backendType)) echo " $backendType-selected";?>'>
<div class='main-header'>
<div class='heading'>
<strong><?php echo $lang->conference->server?></strong>
</div>
</div>
<table class='table table-form'>
<tr>
<th class="w-150px"><?php echo $lang->conference->enabled;?></th>
<td class="w-400px">
<?php if($type != 'edit'): ?>
<div class="checkbox-primary disabled <?php if($enabled) echo 'checked';?>">
<label><?php echo $lang->conference->enabledTip;?></label>
</div>
<?php else: ?>
<div class="checkbox-primary">
<input type="checkbox" name="enabled" id='enabled' value="true" <?php if($enabled) echo 'checked';?> <?php if($type != 'edit') echo 'disabled';?>>
<label for='enabled'><?php echo $lang->conference->enabledTip;?></label>
</div>
<?php endif; ?>
</td>
<td></td>
</tr>
<?php if($type == 'edit' || $enabled): ?>
<tr class='edit-row common-row'>
<th class="w-120px"><?php echo $lang->conference->backend->type;?></th>
<td class="w-400px code">
<?php if($type == 'edit'):?>
<div class='required required-wrapper'></div>
<?php echo html::radio('backendType', $lang->conference->backend->types, $backendType);?>
<?php else: echo html::radio('backendType', $lang->conference->backend->types, $backendType, 'disabled'); endif; ?>
</td>
<td><?php echo $lang->conference->backendTypeTip;?></td>
</tr>
<tr class='edit-row common-row'>
<th class="w-120px"><?php echo $lang->conference->serverAddr;?></th>
<td class="w-400px code">
<?php if($type == 'edit'): ?>
<div class='required required-wrapper'></div>
<?php echo html::input('serverAddr', $serverAddr, "class='form-control'");?>
<?php else: echo empty($serverAddr) ? $lang->conference->notset : $serverAddr; endif; ?>
</td>
<td><?php echo $lang->conference->serverAddrTip;?></td>
</tr>
<tr class='edit-row common-row'>
<th class="w-120px"><?php echo $lang->conference->https;?></th>
<td class="w-400px">
<?php if($type != 'edit'): ?>
<div class="checkbox-primary disabled <?php if($https) echo 'checked';?>">
<label><?php echo $lang->conference->httpsTip;?></label>
</div>
<?php else: ?>
<div class="checkbox-primary">
<input type="checkbox" name="https" id='https' value="true" <?php if($https) echo 'checked';?> <?php if($type != 'edit') echo 'disabled';?>>
<label for='https'><?php echo $lang->conference->httpsTip;?></label>
</div>
<?php endif; ?>
</td>
<td></td>
</tr>
<tr class='edit-row common-row'>
<th class="w-120px"><?php echo $lang->conference->apiPort;?></th>
<td class="w-400px code">
<?php if($type == 'edit'):?>
<div class='required required-wrapper'></div>
<input type="number" name="apiPort" id="apiPort" <?php echo empty($apiPort) ? '' : "value='$apiPort'";?> min="1" max="65535" class="form-control">
<?php else: echo empty($apiPort) ? $lang->conference->notset : $apiPort; endif; ?>
</td>
<td><?php echo $type == 'edit' ? $lang->conference->apiPortTip : '';?></td>
</tr>
<tr class='edit-row owt-row'>
<th class="w-120px"><?php echo $lang->conference->mgmtPort;?></th>
<td class="w-400px code">
<?php if($type == 'edit'): ?>
<div class='required required-wrapper'></div>
<input type="number" name="mgmtPort" id="mgmtPort" <?php echo empty($mgmtPort) ? '' : "value='$mgmtPort'";?> min="1" max="65535" class="form-control">
<?php else: echo empty($mgmtPort) ? $lang->conference->notset : $mgmtPort; endif; ?>
</td>
<td><?php echo $type == 'edit' ? $lang->conference->mgmtPortTip : '';?></td>
</tr>
<tr class='edit-row srs-row'>
<th class="w-120px"><?php echo $lang->conference->rtcPort;?></th>
<td class="w-400px code">
<?php if($type == 'edit'): ?>
<div class='required required-wrapper'></div>
<input type="number" name="rtcPort" id="rtcPort" <?php echo empty($rtcPort) ? '' : "value='$rtcPort'";?> min="1" max="65535" class="form-control">
<?php else: echo empty($rtcPort) ? $lang->conference->notset : $rtcPort; endif; ?>
</td>
<td><?php echo $type == 'edit' ? $lang->conference->rtcPortTip : '';?></td>
</tr>
<tr class='edit-row owt-row'>
<th class="w-120px"><?php echo $lang->conference->serviceId;?></th>
<td class="w-400px code">
<?php if($type == 'edit'): ?>
<div class='required required-wrapper'></div>
<?php echo html::input('serviceId', $serviceId, "class='form-control'");?>
<?php else: echo empty($serviceId) ? $lang->conference->notset : $serviceId; endif; ?>
</td>
<td><?php echo $type == 'edit' ? $lang->conference->serviceIdTip : '';?></td>
</tr>
<tr class='edit-row owt-row'>
<th class="w-120px vtop"><?php echo $lang->conference->serviceKey;?></th>
<td class="w-400px code wrapper">
<?php if($type == 'edit'): ?>
<div class='required required-wrapper'></div>
<?php echo html::textarea('serviceKey', $serviceKey, "class='form-control' style='height:100px;'");?>
<?php else: echo empty($serviceKey) ? $lang->conference->notset : $serviceKey; endif; ?>
</td>
<td><?php echo $type == 'edit' ? $lang->conference->serviceKeyTip : '';?></td>
</tr>
<?php endif; ?>
<tr>
<th></th>
<td colspan='2'>
<?php if($type == 'edit') echo html::submitButton();?>
<?php if($type != 'edit') echo '<a class="btn btn-primary" href="' . helper::createLink('conference', 'admin', 'type=edit') . '">' . $lang->edit;?>
</td>
</tr>
</table>
</form>
</div>
<div class="tab-pane fade <?php echo $type == 'video' ? 'active in' : '';?>" id="videoContent">
<form method='post' id='ajaxForm' class='form-ajax' action=<?php echo $this->createLink("conference", 'admin', 'type=video');?>>
<div class='main-header'>
<div class='heading'>
<strong><?php echo $lang->conference->video?></strong>
</div>
</div>
<table class='table table-form'>
<tr>
<th class="w-120px"><?php echo $lang->conference->resolutionWidth;?></th>
<td class="code w-100px">
<input type="number" name="resolutionWidth" id="resolutionWidth" <?php echo "placeholder='{$lang->conference->placeholder->resolutionWidth}'" ;echo empty($resolutionWidth) ? '' : "value='$resolutionWidth'";?> min="320" max="1280" class="form-control">
</td>
<td><?php echo $lang->conference->resolutionWidthTip;?></td>
</tr>
<tr>
<th><?php echo $lang->conference->resolutionHeight;?></th>
<td class="code w-100px">
<input type="number" name="resolutionHeight" id="resolutionHeight" <?php echo "placeholder='{$lang->conference->placeholder->resolutionHeight}'" ;echo empty($resolutionHeight) ? '' : "value='$resolutionHeight'";?> min="240" max="720" class="form-control">
<td><?php echo $lang->conference->resolutionHeightTip;?></td>
</tr>
<tr><th></th><td></td></tr>
<tr>
<th></th>
<td colspan='2'>
<?php echo html::submitButton();?>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
<style>
.edit-row {display: none}
#conference-admin-form.conference-enabled .edit-row {display: table-row}
.srs-selected .owt-row {display: none!important}
.owt-selected .srs-row {display: none!important}
#videoContent, #serverContent{padding-top:0px;}
.tab-content .main-header {margin-bottom:20px;}
</style>
<script>
$(function()
{
$('.side-col .nav a[data-toggle=tab]').click(function()
{
$(this).parent().find('a').removeClass('active');
$(this).addClass('active');
});
$.setAjaxForm('#conference-admin-form');
$('#enabled').on('change', function()
{
$('#conference-admin-form').toggleClass('conference-enabled', $('#enabled').is(':checked'));
});
$('input[type="radio"][name="backendType"]').on('change', function(e)
{
if(e.target.value == 'owt')
{
$('#conference-admin-form').removeClass('srs-selected');
$('#conference-admin-form').addClass('owt-selected');
}
if(e.target.value == 'srs')
{
$('#conference-admin-form').removeClass('owt-selected');
$('#conference-admin-form').addClass('srs-selected');
}
});
});
</script>
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>