From 6af0d96e29e71bad83fa46c8b3db7be36ab60199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Tue, 15 Feb 2022 10:11:07 +0800 Subject: [PATCH] * Fix jira style. --- module/convert/control.php | 10 ++++-- module/convert/css/mapjira2zentao.css | 16 +++++++++ module/convert/lang/en.php | 5 +++ module/convert/lang/zh-cn.php | 7 +++- module/convert/view/mapjira2zentao.html.php | 36 +++++++++++++++------ 5 files changed, 60 insertions(+), 14 deletions(-) create mode 100644 module/convert/css/mapjira2zentao.css diff --git a/module/convert/control.php b/module/convert/control.php index d4d29808b3..2dde7442aa 100644 --- a/module/convert/control.php +++ b/module/convert/control.php @@ -320,10 +320,11 @@ class convert extends control * * @param string $method db|file * @param string $dbName + * @param int $step * @access public * @return void */ - public function mapJira2Zentao($method = 'db', $dbName = '') + public function mapJira2Zentao($method = 'db', $dbName = '', $step = 1) { $this->app->loadLang('story'); $this->app->loadLang('bug'); @@ -331,11 +332,13 @@ class convert extends control if($_POST) { - $this->session->set('jiraRelation', $_POST); + foreach($_POST as $key => $value) $_SESSION['jiraRelation'][$key] = $value; + $step = $step + 1; + $link = $step == 5 ? $this->createLink('convert', 'initJiraUser', "method=$method") : inlink('mapJira2Zentao', "method=$method&dbName=$dbName&step=$step"); $response['result'] = 'success'; $response['message'] = $this->lang->saveSuccess; - $response['locate'] = $this->createLink('convert', 'initJiraUser', "method=$method"); + $response['locate'] = $link; return print($this->send($response)); } @@ -362,6 +365,7 @@ class convert extends control $this->view->resolutionList = $resolutionList; $this->view->statusList = $statusList; $this->view->method = $method; + $this->view->step = $step; $this->display(); } diff --git a/module/convert/css/mapjira2zentao.css b/module/convert/css/mapjira2zentao.css new file mode 100644 index 0000000000..ba5b78d217 --- /dev/null +++ b/module/convert/css/mapjira2zentao.css @@ -0,0 +1,16 @@ +.main-header > ul {display: inline-block; padding: 0; margin: 0;} +.main-header > ul > li {position: relative;} +.main-header > ul > li.active > a {background-color: #1CA5FF; color: #fff} +.main-header > ul > li > a {min-width: 120px; padding: 5px 20px; text-align: center; transition: none; color: #838a9d} +.main-header > ul > li.active > a:hover, +.main-header > ul > li.active > a:focus {background-color: #1CA5FF;} +.main-header > ul > li .step-number {display: inline-block; width: 14px; height: 14px; border-radius: 7px; text-align: center; line-height: 12px; border: 1px solid #A6AAB8; color: #A6AAB8; font-size: 12px; font-weight: bold; margin-right: 3px;} +.main-header > ul > li + li > a {padding-left: 35px;} +.main-header > ul > li + li:before, +.main-header > ul > li + li:after {content: ' '; width: 0; height: 0; border-style: solid; border-width: 15px 0 15px 15px; border-color: transparent transparent transparent #a6aab8; position: absolute; left: 0; top: 0;} +.main-header > ul > li + li:after {border-left-color: #fff; left: -1px;} +.main-header > ul > li.active + li:after {border-left-color: #1ca5ff;} +.main-header > ul > li:hover + li:after {border-left-color: #eceef4;} +.main-header > ul > li.active:hover + li:after {border-left-color: #1CA5FF;} +.nav-primary>li.active>a:hover {color: #fff} +.main-header {margin-top: -15px !important;} diff --git a/module/convert/lang/en.php b/module/convert/lang/en.php index 78dfc90414..144565ea5b 100644 --- a/module/convert/lang/en.php +++ b/module/convert/lang/en.php @@ -164,6 +164,11 @@ $lang->convert->jira->zentaoLinkTypeList['subStoryLink'] = 'Parent-Child Story'; $lang->convert->jira->zentaoLinkTypeList['duplicate'] = 'Duplicate'; $lang->convert->jira->zentaoLinkTypeList['relates'] = 'Relates'; +$lang->convert->jira->steps[1] = 'Objects'; +$lang->convert->jira->steps[2] = 'Relates'; +$lang->convert->jira->steps[3] = 'Resolution'; +$lang->convert->jira->steps[4] = 'Status'; + $lang->convert->jira->importSteps['db'][1] = 'Backup ZenTao database, backup Jira database.'; $lang->convert->jira->importSteps['db'][2] = 'Using ZenTao when importing data will cause performance pressure on the server, please try to ensure that no one is using ZenTao when importing data.'; $lang->convert->jira->importSteps['db'][3] = 'Import the Jira database into the Mysql used by ZenTao, the name is distinguished from the ZenTao database.'; diff --git a/module/convert/lang/zh-cn.php b/module/convert/lang/zh-cn.php index f881bd2fc3..563dd85b13 100644 --- a/module/convert/lang/zh-cn.php +++ b/module/convert/lang/zh-cn.php @@ -164,6 +164,11 @@ $lang->convert->jira->zentaoLinkTypeList['subStoryLink'] = '父-子需求'; $lang->convert->jira->zentaoLinkTypeList['duplicate'] = '重复对象'; $lang->convert->jira->zentaoLinkTypeList['relates'] = '互相关联'; +$lang->convert->jira->steps[1] = '对象'; +$lang->convert->jira->steps[2] = '对象关联关系'; +$lang->convert->jira->steps[3] = '解决方案'; +$lang->convert->jira->steps[4] = '状态'; + $lang->convert->jira->importSteps['db'][1] = '备份禅道数据库,备份Jira数据库。'; $lang->convert->jira->importSteps['db'][2] = '导入数据时使用禅道会给服务器造成性能压力,请尽量保证导入数据时无人使用禅道。'; $lang->convert->jira->importSteps['db'][3] = '将Jira数据库导入到禅道使用的Mysql中,名字和禅道数据库区别开来。'; @@ -172,7 +177,7 @@ $lang->convert->jira->importSteps['db'][4] = "将Jira附件目录convert->jira->importSteps['db'][5] = "上述步骤完成后,请输入Jira数据库名字进行下一步。"; $lang->convert->jira->importSteps['file'][1] = '备份禅道数据库,备份Jira数据库。'; $lang->convert->jira->importSteps['file'][2] = '导入数据时使用禅道会给服务器造成性能压力,请尽量保证导入数据时无人使用禅道。'; -$lang->convert->jira->importSteps['file'][3] = "将Jira的备份文件 entities.xml 放到 %s 下。"; +$lang->convert->jira->importSteps['file'][3] = "将Jira的备份文件 entities.xml 放到 %s 下,并给该目录读写权限。"; $lang->convert->jira->importSteps['file'][4] = "将Jira附件目录 attachments 放到 %s 下,确保禅道服务器磁盘空间足够。"; $lang->convert->jira->importSteps['file'][5] = "上述步骤完成后,点击下一步。"; diff --git a/module/convert/view/mapjira2zentao.html.php b/module/convert/view/mapjira2zentao.html.php index a26e460edf..a426bf5dae 100644 --- a/module/convert/view/mapjira2zentao.html.php +++ b/module/convert/view/mapjira2zentao.html.php @@ -10,13 +10,27 @@ */ ?> -
-
-

- convert->jira->mapJira2Zentao;?> -

+ +
+
+ +
+ convert->jira->next);?> +
+
+ @@ -35,6 +49,8 @@

+ + @@ -53,6 +69,8 @@

+ + @@ -73,6 +91,8 @@

+ + @@ -95,11 +115,7 @@ - - - - -
convert->jira->next);?>
+