Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
xia0ta0
2013-08-30 09:24:36 +08:00
15 changed files with 52 additions and 118 deletions
+38 -14
View File
@@ -1,14 +1,14 @@
VERSION=$(shell head -n 1 VERSION)
all: tgz
all: prepare pms zstory ztask ztest
clean:
rm -fr zentaopms
rm -fr {zentaopms,zentaostory,zentaotask,zentaotest,storyext,taskext,testext}
rm -fr *.tar.gz
rm -fr *.zip
rm -fr api*
rm -fr build/linux/lampp
rm -fr lampp
tgz:
prepare:
mkdir zentaopms
cp -fr bin zentaopms/
cp -fr config zentaopms/ && rm -fr zentaopms/config/my.php
@@ -42,18 +42,42 @@ tgz:
chmod 777 zentaopms/module
chmod a+rx zentaopms/bin/*
find zentaopms/ -name ext |xargs chmod -R 777
# add zentaotest zentaotask zentaostory extension.
svn export https://svn.cnezsoft.com/easysoft/trunk/zentaoext/zentaotest
svn export https://svn.cnezsoft.com/easysoft/trunk/zentaoext/zentaotask
svn export https://svn.cnezsoft.com/easysoft/trunk/zentaoext/zentaostory
zip -rm -9 zentaotest.zip zentaotest
zip -rm -9 zentaotask.zip zentaotask
zip -rm -9 zentaostory.zip zentaostory
mv zentaotest.zip zentaopms/tmp/extension
mv zentaostory.zip zentaopms/tmp/extension
mv zentaotask.zip zentaopms/tmp/extension
# zip it.
pms:
echo full > zentaopms/.flow
zip -r -9 ZenTaoPMS.$(VERSION).zip zentaopms
zstory:
cp -frp zentaopms zentaostory
svn export https://svn.cnezsoft.com/easysoft/trunk/zentaoext/zentaostory storyext
cp -fr storyext/module/* zentaostory/module/
find zentaostory/ -name ext |xargs chmod -R 777
echo zentaostory > zentaostory/.flow
sed -e 's/zentao/story/g' zentaostory/www/.ztaccess > .ztaccess.bak
mv .ztaccess.bak zentaostory/www/.ztaccess
zip -r -9 ZenTaoStory.$(VERSION).zip zentaostory
rm -fr storyext
rm -fr zentaostory
ztask:
cp -frp zentaopms zentaotask
svn export https://svn.cnezsoft.com/easysoft/trunk/zentaoext/zentaotask taskext
cp -fr taskext/module/* zentaotask/module/
find zentaotask/ -name ext |xargs chmod -R 777
echo zentaotask > zentaotask/.flow
sed -e 's/zentao/task/g' zentaotask/www/.ztaccess > .ztaccess.bak
mv .ztaccess.bak zentaotask/www/.ztaccess
zip -r -9 ZenTaoTask.$(VERSION).zip zentaotask
rm -fr taskext
rm -fr zentaotask
ztest:
cp -frp zentaopms zentaotest
svn export https://svn.cnezsoft.com/easysoft/trunk/zentaoext/zentaotest testext
cp -fr testext/module/* zentaotest/module/
find zentaotest/ -name ext |xargs chmod -R 777
echo zentaotest > zentaotest/.flow
sed -e 's/zentao/test/g' zentaotest/www/.ztaccess > .ztaccess.bak
mv .ztaccess.bak zentaotest/www/.ztaccess
zip -r -9 ZenTaoTest.$(VERSION).zip zentaotest
rm -fr testext
rm -fr zentaotest
rm -fr zentaopms
patchphpdoc:
sudo cp misc/doc/phpdoc/*.tpl /usr/share/php/data/PhpDocumentor/phpDocumentor/Converters/HTML/frames/templates/phphtmllib/templates/
+1 -1
View File
@@ -1 +1 @@
5.0.beta1
5.0.beta2
-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 -1
View File
@@ -47,6 +47,6 @@ $config->custom->todo->fields['statusList'] = '状态';
$config->custom->todo->canAdd = 'priList,typeList';
$config->custom->user = new stdClass();
$config->custom->user->fields['roleList'] = '角色';
$config->custom->user->fields['roleList'] = '职位';
$config->custom->user->fields['statusList'] = '状态';
$config->custom->user->canAdd = 'roleList';
-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';?>
+1 -1
View File
@@ -57,7 +57,7 @@
echo "<li>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
$misc = common::hasPriv('project', 'importBug') ? '' : "class=disabled";
$link = common::hasPriv('project', 'importBug') ? $this->createLink('project', 'importTask', "project=$project->id") : '#';
$link = common::hasPriv('project', 'importBug') ? $this->createLink('project', 'importBug', "project=$project->id") : '#';
echo "<li>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
?>
</ul>
+1
View File
@@ -62,6 +62,7 @@ class testcaseModel extends model
foreach($this->post->steps as $stepID => $stepDesc)
{
if(empty($stepDesc)) continue;
$step = new stdClass();
$step->case = $caseID;
$step->version = 1;
$step->desc = htmlspecialchars($stepDesc);
+3
View File
@@ -13,6 +13,9 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/chosen.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::set('lblDelete', $lang->testcase->deleteStep);?>
<?php js::set('lblBefore', $lang->testcase->insertBefore);?>
<?php js::set('lblAfter', $lang->testcase->insertAfter);?>
<form method='post' enctype='multipart/form-data' target='hiddenwin' id='dataform'>
<div id='titlebar'>
<div id='main'>
-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
*
+7 -2
View File
@@ -26,13 +26,18 @@ include '../../common/view/colorbox.html.php';
<td class='rowhead' valign='top'>Language:</td>
<td><?php echo html::select('lang', $config->langs, $this->app->getClientLang(), 'class=select-2 onchange=selectLang(this.value)');?></td>
</tr>
<tr><td></td><td id='keeplogin'><?php echo html::checkBox('keepLogin', $lang->user->keepLogin, $keepLogin);?></td></tr>
<tr>
<td></td>
<td id='keeplogin'>
<?php echo html::checkBox('keepLogin', $lang->user->keepLogin, $keepLogin);?>
<?php commonModel::printQRCodeLink('white');?>
</td>
</tr>
<tr>
<td colspan='2' class='a-center'>
<?php
echo html::submitButton($lang->login);
if($app->company->guest) echo html::linkButton($lang->user->asGuest, $this->createLink($config->default->module));
commonModel::printQRCodeLink('white');
echo html::hidden('referer', $referer);
?>
</td>