* Fix jira style.

This commit is contained in:
孙广明
2022-02-15 10:11:07 +08:00
parent 9e9a9f1735
commit 6af0d96e29
5 changed files with 60 additions and 14 deletions
+7 -3
View File
@@ -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();
}
+16
View File
@@ -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;}
+5
View File
@@ -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.';
+6 -1
View File
@@ -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附件目录<strong class
$lang->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的备份文件 <strong class='text-red'>entities.xml</strong> 放到 <strong class='text-red'>%s</strong> 下。";
$lang->convert->jira->importSteps['file'][3] = "将Jira的备份文件 <strong class='text-red'>entities.xml</strong> 放到 <strong class='text-red'>%s</strong> 下,并给该目录读写权限。";
$lang->convert->jira->importSteps['file'][4] = "将Jira附件目录<strong class='text-red'> attachments</strong> 放到 <strong class='text-red'>%s</strong> 下,确保禅道服务器磁盘空间足够。";
$lang->convert->jira->importSteps['file'][5] = "上述步骤完成后,点击下一步。";
+26 -10
View File
@@ -10,13 +10,27 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2>
<?php echo $lang->convert->jira->mapJira2Zentao;?>
</h2>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php echo html::a("javascript::void(0);", "<span class='text'>" . $lang->convert->jira->mapJira2Zentao . '</span>', '', "class='btn btn-link btn-active-text'");?>
</div>
</div>
<div id='mainContent' class='main-content'>
<form class='main-form form-ajax' method='post'>
<div class='main-header text-center'>
<ul class='nav nav-primary'>
<?php foreach($lang->convert->jira->steps as $key => $label):?>
<?php $active = $step == $key ? 'class="active"' : '';?>
<li <?php echo $active;?>>
<a><?php echo $label;?></a>
</li>
<?php endforeach;?>
</ul>
<div class='btn-toolbar pull-right'>
<?php echo html::submitButton($lang->convert->jira->next);?>
</div>
</div>
<?php if($step == 1):?>
<table class='table table-form'>
<thead>
<tr class='text-center'>
@@ -35,6 +49,8 @@
</tbody>
</table>
<hr />
<?php endif;?>
<?php if($step == 2):?>
<table class='table table-form'>
<thead>
<tr class='text-center'>
@@ -53,6 +69,8 @@
</tbody>
</table>
<hr />
<?php endif;?>
<?php if($step == 3):?>
<table class='table table-form'>
<thead>
<tr class='text-center'>
@@ -73,6 +91,8 @@
</tbody>
</table>
<hr />
<?php endif;?>
<?php if($step == 4):?>
<table class='table table-form'>
<thead>
<tr class='text-center'>
@@ -95,11 +115,7 @@
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan="5" class="text-center form-actions"><?php echo html::submitButton($lang->convert->jira->next);?></td>
</tr>
</tfoot>
</table>
<?php endif;?>
</form>
</div>