This commit is contained in:
sgm0422
2021-08-23 09:33:15 +08:00
9 changed files with 408 additions and 295 deletions
+190 -190
View File
File diff suppressed because it is too large Load Diff
+37 -5
View File
@@ -167,12 +167,45 @@ class install extends control
}
/**
* Create company, admin.
* Set system mode.
*
* @access public
* @return void
*/
public function step4()
{
if(!empty($_POST))
{
$this->loadModel('setting')->setItem('system.common.global.mode', $this->post->mode); // Update mode.
die(js::locate(inlink('step5'), 'parent'));
}
$this->app->loadLang('upgrade');
if(isset($this->config->bizVersion))
{
$this->lang->install->introductionContent = sprintf($this->lang->install->introductionContent, $this->lang->bizName, $this->lang->bizName);
}
elseif(isset($this->config->proVersion))
{
$this->lang->install->introductionContent = sprintf($this->lang->install->introductionContent, $this->lang->proName, $this->lang->proName);
}
else
{
$this->lang->install->introductionContent = sprintf($this->lang->install->introductionContent, $this->lang->pmsName, $this->lang->pmsName);
}
$this->view->title = $this->lang->install->introduction;
$this->display();
}
/**
* Create company, admin.
*
* @access public
* @return void
*/
public function step5()
{
if(!empty($_POST))
{
@@ -183,14 +216,13 @@ class install extends control
if(dao::isError()) echo js::alert($this->lang->install->errorImportDemoData);
$this->loadModel('setting')->updateVersion($this->config->version);
$this->loadModel('setting')->setItem('system.common.global.mode', $this->post->mode); // update mode
$this->loadModel('setting')->setItem('system.common.global.flow', $this->post->flow);
$this->loadModel('setting')->setItem('system.common.safe.mode', '1');
$this->loadModel('setting')->setItem('system.common.safe.changeWeak', '1');
$this->loadModel('setting')->setItem('system.common.global.cron', 1);
die(js::locate(inlink('step5'), 'parent'));
die(js::locate(inlink('step6'), 'parent'));
}
$this->app->loadLang('upgrade');
$this->view->title = $this->lang->install->getPriv;
@@ -211,7 +243,7 @@ class install extends control
* @access public
* @return void
*/
public function step5()
public function step6()
{
$this->view->title = $this->lang->install->success;
$this->display();
+8
View File
@@ -0,0 +1,8 @@
.block-content {width: 100%;}
.block-content .block-details {width: 45%; display: inline-table; margin-top: 20px;}
.block-content .block-right {margin-left: 5%;}
.block-content .block-details .block-title {font-size: 14px;}
.block-content .block-details i {color: rgb(22, 169, 248); font-size: 20px;}
.introduction-link a {margin: 30px;}
#selectedModeTips, .select-mode {margin-top: 20px;}
.select-mode .radio-inline {margin-right: 30px;}
+32 -13
View File
@@ -40,6 +40,35 @@ Twitter: <a href='https://twitter.com/ZentaoA' target='_blank'>ZenTao ALM</a>
You are installing ZenTao <strong class='text-danger'>%s</strong>.
EOT;
global $config;
$lang->install->introduction = "Zentao {$this->config->version} Introduction";
$lang->install->howToUse = "How do you like to use ZenTao?";
$lang->install->introductionContent = <<<EOT
<div>
<h4>Welcome to %s</h4>
<p>ZenTao %s provides two management modes, the classic mode and the program mode. The former is relatively simplified with only two core features, the product and the project, and the latter is a brand-new mode with all the core features. You can choose a mode according to your needs.</p>
<div class='block-content'>
<div class='block-details'><p class='block-title'><i class='icon icon-program'></i><strong>Program</strong></p><p>Program is a set of interrelated and coordinated projects. It is at the top and strategic level with multi-level projects.</p></div>
<div class='block-details block-right'>
<p class='block-title'><i class='icon icon-product'></i><strong>Product</strong></p>
<p>Product defines "what" and focuses on requirements. You can manage user requirements, software requirements, plans and releases.<p>
</div>
<div class='block-details'>
<p class='block-title'><i class='icon icon-project'></i><strong>Project</strong></p>
<p>Project defines "how" and focuses on tasks of the project within the specified time, budget and quality. It is at a campaign level.</p>
</div>
<div class='block-details block-right'>
<p class='block-title'><i class='icon icon-product'></i><strong>Execution</strong></p>
<p>Execution are iterations/sprints or stages of a project. The task are done in executions. It is the combat-level management.<p>
</div>
</div>
<div class='text-center introduction-link'>
<a href='https://dl.cnezsoft.com/zentao/zentaoconcept.pdf' target='_blank' class='btn btn-wide btn-info'>Document of introduction</a>
<a href='https://dl.cnezsoft.com/vedio/zentaoconcepteng0716.mp4' target='_blank' class='btn btn-wide btn-info'>Video of introduction</a>
</div>
</div>
EOT;
$lang->install->newReleased = "<strong class='text-danger'>Notice</strong>: Official Website has the latest version<strong class='text-danger'>%s</strong>, released on %s.";
$lang->install->or = 'Or';
$lang->install->checking = 'System Checkup';
@@ -180,6 +209,9 @@ EOT;
$lang->install->product = array('chanzhi', 'zdoo', 'ydisk', 'meshiot');
$lang->install->modeList['classic'] = 'Classic mode';
$lang->install->modeList['new'] = 'Program mode';
$lang->install->promotion = "Products also from EasyCorp:";
$lang->install->chanzhi = new stdclass();
@@ -208,19 +240,6 @@ $lang->install->zdoo->desc = <<<EOD
</ul>
EOD;
$lang->install->ydisk = new stdclass();
$lang->install->ydisk->name = 'YDisk';
$lang->install->ydisk->logo = 'images/main/ydisk.ico';
+33
View File
@@ -40,6 +40,36 @@ $lang->install->links = <<<EOT
您现在正在安装的版本是 <strong class='text-danger'>%s</strong>。
EOT;
global $config;
$lang->install->introduction = "禅道{$this->config->version}版本功能介绍";
$lang->install->howToUse = "请问您计划如何使用禅道的新版本呢";
$lang->install->introductionContent = <<<EOT
<div>
<h4>尊敬的用户您好,欢迎您使用禅道%s。</h4>
<p>禅道%s提供了两种使用模式, 一种是精典管理模式,功能较为精简,提供了产品和项目两个核心功能;另一种是全新项目集管理模式,具备所有核心功能。如下是相关功能介绍,您可以根据需要选择使用的模式。</p>
<div class='block-content'>
<div class='block-details'><p class='block-title'><i class='icon icon-program'></i><strong>项目集</strong></p><p>项目集是一组相互关联,且被协调管理的项目集合,可以进行多层级管理,属于战略层面的管理。</p></div>
<div class='block-details block-right'>
<p class='block-title'><i class='icon icon-product'></i><strong>产品</strong></p>
<p>产品是定义做什么,主要是管理需求,通过产品可以管理用户需求、研发需求、计划以及发布。<p>
</div>
<div class='block-details'>
<p class='block-title'><i class='icon icon-project'></i><strong>项目</strong></p>
<p>项目是定义如何做,主要是在规定的时间、预算和质量目标范围内完成项目的各种工作,属于战役层面的管理。</p>
</div>
<div class='block-details block-right'>
<p class='block-title'><i class='icon icon-product'></i><strong>执行</strong></p>
<p>我们把一个项目下的多个迭代/冲刺或阶段统称为执行,通过执行去完成项目的任务,属于战斗层面的管理。<p>
</div>
</div>
<div class='text-center introduction-link'>
<a href='https://dl.cnezsoft.com/zentao/zentaoconcept.pdf' target='_blank' class='btn btn-wide btn-info'>文档介绍</a>
<a href='https://dl.cnezsoft.com/vedio/program0716.mp4' target='_blank' class='btn btn-wide btn-info'>视频介绍</a>
</div>
</div>
EOT;
$lang->install->newReleased = "<strong class='text-danger'>提示</strong>:官网网站已有最新版本<strong class='text-danger'>%s</strong>, 发布日期于 %s。";
$lang->install->or = '或者';
$lang->install->checking = '系统检查';
@@ -180,6 +210,9 @@ EOT;
$lang->install->product = array('chanzhi', 'zdoo', 'xuanxuan', 'ydisk', 'meshiot');
$lang->install->modeList['classic'] = '经典管理模式';
$lang->install->modeList['new'] = '全新项目集管理模式';
$lang->install->promotion = "为您推荐易软天创旗下其他产品:";
$lang->install->chanzhi = new stdclass();
+1 -1
View File
@@ -77,7 +77,7 @@ EOT;
?>
</div>
</div>
<div class='modal-footer'><?php echo html::a($this->createLink('install', 'step4'), $lang->install->next, '', "class='btn btn-wide btn-primary'");?></div>
<div class='modal-footer'><?php echo html::a($this->createLink('install', isset($this->config->maxVersion) ? 'step5' : 'step4'), $lang->install->next, '', "class='btn btn-wide btn-primary'");?></div>
<?php endif;?>
</div>
</div>
+21 -77
View File
@@ -1,90 +1,34 @@
<?php
/**
* The html template file of step4 method of install module of ZenTaoPMS.
* The to20 view file of install module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package ZenTaoPMS
* @version $Id: step4.html.php 4129 2013-01-18 01:58:14Z wwccss $
* @author Yuchun Li <liyuchun@cnezsoft.com>
* @package install
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<style>.modal-body table tr th{text-align: right}</style>
<div class='container'>
<div class='modal-dialog'>
<?php if(isset($error)):?>
<div class='modal-header'>
<strong><?php echo $lang->install->error;?></strong>
</div>
<div class='modal-body'>
<div class='alert alert-danger alert-pure with-icon'>
<i class='icon-exclamation-sign'></i>
<div class='content'><?php echo $error;?></div>
<div class='panel' style='padding:50px; margin:50px 300px;'>
<form method='post'>
<h1 class='text-center'><?php echo $title;?></h1>
<div class='panel-body'>
<?php echo $lang->install->introductionContent;?>
<div class='text-center'>
<h2><?php echo $lang->install->howToUse;?></h2>
<?php $systemMode = isset($lang->upgrade->to15Mode['classic']) ? 'classic' : 'new';?>
<div class='select-mode'><?php echo html::radio('mode', $lang->install->modeList, $systemMode);?></div>
<div id='selectedModeTips' class='text-info'><?php echo $lang->upgrade->selectedModeTips[$systemMode];?></div>
</div>
</div>
</div>
<div class='modal-footer'>
<?php echo html::commonButton($lang->install->pre, "onclick='javascript:history.back(-1)'");?>
</div>
<?php elseif(isset($success)):?>
<div class='modal-header'>
<strong><?php echo $lang->install->success;?></strong>
</div>
<div class='modal-body'>
<div class='alert alert-success alert-pure with-icon'>
<i class='icon-check-circle'></i>
<div class='content'><?php echo $afterSuccess;?></div>
<hr/>
<div class='panel-footer text-center'>
<?php echo html::submitButton($lang->install->next);?>
</div>
</div>
<div class='modal-footer'>
<?php echo html::commonButton($lang->install->pre, "onclick='javascript:history.back(-1)'");?>
</div>
<?php else:?>
<div class='modal-header'>
<strong><?php echo $lang->install->getPriv;?></strong>
</div>
<div class='modal-body'>
<form method='post' target='hiddenwin'>
<table class='table table-form mw-400px' style='margin: 0 auto'>
<tr>
<th class="<?php echo strpos($this->app->getClientLang(), 'zh') === false ? 'w-150px' : 'w-80px';?>"><?php echo $lang->install->company;?></th>
<td class="<?php echo strpos($this->app->getClientLang(), 'zh') === false ? 'w-350px' : 'w-300px';?>"><?php echo html::input('company', '', "class='form-control'");?></td>
</tr>
<tr class='hidden'>
<th><?php echo $lang->install->working;?></th>
<td><?php echo html::select('flow', $lang->install->workingList, 'full', "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->install->account;?></th>
<td><?php echo html::input('account', '', "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->install->password;?></th>
<td><?php echo html::input('password', '', "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->install->selectedMode;?></th>
<td>
<?php $systemMode = isset($lang->upgrade->to15Mode['classic']) ? 'classic' : 'new';?>
<?php echo html::radio('mode', $lang->upgrade->to15Mode, $systemMode);?>
</td>
</tr>
<tr>
<th></th>
<td>
<div class='text-info'><?php echo $lang->install->selectedModeTips;?></div>
</td>
</tr>
<tr>
<th></th><td><?php echo html::checkBox('importDemoData', $lang->install->importDemoData);?></td>
</tr>
<tr class='text-center'>
<td colspan='2'><?php echo html::submitButton();?></td>
</tr>
</table>
</form>
</div>
<?php endif;?>
</form>
</div>
</div>
<?php include '../../common/view/footer.lite.html.php';?>
+53 -9
View File
@@ -1,33 +1,77 @@
<?php
/**
* The html template file of index method of install module of ZenTaoPMS.
* The html template file of step4 method of install module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package ZenTaoPMS
* @version $Id: step5.html.php 2568 2012-02-18 15:53:35Z zhujinyong@cnezsoft.com$
* @version $Id: step4.html.php 4129 2013-01-18 01:58:14Z wwccss $
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<style>.modal-body table tr th{text-align: right}</style>
<div class='container'>
<div class='modal-dialog'>
<?php if(isset($error)):?>
<div class='modal-header'>
<strong><?php echo $lang->install->error;?></strong>
</div>
<div class='modal-body'>
<div class='alert alert-danger alert-pure with-icon'>
<i class='icon-exclamation-sign'></i>
<div class='content'><?php echo $error;?></div>
</div>
</div>
<div class='modal-footer'>
<?php echo html::commonButton($lang->install->pre, "onclick='javascript:history.back(-1)'");?>
</div>
<?php elseif(isset($success)):?>
<div class='modal-header'>
<strong><?php echo $lang->install->success;?></strong>
</div>
<div class='modal-body'>
<div class='alert with-icon alert-pure'>
<div class='alert alert-success alert-pure with-icon'>
<i class='icon-check-circle'></i>
<div class='content'><?php echo nl2br(sprintf($lang->install->joinZentao, $config->version, $this->createLink('admin', 'register'), $this->createLink('admin', 'bind'), inlink('step6')));?></div>
<div class='content'><?php echo $afterSuccess;?></div>
</div>
</div>
<div class='modal-footer'>
<?php
echo html::a($lang->install->officeDomain, $lang->install->register, '_blank', "class='btn btn-wide btn-success'");
echo "<span class='text-muted'> &nbsp; " . $lang->install->or . ' &nbsp; </span>';
echo html::a('index.php', $lang->install->login, '', "class='btn bin-wide btn-primary'");
?>
<?php echo html::commonButton($lang->install->pre, "onclick='javascript:history.back(-1)'");?>
</div>
<?php else:?>
<div class='modal-header'>
<strong><?php echo $lang->install->getPriv;?></strong>
</div>
<div class='modal-body'>
<form method='post' target='hiddenwin'>
<table class='table table-form mw-400px' style='margin: 0 auto'>
<tr>
<th class="<?php echo strpos($this->app->getClientLang(), 'zh') === false ? 'w-150px' : 'w-80px';?>"><?php echo $lang->install->company;?></th>
<td class="<?php echo strpos($this->app->getClientLang(), 'zh') === false ? 'w-350px' : 'w-300px';?>"><?php echo html::input('company', '', "class='form-control'");?></td>
</tr>
<tr class='hidden'>
<th><?php echo $lang->install->working;?></th>
<td><?php echo html::select('flow', $lang->install->workingList, 'full', "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->install->account;?></th>
<td><?php echo html::input('account', '', "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->install->password;?></th>
<td><?php echo html::input('password', '', "class='form-control'");?></td>
</tr>
<tr>
<th></th><td><?php echo html::checkBox('importDemoData', $lang->install->importDemoData);?></td>
</tr>
<tr class='text-center'>
<td colspan='2'><?php echo html::submitButton();?></td>
</tr>
</table>
</form>
</div>
<?php endif;?>
</div>
</div>
<?php include '../../common/view/footer.lite.html.php';?>
+33
View File
@@ -0,0 +1,33 @@
<?php
/**
* The html template file of index method of install module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package ZenTaoPMS
* @version $Id: step5.html.php 2568 2012-02-18 15:53:35Z zhujinyong@cnezsoft.com$
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<div class='container'>
<div class='modal-dialog'>
<div class='modal-header'>
<strong><?php echo $lang->install->success;?></strong>
</div>
<div class='modal-body'>
<div class='alert with-icon alert-pure'>
<i class='icon-check-circle'></i>
<div class='content'><?php echo nl2br(sprintf($lang->install->joinZentao, $config->version, $this->createLink('admin', 'register'), $this->createLink('admin', 'bind'), inlink('step6')));?></div>
</div>
</div>
<div class='modal-footer'>
<?php
echo html::a($lang->install->officeDomain, $lang->install->register, '_blank', "class='btn btn-wide btn-success'");
echo "<span class='text-muted'> &nbsp; " . $lang->install->or . ' &nbsp; </span>';
echo html::a('index.php', $lang->install->login, '', "class='btn bin-wide btn-primary'");
?>
</div>
</div>
</div>
<?php include '../../common/view/footer.lite.html.php';?>