* finish task#1412.

This commit is contained in:
iamazhi
2013-08-29 16:35:31 +08:00
parent 04daf5979f
commit fa54dff413
8 changed files with 0 additions and 99 deletions
-18
View File
@@ -181,22 +181,4 @@ class admin extends control
$this->view->position[] = $this->lang->admin->clearData;
$this->display();
}
/**
* Set flow.
*
* @access public
* @return void
*/
public function setFlow()
{
if($_POST)
{
if($this->post->flow != 'full') die(js::locate($this->createLink('extension', 'install', "extension={$this->post->flow}"), 'parent'));
$this->loadModel('setting')->setItem('system.common.global.flow', 'full');
die(js::reload( 'parent.parent'));
}
$this->display();
}
}
-9
View File
@@ -55,12 +55,3 @@ $lang->admin->bind = new stdclass();
$lang->admin->bind->caption = 'Bind with community account';
$lang->admin->bind->action = 'bind';
$lang->admin->bind->success = "Bind success";
$lang->admin->selectFlow = 'How do you plan to use zentao?';
$lang->admin->flowList['full'] = 'All features(including product, project, plan, release, story, task, bug, case, testtask, doc and so on.)';
$lang->admin->flowList['zentaotest'] = 'Only testing(including product, release, bug, case, testtask, doc and so on.)';
$lang->admin->flowList['zentaotask'] = 'Only task (including project, task, doc and so on.)';
$lang->admin->flowList['zentaostory'] = 'Only story(including product, story, plan, release, doc and so on.)';
$lang->admin->flowNotice = "<span class='red'>You can remove testing, task or story extension in admin->extension panel to use all features again.</span>";
-9
View File
@@ -55,12 +55,3 @@ $lang->admin->bind = new stdclass();
$lang->admin->bind->caption = '关联社区账号';
$lang->admin->bind->action = '关联';
$lang->admin->bind->success = "关联账户成功";
$lang->admin->selectFlow = '您计划如何使用禅道?';
$lang->admin->flowList['full'] = '所有功能(包括产品、项目、需求、计划、发布、任务、Bug、用例、测试任务和文档等功能。)';
$lang->admin->flowList['zentaotest'] = '仅测试管理(包括产品、版本、Bug、用例、测试任务和文档管理等功能。)';
$lang->admin->flowList['zentaotask'] = '仅任务管理(包括项目、任务和文档管理。)';
$lang->admin->flowList['zentaostory'] = '仅需求管理(包括产品、需求、计划、发布和文档管理等功能。)';
$lang->admin->flowNotice = "<span class='red'>注:如果您使用的不是所有功能,后续可以到“管理->插件”中,卸载相应的插件,即可重新使用禅道所有功能。</span>";
-36
View File
@@ -1,36 +0,0 @@
<?php
/**
* The setFlow view file of admin module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Yidong Wang <yidong@cnezsoft.com>
* @package admin
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<form method='post' target='hiddenwin'>
<table class='table-1'>
<caption><?php echo $lang->admin->selectFlow?></caption>
<?php foreach($lang->admin->flowList as $type => $name):?>
<tr>
<td>
<?php
$checked = $type == 'full' ? "checked='checked'" : '';
echo "<input type='radio' name='flow' value='$type' $checked> $name";
?>
</td>
</tr>
<?php endforeach;?>
<tr>
<td><?php echo "<p>{$lang->admin->flowNotice}</p>"?></td>
</tr>
<tr>
<td align='center'><?php echo html::submitButton()?></td>
</tr>
</table>
</form>
<?php include '../../common/view/footer.lite.html.php';?>
-1
View File
@@ -43,7 +43,6 @@ class my extends control
$this->app->loadClass('pager', true);
$pager = new pager($recTotal = 1000, $this->config->my->dynamicCounts); // Init the $recTotal var, thus omit one sql query.
$this->view->setFlow = (!(isset($this->config->global->flow) or strpos($this->app->company->admins, ",{$this->app->user->account},") === false)) ? true : false;
$this->view->projectStats = $projectStats;
$this->view->productStats = $productStats;
$this->view->actions = $this->loadModel('action')->getDynamic('all', 'latest3days', 'date_desc', $pager);
-1
View File
@@ -14,5 +14,4 @@ $(function()
{
$(this).sparkline('html', {height:'25px'});
})
if(flow) $.colorbox({href:createLink('admin', 'setFlow'), open:true, width:800, height:277, transition:'none', iframe:true});
});
-1
View File
@@ -37,5 +37,4 @@
<?php endif;?>
</tr>
</table>
<?php js::set('flow', $setFlow ? true : false);?>
<?php include '../../common/view/footer.html.php';?>
-24
View File
@@ -83,7 +83,6 @@ class upgradeModel extends model
$this->execSQL($this->getUpgradeFile('4.0'));
case '4_0_1':
$this->execSQL($this->getUpgradeFile('4.0.1'));
$this->processFlow();
$this->addPriv4_0_1();
case '4_1':
$this->execSQL($this->getUpgradeFile('4.1'));
@@ -627,29 +626,6 @@ class upgradeModel extends model
}
}
/**
* Process flow.
*
* @access public
* @return void
*/
public function processFlow()
{
/* First delete all flow records. */
$this->setting->deleteItems('owner=system&module=common&section=global&key=flow');
/* Search the extension table to check zentaotest, zentaotask, zentaostory exists or not. */
$flow = 'full';
$extension = $this->dao->select('code')->from(TABLE_EXTENSION)
->where('code')->in('zentaotest,zentaotask,zentaostory')
->andWhere('status')->eq('installed')
->fetch('code');
if($extension) $flow = 'only' . ucfirst(str_replace('zentao', '', $extension));
/* Update database again. */
$this->setting->setItem('system.common.global.flow', $flow, 0);
}
/**
* Add priv for version 4.0.1
*