* adjust for choose flow.

This commit is contained in:
wangyidong
2013-01-23 08:22:46 +00:00
parent dfb35fbde2
commit 166560f243
9 changed files with 40 additions and 30 deletions
+17
View File
@@ -187,4 +187,21 @@ class admin extends control
die(js::alert($this->lang->admin->clearDataFailed));
}
}
/**
* Set flow.
*
* @access public
* @return void
*/
public function setFlow()
{
if($_POST)
{
$this->loadModel('setting')->setItem('system.common.global.flow', $this->post->flow);
if($this->post->flow != 'full') die(js::locate($this->createLink('extension', 'install', "extension={$this->config->index->flow2Ext[$this->post->flow]}"), 'parent'));
die(js::reload( 'parent.parent'));
}
$this->display();
}
}
+9
View File
@@ -54,3 +54,12 @@ $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 = 'Please select zentao use flow';
$lang->admin->flowList['full'] = 'Total life cycle management(Zentao fully functional)';
$lang->admin->flowList['onlyTest'] = 'Test management(Zentao test management extension. Remove the story, task management, Just keep bug, case and test management, Can only be used for the test track)';
$lang->admin->flowList['onlyTask'] = 'Task management(Zentao task management extension. Remove the story, test management, Just keep task management, Can only be used for the task track)';
$lang->admin->flowList['onlyStory'] = 'Story management(Zentao story management extension, Remove the task, test management, Just keep story management, Can only be used for the trim story)';
$lang->admin->flowNotice = "<span class='red'>Note: if the choice is not total life cycle management, then you can go to \"Admin -> Extension\", the corresponding extension unloading, can reuse Zentao fully functional.</span>";
+9
View File
@@ -54,3 +54,12 @@ $lang->admin->bind = new stdclass();
$lang->admin->bind->caption = '关联社区账号';
$lang->admin->bind->action = '关联';
$lang->admin->bind->success = "关联账户成功";
$lang->admin->selectFlow = '请选择禅道使用流程';
$lang->admin->flowList['full'] = '全生命周期管理(禅道完全功能)';
$lang->admin->flowList['onlyTest'] = '测试管理(禅道测试管理扩展,去掉了需求、任务管理,只保留bug管理、用例管理和测试任务管理,可以只用作测试跟踪)';
$lang->admin->flowList['onlyTask'] = '任务管理(禅道任务管理扩展,去掉了需求、测试管理,只保留任务管理,可以只用作简单任务跟踪)';
$lang->admin->flowList['onlyStory'] = '需求管理(禅道需求管理扩展,去掉了任务、测试管理,只保留需求管理,可以只用作需求整理)';
$lang->admin->flowNotice = "<span class='red'>注:如果不是选择全生命周期管理,则可以到“管理->插件”中,卸载相应的插件,即可重新使用禅道完全功能。</span>";
+2 -10
View File
@@ -30,17 +30,9 @@ class index extends control
* @access public
* @return void
*/
public function index($type='')
public function index()
{
if(empty($type))$this->locate($this->createLink('my', 'index'));
if($_POST)
{
$this->loadModel('setting')->setItem('system.common.global.flow', $this->post->flow);
if($this->post->flow != 'full') die(js::locate($this->createLink('extension', 'install', "extension={$this->config->index->flow2Ext[$this->post->flow]}"), 'parent'));
die(js::reload( 'parent.parent'));
}
$this->display();
$this->locate($this->createLink('my', 'index'));
}
/**
-9
View File
@@ -1,12 +1,3 @@
<?php
$lang->index->common = 'Index';
$lang->index->index = 'Index';
$lang->index->selectFlow = 'Please select zentao use flow';
$lang->index->flowList['full'] = 'Total life cycle management(Zentao fully functional)';
$lang->index->flowList['onlyTest'] = 'Test management(Zentao test management extension. Remove the story, task management, Just keep bug, case and test management, Can only be used for the test track)';
$lang->index->flowList['onlyTask'] = 'Task management(Zentao task management extension. Remove the story, test management, Just keep task management, Can only be used for the task track)';
$lang->index->flowList['onlyStory'] = 'Story management(Zentao story management extension, Remove the task, test management, Just keep story management, Can only be used for the trim story)';
$lang->index->flowNotice = "<span class='red'>Note: if the choice is not total life cycle management, then you can go to \"Admin -> Extension\", the corresponding extension unloading, can reuse Zentao fully functional.</span>";
-9
View File
@@ -1,12 +1,3 @@
<?php
$lang->index->common = '首页';
$lang->index->index = '首页';
$lang->index->selectFlow = '请选择禅道使用流程';
$lang->index->flowList['full'] = '全生命周期管理(禅道完全功能)';
$lang->index->flowList['onlyTest'] = '测试管理(禅道测试管理扩展,去掉了需求、任务管理,只保留bug管理、用例管理和测试任务管理,可以只用作测试跟踪)';
$lang->index->flowList['onlyTask'] = '任务管理(禅道任务管理扩展,去掉了需求、测试管理,只保留任务管理,可以只用作简单任务跟踪)';
$lang->index->flowList['onlyStory'] = '需求管理(禅道需求管理扩展,去掉了任务、测试管理,只保留需求管理,可以只用作需求整理)';
$lang->index->flowNotice = "<span class='red'>注:如果选择不是全生命周期管理,则可以到“管理->插件”中,卸载相应的插件,即可重新使用禅道完全功能。</span>";
+1
View File
@@ -43,6 +43,7 @@ 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 -1
View File
@@ -14,5 +14,5 @@ $(function()
{
$(this).sparkline('html', {height:'25px'});
})
if(typeof(flow) != 'undefined' && flow) $.colorbox({href:createLink('index', 'index', 'type=flow'), open:true, width:800, height:400, iframe:true});
if(typeof(flow) != 'undefined' && flow) $.colorbox({href:createLink('admin', 'setFlow'), open:true, width:800, height:330, iframe:true});
});
+1 -1
View File
@@ -37,5 +37,5 @@
<?php endif;?>
</tr>
</table>
<?php if(!(isset($config->global->flow) or strpos($this->config->version, 'pro') !== false or strpos($this->app->company->admins, ",{$this->app->user->account},") === false)) js::set('flow', 'true', 'number');?>
<?php if($setFlow) js::set('flow', 'true', 'number');?>
<?php include '../../common/view/footer.html.php';?>