From 9bd8f21ac6f0d2367b3ffa97853b4f12a3714804 Mon Sep 17 00:00:00 2001 From: liuhong Date: Tue, 3 Jan 2023 02:22:37 +0000 Subject: [PATCH 001/499] * Fix bug #30537. --- lib/phpmailer/language/phpmailer.lang-de.php | 4 ++-- lib/phpmailer/language/phpmailer.lang-fr.php | 4 ++-- lib/phpmailer/language/phpmailer.lang-zh-cn.php | 2 +- lib/phpmailer/language/phpmailer.lang-zh-tw.php | 2 +- module/mail/view/browse.html.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/phpmailer/language/phpmailer.lang-de.php b/lib/phpmailer/language/phpmailer.lang-de.php index b2a76ce1b5..bbbc08e7dc 100644 --- a/lib/phpmailer/language/phpmailer.lang-de.php +++ b/lib/phpmailer/language/phpmailer.lang-de.php @@ -16,10 +16,10 @@ $PHPMAILER_LANG['from_failed'] = 'Die folgende Absenderadresse ist nich $PHPMAILER_LANG['instantiate'] = 'Mail Funktion konnte nicht initialisiert werden.'; $PHPMAILER_LANG['invalid_email'] = 'E-Mail wird nicht gesendet, die Adresse ist ungültig.'; $PHPMAILER_LANG['mailer_not_supported'] = ' mailer wird nicht unterstützt.'; -$PHPMAILER_LANG['provide_address'] = 'Bitte geben Sie mindestens eine Empfänger E-Mailadresse an.'; +$PHPMAILER_LANG['provide_address'] = 'The recipient has not set up an email address, please go to the background-personnel-user edit to add an email address.'; $PHPMAILER_LANG['recipients_failed'] = 'SMTP Fehler: Die folgenden Empfänger sind nicht korrekt: '; $PHPMAILER_LANG['signing'] = 'Fehler beim Signieren: '; $PHPMAILER_LANG['smtp_connect_failed'] = 'Verbindung zu SMTP Server fehlgeschlagen.'; $PHPMAILER_LANG['smtp_error'] = 'Fehler vom SMTP Server: '; $PHPMAILER_LANG['variable_set'] = 'Kann Variable nicht setzen oder zurücksetzen: '; -?> \ No newline at end of file +?> diff --git a/lib/phpmailer/language/phpmailer.lang-fr.php b/lib/phpmailer/language/phpmailer.lang-fr.php index c99ac3caf9..e2497c60c4 100644 --- a/lib/phpmailer/language/phpmailer.lang-fr.php +++ b/lib/phpmailer/language/phpmailer.lang-fr.php @@ -16,10 +16,10 @@ $PHPMAILER_LANG['from_failed'] = 'L\'adresse d\'expéditeur suivante a $PHPMAILER_LANG['instantiate'] = 'Impossible d\'instancier la fonction mail.'; //$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: '; $PHPMAILER_LANG['mailer_not_supported'] = ' client de messagerie non supporté.'; -$PHPMAILER_LANG['provide_address'] = 'Vous devez fournir au moins une adresse de destinataire.'; +$PHPMAILER_LANG['provide_address'] = 'The recipient has not set up an email address, please go to the background-personnel-user edit to add an email address.'; $PHPMAILER_LANG['recipients_failed'] = 'Erreur SMTP : Les destinataires suivants sont en erreur : '; //$PHPMAILER_LANG['signing'] = 'Signing Error: '; //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; -?> \ No newline at end of file +?> diff --git a/lib/phpmailer/language/phpmailer.lang-zh-cn.php b/lib/phpmailer/language/phpmailer.lang-zh-cn.php index 36db92c7af..fa587e0031 100644 --- a/lib/phpmailer/language/phpmailer.lang-zh-cn.php +++ b/lib/phpmailer/language/phpmailer.lang-zh-cn.php @@ -17,7 +17,7 @@ $PHPMAILER_LANG['from_failed'] = '发送地址错误:'; $PHPMAILER_LANG['instantiate'] = '未知函数调用。'; //$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: '; $PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; -$PHPMAILER_LANG['provide_address'] = '收件人没有设置邮箱,请到组织视图中检查下相应用户的email设置。'; +$PHPMAILER_LANG['provide_address'] = '收件人没有设置邮箱,请到后台-人员-用户编辑中添加上邮箱地址。'; $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误,或检查SMTP服务设置,是否允许发送该邮件地址:'; //$PHPMAILER_LANG['signing'] = 'Signing Error: '; //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; diff --git a/lib/phpmailer/language/phpmailer.lang-zh-tw.php b/lib/phpmailer/language/phpmailer.lang-zh-tw.php index 9dbfef7824..bd2e7fd38d 100644 --- a/lib/phpmailer/language/phpmailer.lang-zh-tw.php +++ b/lib/phpmailer/language/phpmailer.lang-zh-tw.php @@ -17,7 +17,7 @@ $PHPMAILER_LANG['from_failed'] = '發送地址錯誤:'; $PHPMAILER_LANG['instantiate'] = '未知函數調用。'; //$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: '; $PHPMAILER_LANG['mailer_not_supported'] = '發信客戶端不被支持。'; -$PHPMAILER_LANG['provide_address'] = '收件人沒有設置郵箱,請到組織視圖中檢查下相應用戶的email設置。'; +$PHPMAILER_LANG['provide_address'] = '收件人没有设置邮箱,请到后台-人员-用户编辑中添加上邮箱地址。'; $PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:收件人地址錯誤,或檢查SMTP服務設置,是否允許發送該郵件地址:'; //$PHPMAILER_LANG['signing'] = 'Signing Error: '; //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; diff --git a/module/mail/view/browse.html.php b/module/mail/view/browse.html.php index c21bc04d06..0f7ce1b109 100644 --- a/module/mail/view/browse.html.php +++ b/module/mail/view/browse.html.php @@ -54,7 +54,7 @@ createdDate?> sendTime?> mail->statusList, $queue->status)?> - failReason?> + failReason?> id"), $lang->delete, 'hiddenwin'); From da18b4b7f0527844f5022417d4977a728fdf0a7f Mon Sep 17 00:00:00 2001 From: liuhong Date: Tue, 3 Jan 2023 02:33:48 +0000 Subject: [PATCH 002/499] * Adjust code for bug #30537. --- lib/phpmailer/language/phpmailer.lang-zh-tw.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/phpmailer/language/phpmailer.lang-zh-tw.php b/lib/phpmailer/language/phpmailer.lang-zh-tw.php index bd2e7fd38d..41af4ab3c6 100644 --- a/lib/phpmailer/language/phpmailer.lang-zh-tw.php +++ b/lib/phpmailer/language/phpmailer.lang-zh-tw.php @@ -17,7 +17,7 @@ $PHPMAILER_LANG['from_failed'] = '發送地址錯誤:'; $PHPMAILER_LANG['instantiate'] = '未知函數調用。'; //$PHPMAILER_LANG['invalid_email'] = 'Not sending, email address is invalid: '; $PHPMAILER_LANG['mailer_not_supported'] = '發信客戶端不被支持。'; -$PHPMAILER_LANG['provide_address'] = '收件人没有设置邮箱,请到后台-人员-用户编辑中添加上邮箱地址。'; +$PHPMAILER_LANG['provide_address'] = '收件人沒有設置郵箱,請到後台-人員-用戶編輯中添加上郵箱地址。'; $PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:收件人地址錯誤,或檢查SMTP服務設置,是否允許發送該郵件地址:'; //$PHPMAILER_LANG['signing'] = 'Signing Error: '; //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; From 5a2b75d24fbb0acb3726d78656fdbe3a4a1e0693 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Tue, 3 Jan 2023 10:59:35 +0800 Subject: [PATCH 003/499] * Finish task#81780. --- module/product/model.php | 8 ++++++++ module/program/model.php | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/module/product/model.php b/module/product/model.php index f5191622e1..81a341464f 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -1300,14 +1300,22 @@ class productModel extends model { $projectList = $this->dao->select('t2.*')->from(TABLE_PROJECTPRODUCT)->alias('t1') ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') + ->leftJoin(TABLE_TEAM)->alias('t3')->on('t2.id=t3.root') + ->leftJoin(TABLE_STAKEHOLDER)->alias('t4')->on('t2.id=t4.objectID') ->where('t1.product')->eq($productID) ->andWhere('t2.type')->eq('project') + ->beginIF($this->cookie->involved or $involved)->andWhere('t3.type')->eq('project')->fi() ->beginIF($browseType == 'undone')->andWhere('t2.status')->in('wait,doing')->fi() ->beginIF(strpos(",all,undone,", ",$browseType,") === false)->andWhere('t2.status')->eq($browseType)->fi() ->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->projects)->fi() ->beginIF($this->cookie->involved or $involved) ->andWhere('t2.openedBy', true)->eq($this->app->user->account) ->orWhere('t2.PM')->eq($this->app->user->account) + ->orWhere('t3.account')->eq($this->app->user->account) + ->orWhere('(t4.user')->eq($this->app->user->account) + ->andWhere('t4.deleted')->eq(0) + ->markRight(1) + ->orWhere("CONCAT(',', t2.whitelist, ',')")->like("%,{$this->app->user->account},%") ->markRight(1) ->fi() ->beginIF($branch !== '' and $branch !== 'all')->andWhere('t1.branch')->in($branch)->fi() diff --git a/module/program/model.php b/module/program/model.php index bbb4068e16..0fd073c6ca 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -615,7 +615,9 @@ class programModel extends model ->andWhere('t1.openedBy', true)->eq($this->app->user->account) ->orWhere('t1.PM')->eq($this->app->user->account) ->orWhere('t2.account')->eq($this->app->user->account) - ->orWhere('t3.user')->eq($this->app->user->account) + ->orWhere('(t3.user')->eq($this->app->user->account) + ->andWhere('t3.deleted')->eq(0) + ->markRight(1) ->orWhere("CONCAT(',', t1.whitelist, ',')")->like("%,{$this->app->user->account},%") ->markRight(1) ->fi() From b922f85ecd29550c522150cd21e0f79f2a78c162 Mon Sep 17 00:00:00 2001 From: liuhong Date: Tue, 3 Jan 2023 04:50:20 +0000 Subject: [PATCH 004/499] * Finish task #81781. --- module/productplan/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/productplan/control.php b/module/productplan/control.php index ab589b4eae..f7baffdeae 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -758,7 +758,7 @@ class productplan extends control $this->productplan->unlinkStory($storyID, $planID); $this->loadModel('action')->create('productplan', $planID, 'unlinkstory', '', $storyID); - return print(js::locate($this->createLink('productplan', 'view', "planID=$planID&type=story"), 'parent')); + return print(js::reload('parent')); } } From 62070301f403eebea2eb5e981cdeb47554c92533 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Tue, 3 Jan 2023 17:04:09 +0800 Subject: [PATCH 005/499] * Code for task#81779. --- module/bug/control.php | 1 + module/bug/model.php | 23 +++++++++++++++++++++-- module/bug/view/create.html.php | 11 ++++++++++- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index eb6b86c45f..b49a67aedd 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -665,6 +665,7 @@ class bug extends control $this->view->storyID = $storyID; $this->view->buildID = $buildID; $this->view->caseID = $caseID; + $this->view->caseFiles = isset($caseFiles) ? $caseFiles : array(); $this->view->runID = $runID; $this->view->version = $version; $this->view->testtask = $testtask; diff --git a/module/bug/model.php b/module/bug/model.php index 64fb3747d1..748057d086 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -78,7 +78,7 @@ class bugModel extends model ->join('mailto', ',') ->join('os', ',') ->join('browser', ',') - ->remove('files,labels,uid,oldTaskID,contactListMenu,region,lane,ticket') + ->remove('files,labels,uid,oldTaskID,contactListMenu,region,lane,ticket,deleteFiles,caseFiles') ->get(); /* Check repeat bug. */ @@ -98,6 +98,23 @@ class bugModel extends model { $bugID = $this->dao->lastInsertID(); + if(isset($_POST['caseFiles'])) + { + $caseFiles = $_POST['caseFiles']; + if(isset($_POST['deleteFiles'])) + { + foreach($_POST['deleteFiles'] as $deletedCaseFileID) $caseFiles = trim(str_replace(",$deletedCaseFileID,", ',', ",$caseFiles,"), ','); + } + $files = $this->dao->select('*')->from(TABLE_FILE)->where('id')->in($caseFiles)->fetchAll('id'); + foreach($files as $file) + { + unset($file->id); + $file->objectType = 'bug'; + $file->objectID = $bugID; + $this->dao->insert(TABLE_FILE)->data($file)->exec(); + } + } + $this->file->updateObjectID($this->post->uid, $bugID, 'bug'); $this->file->saveUpload('bug', $bugID); empty($bug->case) ? $this->loadModel('score')->create('bug', 'create', $bugID) : $this->loadModel('score')->create('bug', 'createFormCase', $bug->case); @@ -2279,7 +2296,9 @@ class bugModel extends model if(!$executionID and $caseID > 0) $executionID = isset($run->case->execution) ? $run->case->execution : 0; // Fix feedback #1043. if(!$executionID and $this->app->tab == 'execution') $executionID = $this->session->execution; - return array('title' => $title, 'steps' => $bugSteps, 'storyID' => $run->case->story, 'moduleID' => $run->case->module, 'version' => $run->case->version, 'executionID' => $executionID); + $caseFiles = $caseID ? $this->loadModel('file')->getByObject('testcase', $caseID) : array(); + + return array('title' => $title, 'steps' => $bugSteps, 'storyID' => $run->case->story, 'moduleID' => $run->case->module, 'version' => $run->case->version, 'executionID' => $executionID, 'caseFiles' => $caseFiles); } /** diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index 825a86fb40..732402cf5e 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -365,7 +365,16 @@ if($this->app->tab == 'project') js::set('objectID', $projectID); printExtendFields('', 'table');?> bug->files;?> - fetch('file', 'buildform', 'fileCount=1&percent=0.85');?> + + fetch('file', 'printFiles', array('files' => $caseFiles, 'fieldset' => 'false', 'object' => null, 'method' => 'edit')); + echo html::hidden('caseFiles', implode(',', array_keys($caseFiles))); + } + ?> + fetch('file', 'buildform', 'fileCount=1&percent=0.85');?> + From 2996d56fa0e4c7e903c42e9391a40df4dc8a9420 Mon Sep 17 00:00:00 2001 From: liuhong Date: Tue, 3 Jan 2023 09:14:04 +0000 Subject: [PATCH 006/499] * Finish task #81778. --- module/testcase/config.php | 2 ++ module/testtask/control.php | 6 ++++++ module/testtask/lang/de.php | 1 + module/testtask/lang/en.php | 1 + module/testtask/lang/fr.php | 1 + module/testtask/lang/zh-cn.php | 1 + module/testtask/model.php | 26 +++++++++++++++----------- module/testtask/view/linkcase.html.php | 2 ++ 8 files changed, 29 insertions(+), 11 deletions(-) diff --git a/module/testcase/config.php b/module/testcase/config.php index 26acbca266..c5cadcf6f0 100644 --- a/module/testcase/config.php +++ b/module/testcase/config.php @@ -37,6 +37,7 @@ $config->testcase->excludeCheckFileds = ',pri,type,stage,needReview,story,branch global $lang; $config->testcase->search['module'] = 'testcase'; $config->testcase->search['fields']['title'] = $lang->testcase->title; +$config->testcase->search['fields']['storyTitle'] = $lang->testcase->linkStory; $config->testcase->search['fields']['id'] = $lang->testcase->id; $config->testcase->search['fields']['keywords'] = $lang->testcase->keywords; $config->testcase->search['fields']['lastEditedBy'] = $lang->testcase->lastEditedByAB; @@ -58,6 +59,7 @@ $config->testcase->search['fields']['openedDate'] = $lang->testcase->openedD $config->testcase->search['fields']['lastEditedDate'] = $lang->testcase->lastEditedDateAB; $config->testcase->search['params']['title'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); +$config->testcase->search['params']['storyTitle'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); $config->testcase->search['params']['module'] = array('operator' => 'belong', 'control' => 'select', 'values' => 'modules'); $config->testcase->search['params']['keywords'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); $config->testcase->search['params']['lastEditedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); diff --git a/module/testtask/control.php b/module/testtask/control.php index d12e5cae63..8eb9073e49 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -1059,6 +1059,11 @@ class testtask extends control * Link cases to a test task. * * @param int $taskID + * @param string $type + * @param int $param + * @param int $recTotal + * @param int $recPerPage + * @param int $pageID * @access public * @return void */ @@ -1108,6 +1113,7 @@ class testtask extends control $this->config->testcase->search['style'] = 'simple'; if($product->shadow) unset($this->config->testcase->search['fields']['product']); + if($type != 'bystory') unset($this->config->testcase->search['fields']['storyTitle']); if($task->productType == 'normal') { unset($this->config->testcase->search['fields']['branch']); diff --git a/module/testtask/lang/de.php b/module/testtask/lang/de.php index 481fabdaa5..fa6ab7c3ad 100644 --- a/module/testtask/lang/de.php +++ b/module/testtask/lang/de.php @@ -131,6 +131,7 @@ $lang->testtask->priList[2] = '2'; $lang->testtask->priList[3] = '3'; $lang->testtask->priList[4] = '4'; +$lang->testcase->linkStory = 'linkStory'; $lang->testtask->unlinkedCases = 'Unverknüpfte Fälle'; $lang->testtask->linkByBuild = 'Mit Build verknüpfen'; $lang->testtask->linkByStory = 'Mit Story verknüpfen'; diff --git a/module/testtask/lang/en.php b/module/testtask/lang/en.php index 28a1f09374..08f54f1403 100644 --- a/module/testtask/lang/en.php +++ b/module/testtask/lang/en.php @@ -131,6 +131,7 @@ $lang->testtask->priList[2] = '2'; $lang->testtask->priList[3] = '3'; $lang->testtask->priList[4] = '4'; +$lang->testcase->linkStory = 'linkStory'; $lang->testtask->unlinkedCases = 'Unlinked Case'; $lang->testtask->linkByBuild = 'Copy from build'; $lang->testtask->linkByStory = 'Link by Story'; diff --git a/module/testtask/lang/fr.php b/module/testtask/lang/fr.php index 40eaf40f0f..36b9f0f3f5 100644 --- a/module/testtask/lang/fr.php +++ b/module/testtask/lang/fr.php @@ -131,6 +131,7 @@ $lang->testtask->priList[2] = '2'; $lang->testtask->priList[3] = '3'; $lang->testtask->priList[4] = '4'; +$lang->testcase->linkStory = 'linkStory'; $lang->testtask->unlinkedCases = 'CasTests Non rattachés'; $lang->testtask->linkByBuild = 'Copier depuis build'; $lang->testtask->linkByStory = 'Lier par Story'; diff --git a/module/testtask/lang/zh-cn.php b/module/testtask/lang/zh-cn.php index 74c93f4342..33759d1927 100644 --- a/module/testtask/lang/zh-cn.php +++ b/module/testtask/lang/zh-cn.php @@ -131,6 +131,7 @@ $lang->testtask->priList[2] = '2'; $lang->testtask->priList[3] = '3'; $lang->testtask->priList[4] = '4'; +$lang->testcase->linkStory = '关联需求'; $lang->testtask->unlinkedCases = '未关联'; $lang->testtask->linkByBuild = '复制测试单'; $lang->testtask->linkByStory = "按{$lang->SRCommon}关联"; diff --git a/module/testtask/model.php b/module/testtask/model.php index 11c07e5f8e..ab98d62ac7 100755 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -346,6 +346,7 @@ class testtaskModel extends model { if($this->session->testcaseQuery == false) $this->session->set('testcaseQuery', ' 1 = 1'); $query = $this->session->testcaseQuery; + if(strpos($query, 'storyTitle') !== false and $type != 'bystory') $query = '1 = 1'; $allProduct = "`product` = 'all'"; if(strpos($query, '`product` =') === false && $type != 'bysuite') $query .= " AND `product` = $productID"; if(strpos($query, $allProduct) !== false) $query = str_replace($allProduct, '1', $query); @@ -399,18 +400,21 @@ class testtaskModel extends model { $stories = $this->dao->select('stories')->from(TABLE_BUILD)->where('id')->eq($task->build)->fetch('stories'); $cases = array(); + $query = preg_replace('/`(\w+)`/', 't1.`$1`', $query); + if(strpos($query, '`storyTitle`') !== false) $query = str_replace('t1.`storyTitle`', 't2.`title`', $query); if($stories) { - $cases = $this->dao->select('*')->from(TABLE_CASE) + $cases = $this->dao->select('t1.*,t2.title as storyTitle')->from(TABLE_CASE)->alias('t1') + ->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id') ->where($query) ->beginIF($this->lang->navGroup->testtask != 'qa')->andWhere('project')->eq($this->session->project)->fi() - ->andWhere('product')->eq($productID) - ->andWhere('status')->ne('wait') - ->beginIF($linkedCases)->andWhere('id')->notIN($linkedCases)->fi() - ->beginIF($task->branch !== '')->andWhere('branch')->in("0,$task->branch")->fi() - ->andWhere('story')->in(trim($stories, ',')) - ->andWhere('deleted')->eq(0) - ->orderBy('id desc') + ->andWhere('t1.product')->eq($productID) + ->andWhere('t1.status')->ne('wait') + ->beginIF($linkedCases)->andWhere('t1.id')->notIN($linkedCases)->fi() + ->beginIF($task->branch !== '')->andWhere('t1.branch')->in("0,$task->branch")->fi() + ->andWhere('t1.story')->in(trim($stories, ',')) + ->andWhere('t1.deleted')->eq(0) + ->orderBy('t1.id desc') ->page($pager) ->fetchAll(); } @@ -1500,7 +1504,7 @@ class testtaskModel extends model $failHtml = ': ' . $this->lang->testtask->fail . ''; $passHtml = ': ' . $this->lang->testtask->pass . ''; - + $log = preg_replace(array("/:\x20失败/", "/:\x20fail/", "/:\x20成功/", "/:\x20pass/"), array($failHtml, $failHtml, $passHtml, $passHtml), $log); $logHtml .= "
  • " . $log . "
  • "; @@ -1524,11 +1528,11 @@ class testtaskModel extends model } $caseResult = $passCount ? 'pass':'fail'; - $logHtml .= "
  • " + $logHtml .= "
  • " . sprintf($this->lang->testtask->stepSummary, $total, $passCount, $failCount) . "
  • "; } - + return $logHtml; } diff --git a/module/testtask/view/linkcase.html.php b/module/testtask/view/linkcase.html.php index e052cb5e1b..c79a193708 100644 --- a/module/testtask/view/linkcase.html.php +++ b/module/testtask/view/linkcase.html.php @@ -86,6 +86,7 @@ testtask->linkVersion;?> priAB;?> testcase->title;?> + testcase->linkStory;?> testcase->type;?> openedByAB;?> testtask->lastRunAccount;?> @@ -112,6 +113,7 @@ echo ')'; ?> + story and $case->storyTitle) echo html::a(helper ::createLink('story', 'view', "storyID=$case->story"), $case->storyTitle);?> testcase->typeList[$case->type];?> openedBy);?> lastRunner);?> From 204b52f0b56bbabb1817dd98db267bf1024eaec6 Mon Sep 17 00:00:00 2001 From: liuhong Date: Tue, 3 Jan 2023 09:17:55 +0000 Subject: [PATCH 007/499] * Adjust code for task. --- module/testtask/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/testtask/model.php b/module/testtask/model.php index ab98d62ac7..8f0961644e 100755 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -407,7 +407,7 @@ class testtaskModel extends model $cases = $this->dao->select('t1.*,t2.title as storyTitle')->from(TABLE_CASE)->alias('t1') ->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id') ->where($query) - ->beginIF($this->lang->navGroup->testtask != 'qa')->andWhere('project')->eq($this->session->project)->fi() + ->beginIF($this->lang->navGroup->testtask != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi() ->andWhere('t1.product')->eq($productID) ->andWhere('t1.status')->ne('wait') ->beginIF($linkedCases)->andWhere('t1.id')->notIN($linkedCases)->fi() From bc620ef34d23ebb9c2105caa52240dfa15e1b60e Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Tue, 3 Jan 2023 17:36:33 +0800 Subject: [PATCH 008/499] * Code for task#81779. --- module/bug/view/create.html.php | 2 +- module/file/control.php | 4 +++- module/file/view/viewfiles.html.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index 732402cf5e..3a3b919865 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -369,7 +369,7 @@ if($this->app->tab == 'project') js::set('objectID', $projectID); fetch('file', 'printFiles', array('files' => $caseFiles, 'fieldset' => 'false', 'object' => null, 'method' => 'edit')); + echo $this->fetch('file', 'printFiles', array('files' => $caseFiles, 'fieldset' => 'false', 'object' => null, 'method' => 'edit', 'showDelete' => true, 'showEdit' => false)); echo html::hidden('caseFiles', implode(',', array_keys($caseFiles))); } ?> diff --git a/module/file/control.php b/module/file/control.php index 7bf6ae7588..7f2a80b4f3 100755 --- a/module/file/control.php +++ b/module/file/control.php @@ -293,16 +293,18 @@ class file extends control * @param object $object * @param string $method * @param bool $showDelete + * @param bool $showEdit * @access public * @return void */ - public function printFiles($files, $fieldset, $object = null, $method = 'view', $showDelete = true) + public function printFiles($files, $fieldset, $object = null, $method = 'view', $showDelete = true, $showEdit = true) { $this->view->files = $files; $this->view->fieldset = $fieldset; $this->view->object = $object; $this->view->method = $method; $this->view->showDelete = $showDelete; + $this->view->showEdit = $showEdit; if(strpos('view,edit', $method) !== false and $this->app->clientDevice != 'mobile') return $this->display('file', 'viewfiles'); $this->display(); diff --git a/module/file/view/viewfiles.html.php b/module/file/view/viewfiles.html.php index 2668b72ede..4ebd743da8 100644 --- a/module/file/view/viewfiles.html.php +++ b/module/file/view/viewfiles.html.php @@ -220,7 +220,7 @@ function setFileName(fileID) common::printLink('file', 'download', "fileID=$file->id", "", '_blank', "class='fileAction btn btn-link text-primary' title='{$lang->file->downloadFile}'"); if(common::hasPriv($objectType, 'edit', $object)) { - if(common::hasPriv('file', 'edit')) echo html::a('###', "", '', "id='renameFile$file->id' class='fileAction btn btn-link edit text-primary' onclick='showRenameBox($file->id)' title='{$lang->file->edit}'"); + if($showEdit and common::hasPriv('file', 'edit')) echo html::a('###', "", '', "id='renameFile$file->id' class='fileAction btn btn-link edit text-primary' onclick='showRenameBox($file->id)' title='{$lang->file->edit}'"); if($showDelete and common::hasPriv('file', 'delete')) echo html::a('###', "", '', "class='fileAction btn btn-link text-primary' onclick='deleteFile($file->id, this)' title='$lang->delete'"); } echo ''; From 43db2ac8533d2c212f379a0a9d577a768f523490 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 4 Jan 2023 08:28:55 +0800 Subject: [PATCH 009/499] * Adjust code style. --- module/bug/view/create.html.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index 3a3b919865..f90c76b33f 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -366,14 +366,14 @@ if($this->app->tab == 'project') js::set('objectID', $projectID); bug->files;?> - fetch('file', 'printFiles', array('files' => $caseFiles, 'fieldset' => 'false', 'object' => null, 'method' => 'edit', 'showDelete' => true, 'showEdit' => false)); - echo html::hidden('caseFiles', implode(',', array_keys($caseFiles))); - } - ?> - fetch('file', 'buildform', 'fileCount=1&percent=0.85');?> + fetch('file', 'printFiles', array('files' => $caseFiles, 'fieldset' => 'false', 'object' => null, 'method' => 'edit', 'showDelete' => true, 'showEdit' => false)); + echo html::hidden('caseFiles', implode(',', array_keys($caseFiles))); + } + echo $this->fetch('file', 'buildform', 'fileCount=1&percent=0.85'); + ?> From e91bc365a45898dba3e51edc13b8226738ffdb13 Mon Sep 17 00:00:00 2001 From: liuhong Date: Wed, 4 Jan 2023 01:06:36 +0000 Subject: [PATCH 010/499] * Adjust code for task #81778. --- module/testcase/config.php | 4 ++-- module/testcase/lang/de.php | 1 + module/testcase/lang/en.php | 1 + module/testcase/lang/fr.php | 1 + module/testcase/lang/zh-cn.php | 1 + module/testtask/control.php | 11 ++++++++++- module/testtask/lang/de.php | 1 - module/testtask/lang/en.php | 1 - module/testtask/lang/fr.php | 1 - module/testtask/lang/zh-cn.php | 1 - 10 files changed, 16 insertions(+), 7 deletions(-) diff --git a/module/testcase/config.php b/module/testcase/config.php index c5cadcf6f0..283c36ac00 100644 --- a/module/testcase/config.php +++ b/module/testcase/config.php @@ -37,7 +37,7 @@ $config->testcase->excludeCheckFileds = ',pri,type,stage,needReview,story,branch global $lang; $config->testcase->search['module'] = 'testcase'; $config->testcase->search['fields']['title'] = $lang->testcase->title; -$config->testcase->search['fields']['storyTitle'] = $lang->testcase->linkStory; +$config->testcase->search['fields']['story'] = $lang->testcase->linkStory; $config->testcase->search['fields']['id'] = $lang->testcase->id; $config->testcase->search['fields']['keywords'] = $lang->testcase->keywords; $config->testcase->search['fields']['lastEditedBy'] = $lang->testcase->lastEditedByAB; @@ -59,7 +59,7 @@ $config->testcase->search['fields']['openedDate'] = $lang->testcase->openedD $config->testcase->search['fields']['lastEditedDate'] = $lang->testcase->lastEditedDateAB; $config->testcase->search['params']['title'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); -$config->testcase->search['params']['storyTitle'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); +$config->testcase->search['params']['story'] = array('operator' => 'include', 'control' => 'select', 'values' => ''); $config->testcase->search['params']['module'] = array('operator' => 'belong', 'control' => 'select', 'values' => 'modules'); $config->testcase->search['params']['keywords'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); $config->testcase->search['params']['lastEditedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); diff --git a/module/testcase/lang/de.php b/module/testcase/lang/de.php index 1c865a72e3..ad64811882 100644 --- a/module/testcase/lang/de.php +++ b/module/testcase/lang/de.php @@ -13,6 +13,7 @@ $lang->testcase->id = 'ID'; $lang->testcase->product = $lang->productCommon; $lang->testcase->project = 'Project'; $lang->testcase->execution = 'Execution'; +$lang->testcase->linkStory = 'linkStory'; $lang->testcase->module = 'Module'; $lang->testcase->auto = 'Test Automation Cases'; $lang->testcase->frame = 'Test Automation Cramework'; diff --git a/module/testcase/lang/en.php b/module/testcase/lang/en.php index b50993b46c..72e5991595 100644 --- a/module/testcase/lang/en.php +++ b/module/testcase/lang/en.php @@ -13,6 +13,7 @@ $lang->testcase->id = 'ID'; $lang->testcase->product = $lang->productCommon; $lang->testcase->project = 'Project'; $lang->testcase->execution = 'Execution'; +$lang->testcase->linkStory = 'linkStory'; $lang->testcase->module = 'Module'; $lang->testcase->auto = 'Test Automation Cases'; $lang->testcase->frame = 'Test Automation Cramework'; diff --git a/module/testcase/lang/fr.php b/module/testcase/lang/fr.php index da07973081..670943aee9 100644 --- a/module/testcase/lang/fr.php +++ b/module/testcase/lang/fr.php @@ -13,6 +13,7 @@ $lang->testcase->id = 'ID'; $lang->testcase->product = $lang->productCommon; $lang->testcase->project = 'Project'; $lang->testcase->execution = 'Execution'; +$lang->testcase->linkStory = 'linkStory'; $lang->testcase->module = 'Module'; $lang->testcase->auto = 'Test Automation Cases'; $lang->testcase->frame = 'Test Automation Cramework'; diff --git a/module/testcase/lang/zh-cn.php b/module/testcase/lang/zh-cn.php index 835cedb468..956d9281f3 100644 --- a/module/testcase/lang/zh-cn.php +++ b/module/testcase/lang/zh-cn.php @@ -13,6 +13,7 @@ $lang->testcase->id = '用例编号'; $lang->testcase->product = "所属{$lang->productCommon}"; $lang->testcase->project = '所属项目'; $lang->testcase->execution = '所属执行'; +$lang->testcase->linkStory = '关联需求'; $lang->testcase->module = '所属模块'; $lang->testcase->auto = '自动化测试用例'; $lang->testcase->frame = '自动化测试框架'; diff --git a/module/testtask/control.php b/module/testtask/control.php index 8eb9073e49..7995699047 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -1112,8 +1112,17 @@ class testtask extends control $this->config->testcase->search['actionURL'] = inlink('linkcase', "taskID=$taskID&type=$type¶m=$param"); $this->config->testcase->search['style'] = 'simple'; + $build = $this->loadModel('build')->getByID($task->build); + $stories = array(); + if($build) + { + $stories = $this->dao->select('id,title')->from(TABLE_STORY)->where('id')->in($build->stories)->fetchPairs(); + $this->config->testcase->search['params']['story']['values'] = $stories; + $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story'); + } + if($product->shadow) unset($this->config->testcase->search['fields']['product']); - if($type != 'bystory') unset($this->config->testcase->search['fields']['storyTitle']); + if($type != 'bystory') unset($this->config->testcase->search['fields']['story']); if($task->productType == 'normal') { unset($this->config->testcase->search['fields']['branch']); diff --git a/module/testtask/lang/de.php b/module/testtask/lang/de.php index fa6ab7c3ad..481fabdaa5 100644 --- a/module/testtask/lang/de.php +++ b/module/testtask/lang/de.php @@ -131,7 +131,6 @@ $lang->testtask->priList[2] = '2'; $lang->testtask->priList[3] = '3'; $lang->testtask->priList[4] = '4'; -$lang->testcase->linkStory = 'linkStory'; $lang->testtask->unlinkedCases = 'Unverknüpfte Fälle'; $lang->testtask->linkByBuild = 'Mit Build verknüpfen'; $lang->testtask->linkByStory = 'Mit Story verknüpfen'; diff --git a/module/testtask/lang/en.php b/module/testtask/lang/en.php index 08f54f1403..28a1f09374 100644 --- a/module/testtask/lang/en.php +++ b/module/testtask/lang/en.php @@ -131,7 +131,6 @@ $lang->testtask->priList[2] = '2'; $lang->testtask->priList[3] = '3'; $lang->testtask->priList[4] = '4'; -$lang->testcase->linkStory = 'linkStory'; $lang->testtask->unlinkedCases = 'Unlinked Case'; $lang->testtask->linkByBuild = 'Copy from build'; $lang->testtask->linkByStory = 'Link by Story'; diff --git a/module/testtask/lang/fr.php b/module/testtask/lang/fr.php index 36b9f0f3f5..40eaf40f0f 100644 --- a/module/testtask/lang/fr.php +++ b/module/testtask/lang/fr.php @@ -131,7 +131,6 @@ $lang->testtask->priList[2] = '2'; $lang->testtask->priList[3] = '3'; $lang->testtask->priList[4] = '4'; -$lang->testcase->linkStory = 'linkStory'; $lang->testtask->unlinkedCases = 'CasTests Non rattachés'; $lang->testtask->linkByBuild = 'Copier depuis build'; $lang->testtask->linkByStory = 'Lier par Story'; diff --git a/module/testtask/lang/zh-cn.php b/module/testtask/lang/zh-cn.php index 33759d1927..74c93f4342 100644 --- a/module/testtask/lang/zh-cn.php +++ b/module/testtask/lang/zh-cn.php @@ -131,7 +131,6 @@ $lang->testtask->priList[2] = '2'; $lang->testtask->priList[3] = '3'; $lang->testtask->priList[4] = '4'; -$lang->testcase->linkStory = '关联需求'; $lang->testtask->unlinkedCases = '未关联'; $lang->testtask->linkByBuild = '复制测试单'; $lang->testtask->linkByStory = "按{$lang->SRCommon}关联"; From bf0ee11b8027913fb89665eac77b82247de09946 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 4 Jan 2023 09:11:27 +0800 Subject: [PATCH 011/499] * Code for task#81779. --- module/bug/control.php | 2 +- module/bug/model.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index b49a67aedd..fd319ddb3d 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -665,7 +665,7 @@ class bug extends control $this->view->storyID = $storyID; $this->view->buildID = $buildID; $this->view->caseID = $caseID; - $this->view->caseFiles = isset($caseFiles) ? $caseFiles : array(); + $this->view->caseFiles = $caseID ? $this->loadModel('file')->getByObject('testcase', $caseID) : array(); $this->view->runID = $runID; $this->view->version = $version; $this->view->testtask = $testtask; diff --git a/module/bug/model.php b/module/bug/model.php index 748057d086..d94e517439 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2296,9 +2296,7 @@ class bugModel extends model if(!$executionID and $caseID > 0) $executionID = isset($run->case->execution) ? $run->case->execution : 0; // Fix feedback #1043. if(!$executionID and $this->app->tab == 'execution') $executionID = $this->session->execution; - $caseFiles = $caseID ? $this->loadModel('file')->getByObject('testcase', $caseID) : array(); - - return array('title' => $title, 'steps' => $bugSteps, 'storyID' => $run->case->story, 'moduleID' => $run->case->module, 'version' => $run->case->version, 'executionID' => $executionID, 'caseFiles' => $caseFiles); + return array('title' => $title, 'steps' => $bugSteps, 'storyID' => $run->case->story, 'moduleID' => $run->case->module, 'version' => $run->case->version, 'executionID' => $executionID); } /** From 86c398672d4ba99ef4df1c6d10518b6853a72a92 Mon Sep 17 00:00:00 2001 From: liuhong Date: Wed, 4 Jan 2023 01:23:31 +0000 Subject: [PATCH 012/499] * Adjust code --- module/testtask/model.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/testtask/model.php b/module/testtask/model.php index 8f0961644e..c88a7bdf4f 100755 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -346,7 +346,7 @@ class testtaskModel extends model { if($this->session->testcaseQuery == false) $this->session->set('testcaseQuery', ' 1 = 1'); $query = $this->session->testcaseQuery; - if(strpos($query, 'storyTitle') !== false and $type != 'bystory') $query = '1 = 1'; + $allProduct = "`product` = 'all'"; if(strpos($query, '`product` =') === false && $type != 'bysuite') $query .= " AND `product` = $productID"; if(strpos($query, $allProduct) !== false) $query = str_replace($allProduct, '1', $query); @@ -401,7 +401,6 @@ class testtaskModel extends model $stories = $this->dao->select('stories')->from(TABLE_BUILD)->where('id')->eq($task->build)->fetch('stories'); $cases = array(); $query = preg_replace('/`(\w+)`/', 't1.`$1`', $query); - if(strpos($query, '`storyTitle`') !== false) $query = str_replace('t1.`storyTitle`', 't2.`title`', $query); if($stories) { $cases = $this->dao->select('t1.*,t2.title as storyTitle')->from(TABLE_CASE)->alias('t1') From 13d6441857d71d31cca96df790262ca2840bd4e1 Mon Sep 17 00:00:00 2001 From: liuhong Date: Wed, 4 Jan 2023 01:25:07 +0000 Subject: [PATCH 013/499] * Adjust code --- module/testtask/model.php | 1 - 1 file changed, 1 deletion(-) diff --git a/module/testtask/model.php b/module/testtask/model.php index c88a7bdf4f..9042218934 100755 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -346,7 +346,6 @@ class testtaskModel extends model { if($this->session->testcaseQuery == false) $this->session->set('testcaseQuery', ' 1 = 1'); $query = $this->session->testcaseQuery; - $allProduct = "`product` = 'all'"; if(strpos($query, '`product` =') === false && $type != 'bysuite') $query .= " AND `product` = $productID"; if(strpos($query, $allProduct) !== false) $query = str_replace($allProduct, '1', $query); From e8edfb8df85535471a9567028538feb174690a53 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 4 Jan 2023 09:33:13 +0800 Subject: [PATCH 014/499] * Code for task#81779. --- module/bug/control.php | 2 +- module/bug/model.php | 10 +++++----- module/bug/view/create.html.php | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index fd319ddb3d..7ab5ace364 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -665,7 +665,7 @@ class bug extends control $this->view->storyID = $storyID; $this->view->buildID = $buildID; $this->view->caseID = $caseID; - $this->view->caseFiles = $caseID ? $this->loadModel('file')->getByObject('testcase', $caseID) : array(); + $this->view->resultFiles = $resultID ? $this->loadModel('file')->getByObject('stepResult', $resultID) : array(); $this->view->runID = $runID; $this->view->version = $version; $this->view->testtask = $testtask; diff --git a/module/bug/model.php b/module/bug/model.php index d94e517439..96b0019c62 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -78,7 +78,7 @@ class bugModel extends model ->join('mailto', ',') ->join('os', ',') ->join('browser', ',') - ->remove('files,labels,uid,oldTaskID,contactListMenu,region,lane,ticket,deleteFiles,caseFiles') + ->remove('files,labels,uid,oldTaskID,contactListMenu,region,lane,ticket,deleteFiles,resultFiles') ->get(); /* Check repeat bug. */ @@ -98,14 +98,14 @@ class bugModel extends model { $bugID = $this->dao->lastInsertID(); - if(isset($_POST['caseFiles'])) + if(isset($_POST['resultFiles'])) { - $caseFiles = $_POST['caseFiles']; + $resultFiles = $_POST['resultFiles']; if(isset($_POST['deleteFiles'])) { - foreach($_POST['deleteFiles'] as $deletedCaseFileID) $caseFiles = trim(str_replace(",$deletedCaseFileID,", ',', ",$caseFiles,"), ','); + foreach($_POST['deleteFiles'] as $deletedCaseFileID) $resultFiles = trim(str_replace(",$deletedCaseFileID,", ',', ",$resultFiles,"), ','); } - $files = $this->dao->select('*')->from(TABLE_FILE)->where('id')->in($caseFiles)->fetchAll('id'); + $files = $this->dao->select('*')->from(TABLE_FILE)->where('id')->in($resultFiles)->fetchAll('id'); foreach($files as $file) { unset($file->id); diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index f90c76b33f..82b35e3190 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -369,8 +369,8 @@ if($this->app->tab == 'project') js::set('objectID', $projectID); fetch('file', 'printFiles', array('files' => $caseFiles, 'fieldset' => 'false', 'object' => null, 'method' => 'edit', 'showDelete' => true, 'showEdit' => false)); - echo html::hidden('caseFiles', implode(',', array_keys($caseFiles))); + echo $this->fetch('file', 'printFiles', array('files' => $resultFiles, 'fieldset' => 'false', 'object' => null, 'method' => 'edit', 'showDelete' => true, 'showEdit' => false)); + echo html::hidden('resultFiles', implode(',', array_keys($resultFiles))); } echo $this->fetch('file', 'buildform', 'fileCount=1&percent=0.85'); ?> From 892b7d6b8a8e996c604d29795de33525c2bf8503 Mon Sep 17 00:00:00 2001 From: liuhong Date: Wed, 4 Jan 2023 03:31:00 +0000 Subject: [PATCH 015/499] * Fix bug #82220. --- module/execution/control.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/module/execution/control.php b/module/execution/control.php index bb833b35e9..ef5404be22 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1678,8 +1678,14 @@ class execution extends control } $importPlanStoryTips = $multiBranchProduct ? $this->lang->execution->importBranchPlanStory : $this->lang->execution->importPlanStory; + if(!$execution->hasProduct) + { + return print(js::locate(inlink('create', "projectID=$projectID&executionID=$executionID"))); + }else + { + return print(js::confirm($importPlanStoryTips, inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes"), inlink('create', "projectID=$projectID&executionID=$executionID"))); - return print(js::confirm($importPlanStoryTips, inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes"), inlink('create', "projectID=$projectID&executionID=$executionID"))); + } } } From 06700413b1a7ff2d40ea8098c06d06a7f7ab6199 Mon Sep 17 00:00:00 2001 From: liuhong Date: Wed, 4 Jan 2023 05:54:47 +0000 Subject: [PATCH 016/499] * Adjust code. --- module/execution/control.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/execution/control.php b/module/execution/control.php index ef5404be22..064bc06fe2 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1681,7 +1681,8 @@ class execution extends control if(!$execution->hasProduct) { return print(js::locate(inlink('create', "projectID=$projectID&executionID=$executionID"))); - }else + } + else { return print(js::confirm($importPlanStoryTips, inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes"), inlink('create', "projectID=$projectID&executionID=$executionID"))); From c2fd82381d87660e696133dd89d8914b1464b42b Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 4 Jan 2023 16:28:28 +0800 Subject: [PATCH 017/499] * Fix bug of preview file. --- config/zentaopms.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/zentaopms.php b/config/zentaopms.php index 2d3fe90dfa..36d0182f2b 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -404,8 +404,9 @@ $config->objectTables['stage'] = TABLE_STAGE; $config->objectTables['apistruct'] = TABLE_APISTRUCT; $config->objectTables['repo'] = TABLE_REPO; $config->objectTables['dataview'] = TABLE_DATAVIEW; -$config->objectTables['zahost'] = TABLE_ZAHOST; -$config->objectTables['automation'] = TABLE_AUTOMATION; +$config->objectTables['zahost'] = TABLE_ZAHOST; +$config->objectTables['automation'] = TABLE_AUTOMATION; +$config->objectTables['stepResult'] = TABLE_TESTRUN; $config->newFeatures = array('introduction', 'tutorial', 'youngBlueTheme', 'visions'); $config->disabledFeatures = ''; From ee5aacbd35313fff184ad7672bee6ed58e2261ee Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 5 Jan 2023 10:05:45 +0800 Subject: [PATCH 018/499] * Fix bug#31467. --- module/bug/control.php | 2 +- module/file/model.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 7ab5ace364..e17eaabb5b 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -665,7 +665,7 @@ class bug extends control $this->view->storyID = $storyID; $this->view->buildID = $buildID; $this->view->caseID = $caseID; - $this->view->resultFiles = $resultID ? $this->loadModel('file')->getByObject('stepResult', $resultID) : array(); + $this->view->resultFiles = ($resultID and $stepIdList)? $this->loadModel('file')->getByObject('stepResult', $resultID, str_replace('_', ',', $stepIdList)) : array(); $this->view->runID = $runID; $this->view->version = $version; $this->view->testtask = $testtask; diff --git a/module/file/model.php b/module/file/model.php index 7bca92a246..c0adf7d535 100755 --- a/module/file/model.php +++ b/module/file/model.php @@ -46,7 +46,7 @@ class fileModel extends model ->where('objectType')->eq($objectType) ->andWhere('objectID')->in($objectID) ->andWhere('extra')->ne('editor') - ->beginIF($extra)->andWhere('extra')->eq($extra) + ->beginIF($extra)->andWhere('extra')->in($extra)->fi() ->andWhere('deleted')->eq('0') ->orderBy('id') ->fetchAll('id'); From 97d4792fbf704dec0e40eabc778754fcb5b37106 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 5 Jan 2023 10:13:34 +0800 Subject: [PATCH 019/499] * Fix bug of create bug. --- module/bug/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/bug/control.php b/module/bug/control.php index e17eaabb5b..1503324708 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -665,7 +665,7 @@ class bug extends control $this->view->storyID = $storyID; $this->view->buildID = $buildID; $this->view->caseID = $caseID; - $this->view->resultFiles = ($resultID and $stepIdList)? $this->loadModel('file')->getByObject('stepResult', $resultID, str_replace('_', ',', $stepIdList)) : array(); + $this->view->resultFiles = (!empty($resultID) and !empty($stepIdList)) ? $this->loadModel('file')->getByObject('stepResult', $resultID, str_replace('_', ',', $stepIdList)) : array(); $this->view->runID = $runID; $this->view->version = $version; $this->view->testtask = $testtask; From 5e26183cbbd545b173926447530e7868662c0c24 Mon Sep 17 00:00:00 2001 From: liuhong Date: Thu, 5 Jan 2023 07:43:34 +0000 Subject: [PATCH 020/499] * Fix bug for 30923 with get ProductID. --- module/bug/config.php | 2 +- module/bug/model.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/bug/config.php b/module/bug/config.php index 9bf3ff5a95..e4a2983a76 100644 --- a/module/bug/config.php +++ b/module/bug/config.php @@ -205,7 +205,7 @@ $config->bug->datatable->fieldList['branch']['fixed'] = 'left'; $config->bug->datatable->fieldList['branch']['width'] = '100'; $config->bug->datatable->fieldList['branch']['required'] = 'no'; $config->bug->datatable->fieldList['branch']['control'] = 'select'; -$config->bug->datatable->fieldList['branch']['dataSource'] = array('module' => 'bug', 'method' => 'getRelatedObjects', 'params' => 'branch&id,name'); +$config->bug->datatable->fieldList['branch']['dataSource'] = array('module' => 'bug', 'method' => 'getRelatedObjects', 'params' => 'branch&id,name&$productID'); $config->bug->datatable->fieldList['type']['title'] = 'type'; $config->bug->datatable->fieldList['type']['fixed'] = 'no'; diff --git a/module/bug/model.php b/module/bug/model.php index 96b0019c62..cc4e95a5bc 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -3711,10 +3711,11 @@ class bugModel extends model * * @param int $object * @param string $pairs + * @param int $productID * @access public * @return void */ - public function getRelatedObjects($object, $pairs = '') + public function getRelatedObjects($object, $pairs = '', $productID = 0) { /* Get bugs. */ $bugs = $this->loadModel('transfer')->getQueryDatas('bug'); @@ -3732,7 +3733,6 @@ class bugModel extends model if($table) $relatedObjects = $this->dao->select($pairs)->from($table)->where('id')->in($relatedObjectIdList)->fetchPairs(); if($object == 'branch' and $this->session->currentProductType != 'normal') { - $productID = current($bugs)->product; $relatedObjects = $this->dao->select($pairs)->from($table)->where('product')->eq($productID)->fetchPairs(); } From 212debf30fd42fb887fac084049f03c77e517012 Mon Sep 17 00:00:00 2001 From: liuhong Date: Fri, 6 Jan 2023 00:52:01 +0000 Subject: [PATCH 021/499] * Rollback version, the modification of the data source in the general version has been resolved to avoid conflicts --- module/bug/config.php | 2 +- module/bug/model.php | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/module/bug/config.php b/module/bug/config.php index e4a2983a76..060992e9ab 100644 --- a/module/bug/config.php +++ b/module/bug/config.php @@ -205,7 +205,7 @@ $config->bug->datatable->fieldList['branch']['fixed'] = 'left'; $config->bug->datatable->fieldList['branch']['width'] = '100'; $config->bug->datatable->fieldList['branch']['required'] = 'no'; $config->bug->datatable->fieldList['branch']['control'] = 'select'; -$config->bug->datatable->fieldList['branch']['dataSource'] = array('module' => 'bug', 'method' => 'getRelatedObjects', 'params' => 'branch&id,name&$productID'); +$config->bug->datatable->fieldList['branch']['dataSource'] = array('module' => 'branch', 'method' => 'getPairs', 'params' => '$productID'); $config->bug->datatable->fieldList['type']['title'] = 'type'; $config->bug->datatable->fieldList['type']['fixed'] = 'no'; diff --git a/module/bug/model.php b/module/bug/model.php index cc4e95a5bc..e61c3a604f 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -3711,11 +3711,10 @@ class bugModel extends model * * @param int $object * @param string $pairs - * @param int $productID * @access public * @return void */ - public function getRelatedObjects($object, $pairs = '', $productID = 0) + public function getRelatedObjects($object, $pairs = '') { /* Get bugs. */ $bugs = $this->loadModel('transfer')->getQueryDatas('bug'); @@ -3731,12 +3730,8 @@ class bugModel extends model /* Get related objects title or names. */ $table = $this->config->objectTables[$object]; if($table) $relatedObjects = $this->dao->select($pairs)->from($table)->where('id')->in($relatedObjectIdList)->fetchPairs(); - if($object == 'branch' and $this->session->currentProductType != 'normal') - { - $relatedObjects = $this->dao->select($pairs)->from($table)->where('product')->eq($productID)->fetchPairs(); - } - if(in_array($object, array('build','resolvedBuild','branch'))) $relatedObjects = array('trunk' => $this->lang->trunk) + $relatedObjects; + if(in_array($object, array('build','resolvedBuild'))) $relatedObjects = array('trunk' => $this->lang->trunk) + $relatedObjects; return array('' => '', 0 => '') + $relatedObjects; } From 1c7e9b7d14494f00cb42394c6d2d6a281bf2fa74 Mon Sep 17 00:00:00 2001 From: liuhong Date: Fri, 6 Jan 2023 01:35:10 +0000 Subject: [PATCH 022/499] * Fix bug #31521. --- module/productplan/view/view.html.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/productplan/view/view.html.php b/module/productplan/view/view.html.php index d01f599e3b..41ee03b6b5 100644 --- a/module/productplan/view/view.html.php +++ b/module/productplan/view/view.html.php @@ -137,17 +137,17 @@ idAB);?> - productplan->updateOrder);?> + productplan->updateOrder);?> story->title);?> - story->module);?> + story->module);?> priAB);?> statusAB);?> openedByAB);?> assignedToAB);?> - story->estimateAB);?> + story->estimateAB);?> story->stageAB);?> - actions?> + actions?> From ad23d6afe1cd93d273714518d5236da0ac08dfc9 Mon Sep 17 00:00:00 2001 From: liuhong Date: Fri, 6 Jan 2023 03:24:26 +0000 Subject: [PATCH 023/499] * Fix task 82219. --- module/story/control.php | 19 ++++++++++++++++--- module/story/view/batchedit.html.php | 2 +- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index 34fffa959d..49711e9e11 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -1136,6 +1136,7 @@ class story extends control /* Append module when change product type. */ $moduleList = array(0 => '/'); $productStoryList = array(); + $storyPlans = array(); foreach($stories as $story) { if(isset($modules[$story->product][$story->branch])) @@ -1153,6 +1154,18 @@ class story extends control $branch = $storyProduct->type == 'branch' ? ($story->branch > 0 ? $story->branch : '0') : 'all'; if(!isset($productStoryList[$story->product][$story->branch])) $productStoryList[$story->product][$story->branch] = $this->story->getProductStoryPairs($story->product, $branch, 0, 'all', 'id_desc', 0, '', $story->type); } + + if(isset($plans[$story->product][$story->branch]) and zget($plans[$story->product][$story->branch], $story->plan)) + { + $storyPlans = $plans[$story->product][$story->branch]; + $planInfo = $this->dao->select('id,title,begin,end')->from(TABLE_PRODUCTPLAN)->where('id')->eq($story->plan)->fetchAll('id'); + + $storyPlans[$story->plan] = $planInfo[$story->plan]->title . ' [' . $planInfo[$story->plan]->begin . '~' . $planInfo[$story->plan]->end . ']'; + } + else + { + $storyPlans = $plans; + } } $this->view->title = $this->lang->story->batchEdit; @@ -1166,7 +1179,7 @@ class story extends control $this->view->branchProduct = $branchProduct; $this->view->storyIdList = $storyIdList; $this->view->branch = $branch; - $this->view->plans = array('' => '') + $plans; + $this->view->plans = array('' => '') + $storyPlans; $this->view->storyType = $storyType; $this->view->stories = $stories; $this->view->executionID = $executionID; @@ -3068,8 +3081,8 @@ class story extends control /** * Ajax get story pairs. - * - * @param int $storyID + * + * @param int $storyID * @access public * @return void */ diff --git a/module/story/view/batchedit.html.php b/module/story/view/batchedit.html.php index aa4c55ddd8..b0145dcd3b 100644 --- a/module/story/view/batchedit.html.php +++ b/module/story/view/batchedit.html.php @@ -85,7 +85,7 @@ foreach(explode(',', $showFields) as $field) '> parent < 0 ? "disabled='disabled'" : '';?> - product][$story->branch]) ? array('' => '') + $plans[$story->product][$story->branch] : '', $story->plan, "class='form-control picker-select' data-drop-width='auto' $planDisabled");?> + '') + $plans : '', $story->plan, "class='form-control picker-select' data-drop-width='auto' $planDisabled");?> From d71ca3ac54d425cfe528af36cd9d7deaa416df2a Mon Sep 17 00:00:00 2001 From: liuhong Date: Fri, 6 Jan 2023 04:10:54 +0000 Subject: [PATCH 024/499] * Fix bug #31538. --- module/testtask/control.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/testtask/control.php b/module/testtask/control.php index 7995699047..1503e1cf00 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -1122,7 +1122,11 @@ class testtask extends control } if($product->shadow) unset($this->config->testcase->search['fields']['product']); - if($type != 'bystory') unset($this->config->testcase->search['fields']['story']); + if($type != 'bystory') + { + unset($this->config->testcase->search['fields']['story']); + unset($this->config->testcase->search['params']['story']); + } if($task->productType == 'normal') { unset($this->config->testcase->search['fields']['branch']); From b56ec5f7f550c30e7050becc75e35cef692b54fd Mon Sep 17 00:00:00 2001 From: liuhong Date: Mon, 9 Jan 2023 01:44:17 +0000 Subject: [PATCH 025/499] * Finish story #41436. --- module/programplan/view/gantt.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/programplan/view/gantt.html.php b/module/programplan/view/gantt.html.php index e583097b6c..23448bef8a 100755 --- a/module/programplan/view/gantt.html.php +++ b/module/programplan/view/gantt.html.php @@ -107,8 +107,8 @@ form {display: block; margin-top: 0em; margin-block-end: 1em;}
    - createLink('project', 'execution', "status=all&projectID=$projectID"),"  ", '', "class='btn btn-icon switchBtn' title='{$lang->project->bylist}'");?>  ", '', "class='btn btn-icon text-primary switchBtn' title='{$lang->programplan->gantt}'");?> + createLink('project', 'execution', "status=all&projectID=$projectID"),"  ", '', "class='btn btn-icon switchBtn' title='{$lang->project->bylist}'");?>
    programplan->full;?>
    From a2342f7ecacf7e966882af1dd6f7fb20bd604b40 Mon Sep 17 00:00:00 2001 From: liuhong Date: Mon, 9 Jan 2023 03:06:41 +0000 Subject: [PATCH 026/499] * Add project for auditplan #40669. --- module/my/control.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/my/control.php b/module/my/control.php index 75e03d3233..bb3a09b65c 100755 --- a/module/my/control.php +++ b/module/my/control.php @@ -1016,6 +1016,7 @@ EOF; $auditplans = $this->auditplan->getList(0, $browseType, $param, $orderBy, $pager); $this->view->executions = $this->loadModel('execution')->getPairs(); + $this->view->projects = $this->loadModel('project')->getPairs(); $this->view->processTypeList = $this->lang->process->classify; $this->view->processes = $this->pssp->getProcesses(); $this->view->activities = $this->pssp->getActivityPairs(); From 7bbeded71698987a81108de87b4cd352abf47773 Mon Sep 17 00:00:00 2001 From: liuhong Date: Mon, 9 Jan 2023 05:22:53 +0000 Subject: [PATCH 027/499] * Adjust code. --- module/project/view/execution.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index 05e9c4cb9a..219f2c8bf3 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -45,8 +45,8 @@
    model == 'waterfall' and $this->config->edition == 'max'):?>
    -  ", '', "class='btn btn-icon text-primary switchBtn' title='{$lang->project->bylist}'");?> createLink('programplan', 'browse', "projectID=$projectID&productID=$productID&type=gantt"), "  ", '', "class='btn btn-icon switchBtn' title='{$lang->programplan->gantt}'");?> +  ", '', "class='btn btn-icon text-primary switchBtn' title='{$lang->project->bylist}'");?>
    " . $lang->export, '', "class='btn btn-link export'")?> From 62967bf48b8be51e473622e31485be5c7a0cb9c4 Mon Sep 17 00:00:00 2001 From: liuhong Date: Thu, 12 Jan 2023 01:47:48 +0000 Subject: [PATCH 028/499] * Fix bug #31524. --- module/productplan/js/view.js | 7 +++++++ module/productplan/view/view.html.php | 4 ++-- module/release/js/view.js | 27 ++++++++++++++++++++++++--- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/module/productplan/js/view.js b/module/productplan/js/view.js index 1658a7a071..8c55c57ffe 100644 --- a/module/productplan/js/view.js +++ b/module/productplan/js/view.js @@ -69,6 +69,13 @@ $(function() infoShowed = true; } + if(href !== '') + { + type = href == '#stories' ? 'story' : (href == '#bugs' ? 'bug' : 'planInfo'); + var viewLink = createLink('productplan', 'view', 'planID=' + planID + '&type=' + type + (typeof(param) == 'undefined' ? '' : param) + (typeof(orderBy) == 'undefined' ? '' : "&orderBy=" + orderBy)); + if(type == 'planInfo') viewLink = createLink('productplan', 'view', 'planID=' + planID + '&type=' + type); + self.location.href = viewLink; + } }); $('#storyList').on('sort.sortable', function(e, data) diff --git a/module/productplan/view/view.html.php b/module/productplan/view/view.html.php index 41ee03b6b5..e7df627a15 100644 --- a/module/productplan/view/view.html.php +++ b/module/productplan/view/view.html.php @@ -66,7 +66,7 @@ -
  • +
  • '> icons['plan'], 'text-info') . ' ' . $lang->productplan->view;?>
  • @@ -533,7 +533,7 @@
    -
    +
    '>
    productplan->basicInfo;?>
    diff --git a/module/release/js/view.js b/module/release/js/view.js index 3fe9cdb5b1..e14f125052 100644 --- a/module/release/js/view.js +++ b/module/release/js/view.js @@ -10,9 +10,9 @@ function showLink(releaseID, type, param) /** * Load URL. - * - * @param string $url - * @param string$type + * + * @param string $url + * @param string$type * @access public * @return void */ @@ -68,5 +68,26 @@ $(function() infoShowed = true; } + if(href !== '') + { + switch(href) + { + case '#stories': + type = 'story'; + break; + case '#bugs': + type = 'bug'; + break; + case '#leftBugs': + type = 'leftBug'; + break; + case '#releaseInfo': + type = 'releaseInfo'; + break; + } + var viewLink = createLink('release', 'view', 'releaseID=' + releaseID + '&type=' + type + '&link=' + link + (typeof(param) == 'undefined' ? '' : param) + (typeof(orderBy) == 'undefined' ? '' : "&orderBy=" + orderBy)); + if(type == 'releaseInfo') viewLink = createLink('release', 'view', 'releaseID=' + releaseID + '&type=' + type); + self.location.href = viewLink; + } }); }) From 89537c0186103c3cbadeb9172b3119b5b1b172cf Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Mon, 30 Jan 2023 13:16:46 +0800 Subject: [PATCH 029/499] * Finish task #83208. --- module/task/view/edit.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/view/edit.html.php b/module/task/view/edit.html.php index 45ea694f7f..69290262ca 100644 --- a/module/task/view/edit.html.php +++ b/module/task/view/edit.html.php @@ -134,7 +134,7 @@ foreach(explode(',', $config->task->edit->requiredFields) as $field) task->mode;?> status == 'wait') + if($task->status == 'wait' and $task->parent == 0) { echo html::select('mode', $lang->task->editModeList, $task->mode, "class='form-control chosen'"); } From f2684559d6449a9fc975e40f1854c233652e82d8 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Mon, 30 Jan 2023 14:13:09 +0800 Subject: [PATCH 030/499] * Finish task #83207. --- module/task/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/task/model.php b/module/task/model.php index 4fc055fdb8..4a2dabbb51 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -865,7 +865,7 @@ class taskModel extends model } elseif(strpos('wait,doing,pause', $oldTask->status) !== false) { - $currentTask->status = 'done'; + $currentTask->status = 'done'; $currentTask->assignedTo = $oldTask->openedBy; $currentTask->assignedDate = $now; $currentTask->finishedBy = $this->app->user->account; @@ -3909,7 +3909,7 @@ class taskModel extends model $btnTextClass = ''; $btnClass = ''; $assignedToText = $assignedToTitle = zget($users, $task->assignedTo); - if(!empty($task->team) and $task->mode == 'multi' and $task->status != 'closed') + if(!empty($task->team) and $task->mode == 'multi' and strpos('done,closed', $task->status) === false) { $assignedToText = $this->lang->task->team; From 44b526f9fc057625f15021e209096f4e6cc710e7 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Mon, 30 Jan 2023 14:57:46 +0800 Subject: [PATCH 031/499] * code for task #83327 --- module/admin/config.php | 0 module/admin/control.php | 0 module/admin/css/index.css | 15 ++++++ module/admin/css/safe.en.css | 0 module/admin/css/safe.vi.css | 0 module/admin/css/safe.zh-cn.css | 0 module/admin/css/safe.zh-tw.css | 0 module/admin/css/setmodule.css | 0 module/admin/js/checkweak.js | 0 module/admin/js/log.js | 0 module/admin/js/safe.js | 0 module/admin/js/setmodule.js | 0 module/admin/lang/de.php | 0 module/admin/lang/en.php | 0 module/admin/lang/fr.php | 0 module/admin/lang/vi.php | 0 module/admin/lang/zh-cn.php | 14 ++++-- module/admin/lang/zh-tw.php | 0 module/admin/model.php | 0 module/admin/view/bind.html.php | 0 module/admin/view/certifyztemail.html.php | 0 module/admin/view/certifyztmobile.html.php | 0 module/admin/view/checkweak.html.php | 0 module/admin/view/index.html.php | 56 +++++++++++++++------- module/admin/view/log.html.php | 0 module/admin/view/register.html.php | 0 module/admin/view/resetpwdsetting.html.php | 0 module/admin/view/safe.html.php | 0 module/admin/view/setmodule.html.php | 0 module/admin/view/sso.html.php | 0 module/admin/view/tableengine.html.php | 0 module/admin/view/ztcompany.html.php | 0 32 files changed, 62 insertions(+), 23 deletions(-) mode change 100644 => 100755 module/admin/config.php mode change 100644 => 100755 module/admin/control.php mode change 100644 => 100755 module/admin/css/index.css mode change 100644 => 100755 module/admin/css/safe.en.css mode change 100644 => 100755 module/admin/css/safe.vi.css mode change 100644 => 100755 module/admin/css/safe.zh-cn.css mode change 100644 => 100755 module/admin/css/safe.zh-tw.css mode change 100644 => 100755 module/admin/css/setmodule.css mode change 100644 => 100755 module/admin/js/checkweak.js mode change 100644 => 100755 module/admin/js/log.js mode change 100644 => 100755 module/admin/js/safe.js mode change 100644 => 100755 module/admin/js/setmodule.js mode change 100644 => 100755 module/admin/lang/de.php mode change 100644 => 100755 module/admin/lang/en.php mode change 100644 => 100755 module/admin/lang/fr.php mode change 100644 => 100755 module/admin/lang/vi.php mode change 100644 => 100755 module/admin/lang/zh-cn.php mode change 100644 => 100755 module/admin/lang/zh-tw.php mode change 100644 => 100755 module/admin/model.php mode change 100644 => 100755 module/admin/view/bind.html.php mode change 100644 => 100755 module/admin/view/certifyztemail.html.php mode change 100644 => 100755 module/admin/view/certifyztmobile.html.php mode change 100644 => 100755 module/admin/view/checkweak.html.php mode change 100644 => 100755 module/admin/view/index.html.php mode change 100644 => 100755 module/admin/view/log.html.php mode change 100644 => 100755 module/admin/view/register.html.php mode change 100644 => 100755 module/admin/view/resetpwdsetting.html.php mode change 100644 => 100755 module/admin/view/safe.html.php mode change 100644 => 100755 module/admin/view/setmodule.html.php mode change 100644 => 100755 module/admin/view/sso.html.php mode change 100644 => 100755 module/admin/view/tableengine.html.php mode change 100644 => 100755 module/admin/view/ztcompany.html.php diff --git a/module/admin/config.php b/module/admin/config.php old mode 100644 new mode 100755 diff --git a/module/admin/control.php b/module/admin/control.php old mode 100644 new mode 100755 diff --git a/module/admin/css/index.css b/module/admin/css/index.css old mode 100644 new mode 100755 index e954c9c911..ec95e71c69 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -1,3 +1,18 @@ #notice {margin: -20px -20px 20px; padding: 20px;} #zentaoLinks {margin-top: 20px;} #zentaoLinks .panel .panel-heading {padding: 6px 10px;} +.admin {display: flex; background: unset;} +.admin > .main {flex: 1 1 60%; padding-right: 10px;} +.admin > .side {flex: 1 1 40%; padding-left: 10px;} +.panel-title {padding: 10px 0px;} +.flex {display: flex;} +.panel {padding: 0 16px;} + +.settings-list {display: flex; flex-wrap: wrap; padding: 12px 4px 16px 4px;} +.settings-list > .setting-box {flex: 0 0 20%; padding: 18px 0;} + +.plugin-list {display: flex; flex-wrap: wrap; padding: 12px 4px 4px 4px;} +.plugin-list > .plugin-item {flex: 1 1 33%; padding: 16px 4px;} + +.bottom.flex > .official {flex: 1 1 30%;} +.bottom.flex > .openClass {flex: 1 1 60%; margin-left: 20px;} diff --git a/module/admin/css/safe.en.css b/module/admin/css/safe.en.css old mode 100644 new mode 100755 diff --git a/module/admin/css/safe.vi.css b/module/admin/css/safe.vi.css old mode 100644 new mode 100755 diff --git a/module/admin/css/safe.zh-cn.css b/module/admin/css/safe.zh-cn.css old mode 100644 new mode 100755 diff --git a/module/admin/css/safe.zh-tw.css b/module/admin/css/safe.zh-tw.css old mode 100644 new mode 100755 diff --git a/module/admin/css/setmodule.css b/module/admin/css/setmodule.css old mode 100644 new mode 100755 diff --git a/module/admin/js/checkweak.js b/module/admin/js/checkweak.js old mode 100644 new mode 100755 diff --git a/module/admin/js/log.js b/module/admin/js/log.js old mode 100644 new mode 100755 diff --git a/module/admin/js/safe.js b/module/admin/js/safe.js old mode 100644 new mode 100755 diff --git a/module/admin/js/setmodule.js b/module/admin/js/setmodule.js old mode 100644 new mode 100755 diff --git a/module/admin/lang/de.php b/module/admin/lang/de.php old mode 100644 new mode 100755 diff --git a/module/admin/lang/en.php b/module/admin/lang/en.php old mode 100644 new mode 100755 diff --git a/module/admin/lang/fr.php b/module/admin/lang/fr.php old mode 100644 new mode 100755 diff --git a/module/admin/lang/vi.php b/module/admin/lang/vi.php old mode 100644 new mode 100755 diff --git a/module/admin/lang/zh-cn.php b/module/admin/lang/zh-cn.php old mode 100644 new mode 100755 index 33831b046d..6a37c3cd4a --- a/module/admin/lang/zh-cn.php +++ b/module/admin/lang/zh-cn.php @@ -25,11 +25,15 @@ $lang->admin->resetPWDSetting = '重置密码设置'; $lang->admin->tableEngine = '表引擎'; $lang->admin->setModuleIndex = '系统功能配置'; -$lang->admin->api = '接口'; -$lang->admin->log = '日志'; -$lang->admin->setting = '设置'; -$lang->admin->days = '日志保存天数'; -$lang->admin->resetPWDByMail = '通过邮箱重置密码'; +$lang->admin->api = '接口'; +$lang->admin->log = '日志'; +$lang->admin->setting = '设置'; +$lang->admin->pluginRecommendation = '插件推荐'; +$lang->admin->zentaoInfo = '禅道信息'; +$lang->admin->officialAccount = '官方公众号'; +$lang->admin->openClass = '公开课'; +$lang->admin->days = '日志保存天数'; +$lang->admin->resetPWDByMail = '通过邮箱重置密码'; $lang->admin->changeEngine = "更换到InnoDB"; $lang->admin->changingTable = '正在更换数据表%s引擎...'; diff --git a/module/admin/lang/zh-tw.php b/module/admin/lang/zh-tw.php old mode 100644 new mode 100755 diff --git a/module/admin/model.php b/module/admin/model.php old mode 100644 new mode 100755 diff --git a/module/admin/view/bind.html.php b/module/admin/view/bind.html.php old mode 100644 new mode 100755 diff --git a/module/admin/view/certifyztemail.html.php b/module/admin/view/certifyztemail.html.php old mode 100644 new mode 100755 diff --git a/module/admin/view/certifyztmobile.html.php b/module/admin/view/certifyztmobile.html.php old mode 100644 new mode 100755 diff --git a/module/admin/view/checkweak.html.php b/module/admin/view/checkweak.html.php old mode 100644 new mode 100755 diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php old mode 100644 new mode 100755 index 2ac6cdc8a8..dbc150d456 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -11,25 +11,45 @@ */ ?> -
    - -
    - ' . $lang->admin->notice->ignore, 'hiddenwin', 'class="close" data-dismiss="alert" style="font-size: 12px"');?> -
    admin->notice->register, html::a(inlink('register'), $lang->admin->registerNotice->click, '', 'class="alert-link"'));?>
    +
    +
    +
    +
    admin->setting?>
    +
    +
    1
    +
    2
    +
    3
    +
    4
    +
    5
    +
    6
    +
    7
    +
    8
    +
    9
    +
    10
    +
    +
    +
    +
    admin->pluginRecommendation?>
    +
    +
    1
    +
    2
    +
    3
    +
    4
    +
    5
    +
    6
    +
    +
    +
    +
    +
    admin->officialAccount?>
    +
    +
    +
    admin->openClass?>
    +
    +
    - - -
    -

    - version; - if(trim($config->visions, ',') == 'lite') $versionName = $lang->liteName . $config->liteVersion; - printf($lang->admin->info->version, $versionName); - if($bind) echo sprintf($lang->admin->info->account, '' . $account . ''); - echo $lang->admin->info->links; - ?> -

    +
    +
    admin->zentaoInfo?>
    -
    diff --git a/module/admin/view/log.html.php b/module/admin/view/log.html.php old mode 100644 new mode 100755 diff --git a/module/admin/view/register.html.php b/module/admin/view/register.html.php old mode 100644 new mode 100755 diff --git a/module/admin/view/resetpwdsetting.html.php b/module/admin/view/resetpwdsetting.html.php old mode 100644 new mode 100755 diff --git a/module/admin/view/safe.html.php b/module/admin/view/safe.html.php old mode 100644 new mode 100755 diff --git a/module/admin/view/setmodule.html.php b/module/admin/view/setmodule.html.php old mode 100644 new mode 100755 diff --git a/module/admin/view/sso.html.php b/module/admin/view/sso.html.php old mode 100644 new mode 100755 diff --git a/module/admin/view/tableengine.html.php b/module/admin/view/tableengine.html.php old mode 100644 new mode 100755 diff --git a/module/admin/view/ztcompany.html.php b/module/admin/view/ztcompany.html.php old mode 100644 new mode 100755 From a8e7b0e2a1ce4565510846716f8b035682985289 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Mon, 30 Jan 2023 15:03:22 +0800 Subject: [PATCH 032/499] * Finish task #83206. --- module/block/model.php | 1 + module/execution/model.php | 4 ++-- module/task/model.php | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/module/block/model.php b/module/block/model.php index 65f6a4c647..404e7a229e 100644 --- a/module/block/model.php +++ b/module/block/model.php @@ -177,6 +177,7 @@ class blockModel extends model ->andWhere('t1.deleted')->eq('0') ->andWhere('t3.deleted')->eq('0') ->andWhere('t1.status')->notin('closed,cancel,pause') + ->andWhere("(t1.assignedTo = '{$this->app->user->account}' or (t1.mode = 'multi' and t4.`account` = '{$this->app->user->account}' and t1.status != 'closed' and t1.status != 'done') )") ->beginIF(!$this->app->user->admin)->andWhere('t1.execution')->in($this->app->user->view->sprints)->fi() ->beginIF($this->config->vision)->andWhere('t1.vision')->eq($this->config->vision)->fi() ->beginIF($this->config->vision)->andWhere('t3.vision')->eq($this->config->vision)->fi() diff --git a/module/execution/model.php b/module/execution/model.php index 4e7f718631..92b8cbb006 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2075,13 +2075,13 @@ class executionModel extends model if($this->session->taskQuery == false) $this->session->set('taskQuery', ' 1 = 1'); } - if(strpos($this->session->taskQuery, "deleted =") === false) $this->session->set('taskQuery', $this->session->taskQuery . " AND deleted = '0'"); + if(strpos($this->session->taskQuery, "deleted =") === false) $this->session->set('taskQuery', $this->session->taskQuery . " AND deleted = '0'"); $taskQuery = $this->session->taskQuery; /* Limit current execution when no execution. */ if(strpos($taskQuery, "`execution` =") === false) $taskQuery = $taskQuery . " AND `execution` = $executionID"; $executionQuery = "`execution` " . helper::dbIN(array_keys($executions)); - $taskQuery = str_replace("`execution` = 'all'", $executionQuery, $taskQuery); // Search all execution. + $taskQuery = str_replace("`execution` = 'all'", $executionQuery, $taskQuery); // Search all execution. $this->session->set('taskQueryCondition', $taskQuery, $this->app->tab); $this->session->set('taskOnlyCondition', true, $this->app->tab); diff --git a/module/task/model.php b/module/task/model.php index 4a2dabbb51..1552c3abf8 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -2496,7 +2496,7 @@ class taskModel extends model ->beginIF($productID)->andWhere("((t5.root=" . (int)$productID . " and t5.type='story') OR t2.product=" . (int)$productID . ")")->fi() ->beginIF($type == 'undone')->andWhere('t1.status')->notIN('done,closed')->fi() ->beginIF($type == 'needconfirm')->andWhere('t2.version > t1.storyVersion')->andWhere("t2.status = 'active'")->fi() - ->beginIF($type == 'assignedtome')->andWhere("(t1.assignedTo = '{$this->app->user->account}' or (t1.mode = 'multi' and t4.`account` = '{$this->app->user->account}') )")->fi() + ->beginIF($type == 'assignedtome')->andWhere("(t1.assignedTo = '{$this->app->user->account}' or (t1.mode = 'multi' and t4.`account` = '{$this->app->user->account}' and t1.status != 'closed' and t1.status != 'done') )")->fi() ->beginIF($type == 'finishedbyme') ->andWhere('t1.finishedby', 1)->eq($this->app->user->account) ->orWhere('t4.status')->eq("done") @@ -2640,7 +2640,7 @@ class taskModel extends model ->fi() ->beginIF($type == 'assignedTo' and ($this->app->rawModule == 'my' or $this->app->rawModule == 'block'))->andWhere('t2.status', true)->ne('suspended')->orWhere('t4.status')->ne('suspended')->markRight(1)->fi() ->beginIF($type != 'all' and $type != 'finishedBy' and $type != 'assignedTo')->andWhere("t1.`$type`")->eq($account)->fi() - ->beginIF($type == 'assignedTo')->andWhere("(t1.assignedTo = '{$account}' or (t1.mode = 'multi' and t5.`account` = '{$account}' and t1.status != 'closed') )")->fi() + ->beginIF($type == 'assignedTo')->andWhere("(t1.assignedTo = '{$account}' or (t1.mode = 'multi' and t5.`account` = '{$account}' and t1.status != 'closed' and t1.status != 'done') )")->fi() ->beginIF($type == 'assignedTo' and $this->app->rawModule == 'my' and $this->app->rawMethod == 'work')->andWhere('t1.status')->notin('closed,cancel,pause')->fi() ->orderBy($orderBy) ->beginIF($limit > 0)->limit($limit)->fi() From 8f17a289b380883f833ce457f50c0f2a570b5d6d Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 30 Jan 2023 15:23:59 +0800 Subject: [PATCH 033/499] * Finish task #83214. --- module/execution/lang/de.php | 3 ++- module/execution/lang/en.php | 3 ++- module/execution/lang/fr.php | 3 ++- module/execution/lang/zh-cn.php | 3 ++- module/execution/view/batchedit.html.php | 6 ++++++ module/execution/view/edit.html.php | 7 ++++++- 6 files changed, 20 insertions(+), 5 deletions(-) diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index 1aad7582a6..7ee7f5d3e9 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -139,6 +139,7 @@ $lang->execution->kanbanNoLinkProduct = "Kanban not linked {$lang->productCommon $lang->execution->myTask = "My Task"; $lang->execution->list = "{$lang->executionCommon} List"; $lang->execution->allProject = 'All'; +$lang->execution->method = 'Method'; /* Fields of zt_team. */ $lang->execution->root = 'Root'; @@ -599,4 +600,4 @@ $lang->execution->gantt->exportFail = 'Failed to export.'; $lang->execution->boardColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#7FBB00', '#424BAC', '#66c5f8', '#EC2761'); $lang->execution->linkBranchStoryByPlanTips = "When a scheduled association requirement is executed, only the active requirements associated with the %s of this execution are imported."; -$lang->execution->linkNormalStoryByPlanTips = "Only the active requirements are imported when the scheduled requirements are associated."; \ No newline at end of file +$lang->execution->linkNormalStoryByPlanTips = "Only the active requirements are imported when the scheduled requirements are associated."; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index 412c0c9f74..38ed9d0340 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -139,6 +139,7 @@ $lang->execution->kanbanNoLinkProduct = "Kanban not linked {$lang->productCommon $lang->execution->myTask = "My Task"; $lang->execution->list = 'List'; $lang->execution->allProject = 'All'; +$lang->execution->method = 'Method'; /* Fields of zt_team. */ $lang->execution->root = 'Root'; @@ -599,4 +600,4 @@ $lang->execution->gantt->exportFail = 'Failed to export.'; $lang->execution->boardColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#7FBB00', '#424BAC', '#66c5f8', '#EC2761'); $lang->execution->linkBranchStoryByPlanTips = "When a scheduled association requirement is executed, only the active requirements associated with the %s of this execution are imported."; -$lang->execution->linkNormalStoryByPlanTips = "Only the active requirements are imported when the scheduled requirements are associated."; \ No newline at end of file +$lang->execution->linkNormalStoryByPlanTips = "Only the active requirements are imported when the scheduled requirements are associated."; diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index 4e87634ef9..28a1b0a0c0 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -139,6 +139,7 @@ $lang->execution->kanbanNoLinkProduct = "Kanban not linked {$lang->productCommon $lang->execution->myTask = "My Task"; $lang->execution->list = "{$lang->executionCommon} List"; $lang->execution->allProject = 'Tous'; +$lang->execution->method = 'Method'; /* Fields of zt_team. */ $lang->execution->root = 'Root'; @@ -599,4 +600,4 @@ $lang->execution->gantt->exportFail = 'Failed to export.'; $lang->execution->boardColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#7FBB00', '#424BAC', '#66c5f8', '#EC2761'); $lang->execution->linkBranchStoryByPlanTips = "When a scheduled association requirement is executed, only the active requirements associated with the %s of this execution are imported."; -$lang->execution->linkNormalStoryByPlanTips = "Only the active requirements are imported when the scheduled requirements are associated."; \ No newline at end of file +$lang->execution->linkNormalStoryByPlanTips = "Only the active requirements are imported when the scheduled requirements are associated."; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 320385aef4..dd5445a1c7 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -139,6 +139,7 @@ $lang->execution->kanbanNoLinkProduct = "看板没有关联{$lang->productCommon $lang->execution->myTask = "我的任务"; $lang->execution->list = '列表'; $lang->execution->allProject = '全部项目'; +$lang->execution->method = '方法'; /* Fields of zt_team. */ $lang->execution->root = '源ID'; @@ -599,4 +600,4 @@ $lang->execution->gantt->exportFail = '导出失败。'; $lang->execution->boardColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#7FBB00', '#424BAC', '#66c5f8', '#EC2761'); $lang->execution->linkBranchStoryByPlanTips = "执行按计划关联需求时,只导入本执行所关联%s的激活状态的需求。"; -$lang->execution->linkNormalStoryByPlanTips = "执行按计划关联需求时,只导入激活状态的需求。"; \ No newline at end of file +$lang->execution->linkNormalStoryByPlanTips = "执行按计划关联需求时,只导入激活状态的需求。"; diff --git a/module/execution/view/batchedit.html.php b/module/execution/view/batchedit.html.php index 7b4aafe32a..271ccb0cd1 100755 --- a/module/execution/view/batchedit.html.php +++ b/module/execution/view/batchedit.html.php @@ -51,6 +51,9 @@ model == 'scrum'):?> execution->projectName;?> + tab == 'project' and isset($project) and $project->model == 'agileplus'):?> + execution->method;?> + execution->$name;?> setCode) or $config->setCode == 1):?> execution->$code;?> @@ -85,6 +88,9 @@ model == 'scrum'):?> project, "class='form-control picker-select' data-lastselected='{$executions[$executionID]->project}' onchange='changeProject(this, $executionID, {$executions[$executionID]->project})'");?> + tab == 'project' and isset($project)):?> + execution->typeList, $executions[$executionID]->type);?> + name, "class='form-control'");?> setCode) or $config->setCode == 1):?> code, "class='form-control'");?> diff --git a/module/execution/view/edit.html.php b/module/execution/view/edit.html.php index 54e94e7377..223b13a0d3 100644 --- a/module/execution/view/edit.html.php +++ b/module/execution/view/edit.html.php @@ -34,6 +34,11 @@ model == 'kanban'):?> id);?> + tab == 'project' and $project->model == 'agileplus'):?> + + execution->method;?> + execution->typeList, $execution->type);?> + @@ -153,7 +158,7 @@
    type != 'normal' and isset($branchGroups[$product->id]);?>
    '> - product->common;?> + product->common;?> type == 'stage' and !$execution->division) ? "disabled='disabled'" : '';?> id, "class='form-control chosen' $disabled onchange='loadBranches(this)' data-last='" . $product->id . "' data-type='" . $product->type . "'");?> type == 'stage' and !$execution->division) echo html::hidden("products[$i]", $product->id);?> From bda42821892e813a55cb9c5a7572c26fccf9c272 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 30 Jan 2023 15:28:24 +0800 Subject: [PATCH 034/499] * Finish task #83214. --- module/execution/css/batchedit.css | 1 + module/execution/css/batchedit.en.css | 1 + 2 files changed, 2 insertions(+) diff --git a/module/execution/css/batchedit.css b/module/execution/css/batchedit.css index a7d99d80b6..6051595822 100644 --- a/module/execution/css/batchedit.css +++ b/module/execution/css/batchedit.css @@ -1,3 +1,4 @@ .c-id {width: 50px;} .c-team-name {width: 120px;} .c-project, .c-user, .c-code, .c-desc, .c-days {width: 150px;} +.c-method {width: 45px;} diff --git a/module/execution/css/batchedit.en.css b/module/execution/css/batchedit.en.css index d076cb8a7a..1bc7227968 100644 --- a/module/execution/css/batchedit.en.css +++ b/module/execution/css/batchedit.en.css @@ -1,2 +1,3 @@ .c-user {width: 150px !important;} .c-date {width: 125px;} +.c-method {width: 60px;} From 165e7f5bb021d405c09b8024055e222e2b2df2e8 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 30 Jan 2023 15:32:59 +0800 Subject: [PATCH 035/499] * Optimize code for task #83214. --- module/execution/view/edit.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/execution/view/edit.html.php b/module/execution/view/edit.html.php index 223b13a0d3..1f6e7c54a8 100644 --- a/module/execution/view/edit.html.php +++ b/module/execution/view/edit.html.php @@ -34,7 +34,7 @@ model == 'kanban'):?> id);?> - tab == 'project' and $project->model == 'agileplus'):?> + model == 'agileplus'):?> execution->method;?> execution->typeList, $execution->type);?> From 5e179c8b0552ddce5ecf549ad9930a11ee60ea46 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 30 Jan 2023 15:39:20 +0800 Subject: [PATCH 036/499] * Finish task #83215, #83210. --- module/execution/control.php | 96 +++++++++++++----------- module/execution/js/create.js | 12 +++ module/execution/view/batchedit.html.php | 2 +- module/execution/view/create.html.php | 12 ++- module/project/view/execution.html.php | 9 +++ 5 files changed, 84 insertions(+), 47 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 7ad695d678..ba65966a19 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1630,8 +1630,52 @@ class execution extends control if($this->app->tab == 'doc') unset($this->lang->doc->menu->execution['subMenu']); if($this->app->tab == 'project') $this->project->setMenu($projectID); + $extra = str_replace(array(',', ' '), array('&', ''), $extra); + parse_str($extra, $output); + + $type = !empty($output['type']) ? $output['type'] : 'sprint'; + $name = ''; + $code = ''; + $team = ''; + $products = array(); + $whitelist = ''; + $acl = 'private'; + $plan = new stdClass(); + $productPlan = array(); + $productPlans = array(); + if($copyExecutionID) + { + $copyExecution = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->eq($copyExecutionID)->fetch(); + $type = $copyExecution->type; + $name = $copyExecution->name; + $code = $copyExecution->code; + $team = $copyExecution->team; + $acl = $copyExecution->acl; + $whitelist = $copyExecution->whitelist; + $projectID = $copyExecution->project; + $project = $this->project->getByID($projectID); + $products = $this->loadModel('product')->getProducts($copyExecutionID); + $branches = $this->project->getBranchesByProject($copyExecutionID); + $plans = $this->loadModel('productplan')->getGroupByProduct(array_keys($products), 'skipParent|unexpired'); + $branchGroups = $this->execution->getBranchByProduct(array_keys($products), $projectID); + + $linkedBranches = array(); + foreach($products as $productIndex => $product) + { + $productPlans[$productIndex] = array(); + foreach($branches[$productIndex] as $branchID => $branch) + { + $linkedBranches[$productIndex][$branchID] = $branchID; + $productPlans[$productIndex] += isset($plans[$productIndex][$branchID]) ? $plans[$productIndex][$branchID] : array(); + } + } + + $this->view->branches = $branches; + $this->view->linkedBranches = $linkedBranches; + } + $project = $this->project->getByID($projectID); - if(!empty($project) and $project->model == 'kanban') + if(!empty($project) and ($project->model == 'kanban' or ($project->model == 'agileplus' and $type == 'kanban'))) { global $lang; $executionLang = $lang->execution->common; @@ -1639,6 +1683,8 @@ class execution extends control $lang->execution->common = $lang->execution->kanban; include $this->app->getModulePath('', 'execution') . 'lang/' . $this->app->getClientLang() . '.php'; $lang->execution->common = $executionLang; + + $lang->execution->typeList['sprint'] = $lang->execution->common; } elseif(!empty($project) and $project->model == 'waterfall') { @@ -1647,9 +1693,6 @@ class execution extends control include $this->app->getModulePath('', 'execution') . 'lang/' . $this->app->getClientLang() . '.php'; } - $extra = str_replace(array(',', ' '), array('&', ''), $extra); - parse_str($extra, $output); - $this->app->loadLang('program'); $this->app->loadLang('stage'); $this->app->loadLang('programplan'); @@ -1694,45 +1737,6 @@ class execution extends control return $this->display(); } - $name = ''; - $code = ''; - $team = ''; - $products = array(); - $whitelist = ''; - $acl = 'private'; - $plan = new stdClass(); - $productPlan = array(); - $productPlans = array(); - if($copyExecutionID) - { - $copyExecution = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->eq($copyExecutionID)->fetch(); - $name = $copyExecution->name; - $code = $copyExecution->code; - $team = $copyExecution->team; - $acl = $copyExecution->acl; - $whitelist = $copyExecution->whitelist; - $projectID = $copyExecution->project; - $project = $this->project->getByID($projectID); - $products = $this->loadModel('product')->getProducts($copyExecutionID); - $branches = $this->project->getBranchesByProject($copyExecutionID); - $plans = $this->loadModel('productplan')->getGroupByProduct(array_keys($products), 'skipParent|unexpired'); - $branchGroups = $this->execution->getBranchByProduct(array_keys($products), $projectID); - - $linkedBranches = array(); - foreach($products as $productIndex => $product) - { - $productPlans[$productIndex] = array(); - foreach($branches[$productIndex] as $branchID => $branch) - { - $linkedBranches[$productIndex][$branchID] = $branchID; - $productPlans[$productIndex] += isset($plans[$productIndex][$branchID]) ? $plans[$productIndex][$branchID] : array(); - } - } - - $this->view->branches = $branches; - $this->view->linkedBranches = $linkedBranches; - } - if(!empty($planID)) { $plan = $this->dao->select('*')->from(TABLE_PRODUCTPLAN)->where('id')->eq($planID)->fetch(); @@ -1894,6 +1898,7 @@ class execution extends control $this->view->isStage = (isset($project->model) and $project->model == 'waterfall') ? true : false; $this->view->project = $project; $this->view->division = !empty($project) ? $project->division : 1; + $this->view->type = $type; $this->display(); } @@ -4014,18 +4019,20 @@ class execution extends control $executionConfig = $this->config->execution; $projectID = $from == 'project' ? $this->session->project : 0; + $project = $this->project->getByID($projectID); if($projectID) $this->project->setMenu($projectID); /* Create field lists. */ $fields = $this->post->exportFields ? $this->post->exportFields : explode(',', $executionConfig->list->exportFields); foreach($fields as $key => $fieldName) { + if($fieldName == 'name' and $this->app->tab == 'project' and $project->model == 'agileplus') $fields['method'] = $executionLang->method; + $fieldName = trim($fieldName); $fields[$fieldName] = zget($executionLang, $fieldName); unset($fields[$key]); } - $project = $this->project->getByID($projectID); $executionStats = $this->execution->getStatData($projectID, $status == 'byproduct' ? 'all' : $status, $productID, 0, false, '', 'id_asc'); if(isset($project->model) and $project->model == 'waterfall') { @@ -4052,6 +4059,7 @@ class execution extends control $execution->totalConsumed = $execution->hours->totalConsumed; $execution->totalLeft = $execution->hours->totalLeft; $execution->progress = $execution->hours->progress . '%'; + if($this->app->tab == 'project' and $project->model == 'agileplus') $execution->method = zget($executionLang->typeList, $execution->type); if($this->post->exportType == 'selected') { diff --git a/module/execution/js/create.js b/module/execution/js/create.js index cd71e63a61..eb05952139 100644 --- a/module/execution/js/create.js +++ b/module/execution/js/create.js @@ -175,6 +175,18 @@ function refreshPage(projectID) location.href = createLink('execution', 'create', 'projectID=' + projectID); } +/** + * Refresh page. + * + * @param object $projectID + * @access public + * @return void + */ +function setType(type) +{ + location.href = createLink('execution', 'create', 'projectID=' + projectID + '&executionID=0©ExecutionID=&planID=0&confirm=no&productID=0&extra=type=' + type); +} + /** * Cut a string of letters and characters with the same length. * diff --git a/module/execution/view/batchedit.html.php b/module/execution/view/batchedit.html.php index 271ccb0cd1..e9eaa4d175 100755 --- a/module/execution/view/batchedit.html.php +++ b/module/execution/view/batchedit.html.php @@ -88,7 +88,7 @@ model == 'scrum'):?> project, "class='form-control picker-select' data-lastselected='{$executions[$executionID]->project}' onchange='changeProject(this, $executionID, {$executions[$executionID]->project})'");?> - tab == 'project' and isset($project)):?> + tab == 'project' and isset($project) and $project->model == 'agileplus'):?> execution->typeList, $executions[$executionID]->type);?> name, "class='form-control'");?> diff --git a/module/execution/view/create.html.php b/module/execution/view/create.html.php index 8b8924cb7c..92f91fa18f 100644 --- a/module/execution/view/create.html.php +++ b/module/execution/view/create.html.php @@ -61,6 +61,14 @@ + model) and $project->model == 'agileplus'):?> + execution->typeList['stage'], $lang->execution->typeList['']);?> + + execution->method;?> + execution->typeList, $type, "class='form-control chosen' required onchange='setType(this.value)'");?> + + + execution->execName : $lang->execution->name;?> @@ -92,7 +100,7 @@
    - model != 'kanban'):?> + model != 'kanban') and $type != 'kanban'):?> execution->execType : $lang->execution->type;?> @@ -142,7 +150,7 @@
    type != 'normal' and isset($branchGroups[$product->id]);?>
    '> - product->common;?> + product->common;?> model == 'waterfall' and !$project->division) ? "disabled='disabled'" : '';?> id, "class='form-control chosen' $disabled onchange='loadBranches(this)' data-last='" . $product->id . "' data-type='" . $product->type . "'");?> model == 'waterfall' and !$project->division) echo html::hidden("products[$i]", $product->id);?> diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index 05e9c4cb9a..89374f0de3 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -52,6 +52,15 @@ " . $lang->export, '', "class='btn btn-link export'")?> deleted)):?> createLink('programplan', 'create', "projectID=$projectID&productID=$productID"), " " . $lang->programplan->create, '', "class='btn btn-primary'");?> + model == 'agileplus'):?> + createLink('execution', 'create', "projectID=$projectID"), " " . $lang->execution->create, '', "class='btn btn-primary create-execution-btn' data-app='execution' onclick='$(this).removeAttr(\"data-toggle\")'");?> From 650abbb5f5e35ef11e31ca1f99f0a29dfc35e1b3 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 30 Jan 2023 15:53:48 +0800 Subject: [PATCH 037/499] * Fix bug of task #83210. --- module/execution/control.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index ba65966a19..e136d68f1a 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1817,10 +1817,10 @@ class execution extends control return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('doc', 'objectLibs', "type=execution"))); } - if(!empty($projectID) and $project->model == 'kanban') + if(!empty($projectID) and strpos(',kanban,agileplus,', ",$project->model,") !== false) { $execution = $this->execution->getById($executionID); - $this->loadModel('kanban')->createRDKanban($execution); + if($execution->type == 'kanban') $this->loadModel('kanban')->createRDKanban($execution); } if(!empty($_POST['plans'])) From 55a2a8b9a97b474b68c026ccb0377b7d2993a593 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 30 Jan 2023 16:00:43 +0800 Subject: [PATCH 038/499] * Modify css of task #83210. --- module/project/css/execution.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/project/css/execution.css b/module/project/css/execution.css index 5ba7233f20..39676c7cbd 100644 --- a/module/project/css/execution.css +++ b/module/project/css/execution.css @@ -19,3 +19,5 @@ span.table-nest-icon.table-nest-toggle {min-width: 22px; max-width: 22px;} #projectForm .c-name, #executionTableList .c-name, #programTableList .c-name {padding-right:47px;} #mainMenu .pull-left > .btn-group > a > .text{overflow: hidden;display: block;} #mainMenu .pull-right .icon-list{padding-left: 7px;} +#mainMenu .btn-group.dropdown > .create-execution-btn {border-right: 1px solid rgba(255,255,255,0.2);} +#mainMenu .btn-group.dropdown > button.btn-primary {padding: 6px;} From 6df1f2daa6677e8b1a38cf789d1c72638b71c001 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Mon, 30 Jan 2023 16:37:24 +0800 Subject: [PATCH 039/499] * code for task_#83327 --- module/admin/css/index.css | 8 ++++++-- module/admin/view/index.html.php | 5 +++++ www/static/images/wechat.jpg | Bin 0 -> 27899 bytes 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 www/static/images/wechat.jpg diff --git a/module/admin/css/index.css b/module/admin/css/index.css index ec95e71c69..e44841c55b 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -14,5 +14,9 @@ .plugin-list {display: flex; flex-wrap: wrap; padding: 12px 4px 4px 4px;} .plugin-list > .plugin-item {flex: 1 1 33%; padding: 16px 4px;} -.bottom.flex > .official {flex: 1 1 30%;} -.bottom.flex > .openClass {flex: 1 1 60%; margin-left: 20px;} +.bottom.flex > .official {flex: 1 1 30%; margin-right: 20px;} +.bottom.flex > .openClass {flex: 1 1 60%;} + +.official.panel > .main-panel {min-height: 200px;} +.official-img {background-image: url('/static/images/wechat.jpg'); background-repeat: no-repeat; background-size: contain; flex: 1 1 50%; aspect-ratio: 1 / 1; background-position: center;} +.official-content {flex: 0 0 50%;} diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index dbc150d456..5ece0d1329 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -42,6 +42,11 @@
    admin->officialAccount?>
    +
    +
    +
    +
    +
    admin->openClass?>
    diff --git a/www/static/images/wechat.jpg b/www/static/images/wechat.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7f66f85d1a177091dbb242e769ebc1e1f457eb7b GIT binary patch literal 27899 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 Date: Mon, 30 Jan 2023 17:11:28 +0800 Subject: [PATCH 040/499] * Add extension list. --- module/admin/control.php | 5 ++++- module/admin/css/index.css | 6 ++++-- module/admin/view/index.html.php | 13 +++++++------ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/module/admin/control.php b/module/admin/control.php index 3d2d0cbe16..f05ab4299d 100755 --- a/module/admin/control.php +++ b/module/admin/control.php @@ -34,8 +34,11 @@ class admin extends control $this->loadModel('misc'); + $extensions = $this->loadModel('extension')->getExtensionsByAPI('byUpdatedTime', '', 0, 6); + $this->view->title = $this->lang->admin->common; $this->view->position[] = $this->lang->admin->index; + $this->view->extensions = isset($extensions->extensions) ? (array)$extensions->extensions : array(); $this->display(); } @@ -235,7 +238,7 @@ class admin extends control /** * Set closed features config. - * + * * @access public * @return void */ diff --git a/module/admin/css/index.css b/module/admin/css/index.css index ec95e71c69..a510ef026c 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -6,13 +6,15 @@ .admin > .side {flex: 1 1 40%; padding-left: 10px;} .panel-title {padding: 10px 0px;} .flex {display: flex;} -.panel {padding: 0 16px;} +.panel {padding: 0 0 0 16px;} .settings-list {display: flex; flex-wrap: wrap; padding: 12px 4px 16px 4px;} .settings-list > .setting-box {flex: 0 0 20%; padding: 18px 0;} .plugin-list {display: flex; flex-wrap: wrap; padding: 12px 4px 4px 4px;} -.plugin-list > .plugin-item {flex: 1 1 33%; padding: 16px 4px;} +.plugin-list > .plugin-item {flex: 1 1 30%; padding: 16px 4px; border: 1px solid #EDEEF2; border-radius: 4px; margin-right: 16px; padding: 0 10px; margin-bottom: 16px;} +.plugin-list > .plugin-item .ext-download {float: right; padding: 6px 0px;} +.plugin-list > .plugin-item .extension-desc {width: 175px; white-space: nowrap; overflow: hidden;} .bottom.flex > .official {flex: 1 1 30%;} .bottom.flex > .openClass {flex: 1 1 60%; margin-left: 20px;} diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index dbc150d456..7030bfeba8 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -31,12 +31,13 @@
    admin->pluginRecommendation?>
    -
    1
    -
    2
    -
    3
    -
    4
    -
    5
    -
    6
    + +
    + +

    name;?>

    +

    desc);?>

    +
    +
    From 94f43f04e83fe5a13effcd31bde7bb016e60f005 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 30 Jan 2023 17:13:30 +0800 Subject: [PATCH 041/499] * Fix bug of copy execution. --- module/execution/js/create.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/execution/js/create.js b/module/execution/js/create.js index eb05952139..b3f027e5cb 100644 --- a/module/execution/js/create.js +++ b/module/execution/js/create.js @@ -223,15 +223,15 @@ function subString(title, stringLength) */ function loadProjectExecutions(projectID) { - $.get(createLink('execution', 'ajaxGetCopyProjectExecutions', 'projectID=' + projectID + '&$copyExecutionID' + copyExecutionID), function(data) + $.get(createLink('execution', 'ajaxGetCopyProjectExecutions', 'projectID=' + projectID), function(data) { if(data != '[]') { - $('.alert').replaceWith("
    "); + $('#copyProjectModal .alert').replaceWith("
    "); $("#copyProjects > div[data-id != '']").remove(); $(".model-body").remove(); var data = JSON.parse(data); - if(copyExecutionID != 0 ) + if(copyExecutionID != 0) { $('#copyProjects').append(""); } From dfa423b29c5dbb5979c952d17c2a1ec5c75948e3 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Mon, 30 Jan 2023 17:14:56 +0800 Subject: [PATCH 042/499] * Fix bug for task #83206. --- module/block/model.php | 2 +- module/task/model.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/block/model.php b/module/block/model.php index 404e7a229e..0d56adf201 100644 --- a/module/block/model.php +++ b/module/block/model.php @@ -177,7 +177,7 @@ class blockModel extends model ->andWhere('t1.deleted')->eq('0') ->andWhere('t3.deleted')->eq('0') ->andWhere('t1.status')->notin('closed,cancel,pause') - ->andWhere("(t1.assignedTo = '{$this->app->user->account}' or (t1.mode = 'multi' and t4.`account` = '{$this->app->user->account}' and t1.status != 'closed' and t1.status != 'done') )") + ->andWhere("(t1.assignedTo = '{$this->app->user->account}' or (t1.mode = 'multi' and t4.`account` = '{$this->app->user->account}' and t1.status != 'closed' and t4.status != 'done') )") ->beginIF(!$this->app->user->admin)->andWhere('t1.execution')->in($this->app->user->view->sprints)->fi() ->beginIF($this->config->vision)->andWhere('t1.vision')->eq($this->config->vision)->fi() ->beginIF($this->config->vision)->andWhere('t3.vision')->eq($this->config->vision)->fi() diff --git a/module/task/model.php b/module/task/model.php index 1552c3abf8..ed8729ac34 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -2496,7 +2496,7 @@ class taskModel extends model ->beginIF($productID)->andWhere("((t5.root=" . (int)$productID . " and t5.type='story') OR t2.product=" . (int)$productID . ")")->fi() ->beginIF($type == 'undone')->andWhere('t1.status')->notIN('done,closed')->fi() ->beginIF($type == 'needconfirm')->andWhere('t2.version > t1.storyVersion')->andWhere("t2.status = 'active'")->fi() - ->beginIF($type == 'assignedtome')->andWhere("(t1.assignedTo = '{$this->app->user->account}' or (t1.mode = 'multi' and t4.`account` = '{$this->app->user->account}' and t1.status != 'closed' and t1.status != 'done') )")->fi() + ->beginIF($type == 'assignedtome')->andWhere("(t1.assignedTo = '{$this->app->user->account}' or (t1.mode = 'multi' and t4.`account` = '{$this->app->user->account}' and t1.status != 'closed' and t4.status != 'done') )")->fi() ->beginIF($type == 'finishedbyme') ->andWhere('t1.finishedby', 1)->eq($this->app->user->account) ->orWhere('t4.status')->eq("done") @@ -2640,7 +2640,7 @@ class taskModel extends model ->fi() ->beginIF($type == 'assignedTo' and ($this->app->rawModule == 'my' or $this->app->rawModule == 'block'))->andWhere('t2.status', true)->ne('suspended')->orWhere('t4.status')->ne('suspended')->markRight(1)->fi() ->beginIF($type != 'all' and $type != 'finishedBy' and $type != 'assignedTo')->andWhere("t1.`$type`")->eq($account)->fi() - ->beginIF($type == 'assignedTo')->andWhere("(t1.assignedTo = '{$account}' or (t1.mode = 'multi' and t5.`account` = '{$account}' and t1.status != 'closed' and t1.status != 'done') )")->fi() + ->beginIF($type == 'assignedTo')->andWhere("(t1.assignedTo = '{$account}' or (t1.mode = 'multi' and t5.`account` = '{$account}' and t1.status != 'closed' and t4.status != 'done') )")->fi() ->beginIF($type == 'assignedTo' and $this->app->rawModule == 'my' and $this->app->rawMethod == 'work')->andWhere('t1.status')->notin('closed,cancel,pause')->fi() ->orderBy($orderBy) ->beginIF($limit > 0)->limit($limit)->fi() From 8b5f786bd23f441681b1b8608454d9d53a18cab6 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 30 Jan 2023 17:23:10 +0800 Subject: [PATCH 043/499] * Finish task #83329. --- module/admin/config.php | 17 ++++ module/admin/lang/zh-cn.php | 94 ++++++++++++++++++++++ module/admin/model.php | 59 ++++++++++++++ module/common/lang/menu.php | 152 ++++++++++++++++++------------------ module/common/model.php | 4 +- 5 files changed, 248 insertions(+), 78 deletions(-) diff --git a/module/admin/config.php b/module/admin/config.php index 8fa6c10599..858e34106c 100644 --- a/module/admin/config.php +++ b/module/admin/config.php @@ -6,3 +6,20 @@ $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['setting'] = array('backup', 'action|trash', 'admin|xuanxuan', 'admin|license', 'admin|safe', 'custom|timezone', 'search|buildindex', 'admin|tableengine', 'ldap', 'custom|libreoffice'); +$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['template'] = array('custom|set', 'baseline'); +$config->admin->menuGroup['message'] = array('mail', 'webhook', 'sms', 'message'); +$config->admin->menuGroup['dev'] = array('dev', 'entry'); +$config->admin->menuGroup['extension'] = array('extension'); +$config->admin->menuGroup['convert'] = array('convert'); + +$config->admin->menuModuleGroup['model']['custom|set'] = array('project', 'issue', 'risk', 'opportunity', 'nc'); +$config->admin->menuModuleGroup['model']['custom|required'] = array('project', 'build'); +$config->admin->menuModuleGroup['feature']['custom|set'] = array('todo', 'feedback', 'user', 'block', 'story', 'task', 'bug', 'testcase', 'testtask', 'feedback', 'user'); +$config->admin->menuModuleGroup['feature']['custom|required'] = array('bug', 'doc', 'product', 'story', 'productplan', 'release', 'task', 'bug', 'testcase', 'testsuite', 'testtask', 'testreport', 'caselib', 'doc', 'feedback', 'user'); +$config->admin->menuModuleGroup['template']['custom|set'] = array('baseline'); diff --git a/module/admin/lang/zh-cn.php b/module/admin/lang/zh-cn.php index 33831b046d..f8a4b2e1c6 100644 --- a/module/admin/lang/zh-cn.php +++ b/module/admin/lang/zh-cn.php @@ -142,3 +142,97 @@ $lang->admin->safe->noticeMode = '系统会在创建和修改用户、修改 $lang->admin->safe->noticeWeakMode = '系统会在登录、创建和修改用户、修改密码的时候检查用户口令。'; $lang->admin->safe->noticeStrong = '密码长度越长,含有大写字母或数字或特殊符号越多,密码字母越不重复,安全度越强!'; $lang->admin->safe->noticeGd = '系统检测到您的服务器未安装GD模块,无法使用验证码功能,请安装后使用。'; + +$lang->admin->menuList = new stdclass(); +$lang->admin->menuList->setting['name'] = '系统设置'; +$lang->admin->menuList->setting['desc'] = ''; +$lang->admin->menuList->setting['order'] = 1; + +$lang->admin->menuList->user['name'] = '人员管理'; +$lang->admin->menuList->user['desc'] = ''; +$lang->admin->menuList->user['order'] = 2; + +$lang->admin->menuList->switch['name'] = '功能开关'; +$lang->admin->menuList->switch['desc'] = ''; +$lang->admin->menuList->switch['order'] = 3; + +$lang->admin->menuList->model['name'] = '模型配置'; +$lang->admin->menuList->model['desc'] = ''; +$lang->admin->menuList->model['order'] = 4; + +$lang->admin->menuList->feature['name'] = '功能配置'; +$lang->admin->menuList->feature['desc'] = ''; +$lang->admin->menuList->feature['order'] = 5; + +$lang->admin->menuList->template['name'] = '文档模板'; +$lang->admin->menuList->template['desc'] = ''; +$lang->admin->menuList->template['order'] = 6; + +$lang->admin->menuList->message['name'] = '通知设置'; +$lang->admin->menuList->message['desc'] = ''; +$lang->admin->menuList->message['order'] = 7; + +$lang->admin->menuList->extension['name'] = '插件管理'; +$lang->admin->menuList->extension['desc'] = ''; +$lang->admin->menuList->extension['order'] = 8; + +$lang->admin->menuList->dev['name'] = '二次开发'; +$lang->admin->menuList->dev['desc'] = ''; +$lang->admin->menuList->dev['order'] = 9; + +$lang->admin->menuList->convert['name'] = '数据导入'; +$lang->admin->menuList->convert['desc'] = ''; +$lang->admin->menuList->convert['order'] = 10; + +$lang->admin->menuList->setting['subMenu']['mode'] = array('link' => "模式|custom|mode|", 'subModule' => 'custom'); +$lang->admin->menuList->setting['subMenu']['backup'] = array('link' => "备份|backup|index|", 'subModule' => 'backup'); +$lang->admin->menuList->setting['subMenu']['trash'] = array('link' => "回收站|action|trash|", 'subModule' => 'action'); +$lang->admin->menuList->setting['subMenu']['xuanxuan'] = array('link' => "聊天|admin|xuanxuan|"); +$lang->admin->menuList->setting['subMenu']['license'] = array('link' => "授权信息|admin|license|"); +$lang->admin->menuList->setting['subMenu']['safe'] = array('link' => "安全|admin|safe|"); +$lang->admin->menuList->setting['subMenu']['timezone'] = array('link' => "时区|custom|timezone|", 'subModule' => 'custom'); +$lang->admin->menuList->setting['subMenu']['buildindex'] = array('link' => "重建索引|search|buildindex|", 'subModule' => 'search'); +$lang->admin->menuList->setting['subMenu']['tableengine'] = array('link' => "表引擎|admin|tableengine|"); +$lang->admin->menuList->setting['subMenu']['ldap'] = array('link' => "LDAP|ldap|set|", 'subModule' => 'ldap'); +$lang->admin->menuList->setting['subMenu']['libreoffice'] = array('link' => "Office|custom|libreoffice|", 'subModule' => 'custom'); + +$lang->admin->menuList->setting['dividerMenu'] = ',license,ldap,'; + +$lang->admin->menuList->user['subMenu']['dept'] = array('link' => "部门|dept|browse|", 'subModule' => 'dept'); +$lang->admin->menuList->user['subMenu']['user'] = array('link' => "用户|company|browse|", 'subModule' => 'company'); +$lang->admin->menuList->user['subMenu']['group'] = array('link' => "权限|group|browse|", 'subModule' => 'group'); + +$lang->admin->menuList->switch['subMenu']['setmodule'] = array('link' => "功能设置|admin|setmodule|"); + +$lang->admin->menuList->model['subMenu']['common'] = array('link' => "通用|custom|required|module=project", 'subModule' => 'custom'); +$lang->admin->menuList->model['subMenu']['scrum'] = array('link' => "敏捷模型|auditcl|scrumbrowse|", 'subModule' => 'auditcl'); +$lang->admin->menuList->model['subMenu']['waterfall'] = array('link' => "瀑布模型|stage|settype|", 'subModule' => 'stage'); + +$lang->admin->menuList->feature['subMenu']['my'] = array('link' => "地盘|custom|set|module=todo", 'subModule' => 'custom'); +$lang->admin->menuList->feature['subMenu']['product'] = array('link' => "{$lang->productCommon}|custom|product|", 'subModule' => 'custom'); +$lang->admin->menuList->feature['subMenu']['execution'] = array('link' => "{$lang->execution->common}|custom|execution|", 'subModule' => 'custom'); +$lang->admin->menuList->feature['subMenu']['qa'] = array('link' => "测试|custom|required|module=bug", 'subModule' => 'custom'); +$lang->admin->menuList->feature['subMenu']['kanban'] = array('link' => "看板|custom|kanban|", 'subModule' => 'custom'); +$lang->admin->menuList->feature['subMenu']['doc'] = array('link' => "文档|custom|required|module=doc", 'subModule' => 'custom'); +$lang->admin->menuList->feature['subMenu']['feedback'] = array('link' => "反馈|custom|set|module=feedback", 'subModule' => 'custom'); +$lang->admin->menuList->feature['subMenu']['approval'] = array('link' => "审批|approvalflow|browse|", 'subModule' => 'approvalflow'); +$lang->admin->menuList->feature['subMenu']['measure'] = array('link' => "度量|measurement|settips|", 'subModule' => 'measurement'); +$lang->admin->menuList->feature['subMenu']['user'] = array('link' => "用户|custom|set|module=user", 'subModule' => 'custom'); +$lang->admin->menuList->feature['subMenu']['meetingroom'] = array('link' => "会议室|meetingroom|browse|", 'subModule' => 'meetingroom'); + +$lang->admin->menuList->feature['dividerMenu'] = ',user,'; + +$lang->admin->menuList->template['subMenu']['type'] = array('link' => "模版类型|custom|set|module=baseline&field=objectList", 'subModule' => 'custom'); +$lang->admin->menuList->template['subMenu']['template'] = array('link' => "文档模版|baseline|template|", 'subModule' => 'baseline'); +$lang->admin->menuList->template['subMenu']['catalog'] = array('link' => "文档目录|baseline|catalog|", 'subModule' => 'baseline'); + +$lang->admin->menuList->message['subMenu']['mail'] = array('link' => "邮件|mail|edit|", 'subModule' => 'mail'); +$lang->admin->menuList->message['subMenu']['webhook'] = array('link' => "Webhook|webhook|browse|", 'subModule' => 'webhook'); +$lang->admin->menuList->message['subMenu']['sms'] = array('link' => "短信|sms|index|", 'subModule' => 'sms'); +$lang->admin->menuList->message['subMenu']['message'] = array('link' => "浏览器|message|browser|", 'subModule' => 'message'); +$lang->admin->menuList->message['subMenu']['setting'] = array('link' => "设置|message|setting|", 'subModule' => 'message'); + +$lang->admin->menuList->dev['subMenu']['api'] = array('link' => "API|dev|api|", 'subModule' => 'dev'); +$lang->admin->menuList->dev['subMenu']['db'] = array('link' => "数据库|dev|db|", 'subModule' => 'dev'); +$lang->admin->menuList->dev['subMenu']['editor'] = array('link' => "编辑器|dev|editor|", 'subModule' => 'dev'); +$lang->admin->menuList->dev['subMenu']['entry'] = array('link' => "应用|entry|browse|", 'subModule' => 'entry'); diff --git a/module/admin/model.php b/module/admin/model.php index c6ec4bed40..bff5a3bc9d 100644 --- a/module/admin/model.php +++ b/module/admin/model.php @@ -247,4 +247,63 @@ class adminModel extends model if($user->birthday and $user->password == md5($user->birthday)) return true; return false; } + + public function setMenu() + { + $this->lang->switcherMenu = $this->getSwitcher(); + } + + /** + * Get switcher. + * + * @access public + * @return string + */ + public function getSwitcher() + { + $moduleName = $this->app->rawModule; + $methodName = $this->app->rawMethod; + $paramName = current($this->app->rawParams); + $currentMenu = 'setting'; + $currentMenuName = ''; + $link = $paramName ? helper::createLink($moduleName, $methodName, "param=$paramName") : helper::createLink($moduleName, $methodName); + + foreach($this->config->admin->menuGroup as $menuKey => $menuGroup) + { + if(in_array($moduleName, $menuGroup)) + { + $currentMenu = $menuKey; + break; + } + elseif(in_array("$moduleName|$methodName", $menuGroup)) + { + if($moduleName == 'custom' and ($methodName == 'required' or $methodName == 'set')) + { + if(in_array($paramName, $this->config->admin->menuModuleGroup[$menuKey]["custom|$methodName"])) + { + + $currentMenu = $menuKey; + break; + } + } + else + { + $currentMenu = $menuKey; + break; + } + } + } + + $currentMenuName = $this->lang->admin->menuList->$currentMenu['name']; + + $output = "
    "; + + return $output; + } } diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index 3811a4194b..437636fe0c 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -572,82 +572,82 @@ $lang->company->menuOrder[30] = 'addUser'; /* Admin menu. */ $lang->admin->menu = new stdclass(); -$lang->admin->menu->index = array('link' => "$lang->indexPage|admin|index", 'alias' => 'register,certifytemail,certifyztmobile,ztcompany'); -$lang->admin->menu->company = array('link' => "{$lang->personnel->common}|company|browse|", 'subModule' => ',user,dept,group,'); -$lang->admin->menu->model = array('link' => "$lang->model|custom|browsestoryconcept|", 'class' => 'dropdown dropdown-hover', 'exclude' => 'custom-index,custom-set,custom-product,custom-execution,custom-kanban,custom-required,custom-flow,custom-score,custom-feedback,custom-timezone,custom-mode'); -$lang->admin->menu->custom = array('link' => "{$lang->custom->common}|custom|index", 'exclude' => 'custom-browsestoryconcept,custom-timezone,custom-estimate,custom-code,custom-mode'); -$lang->admin->menu->extension = array('link' => "{$lang->extension->common}|extension|browse", 'subModule' => 'extension'); -$lang->admin->menu->dev = array('link' => "$lang->redev|dev|api", 'alias' => 'db', 'subModule' => 'dev,editor,entry'); -$lang->admin->menu->message = array('link' => "{$lang->message->common}|message|index", 'subModule' => 'message,mail,webhook'); -$lang->admin->menu->system = array('link' => "{$lang->admin->system}|custom|mode", 'subModule' => 'cron,backup,action,admin,search,convert', 'exclude' => 'admin-index,admin-xuanxuan,admin-register,admin-ztcompany'); - -$lang->admin->menu->model['dropMenu'] = new stdclass(); -$lang->admin->menu->model['dropMenu']->allModel = array('link' => "{$lang->globalSetting}|custom|browsestoryconcept|", 'subModule' => 'measurement,report,sqlbuilder,subject,custom,meetingroom,baseline'); - -if($config->edition == 'max') $lang->admin->menu->model['dropMenu']->scrum = array('link' => "{$lang->scrumModel}|auditcl|scrumbrowse|processID=0&browseType=scrum", 'subModule' => 'auditcl,process,activity,zoutput,classify,'); -$lang->admin->menu->model['dropMenu']->waterfall = array('link' => "{$lang->waterfallModel}|stage|setType|", 'subModule' => 'stage,auditcl,cmcl,process,activity,zoutput,classify,reviewcl,reviewsetting,design'); - -$lang->admin->menu->allModel['subMenu'] = new stdclass(); -$lang->admin->menu->allModel['subMenu']->storyConcept = array('link' => "{$lang->storyConcept}|custom|browsestoryconcept|"); -$lang->admin->menu->allModel['subMenu']->code = array('link' => "{$lang->code}|custom|code|"); - -$lang->admin->menu->allModel['menuOrder'][5] = 'storyConcept'; -$lang->admin->menu->allModel['menuOrder'][30] = 'code'; - -$lang->admin->menu->waterfall['subMenu'] = new stdclass(); -$lang->admin->menu->waterfall['subMenu']->stage = array('link' => "{$lang->stage->common}|stage|setType|", 'subModule' => 'stage'); - -/* Admin menu order. */ -$lang->admin->menuOrder[5] = 'index'; -$lang->admin->menuOrder[10] = 'company'; -$lang->admin->menuOrder[15] = 'model'; -$lang->admin->menuOrder[20] = 'custom'; -$lang->admin->menuOrder[25] = 'message'; -$lang->admin->menuOrder[30] = 'extension'; -$lang->admin->menuOrder[35] = 'dev'; -$lang->admin->menuOrder[40] = 'system'; - -$lang->admin->menu->message['subMenu'] = new stdclass(); -$lang->admin->menu->message['subMenu']->message = array(); -$lang->admin->menu->message['subMenu']->mail = array('link' => "{$lang->mail->common}|mail|index", 'subModule' => 'mail'); -$lang->admin->menu->message['subMenu']->webhook = array('link' => "Webhook|webhook|browse", 'subModule' => 'webhook'); -$lang->admin->menu->message['subMenu']->browser = array('link' => "$lang->browser|message|browser"); -$lang->admin->menu->message['subMenu']->setting = array('link' => "$lang->settings|message|setting"); - -$lang->admin->menu->message['menuOrder'][5] = 'mail'; -$lang->admin->menu->message['menuOrder'][10] = 'webhook'; -$lang->admin->menu->message['menuOrder'][15] = 'browser'; -$lang->admin->menu->message['menuOrder'][20] = 'setting'; - -$lang->admin->menu->company['subMenu'] = new stdclass(); -$lang->admin->menu->company['subMenu']->browseUser = array('link' => "{$lang->user->common}|company|browse", 'subModule' => 'user'); -$lang->admin->menu->company['subMenu']->dept = array('link' => "{$lang->dept->common}|dept|browse", 'subModule' => 'dept'); -$lang->admin->menu->company['subMenu']->browseGroup = array('link' => "{$lang->priv}|group|browse", 'subModule' => 'group'); - -$lang->admin->menu->dev['subMenu'] = new stdclass(); -$lang->admin->menu->dev['subMenu']->api = array('link' => "API|dev|api"); -$lang->admin->menu->dev['subMenu']->db = array('link' => "$lang->db|dev|db"); -$lang->admin->menu->dev['subMenu']->editor = array('link' => "$lang->editor|dev|editor"); -$lang->admin->menu->dev['subMenu']->entry = array('link' => "{$lang->admin->entry}|entry|browse", 'subModule' => 'entry'); - -$lang->admin->menu->dev['menuOrder'][5] = 'api'; -$lang->admin->menu->dev['menuOrder'][10] = 'db'; -$lang->admin->menu->dev['menuOrder'][15] = 'editor'; -$lang->admin->menu->dev['menuOrder'][20] = 'entry'; - -$lang->admin->menu->system['subMenu'] = new stdclass(); -$lang->admin->menu->system['subMenu']->mode = array('link' => "{$lang->custom->mode}|custom|mode"); -$lang->admin->menu->system['subMenu']->setModule = array('link' => "{$lang->admin->module}|admin|setmodule"); -$lang->admin->menu->system['subMenu']->backup = array('link' => "{$lang->backup->common}|backup|index"); -$lang->admin->menu->system['subMenu']->trash = array('link' => "{$lang->action->trash}|action|trash"); -$lang->admin->menu->system['subMenu']->safe = array('link' => "$lang->security|admin|safe", 'alias' => 'checkweak,resetpwdsetting'); -$lang->admin->menu->system['subMenu']->cron = array('link' => "{$lang->admin->cron}|cron|index", 'subModule' => 'cron'); -$lang->admin->menu->system['subMenu']->timezone = array('link' => "$lang->timezone|custom|timezone"); -$lang->admin->menu->system['subMenu']->buildIndex = array('link' => "{$lang->admin->buildIndex}|search|buildindex|"); -$lang->admin->menu->system['subMenu']->tableEngine = array('link' => "{$lang->admin->tableEngine}|admin|tableengine|"); -if(version_compare(phpversion(), 5.6) > 0) $lang->admin->menu->system['subMenu']->convertJira = array('link' => "{$lang->convert->importJira}|convert|convertjira|", 'subModule' => 'convert'); - -$lang->admin->dividerMenu = ',company,message,system,'; +//$lang->admin->menu->index = array('link' => "$lang->indexPage|admin|index", 'alias' => 'register,certifytemail,certifyztmobile,ztcompany'); +//$lang->admin->menu->company = array('link' => "{$lang->personnel->common}|company|browse|", 'subModule' => ',user,dept,group,'); +//$lang->admin->menu->model = array('link' => "$lang->model|custom|browsestoryconcept|", 'class' => 'dropdown dropdown-hover', 'exclude' => 'custom-index,custom-set,custom-product,custom-execution,custom-kanban,custom-required,custom-flow,custom-score,custom-feedback,custom-timezone,custom-mode'); +//$lang->admin->menu->custom = array('link' => "{$lang->custom->common}|custom|index", 'exclude' => 'custom-browsestoryconcept,custom-timezone,custom-estimate,custom-code,custom-mode'); +//$lang->admin->menu->extension = array('link' => "{$lang->extension->common}|extension|browse", 'subModule' => 'extension'); +//$lang->admin->menu->dev = array('link' => "$lang->redev|dev|api", 'alias' => 'db', 'subModule' => 'dev,editor,entry'); +//$lang->admin->menu->message = array('link' => "{$lang->message->common}|message|index", 'subModule' => 'message,mail,webhook'); +//$lang->admin->menu->system = array('link' => "{$lang->admin->system}|custom|mode", 'subModule' => 'cron,backup,action,admin,search,convert', 'exclude' => 'admin-index,admin-xuanxuan,admin-register,admin-ztcompany'); +// +//$lang->admin->menu->model['dropMenu'] = new stdclass(); +//$lang->admin->menu->model['dropMenu']->allModel = array('link' => "{$lang->globalSetting}|custom|browsestoryconcept|", 'subModule' => 'measurement,report,sqlbuilder,subject,custom,meetingroom,baseline'); +// +//if($config->edition == 'max') $lang->admin->menu->model['dropMenu']->scrum = array('link' => "{$lang->scrumModel}|auditcl|scrumbrowse|processID=0&browseType=scrum", 'subModule' => 'auditcl,process,activity,zoutput,classify,'); +//$lang->admin->menu->model['dropMenu']->waterfall = array('link' => "{$lang->waterfallModel}|stage|setType|", 'subModule' => 'stage,auditcl,cmcl,process,activity,zoutput,classify,reviewcl,reviewsetting,design'); +// +//$lang->admin->menu->allModel['subMenu'] = new stdclass(); +//$lang->admin->menu->allModel['subMenu']->storyConcept = array('link' => "{$lang->storyConcept}|custom|browsestoryconcept|"); +//$lang->admin->menu->allModel['subMenu']->code = array('link' => "{$lang->code}|custom|code|"); +// +//$lang->admin->menu->allModel['menuOrder'][5] = 'storyConcept'; +//$lang->admin->menu->allModel['menuOrder'][30] = 'code'; +// +//$lang->admin->menu->waterfall['subMenu'] = new stdclass(); +//$lang->admin->menu->waterfall['subMenu']->stage = array('link' => "{$lang->stage->common}|stage|setType|", 'subModule' => 'stage'); +// +///* Admin menu order. */ +//$lang->admin->menuOrder[5] = 'index'; +//$lang->admin->menuOrder[10] = 'company'; +//$lang->admin->menuOrder[15] = 'model'; +//$lang->admin->menuOrder[20] = 'custom'; +//$lang->admin->menuOrder[25] = 'message'; +//$lang->admin->menuOrder[30] = 'extension'; +//$lang->admin->menuOrder[35] = 'dev'; +//$lang->admin->menuOrder[40] = 'system'; +// +//$lang->admin->menu->message['subMenu'] = new stdclass(); +//$lang->admin->menu->message['subMenu']->message = array(); +//$lang->admin->menu->message['subMenu']->mail = array('link' => "{$lang->mail->common}|mail|index", 'subModule' => 'mail'); +//$lang->admin->menu->message['subMenu']->webhook = array('link' => "Webhook|webhook|browse", 'subModule' => 'webhook'); +//$lang->admin->menu->message['subMenu']->browser = array('link' => "$lang->browser|message|browser"); +//$lang->admin->menu->message['subMenu']->setting = array('link' => "$lang->settings|message|setting"); +// +//$lang->admin->menu->message['menuOrder'][5] = 'mail'; +//$lang->admin->menu->message['menuOrder'][10] = 'webhook'; +//$lang->admin->menu->message['menuOrder'][15] = 'browser'; +//$lang->admin->menu->message['menuOrder'][20] = 'setting'; +// +//$lang->admin->menu->company['subMenu'] = new stdclass(); +//$lang->admin->menu->company['subMenu']->browseUser = array('link' => "{$lang->user->common}|company|browse", 'subModule' => 'user'); +//$lang->admin->menu->company['subMenu']->dept = array('link' => "{$lang->dept->common}|dept|browse", 'subModule' => 'dept'); +//$lang->admin->menu->company['subMenu']->browseGroup = array('link' => "{$lang->priv}|group|browse", 'subModule' => 'group'); +// +//$lang->admin->menu->dev['subMenu'] = new stdclass(); +//$lang->admin->menu->dev['subMenu']->api = array('link' => "API|dev|api"); +//$lang->admin->menu->dev['subMenu']->db = array('link' => "$lang->db|dev|db"); +//$lang->admin->menu->dev['subMenu']->editor = array('link' => "$lang->editor|dev|editor"); +//$lang->admin->menu->dev['subMenu']->entry = array('link' => "{$lang->admin->entry}|entry|browse", 'subModule' => 'entry'); +// +//$lang->admin->menu->dev['menuOrder'][5] = 'api'; +//$lang->admin->menu->dev['menuOrder'][10] = 'db'; +//$lang->admin->menu->dev['menuOrder'][15] = 'editor'; +//$lang->admin->menu->dev['menuOrder'][20] = 'entry'; +// +//$lang->admin->menu->system['subMenu'] = new stdclass(); +//$lang->admin->menu->system['subMenu']->mode = array('link' => "{$lang->custom->mode}|custom|mode"); +//$lang->admin->menu->system['subMenu']->setModule = array('link' => "{$lang->admin->module}|admin|setmodule"); +//$lang->admin->menu->system['subMenu']->backup = array('link' => "{$lang->backup->common}|backup|index"); +//$lang->admin->menu->system['subMenu']->trash = array('link' => "{$lang->action->trash}|action|trash"); +//$lang->admin->menu->system['subMenu']->safe = array('link' => "$lang->security|admin|safe", 'alias' => 'checkweak,resetpwdsetting'); +//$lang->admin->menu->system['subMenu']->cron = array('link' => "{$lang->admin->cron}|cron|index", 'subModule' => 'cron'); +//$lang->admin->menu->system['subMenu']->timezone = array('link' => "$lang->timezone|custom|timezone"); +//$lang->admin->menu->system['subMenu']->buildIndex = array('link' => "{$lang->admin->buildIndex}|search|buildindex|"); +//$lang->admin->menu->system['subMenu']->tableEngine = array('link' => "{$lang->admin->tableEngine}|admin|tableengine|"); +//if(version_compare(phpversion(), 5.6) > 0) $lang->admin->menu->system['subMenu']->convertJira = array('link' => "{$lang->convert->importJira}|convert|convertjira|", 'subModule' => 'convert'); +// +//$lang->admin->dividerMenu = ',company,message,system,'; $lang->subject->menu = new stdclass(); $lang->subject->menu->storyConcept = array('link' => "{$lang->storyConcept}|custom|browsestoryconcept|"); diff --git a/module/common/model.php b/module/common/model.php index 504f4c49a8..d5a533f37a 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -913,9 +913,9 @@ class commonModel extends model */ public static function printHomeButton($tab) { - global $lang; - global $config; + global $lang, $config, $app; + if($tab == 'admin') $app->control->loadModel('admin')->setMenu(); if(!$tab) return; $icon = zget($lang->navIcons, $tab, ''); From e7468f169986e79b76973f2e70d95545d4055d26 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Tue, 31 Jan 2023 08:27:03 +0800 Subject: [PATCH 044/499] * code for css in admin.html --- module/admin/css/index.css | 5 +++-- module/admin/view/index.html.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module/admin/css/index.css b/module/admin/css/index.css index 434a6828ab..3a060cdaf5 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -12,9 +12,10 @@ .settings-list > .setting-box {flex: 0 0 20%; padding: 18px 0;} .plugin-list {display: flex; flex-wrap: wrap; padding: 12px 4px 4px 4px;} -.plugin-list > .plugin-item {flex: 1 1 30%; padding: 16px 4px; border: 1px solid #EDEEF2; border-radius: 4px; margin-right: 16px; padding: 0 10px; margin-bottom: 16px;} +.plugin-list > .plugin-item {flex: 1 1 30%; padding: 16px 4px; border: 1px solid #EDEEF2; border-radius: 4px; margin-right: 16px; margin-bottom: 16px;} .plugin-list > .plugin-item .ext-download {float: right; padding: 6px 0px;} -.plugin-list > .plugin-item .extension-desc {width: 175px; white-space: nowrap; overflow: hidden;} +.plugin-list > .plugin-item > .plug-title {height: 16px; overflow: hidden;} +.plugin-list > .plugin-item .extension-desc {overflow: hidden; height: 16px;} .bottom.flex > .official {flex: 1 1 30%; margin-right: 20px;} .bottom.flex > .openClass {flex: 1 1 60%;} diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index 7ea660e9e2..07a6b96023 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -34,7 +34,7 @@
    -

    name;?>

    +

    name;?>

    desc);?>

    From fd399560f9873db752d44f1f204493d5c245e7cb Mon Sep 17 00:00:00 2001 From: Yagami Date: Tue, 31 Jan 2023 08:54:50 +0800 Subject: [PATCH 045/499] * Code for task #83209. --- module/block/lang/de.php | 5 ++++- module/block/lang/en.php | 5 ++++- module/block/lang/fr.php | 5 ++++- module/block/lang/zh-cn.php | 5 ++++- module/project/config.php | 3 +++ module/project/lang/de.php | 5 ++++- module/project/lang/en.php | 5 ++++- module/project/lang/fr.php | 11 +++++++---- module/project/lang/zh-cn.php | 15 +++++++++------ module/project/view/create.html.php | 2 +- module/project/view/createguide.html.php | 19 ++++++++++++------- module/project/view/edit.html.php | 2 +- 12 files changed, 57 insertions(+), 25 deletions(-) diff --git a/module/block/lang/de.php b/module/block/lang/de.php index f580bc7315..482194e020 100644 --- a/module/block/lang/de.php +++ b/module/block/lang/de.php @@ -169,7 +169,8 @@ $lang->block->default['scrum']['project']['4']['grid'] = 4; $lang->block->default['scrum']['project']['5']['title'] = 'Dynamic'; $lang->block->default['scrum']['project']['5']['block'] = 'projectdynamic'; $lang->block->default['scrum']['project']['5']['grid'] = 4; -$lang->block->default['kanban'] = $lang->block->default['scrum']; +$lang->block->default['kanban'] = $lang->block->default['scrum']; +$lang->block->default['agileplus'] = $lang->block->default['scrum']; $lang->block->default['product']['1']['title'] = $lang->productCommon . ' Berichte'; $lang->block->default['product']['1']['block'] = 'statistic'; @@ -375,6 +376,8 @@ $lang->block->modules['scrum']['index']->availableBlocks->sprint = $lang $lang->block->modules['scrum']['index']->availableBlocks->scrumtest = 'Test Version'; $lang->block->modules['scrum']['index']->availableBlocks->projectdynamic = 'Dynamics'; +$lang->block->modules['agileplus']['index'] = $lang->block->modules['scrum']['index']; + $lang->block->modules['waterfall']['index'] = new stdclass(); $lang->block->modules['waterfall']['index']->availableBlocks = new stdclass(); $lang->block->modules['waterfall']['index']->availableBlocks->waterfallgantt = 'Plan Gantt Chart'; diff --git a/module/block/lang/en.php b/module/block/lang/en.php index b9eada8057..9d63cc9daa 100644 --- a/module/block/lang/en.php +++ b/module/block/lang/en.php @@ -169,7 +169,8 @@ $lang->block->default['scrum']['project']['4']['grid'] = 4; $lang->block->default['scrum']['project']['5']['title'] = 'Dynamic'; $lang->block->default['scrum']['project']['5']['block'] = 'projectdynamic'; $lang->block->default['scrum']['project']['5']['grid'] = 4; -$lang->block->default['kanban'] = $lang->block->default['scrum']; +$lang->block->default['kanban'] = $lang->block->default['scrum']; +$lang->block->default['agileplus'] = $lang->block->default['scrum']; $lang->block->default['product']['1']['title'] = $lang->productCommon . ' Report'; $lang->block->default['product']['1']['block'] = 'statistic'; @@ -375,6 +376,8 @@ $lang->block->modules['scrum']['index']->availableBlocks->sprint = $lang $lang->block->modules['scrum']['index']->availableBlocks->scrumtest = 'Test Version'; $lang->block->modules['scrum']['index']->availableBlocks->projectdynamic = 'Dynamics'; +$lang->block->modules['agileplus']['index'] = $lang->block->modules['scrum']['index']; + $lang->block->modules['waterfall']['index'] = new stdclass(); $lang->block->modules['waterfall']['index']->availableBlocks = new stdclass(); $lang->block->modules['waterfall']['index']->availableBlocks->waterfallgantt = 'Plan Gantt Chart'; diff --git a/module/block/lang/fr.php b/module/block/lang/fr.php index 0575caf8a8..39a54d3f20 100644 --- a/module/block/lang/fr.php +++ b/module/block/lang/fr.php @@ -169,7 +169,8 @@ $lang->block->default['scrum']['project']['4']['grid'] = 4; $lang->block->default['scrum']['project']['5']['title'] = 'Dynamic'; $lang->block->default['scrum']['project']['5']['block'] = 'projectdynamic'; $lang->block->default['scrum']['project']['5']['grid'] = 4; -$lang->block->default['kanban'] = $lang->block->default['scrum']; +$lang->block->default['kanban'] = $lang->block->default['scrum']; +$lang->block->default['agileplus'] = $lang->block->default['scrum']; $lang->block->default['product']['1']['title'] = ' Rapport de ' . $lang->productCommon; $lang->block->default['product']['1']['block'] = 'statistic'; @@ -375,6 +376,8 @@ $lang->block->modules['scrum']['index']->availableBlocks->sprint = $lang $lang->block->modules['scrum']['index']->availableBlocks->scrumtest = 'Test Version'; $lang->block->modules['scrum']['index']->availableBlocks->projectdynamic = 'Dynamics'; +$lang->block->modules['agileplus']['index'] = $lang->block->modules['scrum']['index']; + $lang->block->modules['waterfall']['index'] = new stdclass(); $lang->block->modules['waterfall']['index']->availableBlocks = new stdclass(); $lang->block->modules['waterfall']['index']->availableBlocks->waterfallgantt = 'Plan Gantt Chart'; diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php index 5c6a85626f..59db3097e3 100644 --- a/module/block/lang/zh-cn.php +++ b/module/block/lang/zh-cn.php @@ -169,7 +169,8 @@ $lang->block->default['scrum']['project']['4']['grid'] = 4; $lang->block->default['scrum']['project']['5']['title'] = '最新动态'; $lang->block->default['scrum']['project']['5']['block'] = 'projectdynamic'; $lang->block->default['scrum']['project']['5']['grid'] = 4; -$lang->block->default['kanban'] = $lang->block->default['scrum']; +$lang->block->default['kanban'] = $lang->block->default['scrum']; +$lang->block->default['agileplus'] = $lang->block->default['scrum']; $lang->block->default['product']['1']['title'] = $lang->productCommon . '统计'; $lang->block->default['product']['1']['block'] = 'statistic'; @@ -375,6 +376,8 @@ $lang->block->modules['scrum']['index']->availableBlocks->sprint = $lang $lang->block->modules['scrum']['index']->availableBlocks->scrumtest = '待测版本'; $lang->block->modules['scrum']['index']->availableBlocks->projectdynamic = '最新动态'; +$lang->block->modules['agileplus']['index'] = $lang->block->modules['scrum']['index']; + $lang->block->modules['waterfall']['index'] = new stdclass(); $lang->block->modules['waterfall']['index']->availableBlocks = new stdclass(); $lang->block->modules['waterfall']['index']->availableBlocks->waterfallgantt = "项目计划"; diff --git a/module/project/config.php b/module/project/config.php index 001a56d294..6e519f314d 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -142,10 +142,13 @@ $config->project->checkList = new stdclass(); $config->project->checkList->scrum = array('bug', 'execution', 'build', 'doc', 'release', 'testtask', 'case'); $config->project->checkList->waterfall = array('execution', 'design', 'doc', 'bug', 'case', 'build', 'release', 'testtask'); $config->project->checkList->kanban = array('execution', 'build'); +$config->project->checkList->agileplus = $config->project->checkList->scrum; + $config->project->maxCheckList = new stdclass(); $config->project->maxCheckList->scrum = array('bug', 'execution', 'build', 'doc', 'release', 'testtask', 'case', 'issue', 'risk', 'meeting'); $config->project->maxCheckList->waterfall = array('execution', 'design', 'doc', 'bug', 'case', 'build', 'release', 'testtask', 'review', 'build', 'researchplan', 'issue', 'risk', 'opportunity', 'auditplan', 'gapanalysis', 'meeting'); $config->project->maxCheckList->kanban = array('execution', 'build'); +$config->project->maxCheckList->agileplus = $config->project->maxCheckList->scrum; $config->project->search['module'] = 'project'; $config->project->search['fields']['name'] = $lang->project->name; diff --git a/module/project/lang/de.php b/module/project/lang/de.php index 9f10afb9ee..ca278f58b3 100644 --- a/module/project/lang/de.php +++ b/module/project/lang/de.php @@ -271,6 +271,7 @@ $lang->project->modelList[''] = ''; $lang->project->modelList['scrum'] = "Scrum"; if(helper::hasFeature('waterfall')) $lang->project->modelList['waterfall'] = "CMMI"; $lang->project->modelList['kanban'] = "Kanban"; +$lang->project->modelList['agileplus'] = "Agile +"; $lang->project->featureBar['browse']['all'] = 'All'; $lang->project->featureBar['browse']['undone'] = 'Unfinished'; @@ -327,6 +328,7 @@ $lang->project->endList[999] = 'Longtime'; $lang->project->scrumTitle = 'Agile Development Management'; $lang->project->waterfallTitle = 'CMMI'; $lang->project->kanbanTitle = 'Kanban Project Management'; +$lang->project->agileplusTitle = 'Integrating Agile and Kanban Project Management'; $lang->project->empty = 'No project.'; $lang->project->nextStep = 'Next step'; @@ -337,6 +339,7 @@ $lang->project->lastKanban = 'Recent Kanban'; $lang->project->ongoingStage = 'Ongoing stage'; $lang->project->scrum = 'Scrum'; $lang->project->waterfall = 'CMMI'; +$lang->project->agileplus = 'Agile +'; $lang->project->cannotCreateChild = 'It is not empty, so you cannot add a child. You can add a parent for it, and then create a child.'; $lang->project->emptyPM = 'No manager'; $lang->project->emptyBranch = 'Branch can not be empty!'; @@ -384,4 +387,4 @@ $lang->project->copyProject->endTips = '『Schedule End』Cannot be e $lang->project->copyProject->daysTips = '『Available working days』Should be numerical.'; $lang->project->linkBranchStoryByPlanTips = "When the project is scheduled to associate requirements, only the activated requirements associated with the %s of the project are imported."; -$lang->project->linkNormalStoryByPlanTips = "When the project plans to associate requirements, only the requirements that are active are imported."; \ No newline at end of file +$lang->project->linkNormalStoryByPlanTips = "When the project plans to associate requirements, only the requirements that are active are imported."; diff --git a/module/project/lang/en.php b/module/project/lang/en.php index 291bff2889..6822c5b9e6 100644 --- a/module/project/lang/en.php +++ b/module/project/lang/en.php @@ -271,6 +271,7 @@ $lang->project->modelList[''] = ''; $lang->project->modelList['scrum'] = "Scrum"; if(helper::hasFeature('waterfall')) $lang->project->modelList['waterfall'] = "CMMI"; $lang->project->modelList['kanban'] = "Kanban"; +$lang->project->modelList['agileplus'] = "Agile +"; $lang->project->featureBar['browse']['all'] = 'All'; $lang->project->featureBar['browse']['undone'] = 'Unfinished'; @@ -327,6 +328,7 @@ $lang->project->endList[999] = 'Longtime'; $lang->project->scrumTitle = 'Agile Development Management'; $lang->project->waterfallTitle = 'Waterfall Project Management'; $lang->project->kanbanTitle = 'Kanban Project Management'; +$lang->project->agileplusTitle = 'Integrating Agile and Kanban Project Management'; $lang->project->empty = 'No project.'; $lang->project->nextStep = 'Next step'; @@ -337,6 +339,7 @@ $lang->project->lastKanban = 'Recent Kanban'; $lang->project->ongoingStage = 'Ongoing stage'; $lang->project->scrum = 'Scrum'; $lang->project->waterfall = 'Waterfall'; +$lang->project->agileplus = 'Agile +'; $lang->project->cannotCreateChild = 'It is not empty, so you cannot add a child. You can add a parent for it, and then create a child.'; $lang->project->emptyPM = 'No manager'; $lang->project->emptyBranch = 'Branch can not be empty!'; @@ -384,4 +387,4 @@ $lang->project->copyProject->endTips = '『Schedule End』Cannot be e $lang->project->copyProject->daysTips = '『Available working days』Should be numerical.'; $lang->project->linkBranchStoryByPlanTips = "When the project is scheduled to associate requirements, only the activated requirements associated with the %s of the project are imported."; -$lang->project->linkNormalStoryByPlanTips = "When the project plans to associate requirements, only the requirements that are active are imported."; \ No newline at end of file +$lang->project->linkNormalStoryByPlanTips = "When the project plans to associate requirements, only the requirements that are active are imported."; diff --git a/module/project/lang/fr.php b/module/project/lang/fr.php index 55285fa342..b5507a6e12 100644 --- a/module/project/lang/fr.php +++ b/module/project/lang/fr.php @@ -267,10 +267,11 @@ $lang->project->currencySymbol['NZD'] = 'NZ$'; $lang->project->currencySymbol['THB'] = '฿'; $lang->project->currencySymbol['SGD'] = 'S$'; -$lang->project->modelList[''] = ''; -$lang->project->modelList['scrum'] = "Scrum"; +$lang->project->modelList[''] = ''; +$lang->project->modelList['scrum'] = "Scrum"; if(helper::hasFeature('waterfall')) $lang->project->modelList['waterfall'] = "CMMI"; -$lang->project->modelList['kanban'] = "Kanban"; +$lang->project->modelList['kanban'] = "Kanban"; +$lang->project->modelList['agileplus'] = "Agile +"; $lang->project->featureBar['browse']['all'] = 'All'; $lang->project->featureBar['browse']['undone'] = 'Non Terminées'; @@ -327,6 +328,7 @@ $lang->project->endList[999] = 'Longtime'; $lang->project->scrumTitle = 'Agile Development Management'; $lang->project->waterfallTitle = 'Waterfall Project Management'; $lang->project->kanbanTitle = 'Kanban Project Management'; +$lang->project->agileplusTitle = 'Integrating Agile and Kanban Project Management'; $lang->project->empty = 'No project.'; $lang->project->nextStep = 'Next step'; @@ -337,6 +339,7 @@ $lang->project->lastKanban = 'Recent Kanban'; $lang->project->ongoingStage = 'Ongoing stage'; $lang->project->scrum = 'Scrum'; $lang->project->waterfall = 'CMMI'; +$lang->project->agileplus = 'Agile +'; $lang->project->cannotCreateChild = 'It is not empty, so you cannot add a child. You can add a parent for it, and then create a child.'; $lang->project->emptyPM = 'No manager'; $lang->project->emptyBranch = 'Branch can not be empty!'; @@ -384,4 +387,4 @@ $lang->project->copyProject->endTips = '『Schedule End』Cannot be e $lang->project->copyProject->daysTips = '『Available working days』Should be numerical.'; $lang->project->linkBranchStoryByPlanTips = "When the project is scheduled to associate requirements, only the activated requirements associated with the %s of the project are imported."; -$lang->project->linkNormalStoryByPlanTips = "When the project plans to associate requirements, only the requirements that are active are imported."; \ No newline at end of file +$lang->project->linkNormalStoryByPlanTips = "When the project plans to associate requirements, only the requirements that are active are imported."; diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index b7dfef7811..8fdfd91d52 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -267,10 +267,11 @@ $lang->project->currencySymbol['NZD'] = 'NZ$'; $lang->project->currencySymbol['THB'] = '฿'; $lang->project->currencySymbol['SGD'] = 'S$'; -$lang->project->modelList[''] = ""; -$lang->project->modelList['scrum'] = "Scrum"; +$lang->project->modelList[''] = ""; +$lang->project->modelList['scrum'] = "Scrum"; if(helper::hasFeature('waterfall')) $lang->project->modelList['waterfall'] = "瀑布"; -$lang->project->modelList['kanban'] = "看板"; +$lang->project->modelList['kanban'] = "看板"; +$lang->project->modelList['agileplus'] = "融合敏捷"; $lang->project->featureBar['browse']['all'] = '全部'; $lang->project->featureBar['browse']['undone'] = '未完成'; @@ -324,9 +325,10 @@ $lang->project->endList[186] = '半年'; $lang->project->endList[365] = '一年'; $lang->project->endList[999] = '长期'; -$lang->project->scrumTitle = '敏捷开发全流程项目管理'; -$lang->project->waterfallTitle = '瀑布式项目管理'; -$lang->project->kanbanTitle = '专业研发看板项目管理'; +$lang->project->scrumTitle = '敏捷开发全流程项目管理'; +$lang->project->waterfallTitle = '瀑布式项目管理'; +$lang->project->kanbanTitle = '专业研发看板项目管理'; +$lang->project->agileplusTitle = '融合敏捷开发与看板项目管理'; $lang->project->empty = '暂时没有项目'; $lang->project->nextStep = '下一步'; @@ -337,6 +339,7 @@ $lang->project->lastKanban = '近期看板'; $lang->project->ongoingStage = '进行中的阶段'; $lang->project->scrum = 'Scrum'; $lang->project->waterfall = '瀑布'; +$lang->project->agileplus = '融合敏捷'; $lang->project->cannotCreateChild = '该项目已经有实际的内容,无法直接添加子项目。您可以为当前项目创建一个父项目,然后在新的父项目下面添加子项目。'; $lang->project->emptyPM = '暂无'; $lang->project->emptyBranch = '分支不能为空!'; diff --git a/module/project/view/create.html.php b/module/project/view/create.html.php index 724dee301e..372d17266a 100755 --- a/module/project/view/create.html.php +++ b/module/project/view/create.html.php @@ -79,7 +79,7 @@ - + project->multiple;?> diff --git a/module/project/view/createguide.html.php b/module/project/view/createguide.html.php index a26b4a4076..5c43a8ed14 100644 --- a/module/project/view/createguide.html.php +++ b/module/project/view/createguide.html.php @@ -14,20 +14,18 @@ #guideDialog .project-type-img {width: 280px; border: 1px solid #CBD0DB; border-radius: 2px; margin-bottom: 10px; cursor: pointer; margin-top: 1px} #guideDialog .project-type-img:hover {border-color: #006AF1; box-shadow: 0 0 10px 0 rgba(0,0,0,.25);} #guideDialog .project-type.active img {border-color: #006AF1; border-width: 2px; margin-top: 0} + .col {width: 50%} From 2e21fef01e563199151348e8696b2cacefec7eab Mon Sep 17 00:00:00 2001 From: zhaoke Date: Tue, 31 Jan 2023 02:29:51 +0000 Subject: [PATCH 050/499] * Add lost sql. --- db/update18.0.beta3.sql | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/db/update18.0.beta3.sql b/db/update18.0.beta3.sql index 1b89108373..84d6e98de7 100644 --- a/db/update18.0.beta3.sql +++ b/db/update18.0.beta3.sql @@ -1,3 +1,9 @@ +ALTER TABLE `zt_host` ADD `type` varchar(30) NOT NULL DEFAULT 'normal' AFTER `admin`; +ALTER TABLE `zt_host` ADD `secret` varchar(50) NOT NULL DEFAULT '' AFTER `type`; +ALTER TABLE `zt_host` ADD `token` varchar(50) NOT NULL DEFAULT '' AFTER `secret`; +ALTER TABLE `zt_host` ADD `expiredDate` datetime NOT NULL AFTER `token`; +ALTER TABLE `zt_host` ADD `virtualSoftware` varchar(30) NOT NULL DEFAULT '' AFTER `expiredDate`; + ALTER TABLE `zt_host` DROP COLUMN `cabinet`, DROP COLUMN `cpuRate`, @@ -58,7 +64,6 @@ h.`createdDate` = a.`createdDate`, h.`editedBy` = a.`editedBy`, h.`editedDate` = a.`editedDate`, h.`group` = a.`group`, -h.`type` = a.`type`, h.`deleted` = a.`deleted` WHERE h.`assetID` = a.`id`; From 73df98376a408d97163c11b08ca5ce6a1cc0686b Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Tue, 31 Jan 2023 10:35:06 +0800 Subject: [PATCH 051/499] * Finish task #83205, and fix bug of task #83206. --- module/block/model.php | 3 +-- module/execution/model.php | 19 +++++++++++++++---- module/my/model.php | 10 ++++++++-- module/task/model.php | 2 +- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/module/block/model.php b/module/block/model.php index 0d56adf201..dc76d854af 100644 --- a/module/block/model.php +++ b/module/block/model.php @@ -170,14 +170,13 @@ class blockModel extends model ->leftJoin(TABLE_PROJECT)->alias('t2')->on("t1.project = t2.id") ->leftJoin(TABLE_EXECUTION)->alias('t3')->on("t1.execution = t3.id") ->leftJoin(TABLE_TASKTEAM)->alias('t4')->on("t4.task = t1.id and t4.account = '{$this->app->user->account}'") - ->where("(t1.assignedTo = '{$this->app->user->account}' or (t1.mode = 'multi' and t4.`account` = '{$this->app->user->account}') )") + ->where("(t1.assignedTo = '{$this->app->user->account}' or (t1.mode = 'multi' and t4.`account` = '{$this->app->user->account}' and t1.status != 'closed' and t4.status != 'done') )") ->andWhere('(t2.status')->ne('suspended') ->orWhere('t3.status')->ne('suspended') ->markRight(1) ->andWhere('t1.deleted')->eq('0') ->andWhere('t3.deleted')->eq('0') ->andWhere('t1.status')->notin('closed,cancel,pause') - ->andWhere("(t1.assignedTo = '{$this->app->user->account}' or (t1.mode = 'multi' and t4.`account` = '{$this->app->user->account}' and t1.status != 'closed' and t4.status != 'done') )") ->beginIF(!$this->app->user->admin)->andWhere('t1.execution')->in($this->app->user->view->sprints)->fi() ->beginIF($this->config->vision)->andWhere('t1.vision')->eq($this->config->vision)->fi() ->beginIF($this->config->vision)->andWhere('t3.vision')->eq($this->config->vision)->fi() diff --git a/module/execution/model.php b/module/execution/model.php index 92b8cbb006..c294634f61 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -3774,12 +3774,23 @@ class executionModel extends model */ public function getSearchTasks($condition, $pager, $orderBy) { - $taskIdList = $this->dao->select('id') - ->from(TABLE_TASK) - ->where($condition) + if(strpos($condition, '`assignedTo`') !== false) + { + preg_match("/`assignedTo`\s+(([^']*) ('([^']*)'))/", $condition, $matches); + $condition = preg_replace('/`(\w+)`/', 't1.`$1`', $condition); + $condition = str_replace("t1.$matches[0]", "(t1.$matches[0] or (t1.mode = 'multi' and t2.`account` $matches[1] and t1.status != 'closed' and t2.status != 'done') )", $condition); + } + + $sql = $this->dao->select('t1.id')->from(TABLE_TASK)->alias('t1'); + if(strpos($condition, '`assignedTo`') !== false) $sql = $sql->leftJoin(TABLE_TASKTEAM)->alias('t2')->on("t2.task = t1.id and t2.account $matches[1]"); + + $orderBy = array_map(function($value){return 't1.' . $value;}, explode(',', $orderBy)); + $orderBy = implode(',', $orderBy); + + $taskIdList = $sql->where($condition) ->andWhere('deleted')->eq(0) ->orderBy($orderBy) - ->page($pager) + ->page($pager, 't1.id') ->fetchAll('id'); $orderBy = str_replace('pri_', 'priOrder_', $orderBy); diff --git a/module/my/model.php b/module/my/model.php index bb6ae26b4b..71367222f6 100644 --- a/module/my/model.php +++ b/module/my/model.php @@ -571,6 +571,12 @@ class myModel extends model $query = preg_replace('/`(\w+)`/', 't1.`$1`', $query); $query = str_replace('t1.`project`', 't2.`project`', $query); + if(strpos($query, '`assignedTo`') !== false) + { + preg_match("/`assignedTo`\s+(([^']*) ('([^']*)'))/", $query, $matches); + $query = str_replace("t1.$matches[0]", "(t1.$matches[0] or (t1.mode = 'multi' and t5.`account` $matches[1] and t1.status != 'closed' and t5.status != 'done') )", $query); + } + $orderBy = str_replace('pri_', 'priOrder_', $orderBy); $tasks = $this->dao->select("t1.*, t4.id as project, t2.id as executionID, t2.name as executionName, t2.multiple as executionMultiple, t4.name as projectName, t2.type as executionType, t3.id as storyID, t3.title as storyTitle, t3.status AS storyStatus, t3.version AS latestStoryVersion, IF(t1.`pri` = 0, {$this->config->maxPriValue}, t1.`pri`) as priOrder") ->from(TABLE_TASK)->alias('t1') @@ -582,7 +588,7 @@ class myModel extends model ->andWhere('t1.deleted')->eq(0) ->andWhere('t2.deleted')->eq(0) ->andWhere('(t2.status')->ne('suspended')->orWhere('t4.status')->ne('suspended')->markRight(1) - ->beginIF($moduleName == 'workTask')->andWhere("t1.assignedTo")->eq($account) + ->beginIF($moduleName == 'workTask')->andWhere("(t1.$matches[0] or (t1.mode = 'multi' and t5.`account` $matches[1] and t1.status != 'closed' and t5.status != 'done') )")->fi() ->beginIF($moduleName == 'contributeTask') ->andWhere('t1.openedBy', 1)->eq($account) ->orWhere('t1.closedBy')->eq($account) @@ -597,7 +603,7 @@ class myModel extends model ->beginIF(!$this->app->user->admin)->andWhere('t1.execution')->in($this->app->user->view->sprints)->fi() ->orderBy($orderBy) ->beginIF($limit > 0)->limit($limit)->fi() - ->page($pager) + ->page($pager, 't1.id') ->fetchAll('id'); $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'task', false); diff --git a/module/task/model.php b/module/task/model.php index ed8729ac34..f84be43d69 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -2640,7 +2640,7 @@ class taskModel extends model ->fi() ->beginIF($type == 'assignedTo' and ($this->app->rawModule == 'my' or $this->app->rawModule == 'block'))->andWhere('t2.status', true)->ne('suspended')->orWhere('t4.status')->ne('suspended')->markRight(1)->fi() ->beginIF($type != 'all' and $type != 'finishedBy' and $type != 'assignedTo')->andWhere("t1.`$type`")->eq($account)->fi() - ->beginIF($type == 'assignedTo')->andWhere("(t1.assignedTo = '{$account}' or (t1.mode = 'multi' and t5.`account` = '{$account}' and t1.status != 'closed' and t4.status != 'done') )")->fi() + ->beginIF($type == 'assignedTo')->andWhere("(t1.assignedTo = '{$account}' or (t1.mode = 'multi' and t5.`account` = '{$account}' and t1.status != 'closed' and t5.status != 'done') )")->fi() ->beginIF($type == 'assignedTo' and $this->app->rawModule == 'my' and $this->app->rawMethod == 'work')->andWhere('t1.status')->notin('closed,cancel,pause')->fi() ->orderBy($orderBy) ->beginIF($limit > 0)->limit($limit)->fi() From 0ab09e26c2da208e9d3094d016470ed2bee46443 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Tue, 31 Jan 2023 10:46:16 +0800 Subject: [PATCH 052/499] * code for task #83433 --- module/admin/css/index.css | 6 +++++- module/admin/view/index.html.php | 12 ++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/module/admin/css/index.css b/module/admin/css/index.css index 1fec45f6e9..bae5ed20db 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -18,8 +18,12 @@ .plugin-list > .plugin-item .extension-desc {overflow: hidden; height: 16px;} .bottom.flex > .official {flex: 1 1 30%; margin-right: 20px;} -.bottom.flex > .openClass {flex: 1 1 60%;} +.bottom.flex > .publicClass {flex: 1 1 60%;} .official-img {background-image: url('/static/images/wechat.jpg'); background-repeat: no-repeat; background-size: contain; flex: 1 1 50%; aspect-ratio: 1 / 1; background-position: center;} .official-content {flex: 0 0 50%; display: flex; flex-direction: column; justify-content: center;} .official-content > .content {color: #838A9D;} + +.classList > .classItem {flex: 0 0 50%;} +.classItem > .classImg {background-image: url('/static/images/wechat.jpg'); background-repeat: no-repeat; background-size: contain; flex: 1 1 50%; aspect-ratio: 1 / 1; } +.classItem > .classContent {flex: 1 1 50%;} diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index c6de813d35..85d19c2a24 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -51,9 +51,17 @@
    -
    +
    admin->publicClass?>
    -
    +
    +
    +
    +
    +
    +
    +
    +
    +
    From e11aa068a3e14e22bb47ea4cb3ba746dcc91f527 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Tue, 31 Jan 2023 10:54:49 +0800 Subject: [PATCH 053/499] * code for style in offical-content --- module/admin/css/index.css | 3 ++- module/admin/view/index.html.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/admin/css/index.css b/module/admin/css/index.css index bae5ed20db..b2a3fe6eb1 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -22,7 +22,8 @@ .official-img {background-image: url('/static/images/wechat.jpg'); background-repeat: no-repeat; background-size: contain; flex: 1 1 50%; aspect-ratio: 1 / 1; background-position: center;} .official-content {flex: 0 0 50%; display: flex; flex-direction: column; justify-content: center;} -.official-content > .content {color: #838A9D;} +.official-content > .content {color: #838A9D; font-size: 12px;} +.official-content > .title {color: #313C52; font-size: 13px;} .classList > .classItem {flex: 0 0 50%;} .classItem > .classImg {background-image: url('/static/images/wechat.jpg'); background-repeat: no-repeat; background-size: contain; flex: 1 1 50%; aspect-ratio: 1 / 1; } diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index 85d19c2a24..650d5840d9 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -46,7 +46,7 @@
    -

    admin->followUs?>

    +
    admin->followUs?>
    admin->followUsContent?>
    From cf98bf89df502124b9dfb6832df52d086e71d691 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Tue, 31 Jan 2023 13:17:53 +0800 Subject: [PATCH 054/499] * Make assignee null when create multi mode task for task #83206. --- module/task/model.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/module/task/model.php b/module/task/model.php index f84be43d69..2cf088a70f 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -154,11 +154,6 @@ class taskModel extends model /* Fix Bug #2466 */ if($this->post->multiple) $task->assignedTo = ''; - if($task->mode == 'multi') - { - $task->assignedTo = isset($_POST['team'][0]) ? $_POST['team'][0] : ''; - $task->assignedDate = helper::now(); - } if(!$this->post->multiple or count(array_filter($this->post->team)) < 1) $task->mode = ''; $this->dao->insert(TABLE_TASK)->data($task, $skip = 'gitlab,gitlabProject') ->autoCheck() From d795f17a8e185c87c00d663d09ebe05e840c0722 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 31 Jan 2023 13:23:05 +0800 Subject: [PATCH 055/499] * Finish task #83329. --- .../xuan/common/ext/lang/zh-cn/xuanxuan.php | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/xuanxuan/extension/xuan/common/ext/lang/zh-cn/xuanxuan.php b/xuanxuan/extension/xuan/common/ext/lang/zh-cn/xuanxuan.php index d38395c37b..ce9fc2f385 100644 --- a/xuanxuan/extension/xuan/common/ext/lang/zh-cn/xuanxuan.php +++ b/xuanxuan/extension/xuan/common/ext/lang/zh-cn/xuanxuan.php @@ -1,28 +1,28 @@ xuanxuan = new stdclass(); -if($config->vision != 'lite') -{ - $lang->admin->menu->xuanxuan = array('link' => '聊天|admin|xuanxuan', 'subModule' => 'client,setting'); - $lang->admin->menuOrder[6] = 'xuanxuan'; -} - -$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'; +//if($config->vision != 'lite') +//{ +// $lang->admin->menu->xuanxuan = array('link' => '聊天|admin|xuanxuan', 'subModule' => 'client,setting'); +// $lang->admin->menuOrder[6] = 'xuanxuan'; +//} +// +//$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'; -} +//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'; From 062200535c2b54a09eb91a22d43f20a4f1f53d13 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Tue, 31 Jan 2023 13:54:21 +0800 Subject: [PATCH 056/499] * Modify page style. --- module/admin/config.php | 32 +++++++++++ module/admin/control.php | 22 ++++++-- module/admin/model.php | 93 ++++++++++++++++++++++++++++++++ module/admin/view/index.html.php | 31 ++++++----- 4 files changed, 162 insertions(+), 16 deletions(-) diff --git a/module/admin/config.php b/module/admin/config.php index 858e34106c..0a9ddb1c0f 100755 --- a/module/admin/config.php +++ b/module/admin/config.php @@ -23,3 +23,35 @@ $config->admin->menuModuleGroup['model']['custom|required'] = array('project', $config->admin->menuModuleGroup['feature']['custom|set'] = array('todo', 'feedback', 'user', 'block', 'story', 'task', 'bug', 'testcase', 'testtask', 'feedback', 'user'); $config->admin->menuModuleGroup['feature']['custom|required'] = array('bug', 'doc', 'product', 'story', 'productplan', 'release', 'task', 'bug', 'testcase', 'testsuite', 'testtask', 'testreport', 'caselib', 'doc', 'feedback', 'user'); $config->admin->menuModuleGroup['template']['custom|set'] = array('baseline'); + +$config->admin->plugIns[203] = new stdClass(); +$config->admin->plugIns[203]->name = '人力资源日历'; +$config->admin->plugIns[203]->desc = '禅道人力资源日历插件可以帮助项目管理者查看不同维度下的消耗工时、未完成工作量、并行工作量及负载率,同时组织维度待处理状态下实现了模拟负载的功能,帮助管理者详细了解成员的工作负载情况,更好的进行项目人力资源调度。'; +$config->admin->plugIns[203]->viewLink = 'https://www.zentao.net/extension-viewExt-203.html'; + +$config->admin->plugIns[198] = new stdClass(); +$config->admin->plugIns[198]->name = '需求池插件'; +$config->admin->plugIns[198]->desc = '本插件为禅道需求池管理插件,包括:创建需求池 需求池权限管理 收集需求并向需求池录入需求 记录需求提出人信息 评审需求 拆分用户需求、研发需求 需求跟踪矩阵'; +$config->admin->plugIns[198]->viewLink = 'https://www.zentao.net/extension-viewExt-198.html'; + +$config->admin->plugIns[27] = new stdClass(); +$config->admin->plugIns[27]->name = 'Excel导出/导入'; +$config->admin->plugIns[27]->desc = '安装该插件可以支持Excel导出和任务、需求、Bug、用例导入功能。更新提示:新增任务、需求、Bug的excel导入功能。'; +$config->admin->plugIns[27]->viewLink = 'https://www.zentao.net/extension-viewExt-27.html'; + +$config->admin->plugIns[26] = new stdClass(); +$config->admin->plugIns[26]->name = '甘特图'; +$config->admin->plugIns[26]->desc = '禅道甘特图插件 运用此插件可以查看甘特图,维护任务关系。'; +$config->admin->plugIns[26]->viewLink = 'https://www.zentao.net/extension-viewExt-26.html'; + +$config->admin->plugIns[30] = new stdClass(); +$config->admin->plugIns[30]->name = '日志日历'; +$config->admin->plugIns[30]->desc = '运用此插件可以实现工作日志的添加、编辑、查看、删除、导出等功能,方便用户管理工作日志。'; +$config->admin->plugIns[30]->viewLink = 'https://www.zentao.net/extension-viewExt-30.html'; + +//$config->admin->plugIns[] = new stdClass(); +//$config->admin->plugIns[]->name = ''; +//$config->admin->plugIns[]->desc = ''; +//$config->admin->plugIns[]->viewLink = 'https://www.zentao.net/extension-viewExt-203.html'; + +$config->admin->apiRoot = 'https://www.zentao.net/'; diff --git a/module/admin/control.php b/module/admin/control.php index f05ab4299d..52e29309a3 100755 --- a/module/admin/control.php +++ b/module/admin/control.php @@ -34,11 +34,25 @@ class admin extends control $this->loadModel('misc'); - $extensions = $this->loadModel('extension')->getExtensionsByAPI('byUpdatedTime', '', 0, 6); + /* Check internet. */ + $curl = curl_init(); + curl_setopt($curl, CURLOPT_URL, 'https://api.zentao.net/extension-apiGetExtensions.json'); + curl_setopt($curl, CURLOPT_TIMEOUT_MS, 1000); + curl_setopt($curl, CURLOPT_CONNECTTIMEOUT_MS, 1000); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE); + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE); + $connected = (bool)curl_exec($curl); + curl_close($curl); - $this->view->title = $this->lang->admin->common; - $this->view->position[] = $this->lang->admin->index; - $this->view->extensions = isset($extensions->extensions) ? (array)$extensions->extensions : array(); + $clientLang = $this->app->getClientLang(); + + $this->view->title = $this->lang->admin->common; + $this->view->position[] = $this->lang->admin->index; + $this->view->extensions = $this->admin->getExtensionsByAPI('extension', 6, $connected); + $this->view->hasInternet = $connected; + $this->view->publicClass = ($connected and strpos($clientLang, 'zh') === 0) ? $this->admin->getPublicClassByAPI() : array(); + $this->view->clientLang = $clientLang; $this->display(); } diff --git a/module/admin/model.php b/module/admin/model.php index bff5a3bc9d..bab50d297b 100755 --- a/module/admin/model.php +++ b/module/admin/model.php @@ -13,6 +13,11 @@ loadModel('extension')->getExtensionsByAPI($searchType, $param, 0, $limit); + $extensions = isset($extensions->extensions) ? (array)$extensions->extensions : array(); + } + else + { + if($this->config->edition == 'open') + { + $extensions = array( + $this->config->admin->plugIns[27], + $this->config->admin->plugIns[26], + $this->config->admin->plugIns[30] + ); + } + else + { + $extensions = array( + $this->config->admin->plugIns[198], + $this->config->admin->plugIns[203] + ); + } + } + + return $extensions; + } + + /** + * Fetch data from an api. + * + * @param string $url + * @access public + * @return mixed + */ + public function fetchAPI($url) + { + $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; + $result = json_decode(preg_replace('/[[:cntrl:]]/mu', '', common::http($url))); + + if(!isset($result->status)) return false; + if($result->status != 'success') return false; + if(isset($result->data)) return json_decode($result->data); + } + + /** + * Get public class from zentao.net. + * + * @param int $limit + * @access public + * @return void + */ + public function getPublicClassByAPI($limit = 2) + { + $apiURL = $this->config->admin->apiRoot . "publicclass.json"; + $data = $this->fetchAPI($apiURL); + $courses = $data->videos; + + $index = 1; + $publicClass = array(); + foreach($courses as $course) + { + if($index > $limit) return $publicClass; + + $publicClass[$index] = new stdClass(); + $publicClass[$index]->name = $course->title; + $publicClass[$index]->image = $this->config->admin->apiRoot . $course->image->list[0]->smallURL; + $publicClass[$index]->viewLink = $this->config->admin->apiRoot . "{$course->alias}-{$course->id}.html"; + $index++; + } + return $publicClass; + } } diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index 650d5840d9..921593cb0a 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -11,6 +11,7 @@ */ ?> +
    @@ -28,6 +29,8 @@
    10
    + +
    admin->pluginRecommendation?>
    @@ -40,34 +43,38 @@
    + +
    admin->officialAccount?>
    -
    -
    -
    -
    admin->followUs?>
    +
    +
    +
    +
    admin->followUs?>
    admin->followUsContent?>
    +
    admin->publicClass?>
    -
    -
    -
    -
    -
    -
    -
    -
    +
    + +
    +
    +
    name;?>
    +
    +
    +
    admin->zentaoInfo?>
    +
    From 73ff7ad4444eb361363ef7d264742fe60932ce53 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Tue, 31 Jan 2023 14:50:09 +0800 Subject: [PATCH 057/499] * code for add style in clientList --- module/admin/view/index.html.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index 921593cb0a..75d3d363aa 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -33,7 +33,7 @@
    admin->pluginRecommendation?>
    -
    +
    >
    @@ -45,14 +45,15 @@
    +
    admin->officialAccount?>
    -
    admin->followUs?>
    -
    admin->followUsContent?>
    +
    admin->followUs?>
    +
    admin->followUsContent?>
    @@ -61,7 +62,7 @@
    admin->publicClass?>
    -
    +
    name;?>
    @@ -69,6 +70,7 @@
    +
    From 85ee9918c09457a3000d61600b747b414cd20452 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Tue, 31 Jan 2023 15:25:46 +0800 Subject: [PATCH 058/499] * Modify website check. --- module/admin/control.php | 21 ++++++--------------- module/admin/model.php | 23 ++++++++++++++++++++++- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/module/admin/control.php b/module/admin/control.php index 52e29309a3..8a7a31e2c4 100755 --- a/module/admin/control.php +++ b/module/admin/control.php @@ -34,24 +34,15 @@ class admin extends control $this->loadModel('misc'); - /* Check internet. */ - $curl = curl_init(); - curl_setopt($curl, CURLOPT_URL, 'https://api.zentao.net/extension-apiGetExtensions.json'); - curl_setopt($curl, CURLOPT_TIMEOUT_MS, 1000); - curl_setopt($curl, CURLOPT_CONNECTTIMEOUT_MS, 1000); - curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE); - curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); - curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE); - $connected = (bool)curl_exec($curl); - curl_close($curl); - - $clientLang = $this->app->getClientLang(); + $hasInternet = $this->admin->checkInternet(); + $clientLang = $this->app->getClientLang(); $this->view->title = $this->lang->admin->common; $this->view->position[] = $this->lang->admin->index; - $this->view->extensions = $this->admin->getExtensionsByAPI('extension', 6, $connected); - $this->view->hasInternet = $connected; - $this->view->publicClass = ($connected and strpos($clientLang, 'zh') === 0) ? $this->admin->getPublicClassByAPI() : array(); + $this->view->extensions = $this->admin->getExtensionsByAPI('extension', strpos($clientLang, 'zh') === 0 ? 6 : 5, $hasInternet); + $this->view->patches = $this->admin->getExtensionsByAPI('patch', 3, $hasInternet); + $this->view->hasInternet = $hasInternet; + $this->view->publicClass = ($hasInternet and strpos($clientLang, 'zh') === 0) ? $this->admin->getPublicClassByAPI() : array(); $this->view->clientLang = $clientLang; $this->display(); } diff --git a/module/admin/model.php b/module/admin/model.php index bab50d297b..04e69e624c 100755 --- a/module/admin/model.php +++ b/module/admin/model.php @@ -377,7 +377,7 @@ class adminModel extends model * * @param int $limit * @access public - * @return void + * @return array */ public function getPublicClassByAPI($limit = 2) { @@ -399,4 +399,25 @@ class adminModel extends model } return $publicClass; } + + /** + * Check internet. + * + * @access public + * @return bool + */ + public function checkInternet() + { + $curl = curl_init(); + curl_setopt($curl, CURLOPT_URL, 'https://api.zentao.net/extension-apiGetExtensions.json'); + curl_setopt($curl, CURLOPT_TIMEOUT_MS, 1000); + curl_setopt($curl, CURLOPT_CONNECTTIMEOUT_MS, 1000); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE); + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE); + $connected = curl_exec($curl); + curl_close($curl); + + return (bool)$connected; + } } From 598aa520da70c9c3182fa1eebc09a80ecf054fe8 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Tue, 31 Jan 2023 15:45:22 +0800 Subject: [PATCH 059/499] * Finish task #83211. --- module/kanban/model.php | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/module/kanban/model.php b/module/kanban/model.php index f11e276167..7b2a72261f 100755 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -64,14 +64,16 @@ class kanbanModel extends model * * @param object $kanban * @param int $copyKanbanID + * @param string $from kanban|execution + * @param string $param * @access public * @return void */ - public function copyRegions($kanban, $copyKanbanID) + public function copyRegions($kanban, $copyKanbanID, $from = 'kanban', $param = 'withArchived') { if(empty($kanban) or empty($copyKanbanID)) return; - $regions = $this->getRegionPairs($copyKanbanID); + $regions = $this->getRegionPairs($copyKanbanID, 0, $from); $order = 1; foreach($regions as $copyID => $copyName) { @@ -83,7 +85,7 @@ class kanbanModel extends model $region->createdDate = helper::now(); $region->order = $order; - $this->createRegion($kanban, $region, $copyID, 'kanban', 'withArchived'); + $this->createRegion($kanban, $region, $copyID, $from, $param); $order ++; } } @@ -150,14 +152,16 @@ class kanbanModel extends model $copyLanes = isset($copyLaneGroup[$copyGroupID]) ? $copyLaneGroup[$copyGroupID] : array(); $copyColumns = isset($copyColumnGroup[$copyGroupID]) ? $copyColumnGroup[$copyGroupID] : array(); $parentColumns = array(); + $lanePairs = array(); foreach($copyLanes as $copyLane) { + $laneID = $copyLane->id; unset($copyLane->id); unset($copyLane->actions); $copyLane->region = $regionID; $copyLane->group = $newGroupID; $copyLane->lastEditedTime = helper::now(); - $this->createLane($kanban->id, $regionID, $copyLane); + $lanePairs[$laneID] = $this->createLane($kanban->id, $regionID, $copyLane); if(dao::isError()) return false; } @@ -182,6 +186,22 @@ class kanbanModel extends model if($copyColumn->parent < 0) $parentColumns[$copyColumnID] = $parentColumnID; if(dao::isError()) return false; } + + if($param == 'updateTaskCell') + { + foreach($lanePairs as $oldLaneID => $newLaneID) + { + $cards = $this->dao->select('id,cards')->from(TABLE_KANBANCELL)->where('lane')->eq($oldLaneID)->andWhere('type')->eq('task')->fetchPairs(); + $cards = implode(',', $cards); + $cards = preg_replace('/[,]+/', ',',$cards); + $cards = trim($cards, ','); + + $group = $this->dao->select('`group`')->from(TABLE_KANBANLANE)->where('id')->eq($newLaneID)->fetch(); + $waitColumn = $this->dao->select('id')->from(TABLE_KANBANCOLUMN)->where('type')->eq('wait')->andWhere('`group`')->eq($group->group)->fetch(); + + if(!empty($waitColumn)) $this->addKanbanCell($kanban->id, $newLaneID, $waitColumn->id, 'task', $cards); + } + } } } elseif($from == 'kanban') @@ -196,7 +216,6 @@ class kanbanModel extends model if(dao::isError()) return false; } - return $regionID; } From 746bb0da844318aca78218799181248106e62240 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Tue, 31 Jan 2023 16:14:18 +0800 Subject: [PATCH 060/499] * Modify language check. --- module/admin/control.php | 7 ++++--- module/admin/view/index.html.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/module/admin/control.php b/module/admin/control.php index 8a7a31e2c4..bde9def349 100755 --- a/module/admin/control.php +++ b/module/admin/control.php @@ -36,14 +36,15 @@ class admin extends control $hasInternet = $this->admin->checkInternet(); $clientLang = $this->app->getClientLang(); + $langNotCN = common::checkNotCN(); $this->view->title = $this->lang->admin->common; $this->view->position[] = $this->lang->admin->index; - $this->view->extensions = $this->admin->getExtensionsByAPI('extension', strpos($clientLang, 'zh') === 0 ? 6 : 5, $hasInternet); + $this->view->extensions = $this->admin->getExtensionsByAPI('extension', $langNotCN ? 5 : 6, $hasInternet); $this->view->patches = $this->admin->getExtensionsByAPI('patch', 3, $hasInternet); $this->view->hasInternet = $hasInternet; - $this->view->publicClass = ($hasInternet and strpos($clientLang, 'zh') === 0) ? $this->admin->getPublicClassByAPI() : array(); - $this->view->clientLang = $clientLang; + $this->view->publicClass = ($hasInternet and !$langNotCN) ? $this->admin->getPublicClassByAPI() : array(); + $this->view->langNotCN = $langNotCN; $this->display(); } diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index 921593cb0a..1688bddff6 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -71,7 +71,7 @@
    - +
    admin->zentaoInfo?>
    From 7af8d535f17eea0d227a406c5d64c11089b04618 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 31 Jan 2023 16:15:00 +0800 Subject: [PATCH 061/499] * code for task #83439. --- module/admin/config.php | 2 +- module/admin/lang/zh-cn.php | 85 ++++++++--- module/admin/model.php | 136 +++++++++++++++--- module/common/model.php | 2 +- module/extension/control.php | 1 + .../xuan/admin/ext/lang/zh-cn/xuanxuan.php | 7 + .../xuan/common/ext/lang/zh-cn/xuanxuan.php | 5 - 7 files changed, 187 insertions(+), 51 deletions(-) diff --git a/module/admin/config.php b/module/admin/config.php index 858e34106c..c8204d927b 100755 --- a/module/admin/config.php +++ b/module/admin/config.php @@ -7,7 +7,7 @@ $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['setting'] = array('backup', 'action|trash', 'admin|xuanxuan', 'admin|license', 'admin|safe', 'custom|timezone', 'search|buildindex', 'admin|tableengine', 'ldap', 'custom|libreoffice'); +$config->admin->menuGroup['setting'] = array('custom|mode', 'backup', 'action|trash', 'admin|xuanxuan', 'admin|license', 'admin|checkweak', 'admin|resetpwdsetting', 'admin|safe', 'custom|timezone', 'search|buildindex', 'admin|tableengine', 'ldap', 'custom|libreoffice'); $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'); diff --git a/module/admin/lang/zh-cn.php b/module/admin/lang/zh-cn.php index ec1cc400d2..3ee65899c4 100755 --- a/module/admin/lang/zh-cn.php +++ b/module/admin/lang/zh-cn.php @@ -178,6 +178,7 @@ $lang->admin->menuList->message['order'] = 7; $lang->admin->menuList->extension['name'] = '插件管理'; $lang->admin->menuList->extension['desc'] = ''; +$lang->admin->menuList->extension['link'] = 'extension|browse'; $lang->admin->menuList->extension['order'] = 8; $lang->admin->menuList->dev['name'] = '二次开发'; @@ -186,57 +187,99 @@ $lang->admin->menuList->dev['order'] = 9; $lang->admin->menuList->convert['name'] = '数据导入'; $lang->admin->menuList->convert['desc'] = ''; +$lang->admin->menuList->convert['link'] = 'convert|convertjira'; $lang->admin->menuList->convert['order'] = 10; -$lang->admin->menuList->setting['subMenu']['mode'] = array('link' => "模式|custom|mode|", 'subModule' => 'custom'); +$lang->admin->menuList->setting['subMenu']['mode'] = array('link' => "模式|custom|mode|"); $lang->admin->menuList->setting['subMenu']['backup'] = array('link' => "备份|backup|index|", 'subModule' => 'backup'); $lang->admin->menuList->setting['subMenu']['trash'] = array('link' => "回收站|action|trash|", 'subModule' => 'action'); -$lang->admin->menuList->setting['subMenu']['xuanxuan'] = array('link' => "聊天|admin|xuanxuan|"); -$lang->admin->menuList->setting['subMenu']['license'] = array('link' => "授权信息|admin|license|"); -$lang->admin->menuList->setting['subMenu']['safe'] = array('link' => "安全|admin|safe|"); -$lang->admin->menuList->setting['subMenu']['timezone'] = array('link' => "时区|custom|timezone|", 'subModule' => 'custom'); +$lang->admin->menuList->setting['subMenu']['safe'] = array('link' => "安全|admin|safe|", 'alias' => 'checkweak,resetpwdsetting'); +$lang->admin->menuList->setting['subMenu']['timezone'] = array('link' => "时区|custom|timezone|"); $lang->admin->menuList->setting['subMenu']['buildindex'] = array('link' => "重建索引|search|buildindex|", 'subModule' => 'search'); $lang->admin->menuList->setting['subMenu']['tableengine'] = array('link' => "表引擎|admin|tableengine|"); -$lang->admin->menuList->setting['subMenu']['ldap'] = array('link' => "LDAP|ldap|set|", 'subModule' => 'ldap'); -$lang->admin->menuList->setting['subMenu']['libreoffice'] = array('link' => "Office|custom|libreoffice|", 'subModule' => 'custom'); -$lang->admin->menuList->setting['dividerMenu'] = ',license,ldap,'; +$lang->admin->menuList->setting['menuOrder']['5'] = 'mode'; +$lang->admin->menuList->setting['menuOrder']['10'] = 'backup'; +$lang->admin->menuList->setting['menuOrder']['15'] = 'trash'; +$lang->admin->menuList->setting['menuOrder']['30'] = 'safe'; +$lang->admin->menuList->setting['menuOrder']['35'] = 'timezone'; +$lang->admin->menuList->setting['menuOrder']['40'] = 'buildindex'; +$lang->admin->menuList->setting['menuOrder']['45'] = 'tableengine'; + +$lang->admin->menuList->setting['dividerMenu'] = ',safe,'; $lang->admin->menuList->user['subMenu']['dept'] = array('link' => "部门|dept|browse|", 'subModule' => 'dept'); $lang->admin->menuList->user['subMenu']['user'] = array('link' => "用户|company|browse|", 'subModule' => 'company'); $lang->admin->menuList->user['subMenu']['group'] = array('link' => "权限|group|browse|", 'subModule' => 'group'); +$lang->admin->menuList->user['menuOrder']['5'] = 'dept'; +$lang->admin->menuList->user['menuOrder']['10'] = 'user'; +$lang->admin->menuList->user['menuOrder']['15'] = 'group'; + $lang->admin->menuList->switch['subMenu']['setmodule'] = array('link' => "功能设置|admin|setmodule|"); +$lang->admin->menuList->switch['menuOrder']['5'] = 'setmodule'; + $lang->admin->menuList->model['subMenu']['common'] = array('link' => "通用|custom|required|module=project", 'subModule' => 'custom'); $lang->admin->menuList->model['subMenu']['scrum'] = array('link' => "敏捷模型|auditcl|scrumbrowse|", 'subModule' => 'auditcl'); $lang->admin->menuList->model['subMenu']['waterfall'] = array('link' => "瀑布模型|stage|settype|", 'subModule' => 'stage'); -$lang->admin->menuList->feature['subMenu']['my'] = array('link' => "地盘|custom|set|module=todo", 'subModule' => 'custom'); -$lang->admin->menuList->feature['subMenu']['product'] = array('link' => "{$lang->productCommon}|custom|product|", 'subModule' => 'custom'); -$lang->admin->menuList->feature['subMenu']['execution'] = array('link' => "{$lang->execution->common}|custom|execution|", 'subModule' => 'custom'); -$lang->admin->menuList->feature['subMenu']['qa'] = array('link' => "测试|custom|required|module=bug", 'subModule' => 'custom'); -$lang->admin->menuList->feature['subMenu']['kanban'] = array('link' => "看板|custom|kanban|", 'subModule' => 'custom'); -$lang->admin->menuList->feature['subMenu']['doc'] = array('link' => "文档|custom|required|module=doc", 'subModule' => 'custom'); -$lang->admin->menuList->feature['subMenu']['feedback'] = array('link' => "反馈|custom|set|module=feedback", 'subModule' => 'custom'); +$lang->admin->menuList->model['menuOrder']['5'] = 'common'; +$lang->admin->menuList->model['menuOrder']['10'] = 'scrum'; +$lang->admin->menuList->model['menuOrder']['15'] = 'waterfall'; + +$lang->admin->menuList->feature['subMenu']['my'] = array('link' => "地盘|custom|set|module=todo"); +$lang->admin->menuList->feature['subMenu']['product'] = array('link' => "{$lang->productCommon}|custom|product|"); +$lang->admin->menuList->feature['subMenu']['execution'] = array('link' => "{$lang->execution->common}|custom|execution|"); +$lang->admin->menuList->feature['subMenu']['qa'] = array('link' => "测试|custom|required|module=bug"); +$lang->admin->menuList->feature['subMenu']['kanban'] = array('link' => "看板|custom|kanban|"); +$lang->admin->menuList->feature['subMenu']['doc'] = array('link' => "文档|custom|required|module=doc"); +$lang->admin->menuList->feature['subMenu']['feedback'] = array('link' => "反馈|custom|set|module=feedback"); $lang->admin->menuList->feature['subMenu']['approval'] = array('link' => "审批|approvalflow|browse|", 'subModule' => 'approvalflow'); $lang->admin->menuList->feature['subMenu']['measure'] = array('link' => "度量|measurement|settips|", 'subModule' => 'measurement'); -$lang->admin->menuList->feature['subMenu']['user'] = array('link' => "用户|custom|set|module=user", 'subModule' => 'custom'); +$lang->admin->menuList->feature['subMenu']['user'] = array('link' => "用户|custom|set|module=user"); $lang->admin->menuList->feature['subMenu']['meetingroom'] = array('link' => "会议室|meetingroom|browse|", 'subModule' => 'meetingroom'); +$lang->admin->menuList->feature['menuOrder']['5'] = 'my'; +$lang->admin->menuList->feature['menuOrder']['10'] = 'product'; +$lang->admin->menuList->feature['menuOrder']['15'] = 'execution'; +$lang->admin->menuList->feature['menuOrder']['20'] = 'qa'; +$lang->admin->menuList->feature['menuOrder']['25'] = 'kanban'; +$lang->admin->menuList->feature['menuOrder']['30'] = 'doc'; +$lang->admin->menuList->feature['menuOrder']['35'] = 'feedback'; +$lang->admin->menuList->feature['menuOrder']['40'] = 'approval'; +$lang->admin->menuList->feature['menuOrder']['45'] = 'measure'; +$lang->admin->menuList->feature['menuOrder']['50'] = 'user'; +$lang->admin->menuList->feature['menuOrder']['55'] = 'meetingroom'; + $lang->admin->menuList->feature['dividerMenu'] = ',user,'; $lang->admin->menuList->template['subMenu']['type'] = array('link' => "模版类型|custom|set|module=baseline&field=objectList", 'subModule' => 'custom'); $lang->admin->menuList->template['subMenu']['template'] = array('link' => "文档模版|baseline|template|", 'subModule' => 'baseline'); $lang->admin->menuList->template['subMenu']['catalog'] = array('link' => "文档目录|baseline|catalog|", 'subModule' => 'baseline'); +$lang->admin->menuList->template['menuOrder']['5'] = 'type'; +$lang->admin->menuList->template['menuOrder']['10'] = 'template'; +$lang->admin->menuList->template['menuOrder']['15'] = 'catalog'; + $lang->admin->menuList->message['subMenu']['mail'] = array('link' => "邮件|mail|edit|", 'subModule' => 'mail'); $lang->admin->menuList->message['subMenu']['webhook'] = array('link' => "Webhook|webhook|browse|", 'subModule' => 'webhook'); $lang->admin->menuList->message['subMenu']['sms'] = array('link' => "短信|sms|index|", 'subModule' => 'sms'); -$lang->admin->menuList->message['subMenu']['message'] = array('link' => "浏览器|message|browser|", 'subModule' => 'message'); -$lang->admin->menuList->message['subMenu']['setting'] = array('link' => "设置|message|setting|", 'subModule' => 'message'); +$lang->admin->menuList->message['subMenu']['message'] = array('link' => "浏览器|message|browser|"); +$lang->admin->menuList->message['subMenu']['setting'] = array('link' => "设置|message|setting|"); -$lang->admin->menuList->dev['subMenu']['api'] = array('link' => "API|dev|api|", 'subModule' => 'dev'); -$lang->admin->menuList->dev['subMenu']['db'] = array('link' => "数据库|dev|db|", 'subModule' => 'dev'); -$lang->admin->menuList->dev['subMenu']['editor'] = array('link' => "编辑器|dev|editor|", 'subModule' => 'dev'); +$lang->admin->menuList->message['menuOrder']['5'] = 'mail'; +$lang->admin->menuList->message['menuOrder']['10'] = 'webhook'; +$lang->admin->menuList->message['menuOrder']['15'] = 'sms'; +$lang->admin->menuList->message['menuOrder']['20'] = 'message'; +$lang->admin->menuList->message['menuOrder']['25'] = 'setting'; + +$lang->admin->menuList->dev['subMenu']['api'] = array('link' => "API|dev|api|"); +$lang->admin->menuList->dev['subMenu']['db'] = array('link' => "数据库|dev|db|"); +$lang->admin->menuList->dev['subMenu']['editor'] = array('link' => "编辑器|dev|editor|"); $lang->admin->menuList->dev['subMenu']['entry'] = array('link' => "应用|entry|browse|", 'subModule' => 'entry'); + +$lang->admin->menuList->dev['menuOrder']['5'] = 'api'; +$lang->admin->menuList->dev['menuOrder']['10'] = 'db'; +$lang->admin->menuList->dev['menuOrder']['15'] = 'editor'; +$lang->admin->menuList->dev['menuOrder']['20'] = 'entry'; diff --git a/module/admin/model.php b/module/admin/model.php index bff5a3bc9d..ec4f3af852 100755 --- a/module/admin/model.php +++ b/module/admin/model.php @@ -248,59 +248,149 @@ class adminModel extends model return false; } + /** + * Set admin menu. + * + * @access public + * @return void + */ public function setMenu() { - $this->lang->switcherMenu = $this->getSwitcher(); + $this->sortMenu(); + + $menuKey = $this->getMenuKey(); + if(empty($menuKey)) return; + + $this->lang->switcherMenu = $this->getSwitcher($menuKey); + if(isset($this->lang->admin->menuList->$menuKey)) + { + if(isset($this->lang->admin->menuList->$menuKey['subMenu'])) $this->lang->admin->menu = $this->lang->admin->menuList->$menuKey['subMenu']; + if(isset($this->lang->admin->menuList->$menuKey['menuOrder'])) $this->lang->admin->menuOrder = $this->lang->admin->menuList->$menuKey['menuOrder']; + if(isset($this->lang->admin->menuList->$menuKey['dividerMenu'])) $this->lang->admin->dividerMenu = $this->lang->admin->menuList->$menuKey['dividerMenu']; + } } /** - * Get switcher. + * sort menu. + * + * @access public + * @return void + */ + public function sortMenu() + { + $orders = array(); + $disabled = array(); + foreach($this->lang->admin->menuList as $menuKey => $menu) + { + $menu['disabled'] = false; + if(isset($menu['link'])) + { + list($module, $method) = explode('|', $menu['link']); + $menu['link'] = helper::createLink($module, $method); + if(!common::hasPriv($module, $method)) $menu['disabled'] = true; + } + + if(isset($menu['menuOrder'])) + { + $menuOrder = $menu['menuOrder']; + ksort($menuOrder); + /* Check sub menu priv. */ + foreach($menuOrder as $subOrder => $subMenuKey) + { + list($label, $module, $method, $params) = explode('|', $menu['subMenu'][$subMenuKey]['link']); + if(!common::hasPriv($module, $method)) unset($menuOrder[$subOrder]); + } + /* Set link. */ + if(!empty($menuOrder)) + { + $subMenuKey = reset($menuOrder); + list($label, $module, $method, $params) = explode('|', $menu['subMenu'][$subMenuKey]['link']); + $menu['link'] = helper::createLink($module, $method, $params); + } + if(empty($menuOrder)) $menu['disabled'] = true; + } + + $order = $menu['order']; + $orders[$order] = $menuKey; + if($menu['disabled']) + { + unset($orders[$order]); + $disabled[$menuKey] = $menu; + } + + $this->lang->admin->menuList->$menuKey = $menu; + } + + ksort($orders); + $menuList = new stdclass(); + $index = 1; + foreach($orders as $menuKey) + { + $menuList->$menuKey = $this->lang->admin->menuList->$menuKey; + $menuList->$menuKey['order'] = $index; + $index++; + } + foreach($disabled as $menuKey => $menu) + { + $menuList->$menuKey = $menu; + $menuList->$menuKey['order'] = $index; + $index++; + } + + $this->lang->admin->menuList = $menuList; + } + + /** + * Get menu key * * @access public * @return string */ - public function getSwitcher() + public function getMenuKey() { - $moduleName = $this->app->rawModule; - $methodName = $this->app->rawMethod; - $paramName = current($this->app->rawParams); - $currentMenu = 'setting'; - $currentMenuName = ''; - $link = $paramName ? helper::createLink($moduleName, $methodName, "param=$paramName") : helper::createLink($moduleName, $methodName); + $moduleName = $this->app->rawModule; + $methodName = $this->app->rawMethod; + $paramName = $this->app->rawParams ? reset($this->app->rawParams) : ''; foreach($this->config->admin->menuGroup as $menuKey => $menuGroup) { if(in_array($moduleName, $menuGroup)) { - $currentMenu = $menuKey; - break; + return $menuKey; } elseif(in_array("$moduleName|$methodName", $menuGroup)) { if($moduleName == 'custom' and ($methodName == 'required' or $methodName == 'set')) { - if(in_array($paramName, $this->config->admin->menuModuleGroup[$menuKey]["custom|$methodName"])) - { - - $currentMenu = $menuKey; - break; - } + if(in_array($paramName, $this->config->admin->menuModuleGroup[$menuKey]["custom|$methodName"])) return $menuKey; } else { - $currentMenu = $menuKey; - break; + return $menuKey; } } } + return null; + } - $currentMenuName = $this->lang->admin->menuList->$currentMenu['name']; + /** + * Get switcher. + * + * @param string $currentMenuKey + * @access public + * @return string + */ + public function getSwitcher($currentMenuKey = 'setting') + { + if(empty($currentMenuKey)) return null; - $output = "
    - + createLink('action', 'comment', "objectType=zahost&objectID=$zahost->hostID"); + ?> +
    +
    zahost->browseNode;?>
    +
    createLink('zanode', 'list', "hostID=$zahost->id", '', true) . "' frameborder='no' allowfullscreen='true' mozallowfullscreen='true' webkitallowfullscreen='true' allowtransparency='true' scrolling='auto' onload='setIframeHeight(this)' style='min-height:300px;'>";?>
    + +
    noData;?>
    osName, "windows") ? $config->zanode->defaultWinAccou
    zanode->sshAddress; ?>:
    -
    ssh ip . ' -p ' . $zanode->ssh; ?>"; ?>
    +
    ssh ? 'ssh ' . $account . '@' . $zanode->ip . ' -p ' . $zanode->ssh : ''; ?>ssh ? " " : ''; ?>
    @@ -96,7 +96,7 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
    zanode->defaultPwd; ?>:
    -
    zanode->defaultPwd . ' ' . ""; ?>
    +
    zanode->defaultPwd)) . ' ' . ""; ?>
    From d502d06618cae881eb321a5f78fca61af521b01d Mon Sep 17 00:00:00 2001 From: guofeilong Date: Tue, 31 Jan 2023 17:20:22 +0800 Subject: [PATCH 065/499] * code for css in admin/index.html --- module/admin/.control.php.swp | Bin 0 -> 28672 bytes module/admin/control.php | 2 +- module/admin/css/index.css | 12 ++++++++---- module/admin/view/.index.html.php.swp | Bin 0 -> 12288 bytes module/admin/view/index.html.php | 14 +++++++++----- 5 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 module/admin/.control.php.swp create mode 100644 module/admin/view/.index.html.php.swp diff --git a/module/admin/.control.php.swp b/module/admin/.control.php.swp new file mode 100644 index 0000000000000000000000000000000000000000..d7b34db140475741f48524c6fa8176aedf0961fe GIT binary patch literal 28672 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 zC$F$(FK0^Saview->extensions = $this->admin->getExtensionsByAPI('extension', $langNotCN ? 5 : 6, $hasInternet); $this->view->patches = $this->admin->getExtensionsByAPI('patch', 3, $hasInternet); $this->view->hasInternet = $hasInternet; - $this->view->publicClass = ($hasInternet and !$langNotCN) ? $this->admin->getPublicClassByAPI() : array(); + $this->view->publicClass = ($hasInternet and !$langNotCN) ? $this->admin->getPublicClassByAPI(3) : array(); $this->view->langNotCN = $langNotCN; $this->display(); } diff --git a/module/admin/css/index.css b/module/admin/css/index.css index b2a3fe6eb1..6019858462 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -17,14 +17,18 @@ .plugin-list > .plugin-item > .plug-title {height: 16px; overflow: hidden;} .plugin-list > .plugin-item .extension-desc {overflow: hidden; height: 16px;} -.bottom.flex > .official {flex: 1 1 30%; margin-right: 20px;} +.bottom.flex > .official {flex: 1 1 30%; margin-right: 20px; display: flex; flex-direction: column; position: relative;} .bottom.flex > .publicClass {flex: 1 1 60%;} +.official {justify-content: center;} +.official > .panel-title {position: absolute; top: 0px;} .official-img {background-image: url('/static/images/wechat.jpg'); background-repeat: no-repeat; background-size: contain; flex: 1 1 50%; aspect-ratio: 1 / 1; background-position: center;} .official-content {flex: 0 0 50%; display: flex; flex-direction: column; justify-content: center;} .official-content > .content {color: #838A9D; font-size: 12px;} .official-content > .title {color: #313C52; font-size: 13px;} -.classList > .classItem {flex: 0 0 50%;} -.classItem > .classImg {background-image: url('/static/images/wechat.jpg'); background-repeat: no-repeat; background-size: contain; flex: 1 1 50%; aspect-ratio: 1 / 1; } -.classItem > .classContent {flex: 1 1 50%;} +.classList > .classItem {flex: 1 1 30%;} +.classItem {margin: 5px;} +.classItem > .imgBack {flex: 1 1 50%; background: #C8EDFF;} +.classItem > .imgBack > .classImg {background-repeat: no-repeat; background-size: contain; aspect-ratio: 1 / 1; background-position: center; margin:5px;} +.classItem > .classContent {flex: 1 1 50%; padding: 5px; font-size: 14px; color: #0B0F18;} diff --git a/module/admin/view/.index.html.php.swp b/module/admin/view/.index.html.php.swp new file mode 100644 index 0000000000000000000000000000000000000000..c60991a53036fdb8d010a395aae54a62394dd5cc GIT binary patch literal 12288 zcmeI2TZkOR8pq3{IU4VHdGN`~xH7vTGd;V>#$?=`MAzHOCPa-9qM|k3HQnX*bhXnp zne4u(hR(@dRZF^AJ21b8?x;=@e9k3g`r}XB-?qF)n)4fo-<2&cLK*qGasAKT;;@L8 z15t_Hwur>KhK|P+a}rM^i;mw4oeqzsv&zeei#<2(APdfp54ba)mcb_Q^+rNI z1lNNN;EmG=c>z2KmVpGffm=ZXQ1I)iguDVC0(XKs_~ze)JOv&G%b*SRfHL@W10ipM z`v3#ifX_}L!jt9BM5KQdGvo$Vr(|&AVsJhki z)RG;}+#ppXZPVsV$9()_56s9kCozOb4GLshDvgM>IsElivD^$sl{T#MJ>T|AG*L?- zpDi_+yXbdhH}Wc?&3s;`-A*`Owx=cQ)ik5q^2FtcD(z^a?!opi+WwXBXl5i2Ylh`B zZ#>N_-X3f>`er(fkHy_)DBL-nE0iU4%sgZ!uJ6!FCeykg5=C1fKWzE6qZ%#atd57o zUFC~fw*5Y{<%0~gTCKo`=4LDwZ9EHb(%fj@r|u z2Z0n4gS94&t6ypQp{0eUe`&8-tJGvZLlm1*HopRkUGG}y=0dq%kmanh>Wr!MIxMc! zNb2vB-Y;{#27(=FLrlBBk?Rc^n-No(_JNEZaEb9-n`53}I^O;;lYBQstG#awT%gU8 zAmK_0Y|>4MQaf22)pF;khC46BQlbwG) z$+8JvH?Okx#L6u@3|+TTJk2fP&6f3bwiT80m27Hzwoy=X*el}+Q!ejH>UH!mUbc>K zw}KB(#=>1GGe-64ulz83~c#dXK&^?KFx$XUg?(O4bg9bHcNv_@!^v>#Ku2+Rx;^JvUW}vw3rx GJmhzTyHu0_ literal 0 HcmV?d00001 diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index 0572a86f99..d04f03c25f 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -33,7 +33,7 @@
    admin->pluginRecommendation?>
    -
    > +
    >
    @@ -45,7 +45,7 @@
    - +
    admin->officialAccount?>
    @@ -62,10 +62,12 @@
    admin->publicClass?>
    @@ -73,10 +75,12 @@
    +
    admin->zentaoInfo?>
    +
    From 9cda91e65d5e69045e543665a54fdcbdb3e7dc1e Mon Sep 17 00:00:00 2001 From: guofeilong Date: Wed, 1 Feb 2023 09:17:22 +0800 Subject: [PATCH 066/499] * code for css in admin --- module/admin/css/index.css | 5 ++--- module/admin/view/.index.html.php.swp | Bin 12288 -> 0 bytes 2 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 module/admin/view/.index.html.php.swp diff --git a/module/admin/css/index.css b/module/admin/css/index.css index 6019858462..22f5f11069 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -27,8 +27,7 @@ .official-content > .content {color: #838A9D; font-size: 12px;} .official-content > .title {color: #313C52; font-size: 13px;} -.classList > .classItem {flex: 1 1 30%;} -.classItem {margin: 5px;} +.classList > .classItem {flex: 1 1 30%; margin: 5px;} .classItem > .imgBack {flex: 1 1 50%; background: #C8EDFF;} .classItem > .imgBack > .classImg {background-repeat: no-repeat; background-size: contain; aspect-ratio: 1 / 1; background-position: center; margin:5px;} -.classItem > .classContent {flex: 1 1 50%; padding: 5px; font-size: 14px; color: #0B0F18;} +.classItem > .classContent {flex: 1 1 50%; padding: 5px; font-size: 14px; color: #0B0F18; text-align: center; overflow: hidden; height: 24px; font-weight: 700;} diff --git a/module/admin/view/.index.html.php.swp b/module/admin/view/.index.html.php.swp deleted file mode 100644 index c60991a53036fdb8d010a395aae54a62394dd5cc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2TZkOR8pq3{IU4VHdGN`~xH7vTGd;V>#$?=`MAzHOCPa-9qM|k3HQnX*bhXnp zne4u(hR(@dRZF^AJ21b8?x;=@e9k3g`r}XB-?qF)n)4fo-<2&cLK*qGasAKT;;@L8 z15t_Hwur>KhK|P+a}rM^i;mw4oeqzsv&zeei#<2(APdfp54ba)mcb_Q^+rNI z1lNNN;EmG=c>z2KmVpGffm=ZXQ1I)iguDVC0(XKs_~ze)JOv&G%b*SRfHL@W10ipM z`v3#ifX_}L!jt9BM5KQdGvo$Vr(|&AVsJhki z)RG;}+#ppXZPVsV$9()_56s9kCozOb4GLshDvgM>IsElivD^$sl{T#MJ>T|AG*L?- zpDi_+yXbdhH}Wc?&3s;`-A*`Owx=cQ)ik5q^2FtcD(z^a?!opi+WwXBXl5i2Ylh`B zZ#>N_-X3f>`er(fkHy_)DBL-nE0iU4%sgZ!uJ6!FCeykg5=C1fKWzE6qZ%#atd57o zUFC~fw*5Y{<%0~gTCKo`=4LDwZ9EHb(%fj@r|u z2Z0n4gS94&t6ypQp{0eUe`&8-tJGvZLlm1*HopRkUGG}y=0dq%kmanh>Wr!MIxMc! zNb2vB-Y;{#27(=FLrlBBk?Rc^n-No(_JNEZaEb9-n`53}I^O;;lYBQstG#awT%gU8 zAmK_0Y|>4MQaf22)pF;khC46BQlbwG) z$+8JvH?Okx#L6u@3|+TTJk2fP&6f3bwiT80m27Hzwoy=X*el}+Q!ejH>UH!mUbc>K zw}KB(#=>1GGe-64ulz83~c#dXK&^?KFx$XUg?(O4bg9bHcNv_@!^v>#Ku2+Rx;^JvUW}vw3rx GJmhzTyHu0_ From 49f8c691ac8ddbf991aea97a7e8bdcc7d08d1664 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Wed, 1 Feb 2023 01:42:49 +0000 Subject: [PATCH 067/499] * Add the update sql for task #83206. --- db/zentaopms284.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 db/zentaopms284.sql diff --git a/db/zentaopms284.sql b/db/zentaopms284.sql new file mode 100644 index 0000000000..76de9b3bf4 --- /dev/null +++ b/db/zentaopms284.sql @@ -0,0 +1 @@ +update `zt_task` set `assignedTo` = '' where `mode` = 'multi' and `status` != 'done' and `status` != 'closed'; From 338ddc04d11c783c666e650416f27c550f808095 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Wed, 1 Feb 2023 10:00:43 +0800 Subject: [PATCH 068/499] * code ofr css in admin --- module/admin/.control.php.swp | Bin 28672 -> 0 bytes module/admin/css/index.css | 2 ++ module/admin/view/index.html.php | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) delete mode 100644 module/admin/.control.php.swp diff --git a/module/admin/.control.php.swp b/module/admin/.control.php.swp deleted file mode 100644 index d7b34db140475741f48524c6fa8176aedf0961fe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 28672 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 .imgBack {flex: 1 1 50%; background: #C8EDFF;} .classItem > .imgBack > .classImg {background-repeat: no-repeat; background-size: contain; aspect-ratio: 1 / 1; background-position: center; margin:5px;} .classItem > .classContent {flex: 1 1 50%; padding: 5px; font-size: 14px; color: #0B0F18; text-align: center; overflow: hidden; height: 24px; font-weight: 700;} +.more {float: right; padding-right: 15px; color: #838A9D} +.more::after {content: ' '; display: block; width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent #9EA3B0; position: absolute; right: 3px; top: 15px;} diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index d04f03c25f..bf90464f8c 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -32,7 +32,7 @@
    -
    admin->pluginRecommendation?>
    +
    admin->pluginRecommendation?>more?>
    >
    @@ -59,7 +59,7 @@
    -
    admin->publicClass?>
    +
    admin->publicClass?>more?>
    From b8cc73ea739d4e01af0fa5dc7f7f9df341d0892e Mon Sep 17 00:00:00 2001 From: guofeilong Date: Wed, 1 Feb 2023 10:13:24 +0800 Subject: [PATCH 069/499] * code for dom more --- module/admin/config.php | 5 ++++- module/admin/view/index.html.php | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/module/admin/config.php b/module/admin/config.php index cac2b25639..5d9dc5023d 100755 --- a/module/admin/config.php +++ b/module/admin/config.php @@ -54,4 +54,7 @@ $config->admin->plugIns[30]->viewLink = 'https://www.zentao.net/extension-viewEx //$config->admin->plugIns[]->desc = ''; //$config->admin->plugIns[]->viewLink = 'https://www.zentao.net/extension-viewExt-203.html'; -$config->admin->apiRoot = 'https://www.zentao.net/'; +$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'; + diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index bf90464f8c..ed9ba36f2d 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -32,7 +32,7 @@
    - +
    admin->pluginRecommendation?>admin->extensionURL?> class="more">more?>
    >
    @@ -59,7 +59,7 @@
    -
    admin->publicClass?>more?>
    +
    From 65e097b00ebe79c353579c3901126d834664caac Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 1 Feb 2023 10:18:00 +0800 Subject: [PATCH 070/499] * Add setting block. --- module/admin/css/index.css | 18 +++++++++++------- module/admin/lang/zh-cn.php | 20 ++++++++++---------- module/admin/model.php | 1 + module/admin/view/index.html.php | 17 +++++++---------- 4 files changed, 29 insertions(+), 27 deletions(-) diff --git a/module/admin/css/index.css b/module/admin/css/index.css index b2a3fe6eb1..c7627d0a61 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -1,23 +1,27 @@ #notice {margin: -20px -20px 20px; padding: 20px;} #zentaoLinks {margin-top: 20px;} #zentaoLinks .panel .panel-heading {padding: 6px 10px;} -.admin {display: flex; background: unset;} -.admin > .main {flex: 1 1 60%; padding-right: 20px;} -.admin > .side {flex: 1 1 40%; padding-left: 10px;} +.main-content.admin {padding: 0;} +.admin {display: flex; background: unset; box-shadow: none;} +.admin > .main {flex: 1 1 70%; padding-right: 16px;} +.admin > .side {flex: 1 1 30%; padding-left: 10px;} .panel-title {padding: 10px 0px;} .flex {display: flex;} .panel {padding: 0 0 0 16px;} +.settings.panel, .plug.panel {margin-bottom: 16px;} -.settings-list {display: flex; flex-wrap: wrap; padding: 12px 4px 16px 4px;} -.settings-list > .setting-box {flex: 0 0 20%; padding: 18px 0;} +.settings-list {display: flex; flex-wrap: wrap; padding: 0 4px 16px 4px;} +.settings-list > .setting-box {flex: 0 0 18%; padding: 8px; border: 1px solid #E3E4E9; margin-right: 10px; margin-top: 16px;} +.settings-list > .setting-box > .setting-desc {padding-bottom: 16px;} .plugin-list {display: flex; flex-wrap: wrap; padding: 12px 4px 4px 4px;} -.plugin-list > .plugin-item {flex: 1 1 26%; padding: 16px 4px; border: 1px solid #EDEEF2; border-radius: 4px; margin-right: 16px; margin-bottom: 16px; width: 0px;} +.plugin-list > .plugin-item {flex: 1 1 26%; padding: 16px 10px; border: 1px solid #EDEEF2; border-radius: 4px; margin-right: 16px; margin-bottom: 16px; width: 0px;} .plugin-list > .plugin-item .ext-download {float: right; padding: 6px 0px;} .plugin-list > .plugin-item > .plug-title {height: 16px; overflow: hidden;} .plugin-list > .plugin-item .extension-desc {overflow: hidden; height: 16px;} -.bottom.flex > .official {flex: 1 1 30%; margin-right: 20px;} +.bottom.flex > .panel, .side.panel {margin-bottom: 0;} +.bottom.flex > .official {flex: 1 1 30%; margin-right: 16px; padding: 0 16px 16px 16px;} .bottom.flex > .publicClass {flex: 1 1 60%;} .official-img {background-image: url('/static/images/wechat.jpg'); background-repeat: no-repeat; background-size: contain; flex: 1 1 50%; aspect-ratio: 1 / 1; background-position: center;} diff --git a/module/admin/lang/zh-cn.php b/module/admin/lang/zh-cn.php index 7e1dd9a997..84ed30cc05 100755 --- a/module/admin/lang/zh-cn.php +++ b/module/admin/lang/zh-cn.php @@ -151,44 +151,44 @@ $lang->admin->safe->noticeGd = '系统检测到您的服务器未安装GD $lang->admin->menuList = new stdclass(); $lang->admin->menuList->setting['name'] = '系统设置'; -$lang->admin->menuList->setting['desc'] = ''; +$lang->admin->menuList->setting['desc'] = '备份、聊天、安全等系统各要素配置。'; $lang->admin->menuList->setting['order'] = 1; $lang->admin->menuList->user['name'] = '人员管理'; -$lang->admin->menuList->user['desc'] = ''; +$lang->admin->menuList->user['desc'] = '维护部门、添加人员、分组配置权限。'; $lang->admin->menuList->user['order'] = 2; $lang->admin->menuList->switch['name'] = '功能开关'; -$lang->admin->menuList->switch['desc'] = ''; +$lang->admin->menuList->switch['desc'] = '打开、关闭系统部分功能。'; $lang->admin->menuList->switch['order'] = 3; $lang->admin->menuList->model['name'] = '模型配置'; -$lang->admin->menuList->model['desc'] = ''; +$lang->admin->menuList->model['desc'] = '不同项目管理模型和项目通用要素配置。'; $lang->admin->menuList->model['order'] = 4; $lang->admin->menuList->feature['name'] = '功能配置'; -$lang->admin->menuList->feature['desc'] = ''; +$lang->admin->menuList->feature['desc'] = '按照功能菜单进行系统的要素配置。'; $lang->admin->menuList->feature['order'] = 5; $lang->admin->menuList->template['name'] = '文档模板'; -$lang->admin->menuList->template['desc'] = ''; +$lang->admin->menuList->template['desc'] = '配置文档的模板类型和模板内容。'; $lang->admin->menuList->template['order'] = 6; $lang->admin->menuList->message['name'] = '通知设置'; -$lang->admin->menuList->message['desc'] = ''; +$lang->admin->menuList->message['desc'] = '配置通知路径,自定义需要通知的动作。'; $lang->admin->menuList->message['order'] = 7; $lang->admin->menuList->extension['name'] = '插件管理'; -$lang->admin->menuList->extension['desc'] = ''; +$lang->admin->menuList->extension['desc'] = '浏览、安装插件。'; $lang->admin->menuList->extension['link'] = 'extension|browse'; $lang->admin->menuList->extension['order'] = 8; $lang->admin->menuList->dev['name'] = '二次开发'; -$lang->admin->menuList->dev['desc'] = ''; +$lang->admin->menuList->dev['desc'] = '支持对系统进行二次开发。'; $lang->admin->menuList->dev['order'] = 9; $lang->admin->menuList->convert['name'] = '数据导入'; -$lang->admin->menuList->convert['desc'] = ''; +$lang->admin->menuList->convert['desc'] = '第三方系统的数据导入。'; $lang->admin->menuList->convert['link'] = 'convert|convertjira'; $lang->admin->menuList->convert['order'] = 10; diff --git a/module/admin/model.php b/module/admin/model.php index b28a53ebd1..7976bd2ffc 100755 --- a/module/admin/model.php +++ b/module/admin/model.php @@ -419,6 +419,7 @@ class adminModel extends model $param = $type == 'extension' ? '' : 'MTIxOA=='; $extensions = $this->loadModel('extension')->getExtensionsByAPI($searchType, $param, 0, $limit); $extensions = isset($extensions->extensions) ? (array)$extensions->extensions : array(); + foreach($extensions as $extension) $extension->viewLink = str_replace(array('info', 'client'), '', $extension->viewLink); } else { diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index 1688bddff6..9fbaccff93 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -17,16 +17,13 @@
    admin->setting?>
    -
    1
    -
    2
    -
    3
    -
    4
    -
    5
    -
    6
    -
    7
    -
    8
    -
    9
    -
    10
    + admin->menuList as $menu):?> +
    +

    +

    + {$lang->help}", '_blank', 'class="text-muted setting-help"');?> +
    +
    From 61830b5092e453aea28d7b4ce0d415f2b74b4e5d Mon Sep 17 00:00:00 2001 From: guofeilong Date: Wed, 1 Feb 2023 10:23:48 +0800 Subject: [PATCH 071/499] * code for css in admin --- module/admin/css/index.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/admin/css/index.css b/module/admin/css/index.css index 0ecb656266..34896efe97 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -33,7 +33,7 @@ .classList > .classItem {flex: 1 1 30%; margin: 5px;} .classItem > .imgBack {flex: 1 1 50%; background: #C8EDFF;} -.classItem > .imgBack > .classImg {background-repeat: no-repeat; background-size: contain; aspect-ratio: 1 / 1; background-position: center; margin:5px;} +.classItem > .imgBack > .classImg {background-repeat: no-repeat; background-size: contain; aspect-ratio: 1 / 1; background-position: center; margin: 0 20px;} .classItem > .classContent {flex: 1 1 50%; padding: 5px; font-size: 14px; color: #0B0F18; text-align: center; overflow: hidden; height: 24px; font-weight: 700;} .more {float: right; padding-right: 15px; color: #838A9D} .more::after {content: ' '; display: block; width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent #9EA3B0; position: absolute; right: 3px; top: 15px;} From cca3b53827eef557a47884e80f7cbfb345cf3453 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Wed, 1 Feb 2023 10:25:53 +0800 Subject: [PATCH 072/499] * code for refactor in class dom --- module/admin/css/index.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/admin/css/index.css b/module/admin/css/index.css index 34896efe97..da96fb8607 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -21,7 +21,7 @@ .plugin-list > .plugin-item .extension-desc {overflow: hidden; height: 16px;} .bottom.flex > .panel, .side.panel {margin-bottom: 0;} -.bottom.flex > .official {flex: 1 1 30%; margin-right: 16px; padding: 0 16px 16px 16px; display: flex; flex-direction: column; position: relative;} +.bottom.flex > .official {flex: 1 1 30%; margin-right: 16px; padding: 40px 16px 16px 16px; display: flex; flex-direction: column; position: relative;} .bottom.flex > .publicClass {flex: 1 1 60%;} .official {justify-content: center;} From 1e571955f90ec364deb9f16a4de693616c6d8fea Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 1 Feb 2023 10:27:10 +0800 Subject: [PATCH 073/499] * Adjust code. --- module/admin/model.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/admin/model.php b/module/admin/model.php index 7976bd2ffc..7aae4df93c 100755 --- a/module/admin/model.php +++ b/module/admin/model.php @@ -483,10 +483,10 @@ class adminModel extends model if($index > $limit) return $publicClass; $publicClass[$index] = new stdClass(); - $publicClass[$index]->name = $course->title; - $publicClass[$index]->image = $this->config->admin->apiRoot . $course->image->list[0]->smallURL; + $publicClass[$index]->name = $course->title; + $publicClass[$index]->image = $this->config->admin->apiRoot . $course->image->list[0]->smallURL; $publicClass[$index]->viewLink = $this->config->admin->apiRoot . "{$course->alias}-{$course->id}.html"; - $index++; + $index ++; } return $publicClass; } From ca088f2e2cae417b37157d1d2601a6b4fd5c8871 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Wed, 1 Feb 2023 10:33:56 +0800 Subject: [PATCH 074/499] * code for css in settings dom --- module/admin/css/index.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/admin/css/index.css b/module/admin/css/index.css index da96fb8607..e8d9e1d58f 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -11,7 +11,7 @@ .settings.panel, .plug.panel {margin-bottom: 16px;} .settings-list {display: flex; flex-wrap: wrap; padding: 0 4px 16px 4px;} -.settings-list > .setting-box {flex: 0 0 18%; padding: 8px; border: 1px solid #E3E4E9; margin-right: 10px; margin-top: 16px;} +.settings-list > .setting-box {flex: 1 1 18%; padding: 8px; border: 1px solid #E3E4E9; margin-right: 10px; margin-top: 16px;} .settings-list > .setting-box > .setting-desc {padding-bottom: 16px;} .plugin-list {display: flex; flex-wrap: wrap; padding: 12px 4px 4px 4px;} From d3986931a81c48eb389fda9be7dadf2add093e9c Mon Sep 17 00:00:00 2001 From: zhaoke Date: Wed, 1 Feb 2023 02:34:11 +0000 Subject: [PATCH 075/499] * Fix action list position error. --- module/zahost/view/view.html.php | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/module/zahost/view/view.html.php b/module/zahost/view/view.html.php index d78b9e23d9..61d09e08fe 100644 --- a/module/zahost/view/view.html.php +++ b/module/zahost/view/view.html.php @@ -131,10 +131,6 @@
    zahost->desc;?>
    desc) ? htmlspecialchars_decode($zahost->desc) : $lang->noData;?>
    - createLink('action', 'comment', "objectType=zahost&objectID=$zahost->hostID"); - ?>
    @@ -142,35 +138,11 @@
    createLink('zanode', 'list', "hostID=$zahost->id", '', true) . "' frameborder='no' allowfullscreen='true' mozallowfullscreen='true' webkitallowfullscreen='true' allowtransparency='true' scrolling='auto' onload='setIframeHeight(this)' style='min-height:300px;'>";?> -
    noData;?>
    +
    - createLink('action', 'comment', "objectType=zahost&objectID=$zahost->hostID"); From d11b3f17edc95dfa6ff2c71565d193e0045ccada Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 1 Feb 2023 10:34:45 +0800 Subject: [PATCH 076/499] * Modify class image. --- module/admin/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/admin/model.php b/module/admin/model.php index 7aae4df93c..8f1802145d 100755 --- a/module/admin/model.php +++ b/module/admin/model.php @@ -484,7 +484,7 @@ class adminModel extends model $publicClass[$index] = new stdClass(); $publicClass[$index]->name = $course->title; - $publicClass[$index]->image = $this->config->admin->apiRoot . $course->image->list[0]->smallURL; + $publicClass[$index]->image = $this->config->admin->apiRoot . $course->image->list[0]->largeURL; $publicClass[$index]->viewLink = $this->config->admin->apiRoot . "{$course->alias}-{$course->id}.html"; $index ++; } From 9b699b54ecc80f4f9972107b96b6cdecaec52917 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 1 Feb 2023 11:04:06 +0800 Subject: [PATCH 077/499] * Optimize page style. --- module/admin/css/index.css | 5 ++--- module/admin/view/index.html.php | 10 ++++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/module/admin/css/index.css b/module/admin/css/index.css index e8d9e1d58f..4e40802b34 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -15,7 +15,7 @@ .settings-list > .setting-box > .setting-desc {padding-bottom: 16px;} .plugin-list {display: flex; flex-wrap: wrap; padding: 12px 4px 4px 4px;} -.plugin-list > .plugin-item {flex: 1 1 26%; padding: 16px 10px; border: 1px solid #EDEEF2; border-radius: 4px; margin-right: 16px; margin-bottom: 16px; width: 0px;} +.plugin-list > .plugin-item {flex: 1 1 26%; padding: 16px 10px; border: 1px solid #EDEEF2; border-radius: 4px; margin-right: 10px; margin-bottom: 16px; width: 0px;} .plugin-list > .plugin-item .ext-download {float: right; padding: 6px 0px;} .plugin-list > .plugin-item > .plug-title {height: 16px; overflow: hidden;} .plugin-list > .plugin-item .extension-desc {overflow: hidden; height: 16px;} @@ -35,5 +35,4 @@ .classItem > .imgBack {flex: 1 1 50%; background: #C8EDFF;} .classItem > .imgBack > .classImg {background-repeat: no-repeat; background-size: contain; aspect-ratio: 1 / 1; background-position: center; margin: 0 20px;} .classItem > .classContent {flex: 1 1 50%; padding: 5px; font-size: 14px; color: #0B0F18; text-align: center; overflow: hidden; height: 24px; font-weight: 700;} -.more {float: right; padding-right: 15px; color: #838A9D} -.more::after {content: ' '; display: block; width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent #9EA3B0; position: absolute; right: 3px; top: 15px;} +.more {float: right; padding-right: 12px; font-weight: normal;} diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index df5d6bf01b..a5f529e9db 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -29,7 +29,10 @@
    - +
    + admin->pluginRecommendation;?> + admin->extensionURL, "{$lang->more} ", '_blank', 'class="more text-muted"');?> +
    >
    @@ -56,7 +59,10 @@
    - +
    + admin->publicClass;?> + admin->classURL, "{$lang->more} ", '_blank', 'class="more text-muted"');?> +
    From 8ec471f95013e37ef8e081d946febb3147122207 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 1 Feb 2023 11:20:57 +0800 Subject: [PATCH 078/499] * code for task #83439. --- module/admin/config.php | 2 +- module/admin/lang/de.php | 23 +++ module/admin/lang/en.php | 37 ++++- module/admin/lang/fr.php | 23 +++ module/admin/lang/menu.php | 124 ++++++++++++++ module/admin/lang/vi.php | 2 + module/admin/lang/zh-cn.php | 156 +++--------------- module/admin/model.php | 42 ++--- module/common/lang/de.php | 4 +- module/common/lang/en.php | 4 +- module/common/lang/fr.php | 4 +- module/common/lang/menu.php | 78 +-------- module/common/lang/zh-cn.php | 4 +- module/search/control.php | 2 - .../xuan/admin/ext/lang/de/xuanxuan.php | 7 + .../xuan/admin/ext/lang/en/xuanxuan.php | 7 + .../xuan/admin/ext/lang/fr/xuanxuan.php | 7 + .../xuan/admin/ext/lang/zh-cn/xuanxuan.php | 4 +- .../xuan/common/ext/lang/de/xuanxuan.php | 36 ++-- .../xuan/common/ext/lang/en/xuanxuan.php | 36 ++-- .../xuan/common/ext/lang/fr/xuanxuan.php | 36 ++-- 21 files changed, 316 insertions(+), 322 deletions(-) create mode 100644 module/admin/lang/menu.php diff --git a/module/admin/config.php b/module/admin/config.php index cac2b25639..2468462aa0 100755 --- a/module/admin/config.php +++ b/module/admin/config.php @@ -7,7 +7,7 @@ $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['setting'] = array('custom|mode', 'backup', 'action|trash', 'admin|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', '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['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'); diff --git a/module/admin/lang/de.php b/module/admin/lang/de.php index f0f7ca2c3c..979c1c09b4 100755 --- a/module/admin/lang/de.php +++ b/module/admin/lang/de.php @@ -148,3 +148,26 @@ $lang->admin->safe->noticeMode = 'The password will be checked when creating $lang->admin->safe->noticeWeakMode = 'The password will be checked when logging into the system, creating and modifying user information, and changing passwords.'; $lang->admin->safe->noticeStrong = 'The longer the password, the more letters, numbers, or special characters it contains, and the less repetitive the password, the more secure it is!'; $lang->admin->safe->noticeGd = 'Your server does not have GD module installed, you cannot use the Captcha function, Please use it after installation.'; + +$lang->admin->menuSetting['system']['name'] = 'System'; +$lang->admin->menuSetting['system']['desc'] = ''; +$lang->admin->menuSetting['user']['name'] = 'User'; +$lang->admin->menuSetting['user']['desc'] = ''; +$lang->admin->menuSetting['switch']['name'] = 'Switch'; +$lang->admin->menuSetting['switch']['desc'] = ''; +$lang->admin->menuSetting['model']['name'] = 'Model'; +$lang->admin->menuSetting['model']['desc'] = ''; +$lang->admin->menuSetting['feature']['name'] = 'Feature'; +$lang->admin->menuSetting['feature']['desc'] = ''; +$lang->admin->menuSetting['template']['name'] = 'Template'; +$lang->admin->menuSetting['template']['desc'] = ''; +$lang->admin->menuSetting['message']['name'] = 'Message'; +$lang->admin->menuSetting['message']['desc'] = ''; +$lang->admin->menuSetting['extension']['name'] = 'Extension'; +$lang->admin->menuSetting['extension']['desc'] = ''; +$lang->admin->menuSetting['dev']['name'] = 'Develop'; +$lang->admin->menuSetting['dev']['desc'] = ''; +$lang->admin->menuSetting['convert']['name'] = 'Data Import'; +$lang->admin->menuSetting['convert']['desc'] = ''; + +include dirname(__FILE__) . '/menu.php'; diff --git a/module/admin/lang/en.php b/module/admin/lang/en.php index 6553136041..48f1977590 100755 --- a/module/admin/lang/en.php +++ b/module/admin/lang/en.php @@ -37,13 +37,13 @@ $lang->admin->resetPWDByMail = 'Reset the password via the email'; $lang->admin->followUs = 'Follow Us'; $lang->admin->followUsContent = 'Check out ZenTao news, events, and support at any time'; -$lang->admin->changeEngine = "Change to InnoDB"; -$lang->admin->changingTable = 'Replacing data table %s engine...'; -$lang->admin->changeSuccess = 'The data table %s engine has been changed to InnoDB.'; -$lang->admin->changeFail = "Failed to replace table %s engine. Reason: %s。"; -$lang->admin->errorInnodb = 'Your MySQL does not support InnoDB data table engine.'; -$lang->admin->changeFinished = "Database engine replacement completed."; -$lang->admin->engineInfo = "The %s table engine is %s."; +$lang->admin->changeEngine = "Change to InnoDB"; +$lang->admin->changingTable = 'Replacing data table %s engine...'; +$lang->admin->changeSuccess = 'The data table %s engine has been changed to InnoDB.'; +$lang->admin->changeFail = "Failed to replace table %s engine. Reason: %s。"; +$lang->admin->errorInnodb = 'Your MySQL does not support InnoDB data table engine.'; +$lang->admin->changeFinished = "Database engine replacement completed."; +$lang->admin->engineInfo = "The %s table engine is %s."; $lang->admin->engineSummary['hasMyISAM'] = "There are %s tables that are not InnoDB engines"; $lang->admin->engineSummary['allInnoDB'] = "All tables are InnoDB engines"; @@ -148,3 +148,26 @@ $lang->admin->safe->noticeMode = 'The password will be checked when creating $lang->admin->safe->noticeWeakMode = 'The password will be checked when logging into the system, creating and modifying user information, and changing passwords.'; $lang->admin->safe->noticeStrong = 'The longer the password, the more letters, numbers, or special characters it contains, and the less repetitive the password, the more secure it is!'; $lang->admin->safe->noticeGd = 'Your server does not have GD module installed, you cannot use the Captcha function, Please use it after installation.'; + +$lang->admin->menuSetting['system']['name'] = 'System'; +$lang->admin->menuSetting['system']['desc'] = ''; +$lang->admin->menuSetting['user']['name'] = 'User'; +$lang->admin->menuSetting['user']['desc'] = ''; +$lang->admin->menuSetting['switch']['name'] = 'Switch'; +$lang->admin->menuSetting['switch']['desc'] = ''; +$lang->admin->menuSetting['model']['name'] = 'Model'; +$lang->admin->menuSetting['model']['desc'] = ''; +$lang->admin->menuSetting['feature']['name'] = 'Feature'; +$lang->admin->menuSetting['feature']['desc'] = ''; +$lang->admin->menuSetting['template']['name'] = 'Template'; +$lang->admin->menuSetting['template']['desc'] = ''; +$lang->admin->menuSetting['message']['name'] = 'Message'; +$lang->admin->menuSetting['message']['desc'] = ''; +$lang->admin->menuSetting['extension']['name'] = 'Extension'; +$lang->admin->menuSetting['extension']['desc'] = ''; +$lang->admin->menuSetting['dev']['name'] = 'Develop'; +$lang->admin->menuSetting['dev']['desc'] = ''; +$lang->admin->menuSetting['convert']['name'] = 'Data Import'; +$lang->admin->menuSetting['convert']['desc'] = ''; + +include dirname(__FILE__) . '/menu.php'; diff --git a/module/admin/lang/fr.php b/module/admin/lang/fr.php index 97c4bacb02..c460eb9aa1 100755 --- a/module/admin/lang/fr.php +++ b/module/admin/lang/fr.php @@ -148,3 +148,26 @@ $lang->admin->safe->noticeMode = "Le mot de passe sera vérifié lors de la $lang->admin->safe->noticeWeakMode = "Le mot de passe sera vérifié lors de la connexion au système, de la création et de la modification des coordonnées de l'utilisateur, et du changement de mot de passe."; $lang->admin->safe->noticeStrong = "Le mot de passe est d'autant plus sécurisé qu'il est long, qu'il contient plus de lettres, de chiffres ou de caractères spéciaux, et que les lettres du mot de passe sont peu répétitives !"; $lang->admin->safe->noticeGd = 'Your server does not have GD module installed, you cannot use the Captcha function, Please use it after installation.'; + +$lang->admin->menuSetting['system']['name'] = 'System'; +$lang->admin->menuSetting['system']['desc'] = ''; +$lang->admin->menuSetting['user']['name'] = 'User'; +$lang->admin->menuSetting['user']['desc'] = ''; +$lang->admin->menuSetting['switch']['name'] = 'Switch'; +$lang->admin->menuSetting['switch']['desc'] = ''; +$lang->admin->menuSetting['model']['name'] = 'Model'; +$lang->admin->menuSetting['model']['desc'] = ''; +$lang->admin->menuSetting['feature']['name'] = 'Feature'; +$lang->admin->menuSetting['feature']['desc'] = ''; +$lang->admin->menuSetting['template']['name'] = 'Template'; +$lang->admin->menuSetting['template']['desc'] = ''; +$lang->admin->menuSetting['message']['name'] = 'Message'; +$lang->admin->menuSetting['message']['desc'] = ''; +$lang->admin->menuSetting['extension']['name'] = 'Extension'; +$lang->admin->menuSetting['extension']['desc'] = ''; +$lang->admin->menuSetting['dev']['name'] = 'Develop'; +$lang->admin->menuSetting['dev']['desc'] = ''; +$lang->admin->menuSetting['convert']['name'] = 'Data Import'; +$lang->admin->menuSetting['convert']['desc'] = ''; + +include dirname(__FILE__) . '/menu.php'; diff --git a/module/admin/lang/menu.php b/module/admin/lang/menu.php new file mode 100644 index 0000000000..4ec645fefb --- /dev/null +++ b/module/admin/lang/menu.php @@ -0,0 +1,124 @@ +admin->menuList = new stdclass(); +$lang->admin->menuList->system['name'] = $lang->admin->menuSetting['system']['name']; +$lang->admin->menuList->system['desc'] = $lang->admin->menuSetting['system']['desc']; +$lang->admin->menuList->system['order'] = 1; + +$lang->admin->menuList->user['name'] = $lang->admin->menuSetting['user']['name']; +$lang->admin->menuList->user['desc'] = $lang->admin->menuSetting['user']['desc']; +$lang->admin->menuList->user['order'] = 2; + +$lang->admin->menuList->switch['name'] = $lang->admin->menuSetting['switch']['name']; +$lang->admin->menuList->switch['desc'] = $lang->admin->menuSetting['switch']['desc']; +$lang->admin->menuList->switch['order'] = 3; + +$lang->admin->menuList->model['name'] = $lang->admin->menuSetting['model']['name']; +$lang->admin->menuList->model['desc'] = $lang->admin->menuSetting['model']['desc']; +$lang->admin->menuList->model['order'] = 4; + +$lang->admin->menuList->feature['name'] = $lang->admin->menuSetting['feature']['name']; +$lang->admin->menuList->feature['desc'] = $lang->admin->menuSetting['feature']['desc']; +$lang->admin->menuList->feature['order'] = 5; + +$lang->admin->menuList->template['name'] = $lang->admin->menuSetting['template']['name']; +$lang->admin->menuList->template['desc'] = $lang->admin->menuSetting['template']['desc']; +$lang->admin->menuList->template['order'] = 6; + +$lang->admin->menuList->message['name'] = $lang->admin->menuSetting['message']['name']; +$lang->admin->menuList->message['desc'] = $lang->admin->menuSetting['message']['desc']; +$lang->admin->menuList->message['order'] = 7; + +$lang->admin->menuList->extension['name'] = $lang->admin->menuSetting['extension']['name']; +$lang->admin->menuList->extension['desc'] = $lang->admin->menuSetting['extension']['desc']; +$lang->admin->menuList->extension['link'] = 'extension|browse'; +$lang->admin->menuList->extension['order'] = 8; + +$lang->admin->menuList->dev['name'] = $lang->admin->menuSetting['dev']['name']; +$lang->admin->menuList->dev['desc'] = $lang->admin->menuSetting['dev']['desc']; +$lang->admin->menuList->dev['order'] = 9; + +$lang->admin->menuList->convert['name'] = $lang->admin->menuSetting['convert']['name']; +$lang->admin->menuList->convert['desc'] = $lang->admin->menuSetting['convert']['desc']; +$lang->admin->menuList->convert['link'] = 'convert|convertjira'; +$lang->admin->menuList->convert['order'] = 10; + +$lang->admin->menuList->system['subMenu']['mode'] = array('link' => "{$lang->custom->mode}|custom|mode|"); +$lang->admin->menuList->system['subMenu']['backup'] = array('link' => "{$lang->backup->common}|backup|index|"); +$lang->admin->menuList->system['subMenu']['trash'] = array('link' => "{$lang->action->trash}|action|trash|"); +$lang->admin->menuList->system['subMenu']['safe'] = array('link' => "{$lang->security}|admin|safe|", 'alias' => 'checkweak,resetpwdsetting'); +$lang->admin->menuList->system['subMenu']['cron'] = array('link' => "{$lang->admin->cron}|cron|index|", 'subModule' => 'cron'); +$lang->admin->menuList->system['subMenu']['timezone'] = array('link' => "{$lang->timezone}|custom|timezone|"); +$lang->admin->menuList->system['subMenu']['buildindex'] = array('link' => "{$lang->admin->buildIndex}|search|buildindex|"); +$lang->admin->menuList->system['subMenu']['tableengine'] = array('link' => "{$lang->admin->tableEngine}|admin|tableengine|"); + +$lang->admin->menuList->system['menuOrder']['5'] = 'mode'; +$lang->admin->menuList->system['menuOrder']['10'] = 'backup'; +$lang->admin->menuList->system['menuOrder']['15'] = 'trash'; +$lang->admin->menuList->system['menuOrder']['30'] = 'safe'; +$lang->admin->menuList->system['menuOrder']['35'] = 'cron'; +$lang->admin->menuList->system['menuOrder']['40'] = 'timezone'; +$lang->admin->menuList->system['menuOrder']['45'] = 'buildindex'; +$lang->admin->menuList->system['menuOrder']['50'] = 'tableengine'; + +$lang->admin->menuList->system['dividerMenu'] = ',safe,'; + +$lang->admin->menuList->user['subMenu']['dept'] = array('link' => "{$lang->dept->common}|dept|browse|", 'subModule' => 'dept'); +$lang->admin->menuList->user['subMenu']['user'] = array('link' => "{$lang->user->common}|company|browse|", 'subModule' => 'user'); +$lang->admin->menuList->user['subMenu']['group'] = array('link' => "{$lang->priv}}|group|browse|", 'subModule' => 'group'); + +$lang->admin->menuList->user['menuOrder']['5'] = 'dept'; +$lang->admin->menuList->user['menuOrder']['10'] = 'user'; +$lang->admin->menuList->user['menuOrder']['15'] = 'group'; + +$lang->admin->menuList->switch['subMenu']['setmodule'] = array('link' => "{$lang->admin->module}|admin|setmodule|"); + +$lang->admin->menuList->switch['menuOrder']['5'] = 'setmodule'; + +$lang->admin->menuList->model['subMenu']['common'] = array('link' => "{$lang->globalSetting}|custom|required|module=project", 'subModule' => 'custom'); +$lang->admin->menuList->model['subMenu']['scrum'] = array('link' => "{$lang->scrumModel}|auditcl|scrumbrowse|", 'subModule' => 'auditcl'); +$lang->admin->menuList->model['subMenu']['waterfall'] = array('link' => "$lang->waterfallModel|stage|settype|", 'subModule' => 'stage'); + +$lang->admin->menuList->model['menuOrder']['5'] = 'common'; +$lang->admin->menuList->model['menuOrder']['15'] = 'waterfall'; + +if($config->edition != 'max') unset($lang->admin->menuList->model['subMenu']['scrum']); +if($config->edition == 'max') $lang->admin->menuList->model['menuOrder']['10'] = 'scrum'; + +$lang->admin->menuList->feature['subMenu']['my'] = array('link' => "{$lang->my->common}|custom|set|module=todo"); +$lang->admin->menuList->feature['subMenu']['product'] = array('link' => "{$lang->productCommon}|custom|product|"); +$lang->admin->menuList->feature['subMenu']['execution'] = array('link' => "{$lang->execution->common}|custom|execution|"); +$lang->admin->menuList->feature['subMenu']['qa'] = array('link' => "{$lang->qa->common}|custom|required|module=bug"); +$lang->admin->menuList->feature['subMenu']['kanban'] = array('link' => "{$lang->kanban->common}|custom|kanban|"); +$lang->admin->menuList->feature['subMenu']['doc'] = array('link' => "{$lang->doc->common}|custom|required|module=doc"); +$lang->admin->menuList->feature['subMenu']['user'] = array('link' => "{$lang->user->common}|custom|set|module=user"); + +$lang->admin->menuList->feature['menuOrder']['5'] = 'my'; +$lang->admin->menuList->feature['menuOrder']['10'] = 'product'; +$lang->admin->menuList->feature['menuOrder']['15'] = 'execution'; +$lang->admin->menuList->feature['menuOrder']['20'] = 'qa'; +$lang->admin->menuList->feature['menuOrder']['25'] = 'kanban'; +$lang->admin->menuList->feature['menuOrder']['30'] = 'doc'; +$lang->admin->menuList->feature['menuOrder']['50'] = 'user'; + +$lang->admin->menuList->feature['dividerMenu'] = ',user,'; + +$lang->admin->menuList->message['subMenu']['mail'] = array('link' => "{$lang->mail->common}|mail|edit|", 'subModule' => 'mail'); +$lang->admin->menuList->message['subMenu']['webhook'] = array('link' => "Webhook|webhook|browse|", 'subModule' => 'webhook'); +$lang->admin->menuList->message['subMenu']['message'] = array('link' => "{$lang->browser}|message|browser|"); +$lang->admin->menuList->message['subMenu']['setting'] = array('link' => "{$lang->settings}|message|setting|"); + +$lang->admin->menuList->message['menuOrder']['5'] = 'mail'; +$lang->admin->menuList->message['menuOrder']['10'] = 'webhook'; +$lang->admin->menuList->message['menuOrder']['20'] = 'message'; +$lang->admin->menuList->message['menuOrder']['25'] = 'setting'; + +$lang->admin->menuList->dev['subMenu']['api'] = array('link' => "API|dev|api|"); +$lang->admin->menuList->dev['subMenu']['db'] = array('link' => "{$lang->database}|dev|db|"); +$lang->admin->menuList->dev['subMenu']['editor'] = array('link' => "{$lang->editor}|dev|editor|"); +$lang->admin->menuList->dev['subMenu']['entry'] = array('link' => "{$lang->admin->entry}|entry|browse|", 'subModule' => 'entry'); + +$lang->admin->menuList->dev['menuOrder']['5'] = 'api'; +$lang->admin->menuList->dev['menuOrder']['10'] = 'db'; +$lang->admin->menuList->dev['menuOrder']['15'] = 'editor'; +$lang->admin->menuList->dev['menuOrder']['20'] = 'entry'; diff --git a/module/admin/lang/vi.php b/module/admin/lang/vi.php index 3c099f1faf..96edcc1521 100755 --- a/module/admin/lang/vi.php +++ b/module/admin/lang/vi.php @@ -92,3 +92,5 @@ $lang->admin->safe->loginCaptchaList[0] = 'No'; $lang->admin->safe->noticeMode = 'Mật khẩu sẽ được kiểm tra khi người dùng đăng nhập hoặc người dùng thêm hoặc sửa.'; $lang->admin->safe->noticeStrong = ''; $lang->admin->safe->noticeGd = 'Your server does not have GD module installed, you cannot use the Captcha function, Please use it after installation.'; + +include dirname(__FILE__) . '/menu.php'; diff --git a/module/admin/lang/zh-cn.php b/module/admin/lang/zh-cn.php index 7e1dd9a997..fab6ae63b9 100755 --- a/module/admin/lang/zh-cn.php +++ b/module/admin/lang/zh-cn.php @@ -149,139 +149,25 @@ $lang->admin->safe->noticeWeakMode = '系统会在登录、创建和修改用户 $lang->admin->safe->noticeStrong = '密码长度越长,含有大写字母或数字或特殊符号越多,密码字母越不重复,安全度越强!'; $lang->admin->safe->noticeGd = '系统检测到您的服务器未安装GD模块,无法使用验证码功能,请安装后使用。'; -$lang->admin->menuList = new stdclass(); -$lang->admin->menuList->setting['name'] = '系统设置'; -$lang->admin->menuList->setting['desc'] = ''; -$lang->admin->menuList->setting['order'] = 1; +$lang->admin->menuSetting['system']['name'] = '系统设置'; +$lang->admin->menuSetting['system']['desc'] = ''; +$lang->admin->menuSetting['user']['name'] = '人员管理'; +$lang->admin->menuSetting['user']['desc'] = ''; +$lang->admin->menuSetting['switch']['name'] = '功能开关'; +$lang->admin->menuSetting['switch']['desc'] = ''; +$lang->admin->menuSetting['model']['name'] = '模型配置'; +$lang->admin->menuSetting['model']['desc'] = ''; +$lang->admin->menuSetting['feature']['name'] = '功能配置'; +$lang->admin->menuSetting['feature']['desc'] = ''; +$lang->admin->menuSetting['template']['name'] = '文档模板'; +$lang->admin->menuSetting['template']['desc'] = ''; +$lang->admin->menuSetting['message']['name'] = '通知设置'; +$lang->admin->menuSetting['message']['desc'] = ''; +$lang->admin->menuSetting['extension']['name'] = '插件管理'; +$lang->admin->menuSetting['extension']['desc'] = ''; +$lang->admin->menuSetting['dev']['name'] = '二次开发'; +$lang->admin->menuSetting['dev']['desc'] = ''; +$lang->admin->menuSetting['convert']['name'] = '数据导入'; +$lang->admin->menuSetting['convert']['desc'] = ''; -$lang->admin->menuList->user['name'] = '人员管理'; -$lang->admin->menuList->user['desc'] = ''; -$lang->admin->menuList->user['order'] = 2; - -$lang->admin->menuList->switch['name'] = '功能开关'; -$lang->admin->menuList->switch['desc'] = ''; -$lang->admin->menuList->switch['order'] = 3; - -$lang->admin->menuList->model['name'] = '模型配置'; -$lang->admin->menuList->model['desc'] = ''; -$lang->admin->menuList->model['order'] = 4; - -$lang->admin->menuList->feature['name'] = '功能配置'; -$lang->admin->menuList->feature['desc'] = ''; -$lang->admin->menuList->feature['order'] = 5; - -$lang->admin->menuList->template['name'] = '文档模板'; -$lang->admin->menuList->template['desc'] = ''; -$lang->admin->menuList->template['order'] = 6; - -$lang->admin->menuList->message['name'] = '通知设置'; -$lang->admin->menuList->message['desc'] = ''; -$lang->admin->menuList->message['order'] = 7; - -$lang->admin->menuList->extension['name'] = '插件管理'; -$lang->admin->menuList->extension['desc'] = ''; -$lang->admin->menuList->extension['link'] = 'extension|browse'; -$lang->admin->menuList->extension['order'] = 8; - -$lang->admin->menuList->dev['name'] = '二次开发'; -$lang->admin->menuList->dev['desc'] = ''; -$lang->admin->menuList->dev['order'] = 9; - -$lang->admin->menuList->convert['name'] = '数据导入'; -$lang->admin->menuList->convert['desc'] = ''; -$lang->admin->menuList->convert['link'] = 'convert|convertjira'; -$lang->admin->menuList->convert['order'] = 10; - -$lang->admin->menuList->setting['subMenu']['mode'] = array('link' => "模式|custom|mode|"); -$lang->admin->menuList->setting['subMenu']['backup'] = array('link' => "备份|backup|index|", 'subModule' => 'backup'); -$lang->admin->menuList->setting['subMenu']['trash'] = array('link' => "回收站|action|trash|", 'subModule' => 'action'); -$lang->admin->menuList->setting['subMenu']['safe'] = array('link' => "安全|admin|safe|", 'alias' => 'checkweak,resetpwdsetting'); -$lang->admin->menuList->setting['subMenu']['timezone'] = array('link' => "时区|custom|timezone|"); -$lang->admin->menuList->setting['subMenu']['buildindex'] = array('link' => "重建索引|search|buildindex|", 'subModule' => 'search'); -$lang->admin->menuList->setting['subMenu']['tableengine'] = array('link' => "表引擎|admin|tableengine|"); - -$lang->admin->menuList->setting['menuOrder']['5'] = 'mode'; -$lang->admin->menuList->setting['menuOrder']['10'] = 'backup'; -$lang->admin->menuList->setting['menuOrder']['15'] = 'trash'; -$lang->admin->menuList->setting['menuOrder']['30'] = 'safe'; -$lang->admin->menuList->setting['menuOrder']['35'] = 'timezone'; -$lang->admin->menuList->setting['menuOrder']['40'] = 'buildindex'; -$lang->admin->menuList->setting['menuOrder']['45'] = 'tableengine'; - -$lang->admin->menuList->setting['dividerMenu'] = ',safe,'; - -$lang->admin->menuList->user['subMenu']['dept'] = array('link' => "部门|dept|browse|", 'subModule' => 'dept'); -$lang->admin->menuList->user['subMenu']['user'] = array('link' => "用户|company|browse|", 'subModule' => 'company'); -$lang->admin->menuList->user['subMenu']['group'] = array('link' => "权限|group|browse|", 'subModule' => 'group'); - -$lang->admin->menuList->user['menuOrder']['5'] = 'dept'; -$lang->admin->menuList->user['menuOrder']['10'] = 'user'; -$lang->admin->menuList->user['menuOrder']['15'] = 'group'; - -$lang->admin->menuList->switch['subMenu']['setmodule'] = array('link' => "功能设置|admin|setmodule|"); - -$lang->admin->menuList->switch['menuOrder']['5'] = 'setmodule'; - -$lang->admin->menuList->model['subMenu']['common'] = array('link' => "通用|custom|required|module=project", 'subModule' => 'custom'); -$lang->admin->menuList->model['subMenu']['scrum'] = array('link' => "敏捷模型|auditcl|scrumbrowse|", 'subModule' => 'auditcl'); -$lang->admin->menuList->model['subMenu']['waterfall'] = array('link' => "瀑布模型|stage|settype|", 'subModule' => 'stage'); - -$lang->admin->menuList->model['menuOrder']['5'] = 'common'; -$lang->admin->menuList->model['menuOrder']['10'] = 'scrum'; -$lang->admin->menuList->model['menuOrder']['15'] = 'waterfall'; - -$lang->admin->menuList->feature['subMenu']['my'] = array('link' => "地盘|custom|set|module=todo"); -$lang->admin->menuList->feature['subMenu']['product'] = array('link' => "{$lang->productCommon}|custom|product|"); -$lang->admin->menuList->feature['subMenu']['execution'] = array('link' => "{$lang->execution->common}|custom|execution|"); -$lang->admin->menuList->feature['subMenu']['qa'] = array('link' => "测试|custom|required|module=bug"); -$lang->admin->menuList->feature['subMenu']['kanban'] = array('link' => "看板|custom|kanban|"); -$lang->admin->menuList->feature['subMenu']['doc'] = array('link' => "文档|custom|required|module=doc"); -$lang->admin->menuList->feature['subMenu']['feedback'] = array('link' => "反馈|custom|set|module=feedback"); -$lang->admin->menuList->feature['subMenu']['approval'] = array('link' => "审批|approvalflow|browse|", 'subModule' => 'approvalflow'); -$lang->admin->menuList->feature['subMenu']['measure'] = array('link' => "度量|measurement|settips|", 'subModule' => 'measurement'); -$lang->admin->menuList->feature['subMenu']['user'] = array('link' => "用户|custom|set|module=user"); -$lang->admin->menuList->feature['subMenu']['meetingroom'] = array('link' => "会议室|meetingroom|browse|", 'subModule' => 'meetingroom'); - -$lang->admin->menuList->feature['menuOrder']['5'] = 'my'; -$lang->admin->menuList->feature['menuOrder']['10'] = 'product'; -$lang->admin->menuList->feature['menuOrder']['15'] = 'execution'; -$lang->admin->menuList->feature['menuOrder']['20'] = 'qa'; -$lang->admin->menuList->feature['menuOrder']['25'] = 'kanban'; -$lang->admin->menuList->feature['menuOrder']['30'] = 'doc'; -$lang->admin->menuList->feature['menuOrder']['35'] = 'feedback'; -$lang->admin->menuList->feature['menuOrder']['40'] = 'approval'; -$lang->admin->menuList->feature['menuOrder']['45'] = 'measure'; -$lang->admin->menuList->feature['menuOrder']['50'] = 'user'; -$lang->admin->menuList->feature['menuOrder']['55'] = 'meetingroom'; - -$lang->admin->menuList->feature['dividerMenu'] = ',user,'; - -$lang->admin->menuList->template['subMenu']['type'] = array('link' => "模版类型|custom|set|module=baseline&field=objectList", 'subModule' => 'custom'); -$lang->admin->menuList->template['subMenu']['template'] = array('link' => "文档模版|baseline|template|", 'subModule' => 'baseline'); -$lang->admin->menuList->template['subMenu']['catalog'] = array('link' => "文档目录|baseline|catalog|", 'subModule' => 'baseline'); - -$lang->admin->menuList->template['menuOrder']['5'] = 'type'; -$lang->admin->menuList->template['menuOrder']['10'] = 'template'; -$lang->admin->menuList->template['menuOrder']['15'] = 'catalog'; - -$lang->admin->menuList->message['subMenu']['mail'] = array('link' => "邮件|mail|edit|", 'subModule' => 'mail'); -$lang->admin->menuList->message['subMenu']['webhook'] = array('link' => "Webhook|webhook|browse|", 'subModule' => 'webhook'); -$lang->admin->menuList->message['subMenu']['sms'] = array('link' => "短信|sms|index|", 'subModule' => 'sms'); -$lang->admin->menuList->message['subMenu']['message'] = array('link' => "浏览器|message|browser|"); -$lang->admin->menuList->message['subMenu']['setting'] = array('link' => "设置|message|setting|"); - -$lang->admin->menuList->message['menuOrder']['5'] = 'mail'; -$lang->admin->menuList->message['menuOrder']['10'] = 'webhook'; -$lang->admin->menuList->message['menuOrder']['15'] = 'sms'; -$lang->admin->menuList->message['menuOrder']['20'] = 'message'; -$lang->admin->menuList->message['menuOrder']['25'] = 'setting'; - -$lang->admin->menuList->dev['subMenu']['api'] = array('link' => "API|dev|api|"); -$lang->admin->menuList->dev['subMenu']['db'] = array('link' => "数据库|dev|db|"); -$lang->admin->menuList->dev['subMenu']['editor'] = array('link' => "编辑器|dev|editor|"); -$lang->admin->menuList->dev['subMenu']['entry'] = array('link' => "应用|entry|browse|", 'subModule' => 'entry'); - -$lang->admin->menuList->dev['menuOrder']['5'] = 'api'; -$lang->admin->menuList->dev['menuOrder']['10'] = 'db'; -$lang->admin->menuList->dev['menuOrder']['15'] = 'editor'; -$lang->admin->menuList->dev['menuOrder']['20'] = 'entry'; +include dirname(__FILE__) . '/menu.php'; diff --git a/module/admin/model.php b/module/admin/model.php index b28a53ebd1..41e0969e66 100755 --- a/module/admin/model.php +++ b/module/admin/model.php @@ -261,7 +261,7 @@ class adminModel extends model */ public function setMenu() { - $this->sortMenu(); + $this->checkPrivMenu(); $menuKey = $this->getMenuKey(); if(empty($menuKey)) return; @@ -276,70 +276,58 @@ class adminModel extends model } /** - * sort menu. + * Check priv menu. * * @access public * @return void */ - public function sortMenu() + public function checkPrivMenu() { - $orders = array(); - $disabled = array(); + $orders = array(); foreach($this->lang->admin->menuList as $menuKey => $menu) { $menu['disabled'] = false; - if(isset($menu['link'])) + if(!isset($menu['link'])) $menu['link'] = ''; + if(!empty($menu['link']) and strpos($menu['link'], '|') !== false) { list($module, $method) = explode('|', $menu['link']); $menu['link'] = helper::createLink($module, $method); if(!common::hasPriv($module, $method)) $menu['disabled'] = true; } - if(isset($menu['menuOrder'])) + $menuOrder = isset($menu['menuOrder']) ? $menu['menuOrder'] : array(); + if($menuOrder) { - $menuOrder = $menu['menuOrder']; ksort($menuOrder); + /* Check sub menu priv. */ + list($label, $module, $method, $params) = explode('|', $menu['subMenu'][$subMenuKey]['link']); foreach($menuOrder as $subOrder => $subMenuKey) { - list($label, $module, $method, $params) = explode('|', $menu['subMenu'][$subMenuKey]['link']); if(!common::hasPriv($module, $method)) unset($menuOrder[$subOrder]); } + /* Set link. */ if(!empty($menuOrder)) { $subMenuKey = reset($menuOrder); - list($label, $module, $method, $params) = explode('|', $menu['subMenu'][$subMenuKey]['link']); $menu['link'] = helper::createLink($module, $method, $params); } - if(empty($menuOrder)) $menu['disabled'] = true; } + if(empty($menuOrder) and empty($menu['link'])) $menu['disabled'] = true; $order = $menu['order']; $orders[$order] = $menuKey; - if($menu['disabled']) - { - unset($orders[$order]); - $disabled[$menuKey] = $menu; - } $this->lang->admin->menuList->$menuKey = $menu; } ksort($orders); $menuList = new stdclass(); - $index = 1; - foreach($orders as $menuKey) + foreach($orders as $index => $menuKey) { $menuList->$menuKey = $this->lang->admin->menuList->$menuKey; $menuList->$menuKey['order'] = $index; - $index++; - } - foreach($disabled as $menuKey => $menu) - { - $menuList->$menuKey = $menu; - $menuList->$menuKey['order'] = $index; - $index++; } $this->lang->admin->menuList = $menuList; @@ -385,7 +373,7 @@ class adminModel extends model * @access public * @return string */ - public function getSwitcher($currentMenuKey = 'setting') + public function getSwitcher($currentMenuKey = 'system') { if(empty($currentMenuKey)) return null; @@ -395,7 +383,7 @@ class adminModel extends model { $class = $menuKey == $currentMenuKey ? "class='active'" : ''; if($menuGroup['disabled']) $class .= ' disabled'; - $output .= "
  • " . html::a($menuGroup['link'], $menuGroup['name']) . "
  • "; + $output .= "
  • " . html::a($menuGroup['disabled'] ? '###' : $menuGroup['link'], $menuGroup['name']) . "
  • "; } $output .= "
    "; diff --git a/module/common/lang/de.php b/module/common/lang/de.php index 400a8dd593..f3f247a320 100644 --- a/module/common/lang/de.php +++ b/module/common/lang/de.php @@ -80,7 +80,7 @@ $lang->noData = 'Kein Datensatz'; $lang->fullscreen = 'Fullscreen'; $lang->retrack = 'Retrack'; $lang->whitelist = 'Weiße Liste'; -$lang->globalSetting = 'Global Setting'; +$lang->globalSetting = 'Common'; $lang->waterfallModel = 'Waterfall'; $lang->scrumModel = 'Scrum'; $lang->all = 'All'; @@ -248,7 +248,7 @@ $lang->indexPage = 'Index'; $lang->model = 'Model'; $lang->redev = 'Develop'; $lang->browser = 'Browser'; -$lang->db = 'Database'; +$lang->database = 'Database'; $lang->editor = 'Editor'; $lang->timezone = 'Timezone'; $lang->security = 'Security'; diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 7986be63c8..30eeff46b7 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -80,7 +80,7 @@ $lang->noData = 'No data.'; $lang->fullscreen = 'Fullscreen'; $lang->retrack = 'Retrack'; $lang->whitelist = 'Access whitelist'; -$lang->globalSetting = 'Global Setting'; +$lang->globalSetting = 'Common'; $lang->waterfallModel = 'Waterfall'; $lang->scrumModel = 'Scrum'; $lang->all = 'All'; @@ -248,7 +248,7 @@ $lang->indexPage = 'Index'; $lang->model = 'Model'; $lang->redev = 'Develop'; $lang->browser = 'Browser'; -$lang->db = 'Database'; +$lang->database = 'Database'; $lang->editor = 'Editor'; $lang->timezone = 'Timezone'; $lang->security = 'Security'; diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php index e5fffcfc7d..20c52b0b7d 100644 --- a/module/common/lang/fr.php +++ b/module/common/lang/fr.php @@ -80,7 +80,7 @@ $lang->noData = 'No data.'; $lang->fullscreen = 'Plein Ecran'; $lang->retrack = 'Réduire'; $lang->whitelist = 'Liste blanche'; -$lang->globalSetting = 'Global Setting'; +$lang->globalSetting = 'Common'; $lang->waterfallModel = 'Waterfall'; $lang->scrumModel = 'Scrum'; $lang->all = 'All'; @@ -248,7 +248,7 @@ $lang->indexPage = 'Index'; $lang->model = 'Model'; $lang->redev = 'Develop'; $lang->browser = 'Browser'; -$lang->db = 'Database'; +$lang->database = 'Database'; $lang->editor = 'Editor'; $lang->timezone = 'Timezone'; $lang->security = 'Security'; diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index 437636fe0c..c5b2aab74e 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -571,83 +571,7 @@ $lang->company->menuOrder[25] = 'batchAddUser'; $lang->company->menuOrder[30] = 'addUser'; /* Admin menu. */ -$lang->admin->menu = new stdclass(); -//$lang->admin->menu->index = array('link' => "$lang->indexPage|admin|index", 'alias' => 'register,certifytemail,certifyztmobile,ztcompany'); -//$lang->admin->menu->company = array('link' => "{$lang->personnel->common}|company|browse|", 'subModule' => ',user,dept,group,'); -//$lang->admin->menu->model = array('link' => "$lang->model|custom|browsestoryconcept|", 'class' => 'dropdown dropdown-hover', 'exclude' => 'custom-index,custom-set,custom-product,custom-execution,custom-kanban,custom-required,custom-flow,custom-score,custom-feedback,custom-timezone,custom-mode'); -//$lang->admin->menu->custom = array('link' => "{$lang->custom->common}|custom|index", 'exclude' => 'custom-browsestoryconcept,custom-timezone,custom-estimate,custom-code,custom-mode'); -//$lang->admin->menu->extension = array('link' => "{$lang->extension->common}|extension|browse", 'subModule' => 'extension'); -//$lang->admin->menu->dev = array('link' => "$lang->redev|dev|api", 'alias' => 'db', 'subModule' => 'dev,editor,entry'); -//$lang->admin->menu->message = array('link' => "{$lang->message->common}|message|index", 'subModule' => 'message,mail,webhook'); -//$lang->admin->menu->system = array('link' => "{$lang->admin->system}|custom|mode", 'subModule' => 'cron,backup,action,admin,search,convert', 'exclude' => 'admin-index,admin-xuanxuan,admin-register,admin-ztcompany'); -// -//$lang->admin->menu->model['dropMenu'] = new stdclass(); -//$lang->admin->menu->model['dropMenu']->allModel = array('link' => "{$lang->globalSetting}|custom|browsestoryconcept|", 'subModule' => 'measurement,report,sqlbuilder,subject,custom,meetingroom,baseline'); -// -//if($config->edition == 'max') $lang->admin->menu->model['dropMenu']->scrum = array('link' => "{$lang->scrumModel}|auditcl|scrumbrowse|processID=0&browseType=scrum", 'subModule' => 'auditcl,process,activity,zoutput,classify,'); -//$lang->admin->menu->model['dropMenu']->waterfall = array('link' => "{$lang->waterfallModel}|stage|setType|", 'subModule' => 'stage,auditcl,cmcl,process,activity,zoutput,classify,reviewcl,reviewsetting,design'); -// -//$lang->admin->menu->allModel['subMenu'] = new stdclass(); -//$lang->admin->menu->allModel['subMenu']->storyConcept = array('link' => "{$lang->storyConcept}|custom|browsestoryconcept|"); -//$lang->admin->menu->allModel['subMenu']->code = array('link' => "{$lang->code}|custom|code|"); -// -//$lang->admin->menu->allModel['menuOrder'][5] = 'storyConcept'; -//$lang->admin->menu->allModel['menuOrder'][30] = 'code'; -// -//$lang->admin->menu->waterfall['subMenu'] = new stdclass(); -//$lang->admin->menu->waterfall['subMenu']->stage = array('link' => "{$lang->stage->common}|stage|setType|", 'subModule' => 'stage'); -// -///* Admin menu order. */ -//$lang->admin->menuOrder[5] = 'index'; -//$lang->admin->menuOrder[10] = 'company'; -//$lang->admin->menuOrder[15] = 'model'; -//$lang->admin->menuOrder[20] = 'custom'; -//$lang->admin->menuOrder[25] = 'message'; -//$lang->admin->menuOrder[30] = 'extension'; -//$lang->admin->menuOrder[35] = 'dev'; -//$lang->admin->menuOrder[40] = 'system'; -// -//$lang->admin->menu->message['subMenu'] = new stdclass(); -//$lang->admin->menu->message['subMenu']->message = array(); -//$lang->admin->menu->message['subMenu']->mail = array('link' => "{$lang->mail->common}|mail|index", 'subModule' => 'mail'); -//$lang->admin->menu->message['subMenu']->webhook = array('link' => "Webhook|webhook|browse", 'subModule' => 'webhook'); -//$lang->admin->menu->message['subMenu']->browser = array('link' => "$lang->browser|message|browser"); -//$lang->admin->menu->message['subMenu']->setting = array('link' => "$lang->settings|message|setting"); -// -//$lang->admin->menu->message['menuOrder'][5] = 'mail'; -//$lang->admin->menu->message['menuOrder'][10] = 'webhook'; -//$lang->admin->menu->message['menuOrder'][15] = 'browser'; -//$lang->admin->menu->message['menuOrder'][20] = 'setting'; -// -//$lang->admin->menu->company['subMenu'] = new stdclass(); -//$lang->admin->menu->company['subMenu']->browseUser = array('link' => "{$lang->user->common}|company|browse", 'subModule' => 'user'); -//$lang->admin->menu->company['subMenu']->dept = array('link' => "{$lang->dept->common}|dept|browse", 'subModule' => 'dept'); -//$lang->admin->menu->company['subMenu']->browseGroup = array('link' => "{$lang->priv}|group|browse", 'subModule' => 'group'); -// -//$lang->admin->menu->dev['subMenu'] = new stdclass(); -//$lang->admin->menu->dev['subMenu']->api = array('link' => "API|dev|api"); -//$lang->admin->menu->dev['subMenu']->db = array('link' => "$lang->db|dev|db"); -//$lang->admin->menu->dev['subMenu']->editor = array('link' => "$lang->editor|dev|editor"); -//$lang->admin->menu->dev['subMenu']->entry = array('link' => "{$lang->admin->entry}|entry|browse", 'subModule' => 'entry'); -// -//$lang->admin->menu->dev['menuOrder'][5] = 'api'; -//$lang->admin->menu->dev['menuOrder'][10] = 'db'; -//$lang->admin->menu->dev['menuOrder'][15] = 'editor'; -//$lang->admin->menu->dev['menuOrder'][20] = 'entry'; -// -//$lang->admin->menu->system['subMenu'] = new stdclass(); -//$lang->admin->menu->system['subMenu']->mode = array('link' => "{$lang->custom->mode}|custom|mode"); -//$lang->admin->menu->system['subMenu']->setModule = array('link' => "{$lang->admin->module}|admin|setmodule"); -//$lang->admin->menu->system['subMenu']->backup = array('link' => "{$lang->backup->common}|backup|index"); -//$lang->admin->menu->system['subMenu']->trash = array('link' => "{$lang->action->trash}|action|trash"); -//$lang->admin->menu->system['subMenu']->safe = array('link' => "$lang->security|admin|safe", 'alias' => 'checkweak,resetpwdsetting'); -//$lang->admin->menu->system['subMenu']->cron = array('link' => "{$lang->admin->cron}|cron|index", 'subModule' => 'cron'); -//$lang->admin->menu->system['subMenu']->timezone = array('link' => "$lang->timezone|custom|timezone"); -//$lang->admin->menu->system['subMenu']->buildIndex = array('link' => "{$lang->admin->buildIndex}|search|buildindex|"); -//$lang->admin->menu->system['subMenu']->tableEngine = array('link' => "{$lang->admin->tableEngine}|admin|tableengine|"); -//if(version_compare(phpversion(), 5.6) > 0) $lang->admin->menu->system['subMenu']->convertJira = array('link' => "{$lang->convert->importJira}|convert|convertjira|", 'subModule' => 'convert'); -// -//$lang->admin->dividerMenu = ',company,message,system,'; +$lang->admin->menu = new stdclass(); $lang->subject->menu = new stdclass(); $lang->subject->menu->storyConcept = array('link' => "{$lang->storyConcept}|custom|browsestoryconcept|"); diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index de9520beef..3cc4ed7fc8 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -80,7 +80,7 @@ $lang->noData = '暂无'; $lang->fullscreen = '全屏'; $lang->retrack = '收起'; $lang->whitelist = '访问白名单'; -$lang->globalSetting = '全局设置'; +$lang->globalSetting = '通用'; $lang->waterfallModel = '瀑布模型'; $lang->scrumModel = '敏捷模型'; $lang->all = '所有'; @@ -248,7 +248,7 @@ $lang->indexPage = '首页'; $lang->model = '模型'; $lang->redev = '二次开发'; $lang->browser = '浏览器'; -$lang->db = '数据库'; +$lang->database = '数据库'; $lang->editor = '编辑器'; $lang->timezone = '时区'; $lang->security = '安全'; diff --git a/module/search/control.php b/module/search/control.php index fc3594ff97..470b8b8775 100644 --- a/module/search/control.php +++ b/module/search/control.php @@ -197,8 +197,6 @@ class search extends control } $this->lang->navGroup->search = 'admin'; - $this->lang->search->menu = $this->lang->admin->menu; - $this->lang->search->menuOrder = $this->lang->admin->menuOrder; $this->view->title = $this->lang->search->buildIndex; $this->display(); diff --git a/xuanxuan/extension/xuan/admin/ext/lang/de/xuanxuan.php b/xuanxuan/extension/xuan/admin/ext/lang/de/xuanxuan.php index 4a945d126c..332adc1cc0 100644 --- a/xuanxuan/extension/xuan/admin/ext/lang/de/xuanxuan.php +++ b/xuanxuan/extension/xuan/admin/ext/lang/de/xuanxuan.php @@ -21,3 +21,10 @@ $lang->admin->sizeType = array(); $lang->admin->sizeType['K'] = 1024; $lang->admin->sizeType['M'] = 1024 * 1024; $lang->admin->sizeType['G'] = 1024 * 1024 * 1024; + +global $config; +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'; +} diff --git a/xuanxuan/extension/xuan/admin/ext/lang/en/xuanxuan.php b/xuanxuan/extension/xuan/admin/ext/lang/en/xuanxuan.php index 4a945d126c..332adc1cc0 100644 --- a/xuanxuan/extension/xuan/admin/ext/lang/en/xuanxuan.php +++ b/xuanxuan/extension/xuan/admin/ext/lang/en/xuanxuan.php @@ -21,3 +21,10 @@ $lang->admin->sizeType = array(); $lang->admin->sizeType['K'] = 1024; $lang->admin->sizeType['M'] = 1024 * 1024; $lang->admin->sizeType['G'] = 1024 * 1024 * 1024; + +global $config; +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'; +} diff --git a/xuanxuan/extension/xuan/admin/ext/lang/fr/xuanxuan.php b/xuanxuan/extension/xuan/admin/ext/lang/fr/xuanxuan.php index 4a945d126c..332adc1cc0 100644 --- a/xuanxuan/extension/xuan/admin/ext/lang/fr/xuanxuan.php +++ b/xuanxuan/extension/xuan/admin/ext/lang/fr/xuanxuan.php @@ -21,3 +21,10 @@ $lang->admin->sizeType = array(); $lang->admin->sizeType['K'] = 1024; $lang->admin->sizeType['M'] = 1024 * 1024; $lang->admin->sizeType['G'] = 1024 * 1024 * 1024; + +global $config; +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'; +} diff --git a/xuanxuan/extension/xuan/admin/ext/lang/zh-cn/xuanxuan.php b/xuanxuan/extension/xuan/admin/ext/lang/zh-cn/xuanxuan.php index 1e7555aefa..ab4ae61356 100644 --- a/xuanxuan/extension/xuan/admin/ext/lang/zh-cn/xuanxuan.php +++ b/xuanxuan/extension/xuan/admin/ext/lang/zh-cn/xuanxuan.php @@ -25,6 +25,6 @@ $lang->admin->sizeType['G'] = 1024 * 1024 * 1024; global $config; if($config->vision != 'lite') { - $lang->admin->menuList->setting['subMenu']['xuanxuan'] = array('link' => '聊天|admin|xuanxuan|', 'subModule' => 'client,setting'); - $lang->admin->menuList->setting['menuOrder']['20'] = 'xuanxuan'; + $lang->admin->menuList->system['subMenu']['xuanxuan'] = array('link' => '聊天|admin|xuanxuan|', 'subModule' => 'client,setting'); + $lang->admin->menuList->system['menuOrder']['20'] = 'xuanxuan'; } diff --git a/xuanxuan/extension/xuan/common/ext/lang/de/xuanxuan.php b/xuanxuan/extension/xuan/common/ext/lang/de/xuanxuan.php index 0a0bac6bf5..f83f28956d 100644 --- a/xuanxuan/extension/xuan/common/ext/lang/de/xuanxuan.php +++ b/xuanxuan/extension/xuan/common/ext/lang/de/xuanxuan.php @@ -1,28 +1,22 @@ xuanxuan = new stdclass(); -if($config->vision != 'lite') -{ - $lang->admin->menu->xuanxuan = array('link' => 'Desktop|admin|xuanxuan', 'subModule' => 'client,setting'); - $lang->admin->menuOrder[6] = 'xuanxuan'; -} - -$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'; +//$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'; -} +//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'; diff --git a/xuanxuan/extension/xuan/common/ext/lang/en/xuanxuan.php b/xuanxuan/extension/xuan/common/ext/lang/en/xuanxuan.php index 0a0bac6bf5..f83f28956d 100644 --- a/xuanxuan/extension/xuan/common/ext/lang/en/xuanxuan.php +++ b/xuanxuan/extension/xuan/common/ext/lang/en/xuanxuan.php @@ -1,28 +1,22 @@ xuanxuan = new stdclass(); -if($config->vision != 'lite') -{ - $lang->admin->menu->xuanxuan = array('link' => 'Desktop|admin|xuanxuan', 'subModule' => 'client,setting'); - $lang->admin->menuOrder[6] = 'xuanxuan'; -} - -$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'; +//$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'; -} +//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'; diff --git a/xuanxuan/extension/xuan/common/ext/lang/fr/xuanxuan.php b/xuanxuan/extension/xuan/common/ext/lang/fr/xuanxuan.php index 0a0bac6bf5..f83f28956d 100644 --- a/xuanxuan/extension/xuan/common/ext/lang/fr/xuanxuan.php +++ b/xuanxuan/extension/xuan/common/ext/lang/fr/xuanxuan.php @@ -1,28 +1,22 @@ xuanxuan = new stdclass(); -if($config->vision != 'lite') -{ - $lang->admin->menu->xuanxuan = array('link' => 'Desktop|admin|xuanxuan', 'subModule' => 'client,setting'); - $lang->admin->menuOrder[6] = 'xuanxuan'; -} - -$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'; +//$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'; -} +//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'; From e91e8312b53b3860cf65d2b978f417b45c7dedcf Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 1 Feb 2023 13:20:49 +0800 Subject: [PATCH 079/499] * fix bug. --- module/admin/model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/admin/model.php b/module/admin/model.php index 23888d990f..2e4feecb59 100755 --- a/module/admin/model.php +++ b/module/admin/model.php @@ -301,9 +301,9 @@ class adminModel extends model ksort($menuOrder); /* Check sub menu priv. */ - list($label, $module, $method, $params) = explode('|', $menu['subMenu'][$subMenuKey]['link']); foreach($menuOrder as $subOrder => $subMenuKey) { + list($label, $module, $method, $params) = explode('|', $menu['subMenu'][$subMenuKey]['link']); if(!common::hasPriv($module, $method)) unset($menuOrder[$subOrder]); } @@ -311,6 +311,7 @@ class adminModel extends model if(!empty($menuOrder)) { $subMenuKey = reset($menuOrder); + list($label, $module, $method, $params) = explode('|', $menu['subMenu'][$subMenuKey]['link']); $menu['link'] = helper::createLink($module, $method, $params); } } From 88c564634efb8efd3931d2cc4927f7cfc7e32c53 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 1 Feb 2023 13:40:08 +0800 Subject: [PATCH 080/499] * Optimize class style. --- module/admin/config.php | 10 ++++++++++ module/admin/css/index.css | 12 ++++++------ module/admin/model.php | 2 +- module/admin/view/index.html.php | 6 +++--- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/module/admin/config.php b/module/admin/config.php index 5d9dc5023d..7652aef470 100755 --- a/module/admin/config.php +++ b/module/admin/config.php @@ -58,3 +58,13 @@ $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->helpURL['setting'] = 'https://www.zentao.net/book/zentaopms/538.html'; +$config->admin->helpURL['user'] = 'https://www.zentao.net/book/zentaopms/538.html'; +$config->admin->helpURL['switch'] = 'https://www.zentao.net/book/zentaopms/538.html'; +$config->admin->helpURL['model'] = 'https://www.zentao.net/book/zentaopms/533.html'; +$config->admin->helpURL['feature'] = 'https://www.zentao.net/book/zentaopms/538.html'; +$config->admin->helpURL['template'] = 'https://www.zentao.net/book/zentaopms/538.html'; +$config->admin->helpURL['message'] = 'https://www.zentao.net/book/zentaopms/email-notification-541.html'; +$config->admin->helpURL['extension'] = 'https://www.zentao.net/book/zentaopms/536.html'; +$config->admin->helpURL['dev'] = 'https://www.zentao.net/book/zentaopms/537.html'; +$config->admin->helpURL['convert'] = 'https://www.zentao.net/book/zentaopms/656.html'; diff --git a/module/admin/css/index.css b/module/admin/css/index.css index 4e40802b34..6ddcdbe125 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -26,13 +26,13 @@ .official {justify-content: center;} .official > .panel-title {position: absolute; top: 0px;} -.official-img {background-image: url('/static/images/wechat.jpg'); background-repeat: no-repeat; background-size: contain; flex: 1 1 50%; aspect-ratio: 1 / 1; background-position: center;} -.official-content {flex: 0 0 50%; display: flex; flex-direction: column; justify-content: center;} +.official-img {background-image: url('/static/images/wechat.jpg'); background-repeat: no-repeat; background-size: contain; flex: 1 1 30%; aspect-ratio: 1 / 1; background-position: center;} +.official-content {flex: 0 0 60%; display: flex; flex-direction: column; justify-content: center; padding-left: 10px;} .official-content > .content {color: #838A9D; font-size: 12px;} .official-content > .title {color: #313C52; font-size: 13px;} -.classList > .classItem {flex: 1 1 30%; margin: 5px;} -.classItem > .imgBack {flex: 1 1 50%; background: #C8EDFF;} -.classItem > .imgBack > .classImg {background-repeat: no-repeat; background-size: contain; aspect-ratio: 1 / 1; background-position: center; margin: 0 20px;} -.classItem > .classContent {flex: 1 1 50%; padding: 5px; font-size: 14px; color: #0B0F18; text-align: center; overflow: hidden; height: 24px; font-weight: 700;} +.classList > .classItem {flex: 1 1 30%; margin: 5px; border: 1px solid #E3E4E9; border-radius: 4px; margin-bottom: 16px;} +.classItem > .imgBack {flex: 1 1 50%;} +.classItem > .imgBack > .classImg {background-repeat: no-repeat; background-size: contain; aspect-ratio: 16 / 9;} +.classItem > .classContent {flex: 1 1 50%; padding: 5px; font-size: 14px; color: #0B0F18; text-align: center; overflow: hidden; height: 30px; line-height: 22px; font-weight: 700;} .more {float: right; padding-right: 12px; font-weight: normal;} diff --git a/module/admin/model.php b/module/admin/model.php index 8f1802145d..11c636d2a9 100755 --- a/module/admin/model.php +++ b/module/admin/model.php @@ -485,7 +485,7 @@ class adminModel extends model $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 . "{$course->alias}-{$course->id}.html"; + $publicClass[$index]->viewLink = $this->config->admin->apiRoot . 'publicclass/' . ($course->alias ? "{$course->alias}-" : '') . "{$course->id}.html"; $index ++; } return $publicClass; diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index a5f529e9db..3732407162 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -17,11 +17,11 @@
    admin->setting?>
    - admin->menuList as $menu):?> + admin->menuList as $menuKey => $menu):?>

    - {$lang->help}", '_blank', 'class="text-muted setting-help"');?> + admin->helpURL[$menuKey], " {$lang->help}", '_blank', 'class="text-muted setting-help"');?>
    @@ -65,7 +65,7 @@
    - +
    From 3e386ba9c84f15a5cf498eb51598ef13249050e2 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Wed, 1 Feb 2023 13:50:27 +0800 Subject: [PATCH 081/499] * code for svg and handle conflict --- module/admin/css/index.css | 4 ++-- www/static/svg/admin-convert.svg | 4 ++++ www/static/svg/admin-dev.svg | 3 +++ www/static/svg/admin-extension.svg | 3 +++ www/static/svg/admin-feature.svg | 3 +++ www/static/svg/admin-message.svg | 3 +++ www/static/svg/admin-model.svg | 3 +++ www/static/svg/admin-setting.svg | 3 +++ www/static/svg/admin-switch.svg | 3 +++ www/static/svg/admin-template.svg | 3 +++ www/static/svg/admin-user.svg | 3 +++ 11 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 www/static/svg/admin-convert.svg create mode 100644 www/static/svg/admin-dev.svg create mode 100644 www/static/svg/admin-extension.svg create mode 100644 www/static/svg/admin-feature.svg create mode 100644 www/static/svg/admin-message.svg create mode 100644 www/static/svg/admin-model.svg create mode 100644 www/static/svg/admin-setting.svg create mode 100644 www/static/svg/admin-switch.svg create mode 100644 www/static/svg/admin-template.svg create mode 100644 www/static/svg/admin-user.svg diff --git a/module/admin/css/index.css b/module/admin/css/index.css index 6ddcdbe125..682431828d 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -31,8 +31,8 @@ .official-content > .content {color: #838A9D; font-size: 12px;} .official-content > .title {color: #313C52; font-size: 13px;} -.classList > .classItem {flex: 1 1 30%; margin: 5px; border: 1px solid #E3E4E9; border-radius: 4px; margin-bottom: 16px;} +.classList > .classItem {flex: 1 1 30%; margin: 5px; border: 1px solid #E3E4E9; border-radius: 4px; margin-bottom: 16px; align-items: center;} .classItem > .imgBack {flex: 1 1 50%;} -.classItem > .imgBack > .classImg {background-repeat: no-repeat; background-size: contain; aspect-ratio: 16 / 9;} +.classItem > .imgBack > .classImg {background-repeat: no-repeat; background-size: contain; aspect-ratio: 16 / 9; background-position: center; margin: 5px;} .classItem > .classContent {flex: 1 1 50%; padding: 5px; font-size: 14px; color: #0B0F18; text-align: center; overflow: hidden; height: 30px; line-height: 22px; font-weight: 700;} .more {float: right; padding-right: 12px; font-weight: normal;} diff --git a/www/static/svg/admin-convert.svg b/www/static/svg/admin-convert.svg new file mode 100644 index 0000000000..b1c768404e --- /dev/null +++ b/www/static/svg/admin-convert.svg @@ -0,0 +1,4 @@ + + + + diff --git a/www/static/svg/admin-dev.svg b/www/static/svg/admin-dev.svg new file mode 100644 index 0000000000..109dd69809 --- /dev/null +++ b/www/static/svg/admin-dev.svg @@ -0,0 +1,3 @@ + + + diff --git a/www/static/svg/admin-extension.svg b/www/static/svg/admin-extension.svg new file mode 100644 index 0000000000..ec7252642a --- /dev/null +++ b/www/static/svg/admin-extension.svg @@ -0,0 +1,3 @@ + + + diff --git a/www/static/svg/admin-feature.svg b/www/static/svg/admin-feature.svg new file mode 100644 index 0000000000..c1970dee4f --- /dev/null +++ b/www/static/svg/admin-feature.svg @@ -0,0 +1,3 @@ + + + diff --git a/www/static/svg/admin-message.svg b/www/static/svg/admin-message.svg new file mode 100644 index 0000000000..eaf9c09e4a --- /dev/null +++ b/www/static/svg/admin-message.svg @@ -0,0 +1,3 @@ + + + diff --git a/www/static/svg/admin-model.svg b/www/static/svg/admin-model.svg new file mode 100644 index 0000000000..3906e5484d --- /dev/null +++ b/www/static/svg/admin-model.svg @@ -0,0 +1,3 @@ + + + diff --git a/www/static/svg/admin-setting.svg b/www/static/svg/admin-setting.svg new file mode 100644 index 0000000000..a3ef612ac7 --- /dev/null +++ b/www/static/svg/admin-setting.svg @@ -0,0 +1,3 @@ + + + diff --git a/www/static/svg/admin-switch.svg b/www/static/svg/admin-switch.svg new file mode 100644 index 0000000000..c7b0d150dd --- /dev/null +++ b/www/static/svg/admin-switch.svg @@ -0,0 +1,3 @@ + + + diff --git a/www/static/svg/admin-template.svg b/www/static/svg/admin-template.svg new file mode 100644 index 0000000000..cc5862d186 --- /dev/null +++ b/www/static/svg/admin-template.svg @@ -0,0 +1,3 @@ + + + diff --git a/www/static/svg/admin-user.svg b/www/static/svg/admin-user.svg new file mode 100644 index 0000000000..a9f8169530 --- /dev/null +++ b/www/static/svg/admin-user.svg @@ -0,0 +1,3 @@ + + + From bbb4c36827df8297b5f74a315bf6b4b1a0acb6aa Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 1 Feb 2023 14:01:05 +0800 Subject: [PATCH 082/499] * Optimiza page style. --- module/admin/css/index.css | 1 + 1 file changed, 1 insertion(+) diff --git a/module/admin/css/index.css b/module/admin/css/index.css index 682431828d..f8ef34da91 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -36,3 +36,4 @@ .classItem > .imgBack > .classImg {background-repeat: no-repeat; background-size: contain; aspect-ratio: 16 / 9; background-position: center; margin: 5px;} .classItem > .classContent {flex: 1 1 50%; padding: 5px; font-size: 14px; color: #0B0F18; text-align: center; overflow: hidden; height: 30px; line-height: 22px; font-weight: 700;} .more {float: right; padding-right: 12px; font-weight: normal;} +.panel.publicClass {padding: 0 10px;} From 8daa3273d0031f7089041174115bcd0d996e5875 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Wed, 1 Feb 2023 14:05:23 +0800 Subject: [PATCH 083/499] * code for css in setting-box --- module/admin/css/index.css | 3 ++- module/admin/view/index.html.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/admin/css/index.css b/module/admin/css/index.css index f8ef34da91..4d098d99b6 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -11,7 +11,8 @@ .settings.panel, .plug.panel {margin-bottom: 16px;} .settings-list {display: flex; flex-wrap: wrap; padding: 0 4px 16px 4px;} -.settings-list > .setting-box {flex: 1 1 18%; padding: 8px; border: 1px solid #E3E4E9; margin-right: 10px; margin-top: 16px;} +.settings-list > .setting-box {flex: 1 1 18%; padding: 8px; border: 1px solid #E3E4E9; margin-right: 10px; margin-top: 16px; display: flex; flex-direction: column; justify-content: space-between} +.settings-list > .setting-box > h4 > img {padding-right: 16px;} .settings-list > .setting-box > .setting-desc {padding-bottom: 16px;} .plugin-list {display: flex; flex-wrap: wrap; padding: 12px 4px 4px 4px;} diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index 3732407162..79e67fc1e8 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -19,7 +19,7 @@
    admin->menuList as $menuKey => $menu):?>
    -

    +

    admin->helpURL[$menuKey], " {$lang->help}", '_blank', 'class="text-muted setting-help"');?>
    From a56ebbab5750390e9a3840dcb8d7c4c5fb2be1ac Mon Sep 17 00:00:00 2001 From: guofeilong Date: Wed, 1 Feb 2023 14:07:20 +0800 Subject: [PATCH 084/499] * change svg name --- www/static/svg/{admin-setting.svg => admin-system.svg} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename www/static/svg/{admin-setting.svg => admin-system.svg} (100%) diff --git a/www/static/svg/admin-setting.svg b/www/static/svg/admin-system.svg similarity index 100% rename from www/static/svg/admin-setting.svg rename to www/static/svg/admin-system.svg From 9f7d184aaa54feff87b545401d49cd88d65950c2 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 1 Feb 2023 14:22:47 +0800 Subject: [PATCH 085/499] * Modify system block style. --- module/admin/config.php | 2 +- module/admin/css/index.css | 2 +- module/admin/js/index.js | 10 ++++++++++ module/admin/view/index.html.php | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 module/admin/js/index.js diff --git a/module/admin/config.php b/module/admin/config.php index 69836737b0..f86f03b0f5 100755 --- a/module/admin/config.php +++ b/module/admin/config.php @@ -58,7 +58,7 @@ $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->helpURL['setting'] = 'https://www.zentao.net/book/zentaopms/538.html'; +$config->admin->helpURL['system'] = 'https://www.zentao.net/book/zentaopms/538.html'; $config->admin->helpURL['user'] = 'https://www.zentao.net/book/zentaopms/538.html'; $config->admin->helpURL['switch'] = 'https://www.zentao.net/book/zentaopms/538.html'; $config->admin->helpURL['model'] = 'https://www.zentao.net/book/zentaopms/533.html'; diff --git a/module/admin/css/index.css b/module/admin/css/index.css index 4d098d99b6..bec672d81e 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -11,7 +11,7 @@ .settings.panel, .plug.panel {margin-bottom: 16px;} .settings-list {display: flex; flex-wrap: wrap; padding: 0 4px 16px 4px;} -.settings-list > .setting-box {flex: 1 1 18%; padding: 8px; border: 1px solid #E3E4E9; margin-right: 10px; margin-top: 16px; display: flex; flex-direction: column; justify-content: space-between} +.settings-list > .setting-box {flex: 1 1 18%; padding: 8px; border: 1px solid #E3E4E9; margin-right: 10px; margin-top: 16px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer;} .settings-list > .setting-box > h4 > img {padding-right: 16px;} .settings-list > .setting-box > .setting-desc {padding-bottom: 16px;} diff --git a/module/admin/js/index.js b/module/admin/js/index.js new file mode 100644 index 0000000000..13f5dd6f7b --- /dev/null +++ b/module/admin/js/index.js @@ -0,0 +1,10 @@ +$(function() +{ + $(document).on('click', '.setting-box', function() + { + location.href = $(this).data('link'); + }).on('click', '.setting-box a', function(e) + { + e.stopPropagation(); + }); +}); diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index 79e67fc1e8..b51dccd305 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -18,7 +18,7 @@
    admin->setting?>
    admin->menuList as $menuKey => $menu):?> -
    +
    '>

    admin->helpURL[$menuKey], " {$lang->help}", '_blank', 'class="text-muted setting-help"');?> From 04000584544d661b7331852cf55635329a069cd5 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Wed, 1 Feb 2023 14:43:39 +0800 Subject: [PATCH 086/499] * code for add css --- module/admin/css/index.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/admin/css/index.css b/module/admin/css/index.css index bec672d81e..dd554b6acc 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -12,7 +12,7 @@ .settings-list {display: flex; flex-wrap: wrap; padding: 0 4px 16px 4px;} .settings-list > .setting-box {flex: 1 1 18%; padding: 8px; border: 1px solid #E3E4E9; margin-right: 10px; margin-top: 16px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer;} -.settings-list > .setting-box > h4 > img {padding-right: 16px;} +.settings-list > .setting-box > h4 > img {padding-right: 10px; padding-bottom: 3px;} .settings-list > .setting-box > .setting-desc {padding-bottom: 16px;} .plugin-list {display: flex; flex-wrap: wrap; padding: 12px 4px 4px 4px;} From a171190cfc9dfc20112184289c1928adbdca8e7e Mon Sep 17 00:00:00 2001 From: liumengyi Date: Wed, 1 Feb 2023 14:49:18 +0800 Subject: [PATCH 087/499] * Finish task #83508. --- db/zentaopms284.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db/zentaopms284.sql b/db/zentaopms284.sql index 76de9b3bf4..f1998a2946 100644 --- a/db/zentaopms284.sql +++ b/db/zentaopms284.sql @@ -1 +1,4 @@ update `zt_task` set `assignedTo` = '' where `mode` = 'multi' and `status` != 'done' and `status` != 'closed'; + +REPLACE INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`, `vision`) SELECT `lang`, `module`, 'scrumClassify', `key`, `value`, `system`, `vision` FROM `zt_lang` WHERE `module` = 'process' and `section` = 'classify' ORDER BY id ASC; +REPLACE INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`, `vision`) SELECT `lang`, `module`, 'agileplusClassify', `key`, `value`, `system`, `vision` FROM `zt_lang` WHERE `module` = 'process' and `section` = 'classify' ORDER BY id ASC; From 78290d812fa8f8d583f575e21ea9cadbb05dbd13 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 1 Feb 2023 14:50:02 +0800 Subject: [PATCH 088/499] * Optimize class style. --- module/admin/css/index.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/admin/css/index.css b/module/admin/css/index.css index bec672d81e..24eb85239b 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -34,7 +34,7 @@ .classList > .classItem {flex: 1 1 30%; margin: 5px; border: 1px solid #E3E4E9; border-radius: 4px; margin-bottom: 16px; 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: 5px;} -.classItem > .classContent {flex: 1 1 50%; padding: 5px; font-size: 14px; color: #0B0F18; text-align: center; overflow: hidden; height: 30px; line-height: 22px; font-weight: 700;} +.classItem > .imgBack > .classImg {background-repeat: no-repeat; background-size: contain; aspect-ratio: 16 / 9; background-position: center; margin: 0px; border-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;} From 84905c803d0ade9be1f3f86c52f5b0edfc5bed8e Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 1 Feb 2023 15:05:58 +0800 Subject: [PATCH 089/499] * code for task #83428. --- extension/lite/common/ext/lang/de/lite.php | 94 ------------------ extension/lite/common/ext/lang/en/lite.php | 94 ------------------ extension/lite/common/ext/lang/fr/lite.php | 94 ------------------ extension/lite/common/ext/lang/zh-cn/lite.php | 96 ------------------- module/admin/lang/menu.php | 14 ++- module/custom/view/required.html.php | 7 ++ module/custom/view/set.html.php | 13 ++- 7 files changed, 29 insertions(+), 383 deletions(-) diff --git a/extension/lite/common/ext/lang/de/lite.php b/extension/lite/common/ext/lang/de/lite.php index 0a74146ca0..ef7b1da49c 100644 --- a/extension/lite/common/ext/lang/de/lite.php +++ b/extension/lite/common/ext/lang/de/lite.php @@ -143,81 +143,6 @@ $lang->doc->menuOrder[30] = 'custom'; $lang->doc->menu->project['subMenu'] = new stdclass(); $lang->doc->menu->custom['subMenu'] = new stdclass(); -if(isset($lang->admin->menu->xuanxuan)) $xuanxuanMenu = $lang->admin->menu->xuanxuan; -/* Admin menu. */ -$lang->admin->menu = new stdclass(); -$lang->admin->menu->index = array('link' => "$lang->indexPage|admin|index", 'alias' => 'register,certifytemail,certifyztmobile,ztcompany'); -if(isset($xuanxuanMenu)) $lang->admin->menu->xuanxuan = $xuanxuanMenu; -$lang->admin->menu->company = array('link' => "{$lang->personnel->common}|company|browse|", 'subModule' => ',user,dept,group,'); -$lang->admin->menu->custom = array('link' => "{$lang->custom->common}|custom|index", 'exclude' => 'custom-browsestoryconcept,custom-timezone,custom-estimate'); -$lang->admin->menu->extension = array('link' => "{$lang->extension->common}|extension|browse", 'subModule' => 'extension'); -$lang->admin->menu->dev = array('link' => "$lang->redev|dev|api", 'alias' => 'db', 'subModule' => 'dev,editor,entry'); -$lang->admin->menu->message = array('link' => "{$lang->message->common}|message|index", 'subModule' => 'message,mail,webhook,sms'); -$lang->admin->menu->system = array('link' => "{$lang->admin->system}|backup|index", 'subModule' => 'cron,backup,action,admin,search,ldap', 'exclude' => 'admin-index,admin-xuanxuan,admin-register,admin-ztcompany'); - -if($config->vision != 'lite') $lang->admin->menu->xuanxuan['link'] = 'Chat|admin|xuanxuan'; - -/* Admin menu order. */ -$lang->admin->menuOrder = array(); -$lang->admin->menuOrder[5] = 'index'; -$lang->admin->menuOrder[6] = 'xuanxuan'; -$lang->admin->menuOrder[10] = 'company'; -$lang->admin->menuOrder[15] = 'custom'; -$lang->admin->menuOrder[20] = 'message'; -$lang->admin->menuOrder[25] = 'extension'; -$lang->admin->menuOrder[30] = 'dev'; -$lang->admin->menuOrder[35] = 'system'; - -$lang->admin->menu->message['subMenu'] = new stdclass(); -$lang->admin->menu->message['subMenu']->message = array(); -$lang->admin->menu->message['subMenu']->mail = array('link' => "{$lang->mail->common}|mail|index", 'subModule' => 'mail'); -$lang->admin->menu->message['subMenu']->webhook = array('link' => "Webhook|webhook|browse", 'subModule' => 'webhook'); - -if($config->edition != 'open') $lang->admin->menu->message['subMenu']->sms = array('link' => "Message|sms|index"); - -$lang->admin->menu->message['subMenu']->browser = array('link' => "$lang->browser|message|browser"); -$lang->admin->menu->message['subMenu']->setting = array('link' => "$lang->settings|message|setting"); - -$lang->admin->menu->message['menuOrder'][5] = 'mail'; -$lang->admin->menu->message['menuOrder'][10] = 'webhook'; -$lang->admin->menu->message['menuOrder'][11] = 'sms'; -$lang->admin->menu->message['menuOrder'][15] = 'browser'; -$lang->admin->menu->message['menuOrder'][20] = 'setting'; - -$lang->admin->menu->company['subMenu'] = new stdclass(); -$lang->admin->menu->company['subMenu']->browseUser = array('link' => "{$lang->user->common}|company|browse", 'subModule' => 'user'); -$lang->admin->menu->company['subMenu']->dept = array('link' => "{$lang->dept->common}|dept|browse", 'subModule' => 'dept'); -$lang->admin->menu->company['subMenu']->browseGroup = array('link' => "{$lang->priv}|group|browse", 'subModule' => 'group'); - -$lang->admin->menu->dev['subMenu'] = new stdclass(); -$lang->admin->menu->dev['subMenu']->api = array('link' => "API|dev|api"); -$lang->admin->menu->dev['subMenu']->db = array('link' => "$lang->db|dev|db"); -$lang->admin->menu->dev['subMenu']->editor = array('link' => "$lang->editor|dev|editor"); -$lang->admin->menu->dev['subMenu']->entry = array('link' => "{$lang->admin->entry}|entry|browse", 'subModule' => 'entry'); - -$lang->admin->menu->dev['menuOrder'][5] = 'api'; -$lang->admin->menu->dev['menuOrder'][10] = 'db'; -$lang->admin->menu->dev['menuOrder'][15] = 'editor'; -$lang->admin->menu->dev['menuOrder'][20] = 'entry'; - -$lang->admin->menu->system['subMenu'] = new stdclass(); -$lang->admin->menu->system['subMenu']->data = array('link' => "{$lang->admin->data}|backup|index", 'subModule' => 'action'); -$lang->admin->menu->system['subMenu']->safe = array('link' => "$lang->security|admin|safe", 'alias' => 'checkweak'); -$lang->admin->menu->system['subMenu']->cron = array('link' => "{$lang->admin->cron}|cron|index", 'subModule' => 'cron'); -$lang->admin->menu->system['subMenu']->timezone = array('link' => "$lang->timezone|custom|timezone"); -$lang->admin->menu->system['subMenu']->buildIndex = array('link' => "{$lang->admin->buildIndex}|search|buildindex|"); - -if($config->visions == ',lite,' and $config->edition != 'open') $lang->admin->menu->system['subMenu']->license = array('link' => "License|admin|license'", 'alias' => 'license'); -if($config->visions != ',lite,') unset($lang->admin->menu->system['subMenu']->buildIndex); - -if($config->edition != 'open') -{ - $lang->admin->menu->system['subMenu']->ldap = array('link' => 'LDAP|ldap|set', 'subModule' => 'ldap'); - $lang->admin->menu->system['subMenu']->libreoffice = array('link' => 'Office|custom|libreoffice'); -} - -$lang->admin->dividerMenu = ',company,message,system,'; - /* adjust items of search. */ $lang->searchObjects['all'] = 'All'; $lang->searchObjects['todo'] = 'Todo'; @@ -275,25 +200,6 @@ global $config; if(isset($config->xuanxuan) && strpos($config->visions, ',rnd,') === false) { $lang->xuanxuan = new stdclass(); - $lang->admin->menu->xuanxuan = array('link' => 'Chat|admin|xuanxuan', 'subModule' => 'client,setting'); - $lang->admin->menuOrder[6] = 'xuanxuan'; - - $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'; - - 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'; diff --git a/extension/lite/common/ext/lang/en/lite.php b/extension/lite/common/ext/lang/en/lite.php index 0a74146ca0..ef7b1da49c 100644 --- a/extension/lite/common/ext/lang/en/lite.php +++ b/extension/lite/common/ext/lang/en/lite.php @@ -143,81 +143,6 @@ $lang->doc->menuOrder[30] = 'custom'; $lang->doc->menu->project['subMenu'] = new stdclass(); $lang->doc->menu->custom['subMenu'] = new stdclass(); -if(isset($lang->admin->menu->xuanxuan)) $xuanxuanMenu = $lang->admin->menu->xuanxuan; -/* Admin menu. */ -$lang->admin->menu = new stdclass(); -$lang->admin->menu->index = array('link' => "$lang->indexPage|admin|index", 'alias' => 'register,certifytemail,certifyztmobile,ztcompany'); -if(isset($xuanxuanMenu)) $lang->admin->menu->xuanxuan = $xuanxuanMenu; -$lang->admin->menu->company = array('link' => "{$lang->personnel->common}|company|browse|", 'subModule' => ',user,dept,group,'); -$lang->admin->menu->custom = array('link' => "{$lang->custom->common}|custom|index", 'exclude' => 'custom-browsestoryconcept,custom-timezone,custom-estimate'); -$lang->admin->menu->extension = array('link' => "{$lang->extension->common}|extension|browse", 'subModule' => 'extension'); -$lang->admin->menu->dev = array('link' => "$lang->redev|dev|api", 'alias' => 'db', 'subModule' => 'dev,editor,entry'); -$lang->admin->menu->message = array('link' => "{$lang->message->common}|message|index", 'subModule' => 'message,mail,webhook,sms'); -$lang->admin->menu->system = array('link' => "{$lang->admin->system}|backup|index", 'subModule' => 'cron,backup,action,admin,search,ldap', 'exclude' => 'admin-index,admin-xuanxuan,admin-register,admin-ztcompany'); - -if($config->vision != 'lite') $lang->admin->menu->xuanxuan['link'] = 'Chat|admin|xuanxuan'; - -/* Admin menu order. */ -$lang->admin->menuOrder = array(); -$lang->admin->menuOrder[5] = 'index'; -$lang->admin->menuOrder[6] = 'xuanxuan'; -$lang->admin->menuOrder[10] = 'company'; -$lang->admin->menuOrder[15] = 'custom'; -$lang->admin->menuOrder[20] = 'message'; -$lang->admin->menuOrder[25] = 'extension'; -$lang->admin->menuOrder[30] = 'dev'; -$lang->admin->menuOrder[35] = 'system'; - -$lang->admin->menu->message['subMenu'] = new stdclass(); -$lang->admin->menu->message['subMenu']->message = array(); -$lang->admin->menu->message['subMenu']->mail = array('link' => "{$lang->mail->common}|mail|index", 'subModule' => 'mail'); -$lang->admin->menu->message['subMenu']->webhook = array('link' => "Webhook|webhook|browse", 'subModule' => 'webhook'); - -if($config->edition != 'open') $lang->admin->menu->message['subMenu']->sms = array('link' => "Message|sms|index"); - -$lang->admin->menu->message['subMenu']->browser = array('link' => "$lang->browser|message|browser"); -$lang->admin->menu->message['subMenu']->setting = array('link' => "$lang->settings|message|setting"); - -$lang->admin->menu->message['menuOrder'][5] = 'mail'; -$lang->admin->menu->message['menuOrder'][10] = 'webhook'; -$lang->admin->menu->message['menuOrder'][11] = 'sms'; -$lang->admin->menu->message['menuOrder'][15] = 'browser'; -$lang->admin->menu->message['menuOrder'][20] = 'setting'; - -$lang->admin->menu->company['subMenu'] = new stdclass(); -$lang->admin->menu->company['subMenu']->browseUser = array('link' => "{$lang->user->common}|company|browse", 'subModule' => 'user'); -$lang->admin->menu->company['subMenu']->dept = array('link' => "{$lang->dept->common}|dept|browse", 'subModule' => 'dept'); -$lang->admin->menu->company['subMenu']->browseGroup = array('link' => "{$lang->priv}|group|browse", 'subModule' => 'group'); - -$lang->admin->menu->dev['subMenu'] = new stdclass(); -$lang->admin->menu->dev['subMenu']->api = array('link' => "API|dev|api"); -$lang->admin->menu->dev['subMenu']->db = array('link' => "$lang->db|dev|db"); -$lang->admin->menu->dev['subMenu']->editor = array('link' => "$lang->editor|dev|editor"); -$lang->admin->menu->dev['subMenu']->entry = array('link' => "{$lang->admin->entry}|entry|browse", 'subModule' => 'entry'); - -$lang->admin->menu->dev['menuOrder'][5] = 'api'; -$lang->admin->menu->dev['menuOrder'][10] = 'db'; -$lang->admin->menu->dev['menuOrder'][15] = 'editor'; -$lang->admin->menu->dev['menuOrder'][20] = 'entry'; - -$lang->admin->menu->system['subMenu'] = new stdclass(); -$lang->admin->menu->system['subMenu']->data = array('link' => "{$lang->admin->data}|backup|index", 'subModule' => 'action'); -$lang->admin->menu->system['subMenu']->safe = array('link' => "$lang->security|admin|safe", 'alias' => 'checkweak'); -$lang->admin->menu->system['subMenu']->cron = array('link' => "{$lang->admin->cron}|cron|index", 'subModule' => 'cron'); -$lang->admin->menu->system['subMenu']->timezone = array('link' => "$lang->timezone|custom|timezone"); -$lang->admin->menu->system['subMenu']->buildIndex = array('link' => "{$lang->admin->buildIndex}|search|buildindex|"); - -if($config->visions == ',lite,' and $config->edition != 'open') $lang->admin->menu->system['subMenu']->license = array('link' => "License|admin|license'", 'alias' => 'license'); -if($config->visions != ',lite,') unset($lang->admin->menu->system['subMenu']->buildIndex); - -if($config->edition != 'open') -{ - $lang->admin->menu->system['subMenu']->ldap = array('link' => 'LDAP|ldap|set', 'subModule' => 'ldap'); - $lang->admin->menu->system['subMenu']->libreoffice = array('link' => 'Office|custom|libreoffice'); -} - -$lang->admin->dividerMenu = ',company,message,system,'; - /* adjust items of search. */ $lang->searchObjects['all'] = 'All'; $lang->searchObjects['todo'] = 'Todo'; @@ -275,25 +200,6 @@ global $config; if(isset($config->xuanxuan) && strpos($config->visions, ',rnd,') === false) { $lang->xuanxuan = new stdclass(); - $lang->admin->menu->xuanxuan = array('link' => 'Chat|admin|xuanxuan', 'subModule' => 'client,setting'); - $lang->admin->menuOrder[6] = 'xuanxuan'; - - $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'; - - 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'; diff --git a/extension/lite/common/ext/lang/fr/lite.php b/extension/lite/common/ext/lang/fr/lite.php index 0a74146ca0..ef7b1da49c 100644 --- a/extension/lite/common/ext/lang/fr/lite.php +++ b/extension/lite/common/ext/lang/fr/lite.php @@ -143,81 +143,6 @@ $lang->doc->menuOrder[30] = 'custom'; $lang->doc->menu->project['subMenu'] = new stdclass(); $lang->doc->menu->custom['subMenu'] = new stdclass(); -if(isset($lang->admin->menu->xuanxuan)) $xuanxuanMenu = $lang->admin->menu->xuanxuan; -/* Admin menu. */ -$lang->admin->menu = new stdclass(); -$lang->admin->menu->index = array('link' => "$lang->indexPage|admin|index", 'alias' => 'register,certifytemail,certifyztmobile,ztcompany'); -if(isset($xuanxuanMenu)) $lang->admin->menu->xuanxuan = $xuanxuanMenu; -$lang->admin->menu->company = array('link' => "{$lang->personnel->common}|company|browse|", 'subModule' => ',user,dept,group,'); -$lang->admin->menu->custom = array('link' => "{$lang->custom->common}|custom|index", 'exclude' => 'custom-browsestoryconcept,custom-timezone,custom-estimate'); -$lang->admin->menu->extension = array('link' => "{$lang->extension->common}|extension|browse", 'subModule' => 'extension'); -$lang->admin->menu->dev = array('link' => "$lang->redev|dev|api", 'alias' => 'db', 'subModule' => 'dev,editor,entry'); -$lang->admin->menu->message = array('link' => "{$lang->message->common}|message|index", 'subModule' => 'message,mail,webhook,sms'); -$lang->admin->menu->system = array('link' => "{$lang->admin->system}|backup|index", 'subModule' => 'cron,backup,action,admin,search,ldap', 'exclude' => 'admin-index,admin-xuanxuan,admin-register,admin-ztcompany'); - -if($config->vision != 'lite') $lang->admin->menu->xuanxuan['link'] = 'Chat|admin|xuanxuan'; - -/* Admin menu order. */ -$lang->admin->menuOrder = array(); -$lang->admin->menuOrder[5] = 'index'; -$lang->admin->menuOrder[6] = 'xuanxuan'; -$lang->admin->menuOrder[10] = 'company'; -$lang->admin->menuOrder[15] = 'custom'; -$lang->admin->menuOrder[20] = 'message'; -$lang->admin->menuOrder[25] = 'extension'; -$lang->admin->menuOrder[30] = 'dev'; -$lang->admin->menuOrder[35] = 'system'; - -$lang->admin->menu->message['subMenu'] = new stdclass(); -$lang->admin->menu->message['subMenu']->message = array(); -$lang->admin->menu->message['subMenu']->mail = array('link' => "{$lang->mail->common}|mail|index", 'subModule' => 'mail'); -$lang->admin->menu->message['subMenu']->webhook = array('link' => "Webhook|webhook|browse", 'subModule' => 'webhook'); - -if($config->edition != 'open') $lang->admin->menu->message['subMenu']->sms = array('link' => "Message|sms|index"); - -$lang->admin->menu->message['subMenu']->browser = array('link' => "$lang->browser|message|browser"); -$lang->admin->menu->message['subMenu']->setting = array('link' => "$lang->settings|message|setting"); - -$lang->admin->menu->message['menuOrder'][5] = 'mail'; -$lang->admin->menu->message['menuOrder'][10] = 'webhook'; -$lang->admin->menu->message['menuOrder'][11] = 'sms'; -$lang->admin->menu->message['menuOrder'][15] = 'browser'; -$lang->admin->menu->message['menuOrder'][20] = 'setting'; - -$lang->admin->menu->company['subMenu'] = new stdclass(); -$lang->admin->menu->company['subMenu']->browseUser = array('link' => "{$lang->user->common}|company|browse", 'subModule' => 'user'); -$lang->admin->menu->company['subMenu']->dept = array('link' => "{$lang->dept->common}|dept|browse", 'subModule' => 'dept'); -$lang->admin->menu->company['subMenu']->browseGroup = array('link' => "{$lang->priv}|group|browse", 'subModule' => 'group'); - -$lang->admin->menu->dev['subMenu'] = new stdclass(); -$lang->admin->menu->dev['subMenu']->api = array('link' => "API|dev|api"); -$lang->admin->menu->dev['subMenu']->db = array('link' => "$lang->db|dev|db"); -$lang->admin->menu->dev['subMenu']->editor = array('link' => "$lang->editor|dev|editor"); -$lang->admin->menu->dev['subMenu']->entry = array('link' => "{$lang->admin->entry}|entry|browse", 'subModule' => 'entry'); - -$lang->admin->menu->dev['menuOrder'][5] = 'api'; -$lang->admin->menu->dev['menuOrder'][10] = 'db'; -$lang->admin->menu->dev['menuOrder'][15] = 'editor'; -$lang->admin->menu->dev['menuOrder'][20] = 'entry'; - -$lang->admin->menu->system['subMenu'] = new stdclass(); -$lang->admin->menu->system['subMenu']->data = array('link' => "{$lang->admin->data}|backup|index", 'subModule' => 'action'); -$lang->admin->menu->system['subMenu']->safe = array('link' => "$lang->security|admin|safe", 'alias' => 'checkweak'); -$lang->admin->menu->system['subMenu']->cron = array('link' => "{$lang->admin->cron}|cron|index", 'subModule' => 'cron'); -$lang->admin->menu->system['subMenu']->timezone = array('link' => "$lang->timezone|custom|timezone"); -$lang->admin->menu->system['subMenu']->buildIndex = array('link' => "{$lang->admin->buildIndex}|search|buildindex|"); - -if($config->visions == ',lite,' and $config->edition != 'open') $lang->admin->menu->system['subMenu']->license = array('link' => "License|admin|license'", 'alias' => 'license'); -if($config->visions != ',lite,') unset($lang->admin->menu->system['subMenu']->buildIndex); - -if($config->edition != 'open') -{ - $lang->admin->menu->system['subMenu']->ldap = array('link' => 'LDAP|ldap|set', 'subModule' => 'ldap'); - $lang->admin->menu->system['subMenu']->libreoffice = array('link' => 'Office|custom|libreoffice'); -} - -$lang->admin->dividerMenu = ',company,message,system,'; - /* adjust items of search. */ $lang->searchObjects['all'] = 'All'; $lang->searchObjects['todo'] = 'Todo'; @@ -275,25 +200,6 @@ global $config; if(isset($config->xuanxuan) && strpos($config->visions, ',rnd,') === false) { $lang->xuanxuan = new stdclass(); - $lang->admin->menu->xuanxuan = array('link' => 'Chat|admin|xuanxuan', 'subModule' => 'client,setting'); - $lang->admin->menuOrder[6] = 'xuanxuan'; - - $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'; - - 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'; diff --git a/extension/lite/common/ext/lang/zh-cn/lite.php b/extension/lite/common/ext/lang/zh-cn/lite.php index bf296cab43..dd43e3aeca 100644 --- a/extension/lite/common/ext/lang/zh-cn/lite.php +++ b/extension/lite/common/ext/lang/zh-cn/lite.php @@ -53,7 +53,6 @@ else $lang->task->common = '任务'; $lang->dashboard = isset($lang->dashboard->common) ? $lang->dashboard->common : $lang->dashboard; - /* Ticket. */ if($config->edition != 'open') $lang->feedback->menu->ticket = array('link' => '工单|ticket|browse|browseType=unclosed'); @@ -144,82 +143,6 @@ $lang->doc->menuOrder[30] = 'custom'; $lang->doc->menu->project['subMenu'] = new stdclass(); $lang->doc->menu->custom['subMenu'] = new stdclass(); -if(isset($lang->admin->menu->xuanxuan)) $xuanxuanMenu = $lang->admin->menu->xuanxuan; -/* Admin menu. */ -$lang->admin->menu = new stdclass(); -$lang->admin->menu->index = array('link' => "$lang->indexPage|admin|index", 'alias' => 'register,certifytemail,certifyztmobile,ztcompany'); -if(isset($xuanxuanMenu)) $lang->admin->menu->xuanxuan = $xuanxuanMenu; -$lang->admin->menu->company = array('link' => "{$lang->personnel->common}|company|browse|", 'subModule' => ',user,dept,group,'); -$lang->admin->menu->custom = array('link' => "{$lang->custom->common}|custom|index", 'exclude' => 'custom-browsestoryconcept,custom-timezone,custom-estimate'); -$lang->admin->menu->extension = array('link' => "{$lang->extension->common}|extension|browse", 'subModule' => 'extension'); -$lang->admin->menu->dev = array('link' => "$lang->redev|dev|api", 'alias' => 'db', 'subModule' => 'dev,editor,entry'); -$lang->admin->menu->message = array('link' => "{$lang->message->common}|message|index", 'subModule' => 'message,mail,webhook,sms'); -$lang->admin->menu->system = array('link' => "{$lang->admin->system}|backup|index", 'subModule' => 'cron,backup,action,admin,search,ldap', 'exclude' => 'admin-index,admin-xuanxuan,admin-register,admin-ztcompany'); - -if($config->vision != 'lite') $lang->admin->menu->xuanxuan['link'] = '聊天|admin|xuanxuan'; - -/* Admin menu order. */ -$lang->admin->menuOrder = array(); -$lang->admin->menuOrder[5] = 'index'; -$lang->admin->menuOrder[6] = 'xuanxuan'; -$lang->admin->menuOrder[10] = 'company'; -$lang->admin->menuOrder[15] = 'custom'; -$lang->admin->menuOrder[20] = 'message'; -$lang->admin->menuOrder[25] = 'extension'; -$lang->admin->menuOrder[30] = 'dev'; -$lang->admin->menuOrder[35] = 'system'; - -$lang->admin->menu->message['subMenu'] = new stdclass(); -$lang->admin->menu->message['subMenu']->message = array(); -$lang->admin->menu->message['subMenu']->mail = array('link' => "{$lang->mail->common}|mail|index", 'subModule' => 'mail'); -$lang->admin->menu->message['subMenu']->webhook = array('link' => "Webhook|webhook|browse", 'subModule' => 'webhook'); - -if($config->edition != 'open') $lang->admin->menu->message['subMenu']->sms = array('link' => "短信|sms|index"); - -$lang->admin->menu->message['subMenu']->browser = array('link' => "$lang->browser|message|browser"); -$lang->admin->menu->message['subMenu']->setting = array('link' => "$lang->settings|message|setting"); - -$lang->admin->menu->message['menuOrder'][5] = 'mail'; -$lang->admin->menu->message['menuOrder'][10] = 'webhook'; -$lang->admin->menu->message['menuOrder'][11] = 'sms'; -$lang->admin->menu->message['menuOrder'][15] = 'browser'; -$lang->admin->menu->message['menuOrder'][20] = 'setting'; - -$lang->admin->menu->company['subMenu'] = new stdclass(); -$lang->admin->menu->company['subMenu']->browseUser = array('link' => "{$lang->user->common}|company|browse", 'subModule' => 'user'); -$lang->admin->menu->company['subMenu']->dept = array('link' => "{$lang->dept->common}|dept|browse", 'subModule' => 'dept'); -$lang->admin->menu->company['subMenu']->browseGroup = array('link' => "{$lang->priv}|group|browse", 'subModule' => 'group'); - -$lang->admin->menu->dev['subMenu'] = new stdclass(); -$lang->admin->menu->dev['subMenu']->api = array('link' => "API|dev|api"); -$lang->admin->menu->dev['subMenu']->db = array('link' => "$lang->db|dev|db"); -$lang->admin->menu->dev['subMenu']->editor = array('link' => "$lang->editor|dev|editor"); -$lang->admin->menu->dev['subMenu']->entry = array('link' => "{$lang->admin->entry}|entry|browse", 'subModule' => 'entry'); - -$lang->admin->menu->dev['menuOrder'][5] = 'api'; -$lang->admin->menu->dev['menuOrder'][10] = 'db'; -$lang->admin->menu->dev['menuOrder'][15] = 'editor'; -$lang->admin->menu->dev['menuOrder'][20] = 'entry'; - -$lang->admin->menu->system['subMenu'] = new stdclass(); -$lang->admin->menu->system['subMenu']->backup = array('link' => "{$lang->backup->common}|backup|index"); -$lang->admin->menu->system['subMenu']->trash = array('link' => "{$lang->action->trash}|action|trash"); -$lang->admin->menu->system['subMenu']->safe = array('link' => "$lang->security|admin|safe", 'alias' => 'checkweak'); -$lang->admin->menu->system['subMenu']->cron = array('link' => "{$lang->admin->cron}|cron|index", 'subModule' => 'cron'); -$lang->admin->menu->system['subMenu']->timezone = array('link' => "$lang->timezone|custom|timezone"); -$lang->admin->menu->system['subMenu']->buildIndex = array('link' => "{$lang->admin->buildIndex}|search|buildindex|"); - -if($config->visions == ',lite,' and $config->edition != 'open') $lang->admin->menu->system['subMenu']->license = array('link' => "授权信息|admin|license'", 'alias' => 'license'); -if($config->visions != ',lite,') unset($lang->admin->menu->system['subMenu']->buildIndex); - -if($config->edition != 'open') -{ - $lang->admin->menu->system['subMenu']->ldap = array('link' => 'LDAP|ldap|set', 'subModule' => 'ldap'); - $lang->admin->menu->system['subMenu']->libreoffice = array('link' => 'Office|custom|libreoffice'); -} - -$lang->admin->dividerMenu = ',company,message,system,'; - /* adjust items of search. */ $lang->searchObjects['all'] = '全部'; $lang->searchObjects['todo'] = '待办'; @@ -277,25 +200,6 @@ global $config; if(isset($config->xuanxuan) && strpos($config->visions, ',rnd,') === false) { $lang->xuanxuan = new stdclass(); - $lang->admin->menu->xuanxuan = array('link' => '聊天|admin|xuanxuan', 'subModule' => 'client,setting'); - $lang->admin->menuOrder[6] = 'xuanxuan'; - - $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'; - - 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'; diff --git a/module/admin/lang/menu.php b/module/admin/lang/menu.php index 4ec645fefb..53bbc299ba 100644 --- a/module/admin/lang/menu.php +++ b/module/admin/lang/menu.php @@ -65,7 +65,7 @@ $lang->admin->menuList->system['dividerMenu'] = ',safe,'; $lang->admin->menuList->user['subMenu']['dept'] = array('link' => "{$lang->dept->common}|dept|browse|", 'subModule' => 'dept'); $lang->admin->menuList->user['subMenu']['user'] = array('link' => "{$lang->user->common}|company|browse|", 'subModule' => 'user'); -$lang->admin->menuList->user['subMenu']['group'] = array('link' => "{$lang->priv}}|group|browse|", 'subModule' => 'group'); +$lang->admin->menuList->user['subMenu']['group'] = array('link' => "{$lang->priv}|group|browse|", 'subModule' => 'group'); $lang->admin->menuList->user['menuOrder']['5'] = 'dept'; $lang->admin->menuList->user['menuOrder']['10'] = 'user'; @@ -77,7 +77,7 @@ $lang->admin->menuList->switch['menuOrder']['5'] = 'setmodule'; $lang->admin->menuList->model['subMenu']['common'] = array('link' => "{$lang->globalSetting}|custom|required|module=project", 'subModule' => 'custom'); $lang->admin->menuList->model['subMenu']['scrum'] = array('link' => "{$lang->scrumModel}|auditcl|scrumbrowse|", 'subModule' => 'auditcl'); -$lang->admin->menuList->model['subMenu']['waterfall'] = array('link' => "$lang->waterfallModel|stage|settype|", 'subModule' => 'stage'); +$lang->admin->menuList->model['subMenu']['waterfall'] = array('link' => "{$lang->waterfallModel}|stage|settype|", 'subModule' => 'stage'); $lang->admin->menuList->model['menuOrder']['5'] = 'common'; $lang->admin->menuList->model['menuOrder']['15'] = 'waterfall'; @@ -122,3 +122,13 @@ $lang->admin->menuList->dev['menuOrder']['5'] = 'api'; $lang->admin->menuList->dev['menuOrder']['10'] = 'db'; $lang->admin->menuList->dev['menuOrder']['15'] = 'editor'; $lang->admin->menuList->dev['menuOrder']['20'] = 'entry'; + +if($config->vision == 'lite') +{ + unset($lang->admin->menuList->system['subMenu']['mode']); + unset($lang->admin->menuList->system['subMenu']['buildindex']); + unset($lang->admin->menuList->system['subMenu']['tableengine']); + unset($lang->admin->menuList->system['menuOrder']['5']); + unset($lang->admin->menuList->system['menuOrder']['45']); + unset($lang->admin->menuList->system['menuOrder']['50']); +} diff --git a/module/custom/view/required.html.php b/module/custom/view/required.html.php index eb83cf9aa6..c98d668b19 100644 --- a/module/custom/view/required.html.php +++ b/module/custom/view/required.html.php @@ -11,6 +11,13 @@ */ ?> +
    - +
    admin->pluginRecommendation;?> admin->extensionURL, "{$lang->more} ", '_blank', 'class="more text-muted"');?>
    > - -
    - -

    name;?>

    -

    desc);?>

    + + desc));?> +
    + +

    name;?>

    +

    From a23689699ae0534f382b3d69c93ab7cc1045baa5 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Fri, 3 Feb 2023 12:22:57 +0800 Subject: [PATCH 135/499] * Adjust code. --- module/admin/view/index.html.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index 0dca43e0bb..81acdc7890 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -54,7 +54,12 @@
    -
    admin->followUs?>
    +
    + admin->followUs?> + + + +
    admin->followUsContent?>
    @@ -86,6 +91,5 @@
    admin->zentaoInfo?>
    -
    From af9507045311f1ed28ad0d6ed979728cfc777672 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Fri, 3 Feb 2023 12:29:26 +0800 Subject: [PATCH 136/499] * Add desc tips. --- module/admin/view/index.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index 81acdc7890..a293e99564 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -21,7 +21,7 @@ vision == 'lite' and !in_array($menuKey, $config->admin->liteMenuList)) continue;?> From 97fcb6263ee93a09418165184f056289e7d91b36 Mon Sep 17 00:00:00 2001 From: zenggang Date: Fri, 3 Feb 2023 05:19:53 +0000 Subject: [PATCH 137/499] * Delete snapshot --- module/action/lang/de.php | 4 ++ module/action/lang/en.php | 6 ++- module/action/lang/fr.php | 4 ++ module/action/lang/zh-cn.php | 6 ++- module/group/lang/resource.php | 34 ++++++++-------- module/zanode/control.php | 28 ++++++++++++++ module/zanode/lang/de.php | 22 +++++++---- module/zanode/lang/en.php | 16 ++++---- module/zanode/lang/fr.php | 22 +++++++---- module/zanode/lang/zh-cn.php | 16 ++++---- module/zanode/model.php | 45 ++++++++++++++++++++++ module/zanode/view/browsesnapshot.html.php | 16 +++++--- module/zanode/view/view.html.php | 2 +- 13 files changed, 168 insertions(+), 53 deletions(-) diff --git a/module/action/lang/de.php b/module/action/lang/de.php index f4a0a74ae1..e29603c2f1 100644 --- a/module/action/lang/de.php +++ b/module/action/lang/de.php @@ -238,7 +238,9 @@ $lang->action->desc->switchtolight = '$date, Switch from ALM mode to ligh $lang->action->desc->getvnc = '$date, Remote control $extra by $actor .' . "\n"; $lang->action->desc->unlinkproduct = '$date, the project is disassociated from the $extra, synchronization disassociates the ' . $lang->executionCommon . 's of the project from the $extra.' . "\n"; $lang->action->desc->createdsnapshot = '$date, $actor creates a snapshot $extra。' . "\n"; +$lang->action->desc->restoredsnapshot = '$date, $actor restored a snapshot $extra。' . "\n"; $lang->action->desc->editsnapshot = '$date, $actor edited the snapshot $extra。' . "\n"; +$lang->action->desc->deletesnapshot = '$date, $actor deleted snapshot $extra。' . "\n"; /* Used to describe the history of operations related to parent-child tasks. */ $lang->action->desc->createchildren = '$date, $actor created a child task $extra。' . "\n"; @@ -422,7 +424,9 @@ $lang->action->label->linkedrepo = 'Linked Code Repo'; $lang->action->label->unlinkedrepo = 'Unlinked Code Repo'; $lang->action->label->unlinkproduct = 'Unlinked Product'; $lang->action->label->createdsnapshot = 'create snapshot'; +$lang->action->label->restoredsnapshot = 'create snapshot'; $lang->action->label->editsnapshot = 'edit snapshot'; +$lang->action->label->deletesnapshot = 'deleted snapshot'; /* Dynamic information is grouped by object. */ $lang->action->dynamicAction = new stdclass; diff --git a/module/action/lang/en.php b/module/action/lang/en.php index 7ead472084..64223a9966 100755 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -238,8 +238,9 @@ $lang->action->desc->switchtolight = '$date, Switch from ALM mode to ligh $lang->action->desc->getvnc = '$date, Remote control $extra by $actor .' . "\n"; $lang->action->desc->unlinkproduct = '$date, the project is disassociated from the $extra, synchronization disassociates the ' . $lang->executionCommon . 's of the project from the $extra.' . "\n"; $lang->action->desc->createdsnapshot = '$date, $actor creates a snapshot $extra。' . "\n"; -$lang->action->desc->restoredsnapshot = '$date, $actor restored a snapshot $extra。' . "\n"; +$lang->action->desc->restoredsnapshot = '$date, $actor restored a snapshot $extra。' . "\n"; $lang->action->desc->editsnapshot = '$date, $actor edited the snapshot $extra。' . "\n"; +$lang->action->desc->deletesnapshot = '$date, $actor deleted snapshot $extra。' . "\n"; /* Used to describe the history of operations related to parent-child tasks. */ $lang->action->desc->createchildren = '$date, $actor created a child task $extra。' . "\n"; @@ -423,8 +424,9 @@ $lang->action->label->linkedrepo = 'Linked Code Repo'; $lang->action->label->unlinkedrepo = 'Unlinked Code Repo'; $lang->action->label->unlinkproduct = 'Unlinked Product'; $lang->action->label->createdsnapshot = 'create snapshot'; -$lang->action->label->restoredsnapshot = 'create snapshot'; +$lang->action->label->restoredsnapshot = 'create snapshot'; $lang->action->label->editsnapshot = 'edit snapshot'; +$lang->action->label->deletesnapshot = 'deleted snapshot'; /* Dynamic information is grouped by object. */ $lang->action->dynamicAction = new stdclass; diff --git a/module/action/lang/fr.php b/module/action/lang/fr.php index a3a3fce60a..b35dfacfe1 100644 --- a/module/action/lang/fr.php +++ b/module/action/lang/fr.php @@ -238,7 +238,9 @@ $lang->action->desc->switchtolight = '$date, Switch from ALM mode to ligh $lang->action->desc->getvnc = '$date, Remote control $extra by $actor .' . "\n"; $lang->action->desc->unlinkproduct = '$date, the project is disassociated from the $extra, synchronization disassociates the ' . $lang->executionCommon . 's of the project from the $extra.' . "\n"; $lang->action->desc->createdsnapshot = '$date, $actor creates a snapshot $extra。' . "\n"; +$lang->action->desc->restoredsnapshot = '$date, $actor restored a snapshot $extra。' . "\n"; $lang->action->desc->editsnapshot = '$date, $actor edited the snapshot $extra。' . "\n"; +$lang->action->desc->deletesnapshot = '$date, $actor deleted snapshot $extra。' . "\n"; /* Used to describe the history of operations related to parent-child tasks. */ $lang->action->desc->createchildren = '$date, $actor a créé un sous-tâche $extra。' . "\n"; @@ -422,7 +424,9 @@ $lang->action->label->linkedrepo = 'Linked Code Repo'; $lang->action->label->unlinkedrepo = 'Unlinked Code Repo'; $lang->action->label->unlinkproduct = 'Unlinked Product'; $lang->action->label->createdsnapshot = 'create snapshot'; +$lang->action->label->restoredsnapshot = 'create snapshot'; $lang->action->label->editsnapshot = 'edit snapshot'; +$lang->action->label->deletesnapshot = 'deleted snapshot'; /* Dynamic information is grouped by object. */ $lang->action->dynamicAction = new stdclass(); diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index 868c060b34..ede1fbb1ee 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -238,8 +238,9 @@ $lang->action->desc->switchtolight = '$date, 由于 '. $lang->adm $lang->action->desc->getvnc = '$date, $actor对执行节点 $extra 进行了远程操控。' . "\n"; $lang->action->desc->unlinkproduct = '$date, 系统判断由于' . $lang->executionCommon . '所属项目与$extra取消关联,同步将' . $lang->executionCommon . '与$extra取消关联。' . "\n"; $lang->action->desc->createdsnapshot = '$date, $actor 创建了快照 $extra。' . "\n"; -$lang->action->desc->restoredsnapshot = '$date, $actor 还原了快照 $extra。' . "\n"; +$lang->action->desc->restoredsnapshot = '$date, $actor 还原了快照 $extra。' . "\n"; $lang->action->desc->editsnapshot = '$date, $actor 编辑了快照 $extra。' . "\n"; +$lang->action->desc->deletesnapshot = '$date, $actor 删除了快照 $extra。' . "\n"; /* 用来描述和父子任务相关的操作历史记录。*/ $lang->action->desc->createchildren = '$date, 由 $actor 创建子任务 $extra。' . "\n"; @@ -423,8 +424,9 @@ $lang->action->label->linkedrepo = '关联代码库到'; $lang->action->label->unlinkedrepo = '取消了项目与代码库的关联'; $lang->action->label->unlinkproduct = '取消了与产品的关联'; $lang->action->label->createdsnapshot = '创建了快照'; -$lang->action->label->restoredsnapshot = '还原了快照'; +$lang->action->label->restoredsnapshot = '还原了快照'; $lang->action->label->editsnapshot = '编辑了快照'; +$lang->action->label->deletesnapshot = '编辑了快照'; /* 动态信息按照对象分组 */ $lang->action->dynamicAction = new stdclass(); diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index fc020d0d71..e58bbc2d7e 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -1239,21 +1239,23 @@ $lang->zahost->methodOrder[30] = 'downloadImage'; $lang->zahost->methodOrder[35] = 'cancelDownload'; $lang->resource->zanode = new stdclass(); -$lang->resource->zanode->browse = 'browse'; -$lang->resource->zanode->create = 'create'; -$lang->resource->zanode->edit = 'edit'; -$lang->resource->zanode->destroy = 'destroy'; -$lang->resource->zanode->reboot = 'reboot'; -$lang->resource->zanode->suspend = 'suspend'; -$lang->resource->zanode->resume = 'resume'; -$lang->resource->zanode->getVNC = 'getVNC'; -$lang->resource->zanode->start = 'boot'; -$lang->resource->zanode->close = 'shutdown'; -$lang->resource->zanode->view = 'view'; -$lang->resource->zanode->createImage = 'createImage'; -$lang->resource->zanode->browseSnapshot = 'browseSnapshot'; -$lang->resource->zanode->createSnapshot = 'createSnapshot'; -$lang->resource->zanode->editSnapshot = 'editSnapshot'; +$lang->resource->zanode->browse = 'browse'; +$lang->resource->zanode->create = 'create'; +$lang->resource->zanode->edit = 'edit'; +$lang->resource->zanode->destroy = 'destroy'; +$lang->resource->zanode->reboot = 'reboot'; +$lang->resource->zanode->suspend = 'suspend'; +$lang->resource->zanode->resume = 'resume'; +$lang->resource->zanode->getVNC = 'getVNC'; +$lang->resource->zanode->start = 'boot'; +$lang->resource->zanode->close = 'shutdown'; +$lang->resource->zanode->view = 'view'; +$lang->resource->zanode->createImage = 'createImage'; +$lang->resource->zanode->browseSnapshot = 'browseSnapshot'; +$lang->resource->zanode->createSnapshot = 'createSnapshot'; +$lang->resource->zanode->editSnapshot = 'editSnapshot'; +$lang->resource->zanode->restoreSnapshot = 'restoreSnapshot'; +$lang->resource->zanode->deleteSnapshot = 'deleteSnapshot'; $lang->zanode->methodOrder[0] = 'browse'; $lang->zanode->methodOrder[5] = 'create'; @@ -1270,6 +1272,8 @@ $lang->zanode->methodOrder[55] = 'createImage'; $lang->zanode->methodOrder[60] = 'browseSnapshot'; $lang->zanode->methodOrder[65] = 'createSnapshot'; $lang->zanode->methodOrder[70] = 'editSnapshot'; +$lang->zanode->methodOrder[75] = 'restoreSnapshot'; +$lang->zanode->methodOrder[80] = 'deleteSnapshot'; $lang->resource->repo = new stdclass(); $lang->resource->repo->browse = 'browseAction'; diff --git a/module/zanode/control.php b/module/zanode/control.php index 76cd0eb876..2166320c1a 100644 --- a/module/zanode/control.php +++ b/module/zanode/control.php @@ -342,6 +342,34 @@ class zanode extends control $this->display(); } + /** + * Delete Snapshot. + * + * @param int $snapshotID + * @param string $confirm + * @access public + * @return void + */ + public function deleteSnapshot($snapshotID, $confirm = 'no') + { + if($confirm == 'no') + { + return print(js::confirm($this->lang->zanode->confirmDeleteSnapshot, inlink('deleteSnapshot', "snapshotID={$snapshotID}&confirm=yes"))); + } + + $result = $this->zanode->deleteSnapshot($snapshotID); + + if($result !== true) + { + return print(js::alert($result)); + } + else + { + if(isonlybody()) return print(js::alert($this->lang->zanode->actionSuccess) . js::reload('parent.parent')); + return print(js::alert($this->lang->zanode->actionSuccess) . js::locate($this->createLink('zanode', 'browse'), 'parent')); + } + } + /** * Desctroy node. * diff --git a/module/zanode/lang/de.php b/module/zanode/lang/de.php index 483ec50fae..9d05efbc81 100644 --- a/module/zanode/lang/de.php +++ b/module/zanode/lang/de.php @@ -79,13 +79,21 @@ $lang->zanode->createImageSuccess = 'Successed, You can use this image to create $lang->zanode->createImageFail = 'Failed to create'; $lang->zanode->createImageButton = 'Create image'; -$lang->zanode->snapshotName = 'Snapshot Name'; -$lang->zanode->browseSnapshot = 'Snapshot List'; -$lang->zanode->createSnapshot = 'Create Snapshot'; -$lang->zanode->editSnapshot = 'Edit Snapshot'; -$lang->zanode->restoreSnapshot = 'Revert Snapshot'; -$lang->zanode->deleteSnapshot = 'Delete Snapshot'; -$lang->zanode->snapshotEmpty = 'No snapshots'; +$lang->zanode->snapshotName = 'Snapshot Name'; +$lang->zanode->browseSnapshot = 'Snapshot List'; +$lang->zanode->createSnapshot = 'Create Snapshot'; +$lang->zanode->editSnapshot = 'Edit Snapshot'; +$lang->zanode->restoreSnapshot = 'Revert Snapshot'; +$lang->zanode->deleteSnapshot = 'Delete Snapshot'; +$lang->zanode->snapshotEmpty = 'No snapshots'; +$lang->zanode->confirmDeleteSnapshot = "The snapshot cannot be restored from the recycle bin after being deleted. Are you sure to continue?"; + +$lang->zanode->snapshot->statusList['creating'] = 'Creating'; +$lang->zanode->snapshot->statusList['completed'] = 'Create Completed'; +$lang->zanode->snapshot->statusList['failed'] = 'Create Failed'; +$lang->zanode->snapshot->statusList['restoring'] = 'Restoring'; +$lang->zanode->snapshot->statusList['restore_failed'] = 'Restore Failed'; +$lang->zanode->snapshot->statusList['restore_completed'] = 'Restore Completed'; $lang->zanode->imageNameEmpty = 'Name can not be empty.'; diff --git a/module/zanode/lang/en.php b/module/zanode/lang/en.php index 78417a405f..f1c9a29cac 100644 --- a/module/zanode/lang/en.php +++ b/module/zanode/lang/en.php @@ -80,16 +80,18 @@ $lang->zanode->createImageSuccess = 'Successed, You can use this image to create $lang->zanode->createImageFail = 'Failed to create'; $lang->zanode->createImageButton = 'Create image'; -$lang->zanode->snapshotName = 'Snapshot Name'; -$lang->zanode->browseSnapshot = 'Snapshot List'; -$lang->zanode->createSnapshot = 'Create Snapshot'; -$lang->zanode->editSnapshot = 'Edit Snapshot'; -$lang->zanode->restoreSnapshot = 'Revert Snapshot'; -$lang->zanode->deleteSnapshot = 'Delete Snapshot'; -$lang->zanode->snapshotEmpty = 'No snapshots'; +$lang->zanode->snapshotName = 'Snapshot Name'; +$lang->zanode->browseSnapshot = 'Snapshot List'; +$lang->zanode->createSnapshot = 'Create Snapshot'; +$lang->zanode->editSnapshot = 'Edit Snapshot'; +$lang->zanode->restoreSnapshot = 'Revert Snapshot'; +$lang->zanode->deleteSnapshot = 'Delete Snapshot'; +$lang->zanode->snapshotEmpty = 'No snapshots'; +$lang->zanode->confirmDeleteSnapshot = "The snapshot cannot be restored from the recycle bin after being deleted. Are you sure to continue?"; $lang->zanode->snapshot->statusList['creating'] = 'Creating'; $lang->zanode->snapshot->statusList['completed'] = 'Create Completed'; +$lang->zanode->snapshot->statusList['failed'] = 'Create Failed'; $lang->zanode->snapshot->statusList['restoring'] = 'Restoring'; $lang->zanode->snapshot->statusList['restore_failed'] = 'Restore Failed'; $lang->zanode->snapshot->statusList['restore_completed'] = 'Restore Completed'; diff --git a/module/zanode/lang/fr.php b/module/zanode/lang/fr.php index 483ec50fae..9d05efbc81 100644 --- a/module/zanode/lang/fr.php +++ b/module/zanode/lang/fr.php @@ -79,13 +79,21 @@ $lang->zanode->createImageSuccess = 'Successed, You can use this image to create $lang->zanode->createImageFail = 'Failed to create'; $lang->zanode->createImageButton = 'Create image'; -$lang->zanode->snapshotName = 'Snapshot Name'; -$lang->zanode->browseSnapshot = 'Snapshot List'; -$lang->zanode->createSnapshot = 'Create Snapshot'; -$lang->zanode->editSnapshot = 'Edit Snapshot'; -$lang->zanode->restoreSnapshot = 'Revert Snapshot'; -$lang->zanode->deleteSnapshot = 'Delete Snapshot'; -$lang->zanode->snapshotEmpty = 'No snapshots'; +$lang->zanode->snapshotName = 'Snapshot Name'; +$lang->zanode->browseSnapshot = 'Snapshot List'; +$lang->zanode->createSnapshot = 'Create Snapshot'; +$lang->zanode->editSnapshot = 'Edit Snapshot'; +$lang->zanode->restoreSnapshot = 'Revert Snapshot'; +$lang->zanode->deleteSnapshot = 'Delete Snapshot'; +$lang->zanode->snapshotEmpty = 'No snapshots'; +$lang->zanode->confirmDeleteSnapshot = "The snapshot cannot be restored from the recycle bin after being deleted. Are you sure to continue?"; + +$lang->zanode->snapshot->statusList['creating'] = 'Creating'; +$lang->zanode->snapshot->statusList['completed'] = 'Create Completed'; +$lang->zanode->snapshot->statusList['failed'] = 'Create Failed'; +$lang->zanode->snapshot->statusList['restoring'] = 'Restoring'; +$lang->zanode->snapshot->statusList['restore_failed'] = 'Restore Failed'; +$lang->zanode->snapshot->statusList['restore_completed'] = 'Restore Completed'; $lang->zanode->imageNameEmpty = 'Name can not be empty.'; diff --git a/module/zanode/lang/zh-cn.php b/module/zanode/lang/zh-cn.php index f499d510d7..52c9f690e0 100644 --- a/module/zanode/lang/zh-cn.php +++ b/module/zanode/lang/zh-cn.php @@ -80,16 +80,18 @@ $lang->zanode->createImageSuccess = '镜像导出成功,您可以使用此镜 $lang->zanode->createImageFail = '镜像导出失败'; $lang->zanode->createImageButton = '去创建'; -$lang->zanode->snapshotName = '快照名称'; -$lang->zanode->browseSnapshot = '快照列表'; -$lang->zanode->createSnapshot = '创建快照'; -$lang->zanode->editSnapshot = '编辑快照'; -$lang->zanode->restoreSnapshot = '还原快照'; -$lang->zanode->deleteSnapshot = '删除快照'; -$lang->zanode->snapshotEmpty = '无快照'; +$lang->zanode->snapshotName = '快照名称'; +$lang->zanode->browseSnapshot = '快照列表'; +$lang->zanode->createSnapshot = '创建快照'; +$lang->zanode->editSnapshot = '编辑快照'; +$lang->zanode->restoreSnapshot = '还原快照'; +$lang->zanode->deleteSnapshot = '删除快照'; +$lang->zanode->snapshotEmpty = '无快照'; +$lang->zanode->confirmDeleteSnapshot = "快照被删除后无法从回收站中还原,您确定继续么?"; $lang->zanode->snapshot->statusList['creating'] = '创建中'; $lang->zanode->snapshot->statusList['completed'] = '创建完成'; +$lang->zanode->snapshot->statusList['failed'] = '创建失败'; $lang->zanode->snapshot->statusList['restoring'] = '还原中'; $lang->zanode->snapshot->statusList['restore_failed'] = '还原失败'; $lang->zanode->snapshot->statusList['restore_completed'] = '还原成功'; diff --git a/module/zanode/model.php b/module/zanode/model.php index ecc4bb0440..a594af4650 100644 --- a/module/zanode/model.php +++ b/module/zanode/model.php @@ -299,6 +299,42 @@ class zanodemodel extends model return false; } + /** + * Delete Snapshot. + * + * @param int $id + * @access public + * @return void + */ + public function deleteSnapshot($snapshotID) + { + $snapshot = $this->getImageByID($snapshotID); + $node = $this->getNodeByID($snapshot->host); + + if($node) + { + $agnetUrl = 'http://' . $node->ip . ':' . $node->hzap; + $param = (object)array( + 'name' => $snapshot->name, + 'task' => $snapshotID, + 'vm' => $node->name + ); + + $result = commonModel::http($agnetUrl . static::SNAPSHOT_REMOVE_PATH, json_encode($param,JSON_NUMERIC_CHECK), array(), array("Authorization:$node->tokenSN")); + $result = json_decode($result); + + if(!empty($result) and $result->code == 'success') + { + $this->dao->delete()->from(TABLE_IMAGE)->where('id')->eq($snapshotID)->exec(); + $this->loadModel('action')->create('zanode', $node->id, 'deletesnapshot', '', $snapshot->name); + return true; + } + + $error = (!empty($result) and !empty($result->msg)) ? $result->msg : $this->lang->zanode->apiError['fail']; + return $error; + } + } + /** * Action Node. @@ -662,6 +698,15 @@ class zanodemodel extends model ->page($pager) ->fetchAll('name'); + foreach($snapshotList as $name => $snapshot) + { + if($snapshot->status == 'creating' and (time() - strtotime($snapshot->createdDate)) > 1800) + { + $this->dao->update(TABLE_IMAGE)->set('status')->eq('failed')->where('id')->eq($snapshot->id)->exec(); + $snapshotList[$name]->status = 'failed'; + } + } + return $snapshotList; } diff --git a/module/zanode/view/browsesnapshot.html.php b/module/zanode/view/browsesnapshot.html.php index 3686889565..8abc25f631 100644 --- a/module/zanode/view/browsesnapshot.html.php +++ b/module/zanode/view/browsesnapshot.html.php @@ -34,19 +34,25 @@ - status = ($snapshot->status == 'restoring' && time() - strtotime($snapshot->restoreDate) > 600) ? 'restore_failed' : $snapshot->status; + + $editAttr = $snapshot->status == 'failed' ? 'class="btn disabled"' : "title={$lang->zanode->editSnapshot} onclick='window.parent.editSnapshot(\"" . $this->createLink('zanode', 'editSnapshot', "snapshotID={$snapshot->id}") . "\")' class='btn'"; + $restoreAttr = "title='{$lang->zanode->restoreSnapshot}' target='hiddenwin'"; - $restoreAttr .= $snapshot->status == 'restoring' ? ' class="btn disabled"' : 'class="btn"'; + $restoreAttr .= ($snapshot->status == 'restoring' or $snapshot->status == 'failed') ? ' class="btn disabled"' : 'class="btn"'; + + $deleteAttr = "title='{$lang->zanode->deleteSnapshot}' target='hiddenwin'"; + $deleteAttr .= (($snapshot->status == 'restoring' and (time() - strtotime($snapshot->restoreDate)) <= 600) or $snapshot->status == 'failed') ? ' class="btn disabled"' : 'class="btn"'; ?> localName ? $snapshot->localName : $snapshot->name;?> - '>zanode->snapshot->statusList, $snapshot->status, '');?> + zanode->snapshot->statusList, $snapshot->status, '');?> createdBy, '')?> createdDate;?> - ', 'hiddenwin', "title={$lang->zanode->editSnapshot} onclick='window.parent.editSnapshot(\"" . $this->createLink('zanode', 'editSnapshot', "snapshotID={$snapshot->id}") . "\")' class='btn'");?> + ', 'hiddenwin', $editAttr);?> createLink('zanode', 'restoreSnapshot', "nodeID={$nodeID}&snapshotID={$snapshot->id}"), '', 'hiddenwin', $restoreAttr);?> - createLink('zanode', 'deleteSnapshot', "snapshotID={$snapshot->id}"), '', 'hiddenwin', "title={$lang->zanode->deleteSnapshot} class='btn'");?> + createLink('zanode', 'deleteSnapshot', "snapshotID={$snapshot->id}"), '', 'hiddenwin', $deleteAttr);?> diff --git a/module/zanode/view/view.html.php b/module/zanode/view/view.html.php index 27e1210261..ff3d5ee010 100644 --- a/module/zanode/view/view.html.php +++ b/module/zanode/view/view.html.php @@ -152,7 +152,7 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
    zanode->browseSnapshot;?>
    - +
    createLink('zanode', 'browseSnapshot', "nodeID=$zanode->id", '', true) . "' frameborder='no' allowfullscreen='true' mozallowfullscreen='true' webkitallowfullscreen='true' allowtransparency='true' scrolling='auto' onload='setIframeHeight(this)' style='min-height:300px;'>";?>
    From 4ff09220baf159aadcbabb5ffba08cfcf357f72a Mon Sep 17 00:00:00 2001 From: zhaoke Date: Fri, 3 Feb 2023 05:35:22 +0000 Subject: [PATCH 138/499] * Fix bug #31896. --- module/action/config.php | 1 + module/zahost/control.php | 3 ++- module/zahost/js/view.js | 1 - module/zahost/view/view.html.php | 2 ++ module/zanode/control.php | 4 ++-- module/zanode/lang/en.php | 1 + module/zanode/lang/zh-cn.php | 2 +- module/zanode/view/browsesnapshot.html.php | 4 +++- module/zanode/view/list.html.php | 1 + 9 files changed, 13 insertions(+), 6 deletions(-) diff --git a/module/action/config.php b/module/action/config.php index aae2118c64..77eaec4b92 100755 --- a/module/action/config.php +++ b/module/action/config.php @@ -49,6 +49,7 @@ $config->action->objectNameFields['stage'] = 'name'; $config->action->objectNameFields['apistruct'] = 'name'; $config->action->objectNameFields['repo'] = 'name'; $config->action->objectNameFields['dataview'] = 'name'; +$config->action->objectNameFields['zahost'] = 'name'; $config->action->objectNameFields['zanode'] = 'name'; $config->action->commonImgSize = 870; diff --git a/module/zahost/control.php b/module/zahost/control.php index a6f09f613c..a49ab2902a 100644 --- a/module/zahost/control.php +++ b/module/zahost/control.php @@ -168,8 +168,9 @@ class zahost extends control return print(js::confirm($this->lang->zahost->confirmDelete, inlink('delete', "hostID=$hostID&confirm=yes"))); } - $this->zahost->delete(TABLE_ZAHOST, $hostID); + $this->dao->update(TABLE_ZAHOST)->set('deleted')->eq(1)->where('id')->eq($hostID)->exec(); $this->loadModel('action')->create('zahost', $hostID, 'deleted'); + $this->loadModel('action')->create('zahost', $hostID, 'deleted', '', $extra = ACTIONMODEL::CAN_UNDELETED); /* if ajax request, send result. */ if($this->server->ajax) diff --git a/module/zahost/js/view.js b/module/zahost/js/view.js index 4df1246224..2b07966f7c 100644 --- a/module/zahost/js/view.js +++ b/module/zahost/js/view.js @@ -76,7 +76,6 @@ function setIframeHeight(iframe) { var height = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight iframe.height = height+10; - console.log(1111, iframe.height) } } } \ No newline at end of file diff --git a/module/zahost/view/view.html.php b/module/zahost/view/view.html.php index 61d09e08fe..012ba10e13 100644 --- a/module/zahost/view/view.html.php +++ b/module/zahost/view/view.html.php @@ -132,6 +132,7 @@
    desc) ? htmlspecialchars_decode($zahost->desc) : $lang->noData;?>
    +
    zahost->browseNode;?>
    @@ -148,6 +149,7 @@ if($canBeChanged) $actionFormLink = $this->createLink('action', 'comment', "objectType=zahost&objectID=$zahost->hostID"); ?>
    + printExtendFields($zahost, 'div', "position=left&inForm=0&inCell=1");?>
    diff --git a/module/zanode/control.php b/module/zanode/control.php index 76cd0eb876..595e650db2 100644 --- a/module/zanode/control.php +++ b/module/zanode/control.php @@ -78,9 +78,9 @@ class zanode extends control */ public function list($hostID, $orderBy = 'id_desc') { - if(!commonModel::hasPriv('zahost', 'view')) + if(!commonModel::hasPriv('zanode', 'browse')) { - $this->loadModel('common')->deny('zahost', 'view'); + $this->loadModel('common')->deny('zanode', 'browse'); } $this->view->title = $this->lang->zanode->common; $this->view->nodeList = $this->loadModel("zanode")->getListByHost($hostID, $orderBy); diff --git a/module/zanode/lang/en.php b/module/zanode/lang/en.php index 78417a405f..dcada9c8bd 100644 --- a/module/zanode/lang/en.php +++ b/module/zanode/lang/en.php @@ -49,6 +49,7 @@ $lang->zanode->confirmShutdown = "Are you sure to shutdown the ZenAgent Node?"; $lang->zanode->confirmSuspend = "Are you sure to suspend the ZenAgent Node?"; $lang->zanode->confirmResume = "Are you sure to resume the ZenAgent Node?"; $lang->zanode->confirmRestore = "Are you sure to restore the ZenAgent Node?"; +$lang->zanode->confirmRestore = "The ZenAgent Node will be restored to this snapshot state, are you sure you want to continue?"; $lang->zanode->actionSuccess = 'Success'; $lang->zanode->deleted = "Deleted"; $lang->zanode->scriptPath = "Script path"; diff --git a/module/zanode/lang/zh-cn.php b/module/zanode/lang/zh-cn.php index f499d510d7..4ea8485bf4 100644 --- a/module/zanode/lang/zh-cn.php +++ b/module/zanode/lang/zh-cn.php @@ -48,7 +48,7 @@ $lang->zanode->confirmReboot = "您确定重启执行节点吗?"; $lang->zanode->confirmShutdown = "您确定关闭执行节点吗?"; $lang->zanode->confirmSuspend = "您确定休眠执行节点吗?"; $lang->zanode->confirmResume = "您确定恢复执行节点吗?"; -$lang->zanode->confirmRestore = "您确定还原执行节点吗?"; +$lang->zanode->confirmRestore = "执行节点将会还原至此快照状态,您确定要继续么?"; $lang->zanode->actionSuccess = '操作成功'; $lang->zanode->deleted = "已删除"; $lang->zanode->scriptPath = "脚本目录"; diff --git a/module/zanode/view/browsesnapshot.html.php b/module/zanode/view/browsesnapshot.html.php index 3686889565..1f5ebda9a4 100644 --- a/module/zanode/view/browsesnapshot.html.php +++ b/module/zanode/view/browsesnapshot.html.php @@ -38,6 +38,8 @@ $snapshot->status = ($snapshot->status == 'restoring' && time() - strtotime($snapshot->restoreDate) > 600) ? 'restore_failed' : $snapshot->status; $restoreAttr = "title='{$lang->zanode->restoreSnapshot}' target='hiddenwin'"; $restoreAttr .= $snapshot->status == 'restoring' ? ' class="btn disabled"' : 'class="btn"'; + $deleteAttr = "title='{$lang->zanode->deleteSnapshot}' target='hiddenwin'"; + $deleteAttr .= $snapshot->status == 'restoring' ? ' class="btn disabled"' : 'class="btn"'; ?> localName ? $snapshot->localName : $snapshot->name;?> '>zanode->snapshot->statusList, $snapshot->status, '');?> @@ -46,7 +48,7 @@ ', 'hiddenwin', "title={$lang->zanode->editSnapshot} onclick='window.parent.editSnapshot(\"" . $this->createLink('zanode', 'editSnapshot', "snapshotID={$snapshot->id}") . "\")' class='btn'");?> createLink('zanode', 'restoreSnapshot', "nodeID={$nodeID}&snapshotID={$snapshot->id}"), '', 'hiddenwin', $restoreAttr);?> - createLink('zanode', 'deleteSnapshot', "snapshotID={$snapshot->id}"), '', 'hiddenwin', "title={$lang->zanode->deleteSnapshot} class='btn'");?> + createLink('zanode', 'deleteSnapshot', "snapshotID={$snapshot->id}"), '', 'hiddenwin', $deleteAttr);?> diff --git a/module/zanode/view/list.html.php b/module/zanode/view/list.html.php index 084e62a41a..37e595a1e5 100644 --- a/module/zanode/view/list.html.php +++ b/module/zanode/view/list.html.php @@ -11,6 +11,7 @@ * @link http://www.zentao.net */ ?> + getModuleRoot() . 'common/view/header.html.php'; ?>
    From 6374db88a628a9e63bb39792f4bf58d69a914c4e Mon Sep 17 00:00:00 2001 From: zhaoke Date: Fri, 3 Feb 2023 05:35:47 +0000 Subject: [PATCH 139/499] * Fix bug #31896. --- module/zahost/control.php | 1 - 1 file changed, 1 deletion(-) diff --git a/module/zahost/control.php b/module/zahost/control.php index a49ab2902a..e7787eb289 100644 --- a/module/zahost/control.php +++ b/module/zahost/control.php @@ -169,7 +169,6 @@ class zahost extends control } $this->dao->update(TABLE_ZAHOST)->set('deleted')->eq(1)->where('id')->eq($hostID)->exec(); - $this->loadModel('action')->create('zahost', $hostID, 'deleted'); $this->loadModel('action')->create('zahost', $hostID, 'deleted', '', $extra = ACTIONMODEL::CAN_UNDELETED); /* if ajax request, send result. */ From 1583320705fb5043e61e7df5f6950938fd3a5aa1 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Fri, 3 Feb 2023 05:41:57 +0000 Subject: [PATCH 140/499] * Merge --- module/action/lang/de.php | 4 ++ module/action/lang/en.php | 6 ++- module/action/lang/fr.php | 4 ++ module/action/lang/zh-cn.php | 6 ++- module/group/lang/resource.php | 34 ++++++++-------- module/zanode/control.php | 28 ++++++++++++++ module/zanode/lang/de.php | 22 +++++++---- module/zanode/lang/en.php | 16 ++++---- module/zanode/lang/fr.php | 22 +++++++---- module/zanode/lang/zh-cn.php | 16 ++++---- module/zanode/model.php | 45 ++++++++++++++++++++++ module/zanode/view/browsesnapshot.html.php | 14 ++++--- module/zanode/view/view.html.php | 2 +- 13 files changed, 166 insertions(+), 53 deletions(-) diff --git a/module/action/lang/de.php b/module/action/lang/de.php index f4a0a74ae1..e29603c2f1 100644 --- a/module/action/lang/de.php +++ b/module/action/lang/de.php @@ -238,7 +238,9 @@ $lang->action->desc->switchtolight = '$date, Switch from ALM mode to ligh $lang->action->desc->getvnc = '$date, Remote control $extra by $actor .' . "\n"; $lang->action->desc->unlinkproduct = '$date, the project is disassociated from the $extra, synchronization disassociates the ' . $lang->executionCommon . 's of the project from the $extra.' . "\n"; $lang->action->desc->createdsnapshot = '$date, $actor creates a snapshot $extra。' . "\n"; +$lang->action->desc->restoredsnapshot = '$date, $actor restored a snapshot $extra。' . "\n"; $lang->action->desc->editsnapshot = '$date, $actor edited the snapshot $extra。' . "\n"; +$lang->action->desc->deletesnapshot = '$date, $actor deleted snapshot $extra。' . "\n"; /* Used to describe the history of operations related to parent-child tasks. */ $lang->action->desc->createchildren = '$date, $actor created a child task $extra。' . "\n"; @@ -422,7 +424,9 @@ $lang->action->label->linkedrepo = 'Linked Code Repo'; $lang->action->label->unlinkedrepo = 'Unlinked Code Repo'; $lang->action->label->unlinkproduct = 'Unlinked Product'; $lang->action->label->createdsnapshot = 'create snapshot'; +$lang->action->label->restoredsnapshot = 'create snapshot'; $lang->action->label->editsnapshot = 'edit snapshot'; +$lang->action->label->deletesnapshot = 'deleted snapshot'; /* Dynamic information is grouped by object. */ $lang->action->dynamicAction = new stdclass; diff --git a/module/action/lang/en.php b/module/action/lang/en.php index 7ead472084..64223a9966 100755 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -238,8 +238,9 @@ $lang->action->desc->switchtolight = '$date, Switch from ALM mode to ligh $lang->action->desc->getvnc = '$date, Remote control $extra by $actor .' . "\n"; $lang->action->desc->unlinkproduct = '$date, the project is disassociated from the $extra, synchronization disassociates the ' . $lang->executionCommon . 's of the project from the $extra.' . "\n"; $lang->action->desc->createdsnapshot = '$date, $actor creates a snapshot $extra。' . "\n"; -$lang->action->desc->restoredsnapshot = '$date, $actor restored a snapshot $extra。' . "\n"; +$lang->action->desc->restoredsnapshot = '$date, $actor restored a snapshot $extra。' . "\n"; $lang->action->desc->editsnapshot = '$date, $actor edited the snapshot $extra。' . "\n"; +$lang->action->desc->deletesnapshot = '$date, $actor deleted snapshot $extra。' . "\n"; /* Used to describe the history of operations related to parent-child tasks. */ $lang->action->desc->createchildren = '$date, $actor created a child task $extra。' . "\n"; @@ -423,8 +424,9 @@ $lang->action->label->linkedrepo = 'Linked Code Repo'; $lang->action->label->unlinkedrepo = 'Unlinked Code Repo'; $lang->action->label->unlinkproduct = 'Unlinked Product'; $lang->action->label->createdsnapshot = 'create snapshot'; -$lang->action->label->restoredsnapshot = 'create snapshot'; +$lang->action->label->restoredsnapshot = 'create snapshot'; $lang->action->label->editsnapshot = 'edit snapshot'; +$lang->action->label->deletesnapshot = 'deleted snapshot'; /* Dynamic information is grouped by object. */ $lang->action->dynamicAction = new stdclass; diff --git a/module/action/lang/fr.php b/module/action/lang/fr.php index a3a3fce60a..b35dfacfe1 100644 --- a/module/action/lang/fr.php +++ b/module/action/lang/fr.php @@ -238,7 +238,9 @@ $lang->action->desc->switchtolight = '$date, Switch from ALM mode to ligh $lang->action->desc->getvnc = '$date, Remote control $extra by $actor .' . "\n"; $lang->action->desc->unlinkproduct = '$date, the project is disassociated from the $extra, synchronization disassociates the ' . $lang->executionCommon . 's of the project from the $extra.' . "\n"; $lang->action->desc->createdsnapshot = '$date, $actor creates a snapshot $extra。' . "\n"; +$lang->action->desc->restoredsnapshot = '$date, $actor restored a snapshot $extra。' . "\n"; $lang->action->desc->editsnapshot = '$date, $actor edited the snapshot $extra。' . "\n"; +$lang->action->desc->deletesnapshot = '$date, $actor deleted snapshot $extra。' . "\n"; /* Used to describe the history of operations related to parent-child tasks. */ $lang->action->desc->createchildren = '$date, $actor a créé un sous-tâche $extra。' . "\n"; @@ -422,7 +424,9 @@ $lang->action->label->linkedrepo = 'Linked Code Repo'; $lang->action->label->unlinkedrepo = 'Unlinked Code Repo'; $lang->action->label->unlinkproduct = 'Unlinked Product'; $lang->action->label->createdsnapshot = 'create snapshot'; +$lang->action->label->restoredsnapshot = 'create snapshot'; $lang->action->label->editsnapshot = 'edit snapshot'; +$lang->action->label->deletesnapshot = 'deleted snapshot'; /* Dynamic information is grouped by object. */ $lang->action->dynamicAction = new stdclass(); diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index 868c060b34..ede1fbb1ee 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -238,8 +238,9 @@ $lang->action->desc->switchtolight = '$date, 由于 '. $lang->adm $lang->action->desc->getvnc = '$date, $actor对执行节点 $extra 进行了远程操控。' . "\n"; $lang->action->desc->unlinkproduct = '$date, 系统判断由于' . $lang->executionCommon . '所属项目与$extra取消关联,同步将' . $lang->executionCommon . '与$extra取消关联。' . "\n"; $lang->action->desc->createdsnapshot = '$date, $actor 创建了快照 $extra。' . "\n"; -$lang->action->desc->restoredsnapshot = '$date, $actor 还原了快照 $extra。' . "\n"; +$lang->action->desc->restoredsnapshot = '$date, $actor 还原了快照 $extra。' . "\n"; $lang->action->desc->editsnapshot = '$date, $actor 编辑了快照 $extra。' . "\n"; +$lang->action->desc->deletesnapshot = '$date, $actor 删除了快照 $extra。' . "\n"; /* 用来描述和父子任务相关的操作历史记录。*/ $lang->action->desc->createchildren = '$date, 由 $actor 创建子任务 $extra。' . "\n"; @@ -423,8 +424,9 @@ $lang->action->label->linkedrepo = '关联代码库到'; $lang->action->label->unlinkedrepo = '取消了项目与代码库的关联'; $lang->action->label->unlinkproduct = '取消了与产品的关联'; $lang->action->label->createdsnapshot = '创建了快照'; -$lang->action->label->restoredsnapshot = '还原了快照'; +$lang->action->label->restoredsnapshot = '还原了快照'; $lang->action->label->editsnapshot = '编辑了快照'; +$lang->action->label->deletesnapshot = '编辑了快照'; /* 动态信息按照对象分组 */ $lang->action->dynamicAction = new stdclass(); diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index fc020d0d71..e58bbc2d7e 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -1239,21 +1239,23 @@ $lang->zahost->methodOrder[30] = 'downloadImage'; $lang->zahost->methodOrder[35] = 'cancelDownload'; $lang->resource->zanode = new stdclass(); -$lang->resource->zanode->browse = 'browse'; -$lang->resource->zanode->create = 'create'; -$lang->resource->zanode->edit = 'edit'; -$lang->resource->zanode->destroy = 'destroy'; -$lang->resource->zanode->reboot = 'reboot'; -$lang->resource->zanode->suspend = 'suspend'; -$lang->resource->zanode->resume = 'resume'; -$lang->resource->zanode->getVNC = 'getVNC'; -$lang->resource->zanode->start = 'boot'; -$lang->resource->zanode->close = 'shutdown'; -$lang->resource->zanode->view = 'view'; -$lang->resource->zanode->createImage = 'createImage'; -$lang->resource->zanode->browseSnapshot = 'browseSnapshot'; -$lang->resource->zanode->createSnapshot = 'createSnapshot'; -$lang->resource->zanode->editSnapshot = 'editSnapshot'; +$lang->resource->zanode->browse = 'browse'; +$lang->resource->zanode->create = 'create'; +$lang->resource->zanode->edit = 'edit'; +$lang->resource->zanode->destroy = 'destroy'; +$lang->resource->zanode->reboot = 'reboot'; +$lang->resource->zanode->suspend = 'suspend'; +$lang->resource->zanode->resume = 'resume'; +$lang->resource->zanode->getVNC = 'getVNC'; +$lang->resource->zanode->start = 'boot'; +$lang->resource->zanode->close = 'shutdown'; +$lang->resource->zanode->view = 'view'; +$lang->resource->zanode->createImage = 'createImage'; +$lang->resource->zanode->browseSnapshot = 'browseSnapshot'; +$lang->resource->zanode->createSnapshot = 'createSnapshot'; +$lang->resource->zanode->editSnapshot = 'editSnapshot'; +$lang->resource->zanode->restoreSnapshot = 'restoreSnapshot'; +$lang->resource->zanode->deleteSnapshot = 'deleteSnapshot'; $lang->zanode->methodOrder[0] = 'browse'; $lang->zanode->methodOrder[5] = 'create'; @@ -1270,6 +1272,8 @@ $lang->zanode->methodOrder[55] = 'createImage'; $lang->zanode->methodOrder[60] = 'browseSnapshot'; $lang->zanode->methodOrder[65] = 'createSnapshot'; $lang->zanode->methodOrder[70] = 'editSnapshot'; +$lang->zanode->methodOrder[75] = 'restoreSnapshot'; +$lang->zanode->methodOrder[80] = 'deleteSnapshot'; $lang->resource->repo = new stdclass(); $lang->resource->repo->browse = 'browseAction'; diff --git a/module/zanode/control.php b/module/zanode/control.php index 595e650db2..73559c7886 100644 --- a/module/zanode/control.php +++ b/module/zanode/control.php @@ -342,6 +342,34 @@ class zanode extends control $this->display(); } + /** + * Delete Snapshot. + * + * @param int $snapshotID + * @param string $confirm + * @access public + * @return void + */ + public function deleteSnapshot($snapshotID, $confirm = 'no') + { + if($confirm == 'no') + { + return print(js::confirm($this->lang->zanode->confirmDeleteSnapshot, inlink('deleteSnapshot', "snapshotID={$snapshotID}&confirm=yes"))); + } + + $result = $this->zanode->deleteSnapshot($snapshotID); + + if($result !== true) + { + return print(js::alert($result)); + } + else + { + if(isonlybody()) return print(js::alert($this->lang->zanode->actionSuccess) . js::reload('parent.parent')); + return print(js::alert($this->lang->zanode->actionSuccess) . js::locate($this->createLink('zanode', 'browse'), 'parent')); + } + } + /** * Desctroy node. * diff --git a/module/zanode/lang/de.php b/module/zanode/lang/de.php index 483ec50fae..9d05efbc81 100644 --- a/module/zanode/lang/de.php +++ b/module/zanode/lang/de.php @@ -79,13 +79,21 @@ $lang->zanode->createImageSuccess = 'Successed, You can use this image to create $lang->zanode->createImageFail = 'Failed to create'; $lang->zanode->createImageButton = 'Create image'; -$lang->zanode->snapshotName = 'Snapshot Name'; -$lang->zanode->browseSnapshot = 'Snapshot List'; -$lang->zanode->createSnapshot = 'Create Snapshot'; -$lang->zanode->editSnapshot = 'Edit Snapshot'; -$lang->zanode->restoreSnapshot = 'Revert Snapshot'; -$lang->zanode->deleteSnapshot = 'Delete Snapshot'; -$lang->zanode->snapshotEmpty = 'No snapshots'; +$lang->zanode->snapshotName = 'Snapshot Name'; +$lang->zanode->browseSnapshot = 'Snapshot List'; +$lang->zanode->createSnapshot = 'Create Snapshot'; +$lang->zanode->editSnapshot = 'Edit Snapshot'; +$lang->zanode->restoreSnapshot = 'Revert Snapshot'; +$lang->zanode->deleteSnapshot = 'Delete Snapshot'; +$lang->zanode->snapshotEmpty = 'No snapshots'; +$lang->zanode->confirmDeleteSnapshot = "The snapshot cannot be restored from the recycle bin after being deleted. Are you sure to continue?"; + +$lang->zanode->snapshot->statusList['creating'] = 'Creating'; +$lang->zanode->snapshot->statusList['completed'] = 'Create Completed'; +$lang->zanode->snapshot->statusList['failed'] = 'Create Failed'; +$lang->zanode->snapshot->statusList['restoring'] = 'Restoring'; +$lang->zanode->snapshot->statusList['restore_failed'] = 'Restore Failed'; +$lang->zanode->snapshot->statusList['restore_completed'] = 'Restore Completed'; $lang->zanode->imageNameEmpty = 'Name can not be empty.'; diff --git a/module/zanode/lang/en.php b/module/zanode/lang/en.php index dcada9c8bd..2e088159cb 100644 --- a/module/zanode/lang/en.php +++ b/module/zanode/lang/en.php @@ -81,16 +81,18 @@ $lang->zanode->createImageSuccess = 'Successed, You can use this image to create $lang->zanode->createImageFail = 'Failed to create'; $lang->zanode->createImageButton = 'Create image'; -$lang->zanode->snapshotName = 'Snapshot Name'; -$lang->zanode->browseSnapshot = 'Snapshot List'; -$lang->zanode->createSnapshot = 'Create Snapshot'; -$lang->zanode->editSnapshot = 'Edit Snapshot'; -$lang->zanode->restoreSnapshot = 'Revert Snapshot'; -$lang->zanode->deleteSnapshot = 'Delete Snapshot'; -$lang->zanode->snapshotEmpty = 'No snapshots'; +$lang->zanode->snapshotName = 'Snapshot Name'; +$lang->zanode->browseSnapshot = 'Snapshot List'; +$lang->zanode->createSnapshot = 'Create Snapshot'; +$lang->zanode->editSnapshot = 'Edit Snapshot'; +$lang->zanode->restoreSnapshot = 'Revert Snapshot'; +$lang->zanode->deleteSnapshot = 'Delete Snapshot'; +$lang->zanode->snapshotEmpty = 'No snapshots'; +$lang->zanode->confirmDeleteSnapshot = "The snapshot cannot be restored from the recycle bin after being deleted. Are you sure to continue?"; $lang->zanode->snapshot->statusList['creating'] = 'Creating'; $lang->zanode->snapshot->statusList['completed'] = 'Create Completed'; +$lang->zanode->snapshot->statusList['failed'] = 'Create Failed'; $lang->zanode->snapshot->statusList['restoring'] = 'Restoring'; $lang->zanode->snapshot->statusList['restore_failed'] = 'Restore Failed'; $lang->zanode->snapshot->statusList['restore_completed'] = 'Restore Completed'; diff --git a/module/zanode/lang/fr.php b/module/zanode/lang/fr.php index 483ec50fae..9d05efbc81 100644 --- a/module/zanode/lang/fr.php +++ b/module/zanode/lang/fr.php @@ -79,13 +79,21 @@ $lang->zanode->createImageSuccess = 'Successed, You can use this image to create $lang->zanode->createImageFail = 'Failed to create'; $lang->zanode->createImageButton = 'Create image'; -$lang->zanode->snapshotName = 'Snapshot Name'; -$lang->zanode->browseSnapshot = 'Snapshot List'; -$lang->zanode->createSnapshot = 'Create Snapshot'; -$lang->zanode->editSnapshot = 'Edit Snapshot'; -$lang->zanode->restoreSnapshot = 'Revert Snapshot'; -$lang->zanode->deleteSnapshot = 'Delete Snapshot'; -$lang->zanode->snapshotEmpty = 'No snapshots'; +$lang->zanode->snapshotName = 'Snapshot Name'; +$lang->zanode->browseSnapshot = 'Snapshot List'; +$lang->zanode->createSnapshot = 'Create Snapshot'; +$lang->zanode->editSnapshot = 'Edit Snapshot'; +$lang->zanode->restoreSnapshot = 'Revert Snapshot'; +$lang->zanode->deleteSnapshot = 'Delete Snapshot'; +$lang->zanode->snapshotEmpty = 'No snapshots'; +$lang->zanode->confirmDeleteSnapshot = "The snapshot cannot be restored from the recycle bin after being deleted. Are you sure to continue?"; + +$lang->zanode->snapshot->statusList['creating'] = 'Creating'; +$lang->zanode->snapshot->statusList['completed'] = 'Create Completed'; +$lang->zanode->snapshot->statusList['failed'] = 'Create Failed'; +$lang->zanode->snapshot->statusList['restoring'] = 'Restoring'; +$lang->zanode->snapshot->statusList['restore_failed'] = 'Restore Failed'; +$lang->zanode->snapshot->statusList['restore_completed'] = 'Restore Completed'; $lang->zanode->imageNameEmpty = 'Name can not be empty.'; diff --git a/module/zanode/lang/zh-cn.php b/module/zanode/lang/zh-cn.php index 4ea8485bf4..4372c17879 100644 --- a/module/zanode/lang/zh-cn.php +++ b/module/zanode/lang/zh-cn.php @@ -80,16 +80,18 @@ $lang->zanode->createImageSuccess = '镜像导出成功,您可以使用此镜 $lang->zanode->createImageFail = '镜像导出失败'; $lang->zanode->createImageButton = '去创建'; -$lang->zanode->snapshotName = '快照名称'; -$lang->zanode->browseSnapshot = '快照列表'; -$lang->zanode->createSnapshot = '创建快照'; -$lang->zanode->editSnapshot = '编辑快照'; -$lang->zanode->restoreSnapshot = '还原快照'; -$lang->zanode->deleteSnapshot = '删除快照'; -$lang->zanode->snapshotEmpty = '无快照'; +$lang->zanode->snapshotName = '快照名称'; +$lang->zanode->browseSnapshot = '快照列表'; +$lang->zanode->createSnapshot = '创建快照'; +$lang->zanode->editSnapshot = '编辑快照'; +$lang->zanode->restoreSnapshot = '还原快照'; +$lang->zanode->deleteSnapshot = '删除快照'; +$lang->zanode->snapshotEmpty = '无快照'; +$lang->zanode->confirmDeleteSnapshot = "快照被删除后无法从回收站中还原,您确定继续么?"; $lang->zanode->snapshot->statusList['creating'] = '创建中'; $lang->zanode->snapshot->statusList['completed'] = '创建完成'; +$lang->zanode->snapshot->statusList['failed'] = '创建失败'; $lang->zanode->snapshot->statusList['restoring'] = '还原中'; $lang->zanode->snapshot->statusList['restore_failed'] = '还原失败'; $lang->zanode->snapshot->statusList['restore_completed'] = '还原成功'; diff --git a/module/zanode/model.php b/module/zanode/model.php index ecc4bb0440..a594af4650 100644 --- a/module/zanode/model.php +++ b/module/zanode/model.php @@ -299,6 +299,42 @@ class zanodemodel extends model return false; } + /** + * Delete Snapshot. + * + * @param int $id + * @access public + * @return void + */ + public function deleteSnapshot($snapshotID) + { + $snapshot = $this->getImageByID($snapshotID); + $node = $this->getNodeByID($snapshot->host); + + if($node) + { + $agnetUrl = 'http://' . $node->ip . ':' . $node->hzap; + $param = (object)array( + 'name' => $snapshot->name, + 'task' => $snapshotID, + 'vm' => $node->name + ); + + $result = commonModel::http($agnetUrl . static::SNAPSHOT_REMOVE_PATH, json_encode($param,JSON_NUMERIC_CHECK), array(), array("Authorization:$node->tokenSN")); + $result = json_decode($result); + + if(!empty($result) and $result->code == 'success') + { + $this->dao->delete()->from(TABLE_IMAGE)->where('id')->eq($snapshotID)->exec(); + $this->loadModel('action')->create('zanode', $node->id, 'deletesnapshot', '', $snapshot->name); + return true; + } + + $error = (!empty($result) and !empty($result->msg)) ? $result->msg : $this->lang->zanode->apiError['fail']; + return $error; + } + } + /** * Action Node. @@ -662,6 +698,15 @@ class zanodemodel extends model ->page($pager) ->fetchAll('name'); + foreach($snapshotList as $name => $snapshot) + { + if($snapshot->status == 'creating' and (time() - strtotime($snapshot->createdDate)) > 1800) + { + $this->dao->update(TABLE_IMAGE)->set('status')->eq('failed')->where('id')->eq($snapshot->id)->exec(); + $snapshotList[$name]->status = 'failed'; + } + } + return $snapshotList; } diff --git a/module/zanode/view/browsesnapshot.html.php b/module/zanode/view/browsesnapshot.html.php index 1f5ebda9a4..8abc25f631 100644 --- a/module/zanode/view/browsesnapshot.html.php +++ b/module/zanode/view/browsesnapshot.html.php @@ -34,19 +34,23 @@ - status = ($snapshot->status == 'restoring' && time() - strtotime($snapshot->restoreDate) > 600) ? 'restore_failed' : $snapshot->status; + + $editAttr = $snapshot->status == 'failed' ? 'class="btn disabled"' : "title={$lang->zanode->editSnapshot} onclick='window.parent.editSnapshot(\"" . $this->createLink('zanode', 'editSnapshot', "snapshotID={$snapshot->id}") . "\")' class='btn'"; + $restoreAttr = "title='{$lang->zanode->restoreSnapshot}' target='hiddenwin'"; - $restoreAttr .= $snapshot->status == 'restoring' ? ' class="btn disabled"' : 'class="btn"'; + $restoreAttr .= ($snapshot->status == 'restoring' or $snapshot->status == 'failed') ? ' class="btn disabled"' : 'class="btn"'; + $deleteAttr = "title='{$lang->zanode->deleteSnapshot}' target='hiddenwin'"; - $deleteAttr .= $snapshot->status == 'restoring' ? ' class="btn disabled"' : 'class="btn"'; + $deleteAttr .= (($snapshot->status == 'restoring' and (time() - strtotime($snapshot->restoreDate)) <= 600) or $snapshot->status == 'failed') ? ' class="btn disabled"' : 'class="btn"'; ?> localName ? $snapshot->localName : $snapshot->name;?> - '>zanode->snapshot->statusList, $snapshot->status, '');?> + zanode->snapshot->statusList, $snapshot->status, '');?> createdBy, '')?> createdDate;?> - ', 'hiddenwin', "title={$lang->zanode->editSnapshot} onclick='window.parent.editSnapshot(\"" . $this->createLink('zanode', 'editSnapshot', "snapshotID={$snapshot->id}") . "\")' class='btn'");?> + ', 'hiddenwin', $editAttr);?> createLink('zanode', 'restoreSnapshot', "nodeID={$nodeID}&snapshotID={$snapshot->id}"), '', 'hiddenwin', $restoreAttr);?> createLink('zanode', 'deleteSnapshot', "snapshotID={$snapshot->id}"), '', 'hiddenwin', $deleteAttr);?> diff --git a/module/zanode/view/view.html.php b/module/zanode/view/view.html.php index 27e1210261..ff3d5ee010 100644 --- a/module/zanode/view/view.html.php +++ b/module/zanode/view/view.html.php @@ -152,7 +152,7 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
    zanode->browseSnapshot;?>
    - +
    createLink('zanode', 'browseSnapshot', "nodeID=$zanode->id", '', true) . "' frameborder='no' allowfullscreen='true' mozallowfullscreen='true' webkitallowfullscreen='true' allowtransparency='true' scrolling='auto' onload='setIframeHeight(this)' style='min-height:300px;'>";?>
    From d4f96da08fb0a1e2015ca81eb50d8c0a09c108c4 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 3 Feb 2023 13:57:36 +0800 Subject: [PATCH 141/499] * code for story 41755. --- module/admin/lang/menu.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/admin/lang/menu.php b/module/admin/lang/menu.php index 3d069bdced..e6030721a4 100644 --- a/module/admin/lang/menu.php +++ b/module/admin/lang/menu.php @@ -146,8 +146,13 @@ if($config->vision == 'lite') unset($lang->admin->menuList->model['menuOrder']['10']); unset($lang->admin->menuList->model['menuOrder']['15']); + unset($lang->admin->menuList->feature['subMenu']['product']); unset($lang->admin->menuList->feature['subMenu']['execution']); unset($lang->admin->menuList->feature['subMenu']['qa']); + unset($lang->admin->menuList->feature['menuOrder']['10']); unset($lang->admin->menuList->feature['menuOrder']['15']); unset($lang->admin->menuList->feature['menuOrder']['20']); + + $lang->admin->menuList->feature['subMenu']['project'] = array('link' => "{$lang->project->common}|custom|execution|"); + $lang->admin->menuList->feature['menuOrder']['15'] = 'project'; } From a6a820376941e9eab7197d1767bbf78488672b30 Mon Sep 17 00:00:00 2001 From: zenggang Date: Fri, 3 Feb 2023 06:07:23 +0000 Subject: [PATCH 142/499] *Fix bugs --- module/zanode/css/browsesnapshot.css | 2 +- module/zanode/js/browsesnapshot.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 module/zanode/js/browsesnapshot.js diff --git a/module/zanode/css/browsesnapshot.css b/module/zanode/css/browsesnapshot.css index 5218ddb6ee..d5033bef8f 100644 --- a/module/zanode/css/browsesnapshot.css +++ b/module/zanode/css/browsesnapshot.css @@ -3,4 +3,4 @@ body{background-color: #fff!important;} .c-createdBy {width: 100px;} .c-datetime {width: 130px;} -.c-status {width: 80px;} +.c-status {width: 120px;} diff --git a/module/zanode/js/browsesnapshot.js b/module/zanode/js/browsesnapshot.js new file mode 100644 index 0000000000..a09811ad70 --- /dev/null +++ b/module/zanode/js/browsesnapshot.js @@ -0,0 +1,7 @@ +$(function() +{ + var myPager = $('.pager').data('zui.pager'); + + myPager.options.menuDirection = 'dropdown'; + myPager.set(); +}); From ecee798f488826bad8439551f728bb852865475e Mon Sep 17 00:00:00 2001 From: zenggang Date: Fri, 3 Feb 2023 08:26:26 +0000 Subject: [PATCH 143/499] * Fix bugs --- module/zanode/control.php | 19 ++++++++++--------- module/zanode/lang/de.php | 1 + module/zanode/lang/en.php | 1 + module/zanode/lang/fr.php | 1 + module/zanode/lang/zh-cn.php | 1 + module/zanode/model.php | 2 ++ module/zanode/view/browsesnapshot.html.php | 2 +- 7 files changed, 17 insertions(+), 10 deletions(-) diff --git a/module/zanode/control.php b/module/zanode/control.php index 73559c7886..ef0141ded4 100644 --- a/module/zanode/control.php +++ b/module/zanode/control.php @@ -439,14 +439,15 @@ class zanode extends control $snapshotList = $this->zanode->getSnapshotList($nodeID, $browseType, $param, $orderBy, $pager); - $this->view->title = $this->lang->zanode->browseSnapshot; - $this->view->nodeID = $nodeID; - $this->view->snapshotList = $snapshotList; - $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->pager = $pager; - $this->view->param = $param; - $this->view->orderBy = $orderBy; - $this->view->browseType = $browseType; + $this->view->title = $this->lang->zanode->browseSnapshot; + $this->view->nodeID = $nodeID; + $this->view->node = $this->zanode->getNodeByID($nodeID); + $this->view->snapshotList = $snapshotList; + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->pager = $pager; + $this->view->param = $param; + $this->view->orderBy = $orderBy; + $this->view->browseType = $browseType; $this->display(); } @@ -472,7 +473,7 @@ class zanode extends control } else { - if(isonlybody()) return print(js::alert($this->lang->zanode->actionSuccess) . js::reload('parent')); + if(isonlybody()) return print(js::alert($this->lang->zanode->actionSuccess) . js::reload('parent.parent')); return print(js::alert($this->lang->zanode->actionSuccess) . js::locate($this->createLink('zanode', 'browse'), 'parent')); } } diff --git a/module/zanode/lang/de.php b/module/zanode/lang/de.php index 9d05efbc81..35fb26c602 100644 --- a/module/zanode/lang/de.php +++ b/module/zanode/lang/de.php @@ -117,6 +117,7 @@ $lang->zanode->statusList['shutodown'] = 'shutdown'; $lang->zanode->statusList['destroy_fail'] = 'Destroy Fail'; $lang->zanode->statusList['wait'] = 'Initializing'; $lang->zanode->statusList['online'] = 'Online'; +$lang->zanode->statusList['restoring'] = 'Restoring'; $lang->zanode->initNotice = "Succeeded. Please initialize the execution node or return to the list."; $lang->zanode->initButton = "Initialize"; diff --git a/module/zanode/lang/en.php b/module/zanode/lang/en.php index 2e088159cb..5c671c31a1 100644 --- a/module/zanode/lang/en.php +++ b/module/zanode/lang/en.php @@ -121,6 +121,7 @@ $lang->zanode->statusList['shutodown'] = 'shutdown'; $lang->zanode->statusList['destroy_fail'] = 'Destroy Fail'; $lang->zanode->statusList['wait'] = 'Initializing'; $lang->zanode->statusList['online'] = 'Online'; +$lang->zanode->statusList['restoring'] = 'Restoring'; $lang->zanode->initNotice = "Succeeded. Please initialize the execution node or return to the list."; $lang->zanode->initButton = "Initialize"; diff --git a/module/zanode/lang/fr.php b/module/zanode/lang/fr.php index 9d05efbc81..35fb26c602 100644 --- a/module/zanode/lang/fr.php +++ b/module/zanode/lang/fr.php @@ -117,6 +117,7 @@ $lang->zanode->statusList['shutodown'] = 'shutdown'; $lang->zanode->statusList['destroy_fail'] = 'Destroy Fail'; $lang->zanode->statusList['wait'] = 'Initializing'; $lang->zanode->statusList['online'] = 'Online'; +$lang->zanode->statusList['restoring'] = 'Restoring'; $lang->zanode->initNotice = "Succeeded. Please initialize the execution node or return to the list."; $lang->zanode->initButton = "Initialize"; diff --git a/module/zanode/lang/zh-cn.php b/module/zanode/lang/zh-cn.php index 4372c17879..a000f90a49 100644 --- a/module/zanode/lang/zh-cn.php +++ b/module/zanode/lang/zh-cn.php @@ -121,6 +121,7 @@ $lang->zanode->statusList['shutodown'] = '已关机'; $lang->zanode->statusList['destroy_fail'] = '销毁失败'; $lang->zanode->statusList['wait'] = '初始化中'; $lang->zanode->statusList['online'] = '已上架'; +$lang->zanode->statusList['restoring'] = '还原中'; $lang->zanode->initNotice = "保存成功,请初始化执行节点或返回列表。"; $lang->zanode->initButton = "去初始化"; diff --git a/module/zanode/model.php b/module/zanode/model.php index a594af4650..5b7c426a5c 100644 --- a/module/zanode/model.php +++ b/module/zanode/model.php @@ -277,6 +277,7 @@ class zanodemodel extends model ->set('restoreDate')->eq(helper::now()) ->where('id')->eq($snapshotID)->exec(); + /* Prepare create params. */ $agnetUrl = 'http://' . $node->ip . ':' . $node->hzap; $param = array(array( @@ -290,6 +291,7 @@ class zanodemodel extends model if(!empty($result) and $result->code == 'success') { + $this->dao->update(TABLE_HOST)->set('status')->eq('restoring')->where('id')->eq($node->id)->exec(); $this->loadModel('action')->create('zanode', $zanodeID, 'restoredsnapshot', '', $snap->name); return true; } diff --git a/module/zanode/view/browsesnapshot.html.php b/module/zanode/view/browsesnapshot.html.php index 8abc25f631..067087af4a 100644 --- a/module/zanode/view/browsesnapshot.html.php +++ b/module/zanode/view/browsesnapshot.html.php @@ -40,7 +40,7 @@ $editAttr = $snapshot->status == 'failed' ? 'class="btn disabled"' : "title={$lang->zanode->editSnapshot} onclick='window.parent.editSnapshot(\"" . $this->createLink('zanode', 'editSnapshot', "snapshotID={$snapshot->id}") . "\")' class='btn'"; $restoreAttr = "title='{$lang->zanode->restoreSnapshot}' target='hiddenwin'"; - $restoreAttr .= ($snapshot->status == 'restoring' or $snapshot->status == 'failed') ? ' class="btn disabled"' : 'class="btn"'; + $restoreAttr .= ($node->status !='running' or $snapshot->status == 'restoring' or $snapshot->status == 'failed') ? ' class="btn disabled"' : 'class="btn"'; $deleteAttr = "title='{$lang->zanode->deleteSnapshot}' target='hiddenwin'"; $deleteAttr .= (($snapshot->status == 'restoring' and (time() - strtotime($snapshot->restoreDate)) <= 600) or $snapshot->status == 'failed') ? ' class="btn disabled"' : 'class="btn"'; From ec8e0acb79f99486b86b58a5c023d98ea86d60f7 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Fri, 3 Feb 2023 16:37:16 +0800 Subject: [PATCH 144/499] * Code for css in admin.html --- module/admin/css/index.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/admin/css/index.css b/module/admin/css/index.css index 2a2e549dfc..5d365ffe4d 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -17,7 +17,7 @@ .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;} -.settings-list > .setting-box > .setting-desc {padding-bottom: 16px;} +.settings-list > .setting-box > .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;} @@ -45,7 +45,7 @@ .panel.publicClass {padding: 0 10px;} .icon.follow-us {font-size: 20px; padding-left: 10px;} -.setting-help {width: 45px;} +.setting-help {width: 45px; color: #9EA3B0;} .pointer-none {pointer-events: none;} .pd-3 {padding: 3px;} From f71582f9f287cbae06c2ed8a1340cffbd9a55c96 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Fri, 3 Feb 2023 16:49:29 +0800 Subject: [PATCH 145/499] * Code for bug #31907 --- module/admin/css/index.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/admin/css/index.css b/module/admin/css/index.css index 5d365ffe4d..292f9579cf 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -16,7 +16,7 @@ .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;} +.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.lite-setting > .setting-box {flex: 1 1 30%;} From 41829d9fa6f22797c5a633f225a58de4361a45a2 Mon Sep 17 00:00:00 2001 From: zenggang Date: Fri, 3 Feb 2023 08:57:34 +0000 Subject: [PATCH 146/499] *Fix bug#31894 --- module/zanode/view/view.html.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/zanode/view/view.html.php b/module/zanode/view/view.html.php index ff3d5ee010..ace6c719fc 100644 --- a/module/zanode/view/view.html.php +++ b/module/zanode/view/view.html.php @@ -149,10 +149,11 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
    desc) ? htmlspecialchars_decode($zanode->desc) : $lang->noData; ?>
    +
    zanode->browseSnapshot;?>
    - +
    createLink('zanode', 'browseSnapshot', "nodeID=$zanode->id", '', true) . "' frameborder='no' allowfullscreen='true' mozallowfullscreen='true' webkitallowfullscreen='true' allowtransparency='true' scrolling='auto' onload='setIframeHeight(this)' style='min-height:300px;'>";?>
    @@ -161,6 +162,7 @@ $account = strpos($zanode->osName, "windows") ? $config->zanode->defaultWinAccou
    + printExtendFields($zanode, 'div', "position=left&inForm=0&inCell=1"); ?>
    From f1124e5cde4129c8b3c92fd9fba309f92deb107a Mon Sep 17 00:00:00 2001 From: guofeilong Date: Mon, 6 Feb 2023 08:27:17 +0800 Subject: [PATCH 147/499] * Code for bug #31938 --- module/admin/css/index.css | 1 + 1 file changed, 1 insertion(+) diff --git a/module/admin/css/index.css b/module/admin/css/index.css index 292f9579cf..34557ab178 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -19,6 +19,7 @@ .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.lite-setting > .setting-box {flex: 1 1 30%;} +.plug.panel > .panel-title > a {display: flex; align-items: center;} .plugin-list {display: flex; flex-wrap: wrap; padding: 12px 4px 4px 4px;} .plugin-list > .plugin-item {flex: 1 1 26%; padding: 16px 10px; border: 1px solid #EDEEF2; border-radius: 4px; margin-right: 10px; margin-bottom: 16px; width: 0px; cursor: pointer;} From 7faf11867e4f9172b91096203a20eceada14c9b7 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Mon, 6 Feb 2023 08:39:25 +0800 Subject: [PATCH 148/499] * Code for bug #31933 --- module/admin/css/index.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/admin/css/index.css b/module/admin/css/index.css index 34557ab178..d052effbd4 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -19,7 +19,7 @@ .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.lite-setting > .setting-box {flex: 1 1 30%;} -.plug.panel > .panel-title > a {display: flex; align-items: center;} +.panel-title > a {display: flex; align-items: center;} .plugin-list {display: flex; flex-wrap: wrap; padding: 12px 4px 4px 4px;} .plugin-list > .plugin-item {flex: 1 1 26%; padding: 16px 10px; border: 1px solid #EDEEF2; border-radius: 4px; margin-right: 10px; margin-bottom: 16px; width: 0px; cursor: pointer;} From 7184aec50c78d0c4ea69637c414b7b93bd14e227 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 6 Feb 2023 08:58:00 +0800 Subject: [PATCH 149/499] * Fix bug #31929. --- module/execution/view/batchedit.html.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/execution/view/batchedit.html.php b/module/execution/view/batchedit.html.php index e9eaa4d175..8fcdada887 100755 --- a/module/execution/view/batchedit.html.php +++ b/module/execution/view/batchedit.html.php @@ -34,7 +34,8 @@ if(strpos(",{$config->execution->customBatchEditFields},", ",{$field},") !== false) $visibleFields[$field] = ''; } } - $minWidth = (count($visibleFields) > 5) ? 'w-150px' : ''; + $maxCount = strpos($this->app->getClientLang(), 'zh-') !== false ? 5 : 3; + $minWidth = (count($visibleFields) > $maxCount) ? 'w-150px' : ''; $name = $from == 'execution' ? 'execName' : 'name'; $code = $from == 'execution' ? 'execCode' : 'code'; $PM = $from == 'execution' ? 'execPM' : 'PM'; From b9d784a037fed8f48ea890e20076bfabb19bda9d Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 6 Feb 2023 09:37:00 +0800 Subject: [PATCH 150/499] * Fix bug #31928. --- module/execution/lang/en.php | 4 ++-- module/execution/lang/fr.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index 38ed9d0340..12c5dcb84d 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -13,7 +13,7 @@ $lang->execution->allExecutions = 'All ' . $lang->execution->common . 's'; $lang->execution->allExecutionAB = 'Execution List'; $lang->execution->id = $lang->executionCommon . ' ID'; -$lang->execution->type = $lang->executionCommon . 'Type'; +$lang->execution->type = $lang->executionCommon . ' Type'; $lang->execution->name = "{$lang->executionCommon} Name"; $lang->execution->code = "{$lang->executionCommon} Code"; $lang->execution->projectName = 'Project'; @@ -64,7 +64,7 @@ $lang->execution->workHour = ' Hours'; $lang->execution->workHourUnit = 'H'; $lang->execution->totalHours = ' Hours'; $lang->execution->totalDays = ' Days'; -$lang->execution->status = $lang->executionCommon . 'Status'; +$lang->execution->status = $lang->executionCommon . ' Status'; $lang->execution->execStatus = 'Status'; $lang->execution->subStatus = 'Sub Status'; $lang->execution->desc = "{$lang->executionCommon} Description"; diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index 28a1b0a0c0..dbc35313b1 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -13,9 +13,9 @@ $lang->execution->allExecutions = 'Tous les ' . $lang->execution->common . 's'; $lang->execution->allExecutionAB = 'Execution List'; $lang->execution->id = $lang->executionCommon . ' ID'; -$lang->execution->type = $lang->executionCommon . 'Type'; -$lang->execution->name = $lang->executionCommon . 'Name'; -$lang->execution->code = $lang->executionCommon . 'Code'; +$lang->execution->type = $lang->executionCommon . ' Type'; +$lang->execution->name = $lang->executionCommon . ' Name'; +$lang->execution->code = $lang->executionCommon . ' Code'; $lang->execution->projectName = 'Project'; $lang->execution->project = 'Project'; $lang->execution->execId = "{$lang->execution->common} ID"; @@ -64,7 +64,7 @@ $lang->execution->workHour = ' Heures'; $lang->execution->workHourUnit = 'H'; $lang->execution->totalHours = 'Budget (Heure)'; $lang->execution->totalDays = 'Budget (Jour)'; -$lang->execution->status = $lang->executionCommon . 'Status'; +$lang->execution->status = $lang->executionCommon . ' Status'; $lang->execution->execStatus = 'Status'; $lang->execution->subStatus = 'Sub Status'; $lang->execution->desc = $lang->executionCommon . 'Description'; From 9e353f106445ad0d0e9d8a7cd3a82c0d4637cd03 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 6 Feb 2023 09:42:08 +0800 Subject: [PATCH 151/499] * Fix bug #31927. --- module/execution/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/execution/control.php b/module/execution/control.php index 426e9b4b52..20e6f3a674 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -4073,7 +4073,7 @@ class execution extends control $this->post->set('fields', $fields); $this->post->set('rows', $executionStats); - $this->post->set('kind', 'execution'); + $this->post->set('kind', $this->lang->execution->common); $this->fetch('file', 'export2' . $this->post->fileType, $_POST); } From a1aa671bb22c61d218b5d2b2960a90032be2cfd8 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 6 Feb 2023 10:35:12 +0800 Subject: [PATCH 152/499] * Finish task #83745. --- module/group/control.php | 7 ++++++- module/group/lang/de.php | 1 + module/group/lang/en.php | 1 + module/group/lang/fr.php | 1 + module/group/lang/resource.php | 20 +++++++++----------- module/group/lang/zh-cn.php | 1 + 6 files changed, 19 insertions(+), 12 deletions(-) diff --git a/module/group/control.php b/module/group/control.php index 462bd14904..df405316d0 100644 --- a/module/group/control.php +++ b/module/group/control.php @@ -199,7 +199,12 @@ class group extends control */ public function managePriv($type = 'byGroup', $param = 0, $menu = '', $version = '') { - if($type == 'byGroup') $groupID = $param; + if($type == 'byGroup') + { + $groupID = $param; + $this->lang->custom->common = $this->lang->group->config; + } + $this->view->type = $type; foreach($this->lang->resource as $moduleName => $action) { diff --git a/module/group/lang/de.php b/module/group/lang/de.php index 15e565c248..6054a38372 100644 --- a/module/group/lang/de.php +++ b/module/group/lang/de.php @@ -64,6 +64,7 @@ $lang->group->outside = 'Andere Benutzer'; $lang->group->limited = 'Limited Users'; $lang->group->other = 'Andere'; $lang->group->all = 'Alle'; +$lang->group->config = 'Config'; $lang->group->copyOptions['copyPriv'] = 'Rechte kopieren'; $lang->group->copyOptions['copyUser'] = 'Benutzer kopieren'; diff --git a/module/group/lang/en.php b/module/group/lang/en.php index 3f5a031f85..ae6e06027a 100644 --- a/module/group/lang/en.php +++ b/module/group/lang/en.php @@ -64,6 +64,7 @@ $lang->group->outside = 'Other Users'; $lang->group->limited = 'Limited Users'; $lang->group->other = 'Others'; $lang->group->all = 'All Privileges'; +$lang->group->config = 'Config'; $lang->group->copyOptions['copyPriv'] = 'Copy Privileges'; $lang->group->copyOptions['copyUser'] = 'Copy Users'; diff --git a/module/group/lang/fr.php b/module/group/lang/fr.php index 0e0ba4b355..81e58e3c78 100644 --- a/module/group/lang/fr.php +++ b/module/group/lang/fr.php @@ -64,6 +64,7 @@ $lang->group->outside = 'Autres utilisateurs'; $lang->group->limited = 'Limited Users'; $lang->group->other = 'Autres'; $lang->group->all = 'Tous les Privilèges'; +$lang->group->config = 'Config'; $lang->group->copyOptions['copyPriv'] = 'Copier Privilèges'; $lang->group->copyOptions['copyUser'] = 'Copier Utilisateurs'; diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 37b350c0d9..53604e35ce 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -1418,7 +1418,6 @@ $lang->resource->custom->execution = 'execution'; $lang->resource->custom->required = 'required'; $lang->resource->custom->restore = 'restore'; $lang->resource->custom->flow = 'flow'; -$lang->resource->custom->working = 'working'; $lang->resource->custom->setPublic = 'setPublic'; $lang->resource->custom->timezone = 'timezone'; $lang->resource->custom->setStoryConcept = 'setStoryConcept'; @@ -1436,16 +1435,15 @@ $lang->custom->methodOrder[20] = 'execution'; $lang->custom->methodOrder[25] = 'required'; $lang->custom->methodOrder[30] = 'restore'; $lang->custom->methodOrder[35] = 'flow'; -$lang->custom->methodOrder[40] = 'working'; -$lang->custom->methodOrder[45] = 'setPublic'; -$lang->custom->methodOrder[50] = 'timezone'; -$lang->custom->methodOrder[55] = 'setStoryConcept'; -$lang->custom->methodOrder[60] = 'editStoryConcept'; -$lang->custom->methodOrder[65] = 'browseStoryConcept'; -$lang->custom->methodOrder[70] = 'setDefaultConcept'; -$lang->custom->methodOrder[75] = 'deleteStoryConcept'; -$lang->custom->methodOrder[80] = 'kanban'; -$lang->custom->methodOrder[85] = 'code'; +$lang->custom->methodOrder[40] = 'setPublic'; +$lang->custom->methodOrder[45] = 'timezone'; +$lang->custom->methodOrder[50] = 'setStoryConcept'; +$lang->custom->methodOrder[55] = 'editStoryConcept'; +$lang->custom->methodOrder[60] = 'browseStoryConcept'; +$lang->custom->methodOrder[65] = 'setDefaultConcept'; +$lang->custom->methodOrder[70] = 'deleteStoryConcept'; +$lang->custom->methodOrder[75] = 'kanban'; +$lang->custom->methodOrder[80] = 'code'; $lang->resource->datatable = new stdclass(); $lang->resource->datatable->setGlobal = 'setGlobal'; diff --git a/module/group/lang/zh-cn.php b/module/group/lang/zh-cn.php index e4d9550abe..1781a61aaf 100644 --- a/module/group/lang/zh-cn.php +++ b/module/group/lang/zh-cn.php @@ -64,6 +64,7 @@ $lang->group->outside = '组外用户'; $lang->group->limited = '受限用户组'; $lang->group->other = '其他模块'; $lang->group->all = '所有权限'; +$lang->group->config = '配置'; $lang->group->copyOptions['copyPriv'] = '复制权限'; $lang->group->copyOptions['copyUser'] = '复制用户'; From 5b6978ed8b9cda0e07bd35a31f11fdd1c49efd6d Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 6 Feb 2023 12:02:31 +0800 Subject: [PATCH 153/499] * Finish task #83744. --- module/group/control.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/module/group/control.php b/module/group/control.php index df405316d0..6885e94cde 100644 --- a/module/group/control.php +++ b/module/group/control.php @@ -199,11 +199,7 @@ class group extends control */ public function managePriv($type = 'byGroup', $param = 0, $menu = '', $version = '') { - if($type == 'byGroup') - { - $groupID = $param; - $this->lang->custom->common = $this->lang->group->config; - } + if($type == 'byGroup') $groupID = $param; $this->view->type = $type; foreach($this->lang->resource as $moduleName => $action) @@ -239,6 +235,9 @@ class group extends control if(version_compare($currentVersion, $realVersion, '>=')) $changelog[] = join(',', $currentChangeLog); } + $this->lang->custom->common = $this->lang->group->config; + if($this->config->edition == 'max') $this->lang->baseline->common = $this->lang->group->docTemplate; + $this->view->group = $group; $this->view->changelogs = ',' . join(',', $changelog) . ','; $this->view->groupPrivs = $groupPrivs; From 2f67a61a45c04bb06726dc4de3f38ba56801b288 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Mon, 6 Feb 2023 13:48:34 +0800 Subject: [PATCH 154/499] * Optimize page style. --- www/theme/default/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/theme/default/style.css b/www/theme/default/style.css index b77e27fa9b..3e9d518d0f 100644 --- a/www/theme/default/style.css +++ b/www/theme/default/style.css @@ -237,6 +237,6 @@ tbody tr td.c-actions .dividing-line {width: 1px; height: 16px; display: inline- #adminMenu.dropdown-menu {min-width: max-content;} #adminMenu.dropdown-menu > li {padding: 0;} -#adminMenu.dropdown-menu > li > a {padding: 6px 16px;} +#adminMenu.dropdown-menu > li > a {padding: 6px 29px 6px 20px;} #adminMenu.dropdown-menu > li > a > img {padding-bottom: 4px; padding-right: 8px;} #adminMenu.dropdown-menu > li.disabled img {filter: grayscale(100%); opacity: .6;} From c7a767521c1b8a86a570f76b9550b89e2ebfb178 Mon Sep 17 00:00:00 2001 From: zhouxin Date: Mon, 6 Feb 2023 14:27:23 +0800 Subject: [PATCH 155/499] * Resolve feedback #313. --- module/upgrade/model.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 78083a4260..f31c544c31 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -7558,6 +7558,8 @@ class upgradeModel extends model { $project = new stdclass(); $project->name = $sprint->name; + $project->code = $sprint->code; + $project->desc = $sprint->desc; $project->type = 'project'; $project->model = 'scrum'; $project->parent = $programID; From 55daaea37f0c47f0a624829e8e3a0ad7569f9543 Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Mon, 6 Feb 2023 14:33:14 +0800 Subject: [PATCH 156/499] finish task#83946. --- module/stage/lang/de.php | 1 + module/stage/lang/en.php | 1 + module/stage/lang/fr.php | 1 + module/stage/lang/vi.php | 1 + module/stage/lang/zh-cn.php | 1 + module/stage/lang/zh-tw.php | 1 + 6 files changed, 6 insertions(+) diff --git a/module/stage/lang/de.php b/module/stage/lang/de.php index 52383a6b77..9eaf1430a0 100644 --- a/module/stage/lang/de.php +++ b/module/stage/lang/de.php @@ -25,6 +25,7 @@ $lang->stage->type = 'Type'; $lang->stage->percent = 'Workload %'; $lang->stage->setType = 'Set Type'; +$lang->stage->typeList['mix'] = 'Mix'; $lang->stage->typeList['request'] = 'Story'; $lang->stage->typeList['design'] = 'Design'; $lang->stage->typeList['dev'] = 'Development'; diff --git a/module/stage/lang/en.php b/module/stage/lang/en.php index 52383a6b77..9eaf1430a0 100644 --- a/module/stage/lang/en.php +++ b/module/stage/lang/en.php @@ -25,6 +25,7 @@ $lang->stage->type = 'Type'; $lang->stage->percent = 'Workload %'; $lang->stage->setType = 'Set Type'; +$lang->stage->typeList['mix'] = 'Mix'; $lang->stage->typeList['request'] = 'Story'; $lang->stage->typeList['design'] = 'Design'; $lang->stage->typeList['dev'] = 'Development'; diff --git a/module/stage/lang/fr.php b/module/stage/lang/fr.php index 52383a6b77..9eaf1430a0 100644 --- a/module/stage/lang/fr.php +++ b/module/stage/lang/fr.php @@ -25,6 +25,7 @@ $lang->stage->type = 'Type'; $lang->stage->percent = 'Workload %'; $lang->stage->setType = 'Set Type'; +$lang->stage->typeList['mix'] = 'Mix'; $lang->stage->typeList['request'] = 'Story'; $lang->stage->typeList['design'] = 'Design'; $lang->stage->typeList['dev'] = 'Development'; diff --git a/module/stage/lang/vi.php b/module/stage/lang/vi.php index c13f128b52..e9be64d0a9 100644 --- a/module/stage/lang/vi.php +++ b/module/stage/lang/vi.php @@ -25,6 +25,7 @@ $lang->stage->type = 'Type'; $lang->stage->percent = 'Workload %'; $lang->stage->setType = 'Set Type'; +$lang->stage->typeList['mix'] = 'Mix'; $lang->stage->typeList['request'] = 'Story'; $lang->stage->typeList['design'] = 'Design'; $lang->stage->typeList['dev'] = 'Development'; diff --git a/module/stage/lang/zh-cn.php b/module/stage/lang/zh-cn.php index 7b1c685901..ee2f1d9f15 100644 --- a/module/stage/lang/zh-cn.php +++ b/module/stage/lang/zh-cn.php @@ -25,6 +25,7 @@ $lang->stage->type = '阶段类型'; $lang->stage->percent = '工作量占比'; $lang->stage->setType = '阶段类型'; +$lang->stage->typeList['mix'] = '综合'; $lang->stage->typeList['request'] = '需求'; $lang->stage->typeList['design'] = '设计'; $lang->stage->typeList['dev'] = '开发'; diff --git a/module/stage/lang/zh-tw.php b/module/stage/lang/zh-tw.php index 712a9bd616..5396d8960f 100644 --- a/module/stage/lang/zh-tw.php +++ b/module/stage/lang/zh-tw.php @@ -25,6 +25,7 @@ $lang->stage->type = '階段分類'; $lang->stage->percent = '工作量占比'; $lang->stage->setType = '階段類型'; +$lang->stage->typeList['mix'] = '綜合'; $lang->stage->typeList['request'] = '需求'; $lang->stage->typeList['design'] = '設計'; $lang->stage->typeList['dev'] = '開發'; From 742e7c28f51c7fc1e387f09ee3914d362288b929 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 6 Feb 2023 15:25:40 +0800 Subject: [PATCH 157/499] * Finish task #83944. --- module/execution/model.php | 4 ++-- module/programplan/lang/zh-cn.php | 2 +- module/programplan/model.php | 7 ++++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index d575d0f2b9..26ce7cc98e 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -4818,9 +4818,9 @@ class executionModel extends model if($execution->type == 'stage') { $isCreateTask = $this->loadModel('programplan')->isCreateTask($execution->id); - $disabled = ($execution->grade == 1 && $isCreateTask) ? '' : ' disabled'; + $disabled = $isCreateTask ? '' : ' disabled'; $title = !$isCreateTask ? $this->lang->programplan->error->createdTask : $this->lang->programplan->createSubPlan; - common::printIcon('programplan', 'create', "program={$execution->parent}&productID=$productID&planID=$execution->id", $execution, 'list', 'split', '', $disabled, '', '', $title); + common::printIcon('programplan', 'create', "program={$execution->project}&productID=$productID&planID=$execution->id", $execution, 'list', 'split', '', $disabled, '', '', $title); } if($execution->type == 'stage') diff --git a/module/programplan/lang/zh-cn.php b/module/programplan/lang/zh-cn.php index 167261e1f1..255cba9d23 100644 --- a/module/programplan/lang/zh-cn.php +++ b/module/programplan/lang/zh-cn.php @@ -19,7 +19,7 @@ $lang->programplan->edit = '编辑'; $lang->programplan->delete = '删除阶段'; $lang->programplan->close = '关闭阶段'; $lang->programplan->activate = '激活阶段'; -$lang->programplan->createSubPlan = '创建二级阶段'; +$lang->programplan->createSubPlan = '创建子阶段'; $lang->programplan->parent = '父阶段'; $lang->programplan->emptyParent = '无'; diff --git a/module/programplan/model.php b/module/programplan/model.php index cc18f4a942..65e805587c 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -1261,7 +1261,12 @@ class programplanModel extends model { $action = strtolower($action); - if($action == 'create' and $plan->grade > 1) return false; + if($action == 'create') + { + global $dao; + $task = !empty($plan->id) ? $dao->select('*')->from(TABLE_TASK)->where('execution')->eq($plan->id)->andWhere('deleted')->eq('0')->limit(1)->fetch() : ''; + return empty($task) ? true : false; + } return true; } From adc06163412e2eb5537f82fd9f331f653dbbe90f Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 6 Feb 2023 15:41:55 +0800 Subject: [PATCH 158/499] * Code for finish task #83721,83722. --- module/admin/lang/menu.php | 8 ++- module/admin/model.php | 101 ++++++++++++++++++++++++++-------- module/block/lang/de.php | 2 - module/block/lang/en.php | 2 - module/block/lang/fr.php | 2 - module/block/lang/vi.php | 2 - module/block/lang/zh-cn.php | 2 - module/common/lang/common.php | 1 + module/common/lang/de.php | 2 + module/common/lang/en.php | 2 + module/common/lang/fr.php | 2 + module/common/lang/zh-cn.php | 2 + module/todo/lang/de.php | 1 - module/todo/lang/en.php | 1 - module/todo/lang/fr.php | 1 - module/todo/lang/vi.php | 1 - module/todo/lang/zh-cn.php | 1 - 17 files changed, 94 insertions(+), 39 deletions(-) diff --git a/module/admin/lang/menu.php b/module/admin/lang/menu.php index e6030721a4..3e6c2681d8 100644 --- a/module/admin/lang/menu.php +++ b/module/admin/lang/menu.php @@ -84,13 +84,19 @@ $lang->admin->menuList->model['menuOrder']['10'] = 'scrum'; $lang->admin->menuList->model['menuOrder']['15'] = 'waterfall'; $lang->admin->menuList->feature['subMenu']['my'] = array('link' => "{$lang->my->common}|custom|set|module=todo"); -$lang->admin->menuList->feature['subMenu']['product'] = array('link' => "{$lang->productCommon}|custom|product|"); +$lang->admin->menuList->feature['subMenu']['product'] = array('link' => "{$lang->productCommon}|custom|required|module=product|"); $lang->admin->menuList->feature['subMenu']['execution'] = array('link' => "{$lang->execution->common}|custom|execution|"); $lang->admin->menuList->feature['subMenu']['qa'] = array('link' => "{$lang->qa->common}|custom|required|module=bug"); $lang->admin->menuList->feature['subMenu']['kanban'] = array('link' => "{$lang->kanban->common}|custom|kanban|"); $lang->admin->menuList->feature['subMenu']['doc'] = array('link' => "{$lang->doc->common}|custom|required|module=doc"); $lang->admin->menuList->feature['subMenu']['user'] = array('link' => "{$lang->user->common}|custom|set|module=user"); +$lang->admin->menuList->feature['tabMenu']['my']['todo'] = array('link' => "{$lang->todo->common}|custom|set|module=todo&field=priList"); +$lang->admin->menuList->feature['tabMenu']['my']['block'] = array('link' => "{$lang->block->common}|custom|set|module=block&field=closed"); +if($this->config->vision == 'lite') $lang->admin->menuList->feature['tabMenu']['my']['task'] = array(); + +$lang->admin->menuList->feature['tabMenu']['product']['product'] = array('link' => "{$lang->productCommon}|custom|required|module=product", 'links' => array("custom|browsestoryconcept|", 'custom|product|')); + $lang->admin->menuList->feature['menuOrder']['5'] = 'my'; $lang->admin->menuList->feature['menuOrder']['10'] = 'product'; $lang->admin->menuList->feature['menuOrder']['15'] = 'execution'; diff --git a/module/admin/model.php b/module/admin/model.php index 2b65005df5..382e65a7d9 100755 --- a/module/admin/model.php +++ b/module/admin/model.php @@ -286,36 +286,54 @@ class adminModel extends model $orders = array(); foreach($this->lang->admin->menuList as $menuKey => $menu) { - $menu['disabled'] = false; + $menu['disabled'] = true; if(!isset($menu['link'])) $menu['link'] = ''; - if(!empty($menu['link']) and strpos($menu['link'], '|') !== false) + + /* Check sub menu priv. */ + if(isset($menu['subMenu'])) { - list($module, $method) = explode('|', $menu['link']); - $menu['link'] = helper::createLink($module, $method); - if(!common::hasPriv($module, $method)) $menu['disabled'] = true; - } - - $menuOrder = isset($menu['menuOrder']) ? $menu['menuOrder'] : array(); - if($menuOrder) - { - ksort($menuOrder); - - /* Check sub menu priv. */ - foreach($menuOrder as $subOrder => $subMenuKey) + foreach($menu['subMenu'] as $subMenuKey => $subMenu) { - list($label, $module, $method, $params) = explode('|', $menu['subMenu'][$subMenuKey]['link']); - if(!common::hasPriv($module, $method)) unset($menuOrder[$subOrder]); - } + /* Check tab menu priv. */ + $link = ''; + $linkLabel = ''; + if(isset($menu['tabMenu'][$subMenuKey])) + { + foreach($menu['tabMenu'][$subMenuKey] as $tabMenuKey => $tabMenu) + { + list($linkLabel, $link) = $this->getMenuLink($tabMenu); + if(!empty($link)) break; + } + } + else + { + list($linkLabel, $link) = $this->getMenuLink($subMenu); + } - /* Set link. */ - if(!empty($menuOrder)) + if(!empty($link)) + { + $menu['subMenu'][$subMenuKey]['link'] = $linkLabel; + if(empty($menu['link'])) + { + $menu['link'] = $link; + $menu['disabled'] = false; + } + } + else + { + unset($this->lang->admin->menuList->feature['subMenu'][$subMenuKey]); + } + } + } + else + { + if(!empty($menu['link']) and strpos($menu['link'], '|') !== false) { - $subMenuKey = reset($menuOrder); - list($label, $module, $method, $params) = explode('|', $menu['subMenu'][$subMenuKey]['link']); - $menu['link'] = helper::createLink($module, $method, $params); + list($module, $method) = explode('|', $menu['link']); + $menu['link'] = helper::createLink($module, $method); + if(common::hasPriv($module, $method)) $menu['disabled'] = false; } } - if(empty($menuOrder) and empty($menu['link'])) $menu['disabled'] = true; $order = $menu['order']; $orders[$order] = $menuKey; @@ -334,6 +352,43 @@ class adminModel extends model $this->lang->admin->menuList = $menuList; } + /** + * Get menu link. + * + * @param array $menu + * @access public + * @return array + */ + public function getMenuLink($menu) + { + $link = ''; + $linkLabel = ''; + if(!empty($menu['link'])) + { + list($label, $module, $method, $params) = explode('|', $menu['link']); + if(common::hasPriv($module, $method)) + { + $linkLabel = $menu['link']; + $link = helper::createLink($module, $method, $params); + } + elseif(!empty($menu['links'])) + { + foreach($menu['links'] as $menuLink) + { + list($module, $method, $params) = explode('|', $menuLink); + if(common::hasPriv($module, $method)) + { + $linkLabel = $label . '|' . $menuLink; + $link = helper::createLink($module, $method); + break; + } + } + } + } + + return array($linkLabel, $link); + } + /** * Get menu key * diff --git a/module/block/lang/de.php b/module/block/lang/de.php index f580bc7315..8d78ff19a1 100644 --- a/module/block/lang/de.php +++ b/module/block/lang/de.php @@ -10,8 +10,6 @@ * @link http://www.zentao.net */ global $config; -$lang->block = new stdclass(); -$lang->block->common = 'InfoBlock'; $lang->block->id = 'ID'; $lang->block->params = 'Params'; $lang->block->name = 'Name'; diff --git a/module/block/lang/en.php b/module/block/lang/en.php index b9eada8057..2186fa2f4b 100644 --- a/module/block/lang/en.php +++ b/module/block/lang/en.php @@ -10,8 +10,6 @@ * @link http://www.zentao.net */ global $config; -$lang->block = new stdclass(); -$lang->block->common = 'Block'; $lang->block->id = 'ID'; $lang->block->params = 'Params'; $lang->block->name = 'Name'; diff --git a/module/block/lang/fr.php b/module/block/lang/fr.php index 0575caf8a8..c66b631095 100644 --- a/module/block/lang/fr.php +++ b/module/block/lang/fr.php @@ -10,8 +10,6 @@ * @link http://www.zentao.net */ global $config; -$lang->block = new stdclass(); -$lang->block->common = 'Bloc'; $lang->block->id = 'ID'; $lang->block->params = 'Params'; $lang->block->name = 'Nom'; diff --git a/module/block/lang/vi.php b/module/block/lang/vi.php index aac102a0cb..fa892b4f23 100644 --- a/module/block/lang/vi.php +++ b/module/block/lang/vi.php @@ -10,8 +10,6 @@ * @link http://www.zentao.net */ global $config; -$lang->block = new stdclass(); -$lang->block->common = 'Block'; $lang->block->name = 'Tên'; $lang->block->style = 'Kiểu'; $lang->block->grid = 'Vị trí'; diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php index 5c6a85626f..f01edea1d9 100644 --- a/module/block/lang/zh-cn.php +++ b/module/block/lang/zh-cn.php @@ -10,8 +10,6 @@ * @link http://www.zentao.net */ global $config; -$lang->block = new stdclass(); -$lang->block->common = '区块'; $lang->block->id = '编号'; $lang->block->params = '参数'; $lang->block->name = '区块名称'; diff --git a/module/common/lang/common.php b/module/common/lang/common.php index 3959e83492..4fe8f34a27 100644 --- a/module/common/lang/common.php +++ b/module/common/lang/common.php @@ -3,6 +3,7 @@ $lang->common = new stdclass(); $lang->index = new stdclass(); $lang->my = new stdclass(); $lang->todo = new stdclass(); +$lang->block = new stdclass(); $lang->program = new stdclass(); $lang->programplan = new stdclass(); $lang->product = new stdclass(); diff --git a/module/common/lang/de.php b/module/common/lang/de.php index f3f247a320..306d80be31 100644 --- a/module/common/lang/de.php +++ b/module/common/lang/de.php @@ -158,6 +158,8 @@ $lang->delayed = 'Delayed'; $lang->common->common = 'Standard Module'; $lang->common->story = 'Story'; $lang->my->common = 'My'; +$lang->todo->common = 'Todo'; +$lang->block->common = 'InfoBlock'; $lang->program->common = 'Program'; $lang->product->common = 'Product'; $lang->project->common = 'Project'; diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 30eeff46b7..5776664091 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -158,6 +158,8 @@ $lang->delayed = 'Delayed'; $lang->common->common = 'Common Module'; $lang->common->story = 'Story'; $lang->my->common = 'My'; +$lang->todo->common = 'Todo'; +$lang->block->common = 'Block'; $lang->program->common = 'Program'; $lang->product->common = 'Product'; $lang->project->common = 'Project'; diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php index 20c52b0b7d..9d84d2c124 100644 --- a/module/common/lang/fr.php +++ b/module/common/lang/fr.php @@ -158,6 +158,8 @@ $lang->delayed = 'Delayed'; $lang->common->common = 'Module Commun'; $lang->common->story = 'Story'; $lang->my->common = 'My'; +$lang->todo->common = 'Agenda'; +$lang->block->common = 'Bloc'; $lang->program->common = 'Program'; $lang->product->common = 'Product'; $lang->project->common = 'Project'; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 3cc4ed7fc8..ba38773871 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -158,6 +158,8 @@ $lang->delayed = '已延期'; $lang->common->common = '公有模块'; $lang->common->story = '需求'; $lang->my->common = '地盘'; +$lang->todo->common = '待办'; +$lang->block->common = '区块'; $lang->program->common = '项目集'; $lang->product->common = '产品'; $lang->project->common = '项目'; diff --git a/module/todo/lang/de.php b/module/todo/lang/de.php index a4b7f1d009..f836b192da 100644 --- a/module/todo/lang/de.php +++ b/module/todo/lang/de.php @@ -9,7 +9,6 @@ * @version $Id: en.php 4676 2013-04-26 06:08:23Z chencongzhi520@gmail.com $ * @link http://www.zentao.net */ -$lang->todo->common = 'Todo'; $lang->todo->index = "Home"; $lang->todo->create = "Todo hinzufügen"; $lang->todo->createCycle = "Wiederkehrenden Todo hinzufügen"; diff --git a/module/todo/lang/en.php b/module/todo/lang/en.php index cb59f94861..6c611d06a7 100644 --- a/module/todo/lang/en.php +++ b/module/todo/lang/en.php @@ -9,7 +9,6 @@ * @version $Id: en.php 4676 2013-04-26 06:08:23Z chencongzhi520@gmail.com $ * @link http://www.zentao.net */ -$lang->todo->common = 'Todo'; $lang->todo->index = "Home"; $lang->todo->create = "Add Todo"; $lang->todo->createCycle = "Add Recurred Todo"; diff --git a/module/todo/lang/fr.php b/module/todo/lang/fr.php index 375a62a895..9acfcedebc 100644 --- a/module/todo/lang/fr.php +++ b/module/todo/lang/fr.php @@ -9,7 +9,6 @@ * @version $Id: en.php 4676 2013-04-26 06:08:23Z chencongzhi520@gmail.com $ * @link http://www.zentao.net */ -$lang->todo->common = 'Agenda'; $lang->todo->index = "Accueil"; $lang->todo->create = "Ajout Entrée"; $lang->todo->createCycle = "Ajout Tâche récurrente"; diff --git a/module/todo/lang/vi.php b/module/todo/lang/vi.php index afbb9a22f3..3b1c09f09e 100644 --- a/module/todo/lang/vi.php +++ b/module/todo/lang/vi.php @@ -9,7 +9,6 @@ * @version $Id: vi.php 4676 2020-04-06 06:08:23Z quocnho@gmail.com $ * @link http://www.zentao.net */ -$lang->todo->common = 'Việc làm'; $lang->todo->index = "Home"; $lang->todo->create = "Thêm việc"; $lang->todo->createCycle = "Thêm việc lặp lại"; diff --git a/module/todo/lang/zh-cn.php b/module/todo/lang/zh-cn.php index ec001e5182..790a23e7ba 100644 --- a/module/todo/lang/zh-cn.php +++ b/module/todo/lang/zh-cn.php @@ -9,7 +9,6 @@ * @version $Id: zh-cn.php 5022 2013-07-05 06:50:39Z chencongzhi520@gmail.com $ * @link http://www.zentao.net */ -$lang->todo->common = '待办'; $lang->todo->index = "待办一览"; $lang->todo->create = "添加待办"; $lang->todo->createCycle = "创建周期待办"; From 73c669b24724d26dd3c9e25005f51179402b50a1 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 6 Feb 2023 16:11:57 +0800 Subject: [PATCH 159/499] * Code for finish task #83722. --- module/admin/model.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/module/admin/model.php b/module/admin/model.php index 382e65a7d9..976191046a 100755 --- a/module/admin/model.php +++ b/module/admin/model.php @@ -289,16 +289,17 @@ class adminModel extends model $menu['disabled'] = true; if(!isset($menu['link'])) $menu['link'] = ''; - /* Check sub menu priv. */ + /* Set links to authorized navigation. */ if(isset($menu['subMenu'])) { + /* Check sub menu priv. */ foreach($menu['subMenu'] as $subMenuKey => $subMenu) { - /* Check tab menu priv. */ $link = ''; $linkLabel = ''; if(isset($menu['tabMenu'][$subMenuKey])) { + /* Check tab menu priv. */ foreach($menu['tabMenu'][$subMenuKey] as $tabMenuKey => $tabMenu) { list($linkLabel, $link) = $this->getMenuLink($tabMenu); @@ -312,7 +313,11 @@ class adminModel extends model if(!empty($link)) { - $menu['subMenu'][$subMenuKey]['link'] = $linkLabel; + /* Updated secondary navigation link. */ + $subMenuLabel = $menu['subMenu'][$subMenuKey]['link']; + $menu['subMenu'][$subMenuKey]['link'] = substr($subMenuLabel, 0, strpos($subMenuLabel, '|') + 1) . $linkLabel; + + /* Update the level 1 navigation link. */ if(empty($menu['link'])) { $menu['link'] = $link; @@ -368,7 +373,7 @@ class adminModel extends model list($label, $module, $method, $params) = explode('|', $menu['link']); if(common::hasPriv($module, $method)) { - $linkLabel = $menu['link']; + $linkLabel = $module . '|' . $method . '|' . $params; $link = helper::createLink($module, $method, $params); } elseif(!empty($menu['links'])) @@ -378,7 +383,7 @@ class adminModel extends model list($module, $method, $params) = explode('|', $menuLink); if(common::hasPriv($module, $method)) { - $linkLabel = $label . '|' . $menuLink; + $linkLabel = $menuLink; $link = helper::createLink($module, $method); break; } From 36bd3f3384dfe53df41a808c41b011f8e8e9b6fc Mon Sep 17 00:00:00 2001 From: guofeilong Date: Mon, 6 Feb 2023 16:52:51 +0800 Subject: [PATCH 160/499] * Code for task #83731 --- module/admin/css/index.css | 29 ++++++++++++- module/admin/lang/zh-cn.php | 6 +++ module/admin/view/index.html.php | 71 ++++++++++++++++++++++++++++++-- 3 files changed, 100 insertions(+), 6 deletions(-) diff --git a/module/admin/css/index.css b/module/admin/css/index.css index d052effbd4..f5523031fb 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -1,3 +1,17 @@ +/* atomic class */ +.flex {display: flex;} +.align-center {align-items: center;} +.justify-between {justify-content: space-between;} +.title-color {color: #313C52} +.font-13 {font-size: 13px;} +.color-gray {color: #5E626D;} +.border-gray {border: 1px solid #E3E4E9;} +.h-56 {height: 56px;} +.h-40 {height: 40px;} +.pl-16 {padding-left: 16px;} +.px-16 {padding: 0 16px;} +.mb-16 {margin-bottom: 16px;} + #notice {margin: -20px -20px 20px; padding: 20px;} #zentaoLinks {margin-top: 20px;} #zentaoLinks .panel .panel-heading {padding: 6px 10px;} @@ -7,7 +21,6 @@ .admin > .main {flex: 1 1 70%;} .admin > .side {flex: 1 1 30%; padding-left: 10px; margin-left: 16px;} .panel-title {padding: 10px 0px;} -.flex {display: flex;} .panel {padding: 0 0 0 16px;} .settings.panel, .plug.panel {margin-bottom: 16px;} @@ -19,7 +32,6 @@ .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.lite-setting > .setting-box {flex: 1 1 30%;} -.panel-title > a {display: flex; align-items: center;} .plugin-list {display: flex; flex-wrap: wrap; padding: 12px 4px 4px 4px;} .plugin-list > .plugin-item {flex: 1 1 26%; padding: 16px 10px; border: 1px solid #EDEEF2; border-radius: 4px; margin-right: 10px; margin-bottom: 16px; width: 0px; cursor: pointer;} @@ -38,6 +50,7 @@ .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; margin-bottom: 16px; 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;} @@ -55,3 +68,15 @@ .main.without-internet > .plug.panel {flex: 1 1 60%; margin-bottom: unset; margin-right: 16px;} .main.without-internet > .bottom > .official.panel {margin-right: unset;} .main.without-internet > .bottom > .official.panel > .main-panel {flex-direction: row-reverse;} + +/* css in side */ +.time-block {background: #EDEEF2; padding: 4px; border-radius: 4px; color: #0B0F18; font-size: 15px;} +.dynamic-block {height: 64px; padding: 12px 16px; display: flex; justify-content: space-between; position: relative; line-height: 20px; border-top: 1px solid #E3E4E9;} +.dynamic-time {white-space: nowrap; position: absolute; right: 28px; bottom: 12px;} + +.patch-block {padding: 12px 16px; line-height: 20px; border-top: 1px solid #E3E4E9;} +.patch-content {height: 40px; overflow: hidden;} + +.upgrade-block {padding: 16px 16px; line-height: 20px; border-top: 1px solid #E3E4E9;} +.upgrade-content {height: 20px; padding-left: 20px; position: relative; margin: 5px 0;} +.upgrade-content:before {content: ' '; width: 10px; height: 10px; background: #E3E4E9; border-radius: 50%; position: absolute; left: 0px; top: 5px;} diff --git a/module/admin/lang/zh-cn.php b/module/admin/lang/zh-cn.php index 05e63ed117..20e7e67adc 100755 --- a/module/admin/lang/zh-cn.php +++ b/module/admin/lang/zh-cn.php @@ -170,4 +170,10 @@ $lang->admin->menuSetting['dev']['desc'] = '支持对系统进行二次开 $lang->admin->menuSetting['convert']['name'] = '数据导入'; $lang->admin->menuSetting['convert']['desc'] = '第三方系统的数据导入。'; +$lang->admin->mon = '月'; +$lang->admin->day = '日'; +$lang->admin->updateDynamics = '更新动态'; +$lang->admin->updatePatch = '补丁更新'; +$lang->admin->upgradeRecommend = '推荐升级'; + include dirname(__FILE__) . '/menu.php'; diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index a293e99564..5576e65c40 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -32,7 +32,7 @@
    admin->pluginRecommendation;?> - admin->extensionURL, "{$lang->more} ", '_blank', 'class="more text-muted"');?> + admin->extensionURL, "{$lang->more} ", '_blank', 'class="more text-muted flex align-center"');?>
    > @@ -68,7 +68,7 @@
    admin->publicClass;?> - admin->classURL, "{$lang->more} ", '_blank', 'class="more text-muted"');?> + admin->classURL, "{$lang->more} ", '_blank', 'class="more text-muted flex align-center"');?>
    @@ -87,8 +87,71 @@
    - From 55bc9f98b02de2edf10a91df5b21fe214bf1b3d3 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 6 Feb 2023 16:53:45 +0800 Subject: [PATCH 161/499] * Code for finish task #83722. --- module/admin/model.php | 42 ++++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/module/admin/model.php b/module/admin/model.php index 976191046a..57946661c6 100755 --- a/module/admin/model.php +++ b/module/admin/model.php @@ -295,49 +295,42 @@ class adminModel extends model /* Check sub menu priv. */ foreach($menu['subMenu'] as $subMenuKey => $subMenu) { - $link = ''; - $linkLabel = ''; + $link = array(); if(isset($menu['tabMenu'][$subMenuKey])) { /* Check tab menu priv. */ foreach($menu['tabMenu'][$subMenuKey] as $tabMenuKey => $tabMenu) { - list($linkLabel, $link) = $this->getMenuLink($tabMenu); + $link = $this->getHasPrivLink($tabMenu); if(!empty($link)) break; } } else { - list($linkLabel, $link) = $this->getMenuLink($subMenu); + $link = $this->getHasPrivLink($subMenu); } if(!empty($link)) { /* Updated secondary navigation link. */ + list($module, $method, $params) = $link; $subMenuLabel = $menu['subMenu'][$subMenuKey]['link']; - $menu['subMenu'][$subMenuKey]['link'] = substr($subMenuLabel, 0, strpos($subMenuLabel, '|') + 1) . $linkLabel; + $menu['subMenu'][$subMenuKey]['link'] = substr($subMenuLabel, 0, strpos($subMenuLabel, '|') + 1) . $module . '|' . $method . '|' . $params; /* Update the level 1 navigation link. */ if(empty($menu['link'])) { - $menu['link'] = $link; + $menu['link'] = helper::createLink($module, $method, $params); $menu['disabled'] = false; } } - else - { - unset($this->lang->admin->menuList->feature['subMenu'][$subMenuKey]); - } } } - else + elseif(!empty($menu['link']) and strpos($menu['link'], '|') !== false) { - if(!empty($menu['link']) and strpos($menu['link'], '|') !== false) - { - list($module, $method) = explode('|', $menu['link']); - $menu['link'] = helper::createLink($module, $method); - if(common::hasPriv($module, $method)) $menu['disabled'] = false; - } + list($module, $method) = explode('|', $menu['link']); + $menu['link'] = helper::createLink($module, $method); + if(common::hasPriv($module, $method)) $menu['disabled'] = false; } $order = $menu['order']; @@ -358,23 +351,21 @@ class adminModel extends model } /** - * Get menu link. + * Get the authorized link. * * @param array $menu * @access public * @return array */ - public function getMenuLink($menu) + public function getHasPrivLink($menu) { - $link = ''; - $linkLabel = ''; + $link = array(); if(!empty($menu['link'])) { list($label, $module, $method, $params) = explode('|', $menu['link']); if(common::hasPriv($module, $method)) { - $linkLabel = $module . '|' . $method . '|' . $params; - $link = helper::createLink($module, $method, $params); + $link = array($module, $method, $params); } elseif(!empty($menu['links'])) { @@ -383,15 +374,14 @@ class adminModel extends model list($module, $method, $params) = explode('|', $menuLink); if(common::hasPriv($module, $method)) { - $linkLabel = $menuLink; - $link = helper::createLink($module, $method); + $link = array($module, $method, $params); break; } } } } - return array($linkLabel, $link); + return $link; } /** From 652595112f341c0e3eff7217ca292ea425332c73 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Mon, 6 Feb 2023 08:59:34 +0000 Subject: [PATCH 162/499] * Finish task #83955. --- db/zentaopms284.sql | 2 ++ module/programplan/control.php | 31 ++++++++++++++----------- module/programplan/view/create.html.php | 12 +++++----- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/db/zentaopms284.sql b/db/zentaopms284.sql index f1998a2946..9137def6cc 100644 --- a/db/zentaopms284.sql +++ b/db/zentaopms284.sql @@ -2,3 +2,5 @@ update `zt_task` set `assignedTo` = '' where `mode` = 'multi' and `status` != 'd REPLACE INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`, `vision`) SELECT `lang`, `module`, 'scrumClassify', `key`, `value`, `system`, `vision` FROM `zt_lang` WHERE `module` = 'process' and `section` = 'classify' ORDER BY id ASC; REPLACE INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`, `vision`) SELECT `lang`, `module`, 'agileplusClassify', `key`, `value`, `system`, `vision` FROM `zt_lang` WHERE `module` = 'process' and `section` = 'classify' ORDER BY id ASC; + +UPDATE `zt_project` AS child INNER JOIN (select `id`,`attribute` from `zt_project` where `parent` != 0 and `type` = 'stage') AS parent ON child.`parent` = parent.`id` SET child.`attribute`=parent.`attribute`; diff --git a/module/programplan/control.php b/module/programplan/control.php index 9fcd1a3916..aeb5713f72 100644 --- a/module/programplan/control.php +++ b/module/programplan/control.php @@ -154,6 +154,8 @@ class programplan extends control return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate)); } + $programPlan = $this->project->getById($planID, 'stage'); + $productList = array(); $this->app->loadLang('stage'); $project = $this->loadModel('project')->getById($projectID); @@ -181,20 +183,21 @@ class programplan extends control } } - $this->view->productList = $productList; - $this->view->project = $project; - $this->view->productID = $productID ? $productID : key($productList); - $this->view->stages = empty($planID) ? $this->loadModel('stage')->getStages('id_asc') : array(); - $this->view->programPlan = $this->project->getById($planID, 'stage'); - $this->view->plans = $this->programplan->getStage($planID ? $planID : $projectID, $this->productID, 'parent'); - $this->view->planID = $planID; - $this->view->type = 'lists'; - $this->view->PMUsers = $this->loadModel('user')->getPairs('noclosed|nodeleted|pmfirst', $project->PM); - $this->view->customFields = $customFields; - $this->view->showFields = $showFields; - $this->view->visibleFields = $visibleFields; - $this->view->requiredFields = $requiredFields; - $this->view->colspan = count($visibleFields) + 3; + $this->view->productList = $productList; + $this->view->project = $project; + $this->view->productID = $productID ? $productID : key($productList); + $this->view->stages = empty($planID) ? $this->loadModel('stage')->getStages('id_asc') : array(); + $this->view->programPlan = $programPlan; + $this->view->plans = $this->programplan->getStage($planID ? $planID : $projectID, $this->productID, 'parent'); + $this->view->planID = $planID; + $this->view->type = 'lists'; + $this->view->PMUsers = $this->loadModel('user')->getPairs('noclosed|nodeleted|pmfirst', $project->PM); + $this->view->customFields = $customFields; + $this->view->showFields = $showFields; + $this->view->visibleFields = $visibleFields; + $this->view->requiredFields = $requiredFields; + $this->view->colspan = count($visibleFields) + 3; + $this->view->enableOptionalAttr = (empty($programPlan) or (!empty($programPlan) and $programPlan->attribute == 'mix')); $this->display(); } diff --git a/module/programplan/view/create.html.php b/module/programplan/view/create.html.php index 277aa52179..5c895cd8c8 100644 --- a/module/programplan/view/create.html.php +++ b/module/programplan/view/create.html.php @@ -40,7 +40,7 @@
    - + programplan->name : $lang->programplan->subStageName;?>
    @@ -66,7 +66,7 @@ - '>programplan->attribute;?> + '>programplan->attribute;?> '>programplan->acl;?> '>programplan->milestone;?> programplan->begin;?> @@ -95,7 +95,7 @@ %
    - '>stage->typeList, $stage->type, "class='form-control'");?> + '>stage->typeList, $stage->type, "class='form-control'") : zget($lang->stage->typeList, $programPlan->attribute);?> '>execution->aclList, 'open', "class='form-control' $class");?> >programplan->milestoneList, 0);?> @@ -129,7 +129,7 @@ %
    - '>stage->typeList, $plan->attribute, "class='form-control'");?> + '>stage->typeList, $plan->attribute, "class='form-control'") : zget($lang->stage->typeList, $programPlan->attribute);?> >execution->aclList, $plan->acl, "class='form-control' $class");?> >programplan->milestoneList, $plan->milestone, $disabled);?> @@ -161,7 +161,7 @@ %
    - '>stage->typeList, '', "class='form-control'");?> + '>stage->typeList, '', "class='form-control'") : zget($lang->stage->typeList, $programPlan->attribute);?> >execution->aclList, 'open', "class='form-control' $class");?> >programplan->milestoneList, 0);?> @@ -206,7 +206,7 @@ %
    - '>stage->typeList, '', "class='form-control'");?> + '>stage->typeList, '', "class='form-control'") : zget($lang->stage->typeList, $programPlan->attribute);?> >execution->aclList, 'open', "class='form-control' $class");?> >programplan->milestoneList, 0);?> From 1a1f8d3a07b18cfb6899f20c1496621868f10642 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 6 Feb 2023 17:05:37 +0800 Subject: [PATCH 163/499] * Put holiday permissions in the open source edition. --- module/common/lang/common.php | 1 + module/group/lang/resource.php | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/module/common/lang/common.php b/module/common/lang/common.php index 3959e83492..ab497700c7 100644 --- a/module/common/lang/common.php +++ b/module/common/lang/common.php @@ -87,6 +87,7 @@ $lang->sonarqube = new stdclass(); $lang->app = new stdclass(); $lang->zahost = new stdclass(); $lang->zanode = new stdclass(); +$lang->holiday = new stdclass(); $lang->projectbuild = new stdclass(); $lang->projectrelease = new stdclass(); diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 53604e35ce..53f4afc3e4 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -1915,6 +1915,19 @@ $lang->message->methodOrder[5] = 'index'; $lang->message->methodOrder[10] = 'browser'; $lang->message->methodOrder[15] = 'setting'; +/* Holiday. */ +$lang->resource->holiday = new stdclass(); +$lang->resource->holiday->create = 'createAction'; +$lang->resource->holiday->edit = 'editAction'; +$lang->resource->holiday->delete = 'deleteAction'; +$lang->resource->holiday->browse = 'browse'; + +$lang->holiday->methodOrder[0] = 'browse'; +$lang->holiday->methodOrder[5] = 'create'; +$lang->holiday->methodOrder[10] = 'edit'; +$lang->holiday->methodOrder[15] = 'delete'; + +/* Action. */ $lang->resource->action = new stdclass(); $lang->resource->action->trash = 'trash'; $lang->resource->action->undelete = 'undeleteAction'; From 07960c45a0e44cf0f2a6283f5ff3c383c54e3edd Mon Sep 17 00:00:00 2001 From: guofeilong Date: Mon, 6 Feb 2023 17:10:28 +0800 Subject: [PATCH 164/499] * Code for admin refactors --- module/admin/css/index.css | 3 ++- module/admin/view/index.html.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module/admin/css/index.css b/module/admin/css/index.css index f5523031fb..bb34529ba2 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -72,7 +72,8 @@ /* css in side */ .time-block {background: #EDEEF2; padding: 4px; border-radius: 4px; color: #0B0F18; font-size: 15px;} .dynamic-block {height: 64px; padding: 12px 16px; display: flex; justify-content: space-between; position: relative; line-height: 20px; border-top: 1px solid #E3E4E9;} -.dynamic-time {white-space: nowrap; position: absolute; right: 28px; bottom: 12px;} +.dynamic-content {height: 40px; overflow: hidden;} +.dynamic-time {white-space: nowrap; position: absolute; right: 20px; bottom: 10px; padding-right: 12px; background: white;} .patch-block {padding: 12px 16px; line-height: 20px; border-top: 1px solid #E3E4E9;} .patch-content {height: 40px; overflow: hidden;} diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index 5576e65c40..173f0167f1 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -135,7 +135,7 @@
    禅道企业版
    -
    查看详情
    +
    查看详情
    工时管理、甘特图、导入导出
    40+内置统计报表、自定义报表功能
    @@ -144,7 +144,7 @@
    禅道旗舰版
    -
    查看详情
    +
    查看详情
    工时管理、甘特图、导入导出
    40+内置统计报表、自定义报表功能
    From c14a0f505a273ff28c52b0f88e22bad028e7b71f Mon Sep 17 00:00:00 2001 From: guofeilong Date: Mon, 6 Feb 2023 17:14:18 +0800 Subject: [PATCH 165/499] * Code for add lang in admin --- module/admin/lang/de.php | 6 ++++++ module/admin/lang/en.php | 6 ++++++ module/admin/lang/fr.php | 6 ++++++ module/admin/lang/vi.php | 6 ++++++ 4 files changed, 24 insertions(+) diff --git a/module/admin/lang/de.php b/module/admin/lang/de.php index ca1e6c6c96..67e77b6ae4 100755 --- a/module/admin/lang/de.php +++ b/module/admin/lang/de.php @@ -170,4 +170,10 @@ $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'; diff --git a/module/admin/lang/en.php b/module/admin/lang/en.php index c808ebf358..2314b2dd83 100755 --- a/module/admin/lang/en.php +++ b/module/admin/lang/en.php @@ -170,4 +170,10 @@ $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'; diff --git a/module/admin/lang/fr.php b/module/admin/lang/fr.php index 760eb8f74d..2bda8e62e3 100755 --- a/module/admin/lang/fr.php +++ b/module/admin/lang/fr.php @@ -170,4 +170,10 @@ $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'; diff --git a/module/admin/lang/vi.php b/module/admin/lang/vi.php index 96edcc1521..9752f9ff71 100755 --- a/module/admin/lang/vi.php +++ b/module/admin/lang/vi.php @@ -93,4 +93,10 @@ $lang->admin->safe->noticeMode = 'Mật khẩu sẽ được kiểm tra khi ng $lang->admin->safe->noticeStrong = ''; $lang->admin->safe->noticeGd = 'Your server does not have GD module installed, you cannot use the Captcha function, Please use it after installation.'; +$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'; From 57dbacf88295a1c96a274297f75bbf5c8c65a2f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Mon, 6 Feb 2023 19:03:55 +0800 Subject: [PATCH 166/499] * Code for task #83937. --- module/execution/model.php | 16 +++++++++++++++- module/project/control.php | 13 ------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 26ce7cc98e..6217555945 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1620,6 +1620,14 @@ class executionModel extends model ->groupBy('t1.root') ->fetchAll('root'); + $productNameList = $this->dao->select('t1.id,GROUP_CONCAT(t3.`name`) as productName')->from(TABLE_EXECUTION)->alias('t1') + ->leftjoin(TABLE_PROJECTPRODUCT)->alias('t2')->on('t1.id=t2.project') + ->leftjoin(TABLE_PRODUCT)->alias('t3')->on('t2.product=t3.id') + ->where('t1.project')->eq($projectID) + ->andWhere('t1.type')->in('kanban,sprint,stage') + ->groupBy('t1.id') + ->fetchPairs(); + if($withTasks) $executionTasks = $this->getTaskGroupByExecution(array_keys($executions)); /* Process executions. */ @@ -1627,8 +1635,11 @@ class executionModel extends model $emptyHour = array('totalEstimate' => 0, 'totalConsumed' => 0, 'totalLeft' => 0, 'progress' => 0); $today = helper::today(); + $childList = array(); foreach($executions as $key => $execution) { + $execution->productName = isset($productNameList[$execution->id]) ? $productNameList[$execution->id] : ''; + /* Process the end time. */ $execution->end = date(DT_DATE1, strtotime($execution->end)); @@ -1665,7 +1676,7 @@ class executionModel extends model if(isset($executions[$execution->parent]) and $execution->type == 'stage') { $executions[$execution->parent]->children[$key] = $execution; - unset($executions[$key]); + $childList[$key] = $key; } } @@ -1675,6 +1686,9 @@ class executionModel extends model $execution->product = $projectProductIdList[$execution->id]; } } + + foreach($childList as $id) unset($executions[$id]); + return array_values($executions); } diff --git a/module/project/control.php b/module/project/control.php index 874ddfee86..c1cd8a1f1d 100755 --- a/module/project/control.php +++ b/module/project/control.php @@ -1097,22 +1097,9 @@ class project extends control $executionStats = $this->execution->getStatData($projectID, $status, $productID, 0, $this->cookie->showTask, '', $orderBy, $pager); $showToggleIcon = false; - $productNameList = $this->dao->select('t1.id,GROUP_CONCAT(t3.`name`) as productName')->from(TABLE_EXECUTION)->alias('t1') - ->leftjoin(TABLE_PROJECTPRODUCT)->alias('t2')->on('t1.id=t2.project') - ->leftjoin(TABLE_PRODUCT)->alias('t3')->on('t2.product=t3.id') - ->where('t1.project')->eq($projectID) - ->andWhere('t1.type')->in('kanban,sprint,stage') - ->groupBy('t1.id') - ->fetchPairs(); foreach($executionStats as $execution) { - $execution->productName = isset($productNameList[$execution->id]) ? $productNameList[$execution->id] : ''; - - if(!empty($execution->children)) - { - foreach($execution->children as $childrenID => $children) $children->productName = isset($productNameList[$childrenID]) ? $productNameList[$childrenID] : ''; - } if(!empty($execution->tasks) or !empty($execution->children)) $showToggleIcon = true; } From 7b6d5a1651d6540249dcb16e0cdbd005ae50f7a7 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 7 Feb 2023 08:26:37 +0800 Subject: [PATCH 167/499] * Code for finish task #83721. --- module/admin/view/tabmenu.html.php | 23 +++++++++++++++++++++++ module/custom/view/header.html.php | 24 +----------------------- 2 files changed, 24 insertions(+), 23 deletions(-) create mode 100644 module/admin/view/tabmenu.html.php diff --git a/module/admin/view/tabmenu.html.php b/module/admin/view/tabmenu.html.php new file mode 100644 index 0000000000..441f8d9819 --- /dev/null +++ b/module/admin/view/tabmenu.html.php @@ -0,0 +1,23 @@ + diff --git a/module/custom/view/header.html.php b/module/custom/view/header.html.php index f8c795c644..2e7a501bac 100644 --- a/module/custom/view/header.html.php +++ b/module/custom/view/header.html.php @@ -1,24 +1,2 @@ getModuleRoot() . 'common/view/header.html.php';?> - +getModuleRoot() . 'admin/view/tabmenu.html.php';?> From 3e1b5be66e3c354b7cf434f2367f6e39767d05f0 Mon Sep 17 00:00:00 2001 From: Yagami Date: Tue, 7 Feb 2023 08:50:47 +0800 Subject: [PATCH 168/499] * Code for execution list table style. --- module/execution/model.php | 3 ++- module/project/css/execution.css | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 6217555945..d8beaadca8 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -4781,9 +4781,10 @@ class executionModel extends model } else { + $path = str_replace(",$execution->project", '', $execution->path); $trClass = 'table-nest-hide'; $trAttrs = "data-id={$execution->id} data-parent={$execution->parent} data-status={$execution->status}"; - $trAttrs .= " data-nest-parent='$execution->parent' data-order='$execution->order' data-nest-path=',$execution->parent,$execution->id,'"; + $trAttrs .= " data-nest-parent='$execution->parent' data-order='$execution->order' data-nest-path='$path'"; } $burns = join(',', $execution->burns); diff --git a/module/project/css/execution.css b/module/project/css/execution.css index 39676c7cbd..291cca644c 100644 --- a/module/project/css/execution.css +++ b/module/project/css/execution.css @@ -10,7 +10,7 @@ th.table-nest-title .check-all {position: absolute; left: 15px; top: 7px;} .c-date {text-align: center;} #executionTableList > tr.has-nest-child .table-nest-toggle {vertical-align: middle;} #executionTableList > tr:not(.has-nest-child) .table-nest-toggle {display: none;} -#executionTableList > tr:not(.has-nest-child) .project-type-label {margin-left: 22px;} +#executionTableList > tr.is-top-level:not(.has-nest-child) .project-type-label {margin-left: 22px;} .table-statistic {padding-left: 10px;} td.flex {display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: center; margin-bottom: 0px;} td.c-name > .project-type-label {flex: 0 0 36px; padding-right: 2px;} From 9137ed1b83a4db6819b5990e8ee24ec7cf0e87da Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Tue, 7 Feb 2023 01:08:03 +0000 Subject: [PATCH 169/499] * Add the ajax request when change parent stage for task #83955. --- module/programplan/control.php | 32 +++++++++++++++++++++------ module/programplan/js/edit.js | 10 +++++++++ module/programplan/view/edit.html.php | 15 ++++++++----- 3 files changed, 44 insertions(+), 13 deletions(-) create mode 100644 module/programplan/js/edit.js diff --git a/module/programplan/control.php b/module/programplan/control.php index aeb5713f72..c22213af94 100644 --- a/module/programplan/control.php +++ b/module/programplan/control.php @@ -212,8 +212,9 @@ class programplan extends control */ public function edit($planID = 0, $projectID = 0) { - $this->app->loadLang('project'); + $this->loadModel('project'); $this->app->loadLang('execution'); + $this->app->loadLang('stage'); $plan = $this->programplan->getByID($planID); global $lang; @@ -234,12 +235,14 @@ class programplan extends control return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate)); } - $this->app->loadLang('stage'); - $this->view->title = $this->lang->programplan->edit; - $this->view->position[] = $this->lang->programplan->edit; - $this->view->parentStage = $this->programplan->getParentStageList($this->session->project, $planID, $plan->product); - $this->view->isCreateTask = $this->programplan->isCreateTask($planID); - $this->view->plan = $plan; + $parentStage = $this->project->getByID($plan->parent, 'stage'); + + $this->view->title = $this->lang->programplan->edit; + $this->view->position[] = $this->lang->programplan->edit; + $this->view->isCreateTask = $this->programplan->isCreateTask($planID); + $this->view->plan = $plan; + $this->view->parentStageList = $this->programplan->getParentStageList($this->session->project, $planID, $plan->product); + $this->view->enableOptionalAttr = (empty($parentStage) or (!empty($parentStage) and $parentStage->attribute == 'mix')); $this->display(); } @@ -328,4 +331,19 @@ class programplan extends control return $this->send(array('result' => 'success')); } } + + public function ajaxGetAttribute($stageID) + { + $this->app->loadLang('stage'); + + $attribute = $this->dao->select('attribute')->from(TABLE_EXECUTION)->where('id')->eq($stageID)->fetch('attribute'); + if(empty($attribute) or $attribute == 'mix') + { + return print(html::select('attribute', $this->lang->stage->typeList, $attribute, "class='form-control chosen'")); + } + else + { + return print(zget($this->lang->stage->typeList, $attribute)); + } + } } diff --git a/module/programplan/js/edit.js b/module/programplan/js/edit.js new file mode 100644 index 0000000000..25d3eb9efc --- /dev/null +++ b/module/programplan/js/edit.js @@ -0,0 +1,10 @@ +function changeParentStage(stageID) +{ + $.get(createLink('programplan', 'ajaxGetAttribute', 'stageID=' + stageID), function(attribute) + { + $('#attributeType td').html(attribute); + $("#attribute" + "_chosen").remove(); + $("#attribute").next('.picker').remove(); + $("#attribute").chosen(); + }) +} diff --git a/module/programplan/view/edit.html.php b/module/programplan/view/edit.html.php index 3cb46b97eb..f3669098b1 100644 --- a/module/programplan/view/edit.html.php +++ b/module/programplan/view/edit.html.php @@ -25,7 +25,7 @@ programplan->parent;?> - parent, "class='form-control chosen '");?> + parent, "class='form-control chosen '");?> programplan->name;?> @@ -46,9 +46,11 @@
    - " id="attributeType"> - programplan->attribute;?> - stage->typeList, $plan->attribute, "class='form-control'");?> + + programplan->attribute;?> + + stage->typeList, $plan->attribute, "class='form-control'") : zget($lang->stage->typeList, $plan->attribute);?> + setMilestone):?> @@ -101,16 +103,17 @@ $("#parent").change(function() { var parent = $(this).children("option:selected").val(); + if(parent == 0) { - $("#attributeType").removeClass('hidden'); $("#acl").attr('disabled', false); } else { - $("#attributeType").addClass('hidden'); $("#acl").attr('disabled', true); } + + changeParentStage(parent); }); From 101456df7cf5e86330c3119309454d41eadf772b Mon Sep 17 00:00:00 2001 From: liuyongkai Date: Tue, 7 Feb 2023 09:18:27 +0800 Subject: [PATCH 170/499] * Fix bugs. --- module/repo/control.php | 2 +- module/repo/model.php | 24 ++++++++++++++++++++++-- module/report/zen.php | 2 +- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/module/repo/control.php b/module/repo/control.php index 7b2ee1892e..8e90a7331a 100644 --- a/module/repo/control.php +++ b/module/repo/control.php @@ -641,7 +641,7 @@ class repo extends control $this->view->path = urldecode($path); $this->view->logType = $logType; $this->view->cloneUrl = $this->repo->getCloneUrl($repo); - $this->view->cacheTime = date('m-d H:i', strtotime($lastRevision->time)); + $this->view->cacheTime = isset($lastRevision->time) ? date('m-d H:i', strtotime($lastRevision->time)) : date('m-d H:i'); $this->view->branchOrTag = $branchOrTag; $this->view->syncedRF = strpos(",{$this->config->repo->synced},", ",$repoID,") !== false; //Check has synced rename files. diff --git a/module/repo/model.php b/module/repo/model.php index 29e3b8e167..5c7a1fd93e 100644 --- a/module/repo/model.php +++ b/module/repo/model.php @@ -2281,7 +2281,7 @@ class repoModel extends model ->where('t1.repo')->eq($repo->id) ->andWhere('left(t2.comment, 12)')->ne('Merge branch') ->beginIF($repo->SCM != 'Subversion' and $branch)->andWhere('t3.branch')->eq($branch)->fi() - ->andWhere('t1.parent')->like("$parent%")->fi() + ->andWhere('t1.parent')->eq("$parent") ->orderBy('t2.`time` asc') ->fetchAll('path'); @@ -2360,9 +2360,29 @@ class repoModel extends model ->orderBy('t2.`time` asc') ->fetchPairs(); + $removedDirs = array(); + if($repo->SCM == 'Subversion') + { + $removedDirs = $this->dao->select('id, path')->from(TABLE_REPOFILES) + ->where('repo')->eq($repo->id) + ->andWhere('type')->eq('dir') + ->andWhere('action')->eq('D') + ->fetchPairs(); + } foreach($files as $file => $action) { - if($action != 'D') $allFiles[] = $file; + foreach($removedDirs as $dir) + { + if(strpos($file, $dir) === 0) + { + $action = 'D'; + break; + } + } + if($action != 'D') + { + $allFiles[] = $file; + } } } else diff --git a/module/report/zen.php b/module/report/zen.php index df91d9e8a4..5016628b36 100644 --- a/module/report/zen.php +++ b/module/report/zen.php @@ -21,7 +21,7 @@ class reportZen extends report if(!$module || !$method) list($module, $method, $params) = $this->getDefaultMethod($dimension, $group); if(!empty($module) && !empty($method) && !common::hasPriv($module, $method)) common::deny('report', $method); - + $this->view->sidebar = $this->getSidebar($dimension, $group, $module, $method, $params); $this->view->dimension = $dimension; $this->view->group = $group; From 5db38be8de7772eb3887960389fbe99360c366b9 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 7 Feb 2023 09:52:21 +0800 Subject: [PATCH 171/499] * Code for finish task #83721. --- module/admin/lang/menu.php | 8 ++++---- module/admin/model.php | 16 +++++++++++++++- module/admin/view/tabmenu.html.php | 27 ++++++++++++--------------- module/custom/view/set.html.php | 12 ++---------- 4 files changed, 33 insertions(+), 30 deletions(-) diff --git a/module/admin/lang/menu.php b/module/admin/lang/menu.php index 3e6c2681d8..14a3592588 100644 --- a/module/admin/lang/menu.php +++ b/module/admin/lang/menu.php @@ -83,13 +83,13 @@ $lang->admin->menuList->model['menuOrder']['5'] = 'common'; $lang->admin->menuList->model['menuOrder']['10'] = 'scrum'; $lang->admin->menuList->model['menuOrder']['15'] = 'waterfall'; -$lang->admin->menuList->feature['subMenu']['my'] = array('link' => "{$lang->my->common}|custom|set|module=todo"); -$lang->admin->menuList->feature['subMenu']['product'] = array('link' => "{$lang->productCommon}|custom|required|module=product|"); +$lang->admin->menuList->feature['subMenu']['my'] = array('link' => "{$lang->my->common}|custom|set|module=todo", 'exclude' => 'set,required'); +$lang->admin->menuList->feature['subMenu']['product'] = array('link' => "{$lang->productCommon}|custom|required|module=product|", 'exclude' => 'set,required'); $lang->admin->menuList->feature['subMenu']['execution'] = array('link' => "{$lang->execution->common}|custom|execution|"); -$lang->admin->menuList->feature['subMenu']['qa'] = array('link' => "{$lang->qa->common}|custom|required|module=bug"); +$lang->admin->menuList->feature['subMenu']['qa'] = array('link' => "{$lang->qa->common}|custom|required|module=bug", 'exclude' => 'set,required'); $lang->admin->menuList->feature['subMenu']['kanban'] = array('link' => "{$lang->kanban->common}|custom|kanban|"); $lang->admin->menuList->feature['subMenu']['doc'] = array('link' => "{$lang->doc->common}|custom|required|module=doc"); -$lang->admin->menuList->feature['subMenu']['user'] = array('link' => "{$lang->user->common}|custom|set|module=user"); +$lang->admin->menuList->feature['subMenu']['user'] = array('link' => "{$lang->user->common}|custom|set|module=user", 'exclude' => 'set,required'); $lang->admin->menuList->feature['tabMenu']['my']['todo'] = array('link' => "{$lang->todo->common}|custom|set|module=todo&field=priList"); $lang->admin->menuList->feature['tabMenu']['my']['block'] = array('link' => "{$lang->block->common}|custom|set|module=block&field=closed"); diff --git a/module/admin/model.php b/module/admin/model.php index 57946661c6..5cae3daad8 100755 --- a/module/admin/model.php +++ b/module/admin/model.php @@ -269,9 +269,23 @@ class adminModel extends model $this->setSwitcher($menuKey); if(isset($this->lang->admin->menuList->$menuKey)) { - if(isset($this->lang->admin->menuList->$menuKey['subMenu'])) $this->lang->admin->menu = $this->lang->admin->menuList->$menuKey['subMenu']; + if(isset($this->lang->admin->menuList->$menuKey['subMenu'])) + { + $moduleName = $this->app->rawModule; + $methodName = $this->app->rawMethod; + $paramName = $this->app->rawParams ? reset($this->app->rawParams) : ''; + if($moduleName == 'custom' and strpos(',required,set,', $methodName) !== false) + { + if(strpos(',todo,block,', $paramName) !== false) $subMenuKey = 'my'; + if(isset($subMenuKey)) $this->lang->admin->menuList->$menuKey['subMenu'][$subMenuKey]['subModule'] = $moduleName; + } + + $this->lang->admin->menu = $this->lang->admin->menuList->$menuKey['subMenu']; + } + if(isset($this->lang->admin->menuList->$menuKey['menuOrder'])) $this->lang->admin->menuOrder = $this->lang->admin->menuList->$menuKey['menuOrder']; if(isset($this->lang->admin->menuList->$menuKey['dividerMenu'])) $this->lang->admin->dividerMenu = $this->lang->admin->menuList->$menuKey['dividerMenu']; + if(isset($this->lang->admin->menuList->$menuKey['tabMenu'])) $this->lang->admin->tabMenu = $this->lang->admin->menuList->$menuKey['tabMenu']; } } diff --git a/module/admin/view/tabmenu.html.php b/module/admin/view/tabmenu.html.php index 441f8d9819..7f4cee4514 100644 --- a/module/admin/view/tabmenu.html.php +++ b/module/admin/view/tabmenu.html.php @@ -1,22 +1,19 @@