Merge branch 'master' of http://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -893,7 +893,14 @@ class baseControl
|
||||
$data = (array) $data;
|
||||
if(helper::isAjaxRequest() or $this->viewType == 'json')
|
||||
{
|
||||
print(json_encode($data));
|
||||
/* Process for zh-cn in json. */
|
||||
foreach($data as $key => $value)
|
||||
{
|
||||
if(!is_string($value)) continue;
|
||||
$data[$key] = urlencode($value);
|
||||
}
|
||||
|
||||
print(urldecode(json_encode($data)));
|
||||
$response = helper::removeUTF8Bom(ob_get_clean());
|
||||
|
||||
if(defined('RUN_MODE') and RUN_MODE == 'api') return print($response);
|
||||
|
||||
@@ -518,6 +518,7 @@ class gitlab
|
||||
$api = "commits";
|
||||
|
||||
if(empty($count)) $count = 100;
|
||||
|
||||
$params = array();
|
||||
$params['ref_name'] = $branch;
|
||||
$params['per_page'] = $count;
|
||||
@@ -616,6 +617,7 @@ class gitlab
|
||||
$params->per_page = 100;
|
||||
|
||||
$allResults = array();
|
||||
$files = array();
|
||||
while(true)
|
||||
{
|
||||
$results = $this->fetch($api, $params);
|
||||
|
||||
@@ -941,7 +941,8 @@ class actionModel extends model
|
||||
|
||||
$objectIds = array_unique($objectIds);
|
||||
$table = $objectType == 'makeup' ? '`zt_overtime`' : $this->config->objectTables[$objectType];
|
||||
$field = $this->config->action->objectNameFields[$objectType];
|
||||
$field = zget($this->config->action->objectNameFields, $objectType, '');
|
||||
if(empty($field)) continue;
|
||||
if($table != TABLE_TODO)
|
||||
{
|
||||
$objectName = array();
|
||||
|
||||
@@ -365,7 +365,7 @@ $lang->block->modules['project']->availableBlocks = new stdclass();
|
||||
$lang->block->modules['project']->availableBlocks->project = 'Project List';
|
||||
$lang->block->modules['project']->availableBlocks->recentproject = 'Recent Project';
|
||||
$lang->block->modules['project']->availableBlocks->statistic = 'Project Statistic';
|
||||
$lang->block->modules['project']->availableBlocks->projectteam = 'Project Human Input';
|
||||
if($config->systemMode == 'new') $lang->block->modules['project']->availableBlocks->projectteam = 'Project Human Input';
|
||||
|
||||
$lang->block->modules['scrum']['index'] = new stdclass();
|
||||
$lang->block->modules['scrum']['index']->availableBlocks = new stdclass();
|
||||
|
||||
@@ -375,7 +375,7 @@ $lang->block->modules['project']->availableBlocks = new stdclass();
|
||||
$lang->block->modules['project']->availableBlocks->project = 'Project List';
|
||||
$lang->block->modules['project']->availableBlocks->recentproject = 'Recent Project';
|
||||
$lang->block->modules['project']->availableBlocks->statistic = 'Project Statistic';
|
||||
if($config->systemMode == 'new') $lang->block->modules['project']->availableBlocks->projectteam = 'Project Human Input';
|
||||
if($config->systemMode == 'new') $lang->block->modules['project']->availableBlocks->projectteam = 'Project Human Input';
|
||||
|
||||
$lang->block->modules['scrum']['index'] = new stdclass();
|
||||
$lang->block->modules['scrum']['index']->availableBlocks = new stdclass();
|
||||
|
||||
@@ -365,7 +365,7 @@ $lang->block->modules['project']->availableBlocks = new stdclass();
|
||||
$lang->block->modules['project']->availableBlocks->project = 'Project List';
|
||||
$lang->block->modules['project']->availableBlocks->recentproject = 'Recent Projects';
|
||||
$lang->block->modules['project']->availableBlocks->statistic = 'Project Statistic';
|
||||
$lang->block->modules['project']->availableBlocks->projectteam = 'Project Human Input';
|
||||
if($config->systemMode == 'new') $lang->block->modules['project']->availableBlocks->projectteam = 'Project Human Input';
|
||||
|
||||
$lang->block->modules['scrum']['index'] = new stdclass();
|
||||
$lang->block->modules['scrum']['index']->availableBlocks = new stdclass();
|
||||
|
||||
@@ -365,7 +365,7 @@ $lang->block->modules['project']->availableBlocks = new stdclass();
|
||||
$lang->block->modules['project']->availableBlocks->project = 'Project List';
|
||||
$lang->block->modules['project']->availableBlocks->recentproject = 'Recent Projects';
|
||||
$lang->block->modules['project']->availableBlocks->statistic = 'Project Statistic';
|
||||
$lang->block->modules['project']->availableBlocks->projectteam = 'ProjectHuman Input';
|
||||
if($config->systemMode == 'new') $lang->block->modules['project']->availableBlocks->projectteam = 'ProjectHuman Input';
|
||||
|
||||
$lang->block->modules['scrum']['index'] = new stdclass();
|
||||
$lang->block->modules['scrum']['index']->availableBlocks = new stdclass();
|
||||
|
||||
@@ -4,9 +4,9 @@ $config->bug->batchCreate = 10;
|
||||
$config->bug->longlife = 7;
|
||||
$config->bug->removeFields = 'objectTypeList,productList,executionList,gitlabID,gitlabProjectID';
|
||||
|
||||
$config->bug->create = new stdclass();
|
||||
$config->bug->edit = new stdclass();
|
||||
$config->bug->resolve = new stdclass();
|
||||
$config->bug->create = new stdclass();
|
||||
$config->bug->edit = new stdclass();
|
||||
$config->bug->resolve = new stdclass();
|
||||
$config->bug->create->requiredFields = 'title,openedBuild';
|
||||
$config->bug->edit->requiredFields = $config->bug->create->requiredFields;
|
||||
$config->bug->resolve->requiredFields = 'resolution';
|
||||
|
||||
+12
-3
@@ -519,7 +519,16 @@ class bug extends control
|
||||
/* Get products and projects. */
|
||||
$products = $this->config->CRProduct ? $this->products : $this->product->getPairs('noclosed', 0, 'program_asc');
|
||||
$projects = array(0 => '');
|
||||
if($projectID)
|
||||
if($executionID)
|
||||
{
|
||||
$products = array();
|
||||
$linkedProducts = $this->loadModel('execution')->getProducts($executionID);
|
||||
foreach($linkedProducts as $product) $products[$product->id] = $product->name;
|
||||
|
||||
$project = $this->loadModel('project')->getByID($projectID);
|
||||
$projects = array($projectID => $project->name);
|
||||
}
|
||||
elseif($projectID)
|
||||
{
|
||||
$products = array();
|
||||
$productList = $this->config->CRProduct ? $this->product->getOrderedProducts('all', 40, $projectID) : $this->product->getOrderedProducts('normal', 40, $projectID);
|
||||
@@ -899,7 +908,7 @@ class bug extends control
|
||||
$this->view->product = $product;
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->plans = $this->loadModel('productplan')->getPairs($productID, $bug->branch);
|
||||
$this->view->projects = array(0 => '') + $this->product->getProjectPairsByProduct($productID, $bug->branch);
|
||||
$this->view->projects = array(0 => '') + $this->product->getProjectPairsByProduct($productID, $bug->branch, $bug->project);
|
||||
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $bug->branch);
|
||||
$this->view->currentModuleID = $currentModuleID;
|
||||
$this->view->executions = array(0 => '') + $this->product->getExecutionPairsByProduct($bug->product, $bug->branch ? "0,{$bug->branch}" : 0, 'id_desc', $projectID);
|
||||
@@ -1563,7 +1572,7 @@ class bug extends control
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('bug', $bugID);
|
||||
if(!empty($relation)) $this->gitlab->deleteIssue('bug', $bugID, $relation->issueID);
|
||||
|
||||
|
||||
$this->bug->delete(TABLE_BUG, $bugID);
|
||||
if($bug->toTask != 0)
|
||||
{
|
||||
|
||||
@@ -178,13 +178,11 @@ $(document).ready(function()
|
||||
projects = '';
|
||||
$.each(gitlabProjects[host], function(id, obj){projects = projects + ',' + obj.gitlabProject});
|
||||
url = createLink('repo', 'ajaxgetgitlabprojects', "host=" + host + "&projects=" + projects);
|
||||
|
||||
|
||||
$.get(url, function(response)
|
||||
{
|
||||
$('#gitlabProject').html('').append(response);
|
||||
$('#gitlabProject').chosen().trigger("chosen:updated");;
|
||||
$('#gitlabProject').chosen().trigger("chosen:updated");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -88,7 +88,7 @@ class bugModel extends model
|
||||
if(!dao::isError())
|
||||
{
|
||||
$bugID = $this->dao->lastInsertID();
|
||||
|
||||
|
||||
$this->loadModel('gitlab')->apiCreateIssue($this->post->gitlab, $this->post->gitlabProject, 'bug', $bugID, $bug);
|
||||
|
||||
$this->file->updateObjectID($this->post->uid, $bugID, 'bug');
|
||||
@@ -278,9 +278,9 @@ class bugModel extends model
|
||||
|
||||
/**
|
||||
* Create bug from gitlab issue.
|
||||
*
|
||||
* @param object $bug
|
||||
* @param int $executionID
|
||||
*
|
||||
* @param object $bug
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return int|bool
|
||||
*/
|
||||
@@ -675,7 +675,7 @@ class bugModel extends model
|
||||
if(!empty($bug->resolvedBy)) $this->loadModel('score')->create('bug', 'resolve', $bugID);
|
||||
$this->file->updateObjectID($this->post->uid, $bugID, 'bug');
|
||||
|
||||
if(!empty($bug))
|
||||
if(!empty($bug))
|
||||
{
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('bug', $bugID);
|
||||
@@ -862,7 +862,7 @@ class bugModel extends model
|
||||
$this->loadModel('gitlab');
|
||||
foreach($activateBugs as $bugID => $bug)
|
||||
{
|
||||
if(!empty($bug))
|
||||
if(!empty($bug))
|
||||
{
|
||||
$relation = $this->gitlab->getRelationByObject('bug', $bugID);
|
||||
if($relation) $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'bug', (Object)$bug, $bugID);
|
||||
@@ -904,7 +904,7 @@ class bugModel extends model
|
||||
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('bug', $bugID);
|
||||
$bug = $this->getById($bugID); // get full bug object to update issue.
|
||||
$bug = $this->getById($bugID); // Get full bug object to update issue.
|
||||
$bug->assignee_id = $this->gitlab->getGitlabUserID($relation->gitlabID, $bug->assignedTo);
|
||||
if($bug->assignee_id != '')
|
||||
{
|
||||
@@ -967,7 +967,7 @@ class bugModel extends model
|
||||
$bug->lastEditedDate = $now;
|
||||
$bug->confirmed = 1;
|
||||
|
||||
if(!empty($bug))
|
||||
if(!empty($bug))
|
||||
{
|
||||
$relation = $this->gitlab->getRelationByObject('bug', $bugID);
|
||||
if($relation) $this->gitlab->apiUpdateIssue($relation->gitlabID, $relation->projectID, $relation->issueID, 'bug', $bug, $bugID);
|
||||
@@ -1259,7 +1259,7 @@ class bugModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($bug))
|
||||
if(!empty($bug))
|
||||
{
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('bug', $bugID);
|
||||
|
||||
@@ -313,13 +313,13 @@ js::set('gitlabProjects', $gitlabProjects);
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if(!empty($gitlabProjects)):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->sync2Gitlab;?></th>
|
||||
<td><?php echo html::select('gitlab', $gitlabList, '', "class='form-control chosen'");?></td>
|
||||
<td><?php echo html::select('gitlabProject', '', '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if(!empty($gitlabProjects)):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->sync2Gitlab;?></th>
|
||||
<td><?php echo html::select('gitlab', $gitlabList, '', "class='form-control chosen'");?></td>
|
||||
<td><?php echo html::select('gitlabProject', '', '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->bug->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'active');?></td>
|
||||
|
||||
@@ -218,7 +218,6 @@ class caselibModel extends model
|
||||
{
|
||||
$cases = $this->dao->select('*')->from(TABLE_CASE)
|
||||
->where('lib')->eq((int)$libID)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->caselib == 'project')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->andWhere('product')->eq(0)
|
||||
->beginIF($moduleIdList)->andWhere('module')->in($moduleIdList)->fi()
|
||||
->beginIF($browseType == 'wait')->andWhere('status')->eq($browseType)->fi()
|
||||
|
||||
@@ -151,4 +151,4 @@ $lang->icons['unlock'] = 'unlock-alt';
|
||||
$lang->icons['confirmStoryChange'] = 'search';
|
||||
$lang->icons['score'] = 'tint';
|
||||
|
||||
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'project', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage', 'entry', 'jenkins','gitlab');
|
||||
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'project', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage', 'entry', 'jenkins', 'gitlab');
|
||||
|
||||
@@ -210,6 +210,7 @@ $lang->my->work = 'Work';
|
||||
$lang->project->list = 'Project List';
|
||||
|
||||
$lang->execution->executionKanban = "{$lang->execution->common} Kanban";
|
||||
$lang->execution->all = "{$lang->execution->common} List";
|
||||
|
||||
$lang->doc->recent = 'Recent';
|
||||
$lang->doc->my = 'My';
|
||||
|
||||
@@ -226,6 +226,7 @@ $lang->scrum->menu->settings['subMenu']->group = array('link' => "{$lang->
|
||||
/* Execution menu. */
|
||||
$lang->execution->homeMenu = new stdclass();
|
||||
if($config->systemMode == 'new') $lang->execution->homeMenu->executionkanban = array('link' => "{$lang->execution->executionKanban}|execution|executionkanban|");
|
||||
if($config->systemMode == 'classic') $lang->execution->homeMenu->all = array('link' => "{$lang->execution->all}|execution|all|");
|
||||
|
||||
$lang->execution->menu = new stdclass();
|
||||
$lang->execution->menu->task = array('link' => "{$lang->task->common}|execution|task|executionID=%s", 'subModule' => 'task,tree', 'alias' => 'importtask,importbug');
|
||||
|
||||
@@ -210,6 +210,7 @@ $lang->my->work = '待处理';
|
||||
$lang->project->list = '项目列表';
|
||||
|
||||
$lang->execution->executionKanban = "{$lang->execution->common}看板";
|
||||
$lang->execution->all = "{$lang->execution->common}列表";
|
||||
|
||||
$lang->doc->recent = '最近文档';
|
||||
$lang->doc->my = '我的文档';
|
||||
|
||||
+25
-1
@@ -1739,7 +1739,8 @@ EOD;
|
||||
{
|
||||
/* Check program priv. */
|
||||
$viewProjects = trim($this->app->user->view->projects, ',');
|
||||
if($this->session->project and $viewProjects and strpos(",{$viewProjects},", ",{$this->session->project},") === false and !$this->app->user->admin) $this->loadModel('project')->accessDenied();
|
||||
$accessDenied = ($this->session->project and $viewProjects and strpos(",{$viewProjects},", ",{$this->session->project},") === false);
|
||||
if($accessDenied and !$this->app->user->admin) $this->loadModel('project')->accessDenied();
|
||||
$this->resetProgramPriv($module, $method);
|
||||
if(!commonModel::hasPriv($module, $method)) $this->deny($module, $method, false);
|
||||
}
|
||||
@@ -2424,6 +2425,29 @@ EOD;
|
||||
|
||||
return $menu;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process markdown.
|
||||
*
|
||||
* @param string $markdown
|
||||
* @static
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
static public function processMarkdown($markdown)
|
||||
{
|
||||
if(empty($markdown)) return false;
|
||||
|
||||
$markdown = str_replace('&', '&', $markdown);
|
||||
|
||||
global $app;
|
||||
$hyperdown = $app->loadClass('hyperdown');
|
||||
$content = $hyperdown->makeHtml($markdown);
|
||||
|
||||
$content = htmlspecialchars_decode($content);
|
||||
$content = fixer::stripDataTags($content);
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
|
||||
class common extends commonModel
|
||||
|
||||
@@ -545,7 +545,7 @@ class custom extends control
|
||||
{
|
||||
$mode = fixer::input('post')->get('mode');
|
||||
$this->loadModel('setting')->setItem('system.common.global.mode', $mode);
|
||||
$this->loadModel('setting')->setItem('system.common.global.changedMode', 'yes');
|
||||
$this->setting->setItem('system.common.global.changedMode', 'yes');
|
||||
|
||||
$sprintConcept = isset($this->config->custom->sprintConcept) ? $this->config->custom->sprintConcept : '0';
|
||||
if($mode == 'new')
|
||||
@@ -553,7 +553,7 @@ class custom extends control
|
||||
if($sprintConcept == 2) $this->setting->setItem('system.custom.sprintConcept', 1);
|
||||
die(js::locate($this->createLink('upgrade', 'mergeTips'), 'parent'));
|
||||
}
|
||||
if($mode == 'classic')
|
||||
else
|
||||
{
|
||||
if($sprintConcept == 1) $this->setting->setItem('system.custom.sprintConcept', 2);
|
||||
die(js::reload('top'));
|
||||
@@ -565,7 +565,6 @@ class custom extends control
|
||||
if(isset($this->config->global->upgradeStep) and $this->config->global->upgradeStep == 'mergeProgram') die(js::locate($this->createLink('upgrade', 'mergeProgram'), 'parent'));
|
||||
|
||||
unset($_SESSION['upgrading']);
|
||||
// $this->locate(inlink('index'));
|
||||
}
|
||||
|
||||
$this->app->loadLang('upgrade');
|
||||
|
||||
@@ -3,7 +3,7 @@ $(function()
|
||||
$('[name=mode]').change(function()
|
||||
{
|
||||
var mode = $(this).val();
|
||||
if(mode == 'classic') $('#modeTips').html(newTips);
|
||||
if(mode == 'new') $('#modeTips').html(classicTips);
|
||||
if(mode == 'new') $('#modeTips').html(newTips);
|
||||
if(mode == 'classic') $('#modeTips').html(classicTips);
|
||||
})
|
||||
})
|
||||
|
||||
@@ -216,7 +216,7 @@ $lang->custom->workingList['full'] = 'Full Management of Dev';
|
||||
$lang->custom->menuTip = 'Click to show/hide navigation bar. Drag to swtich display order.';
|
||||
$lang->custom->saveFail = 'Failed to save!';
|
||||
$lang->custom->page = ' Page';
|
||||
$lang->custom->changeClassicTip = 'The module of Program will be hidden, if you switch to Version 12.5.3 and below.';
|
||||
$lang->custom->changeClassicTip = 'The Program module will be hidden, if you switch to the classic mode.';
|
||||
|
||||
$lang->custom->scoreStatus[1] = 'On';
|
||||
$lang->custom->scoreStatus[0] = 'Off';
|
||||
@@ -231,8 +231,9 @@ $lang->custom->moduleName['product'] = $lang->productCommon;
|
||||
$lang->custom->moduleName['productplan'] = 'Plan';
|
||||
$lang->custom->moduleName['execution'] = $lang->custom->execution;
|
||||
|
||||
$lang->custom->conceptQuestions['overview'] = "1. Which combination of management fits your company?";
|
||||
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
|
||||
$lang->custom->conceptQuestions['overview'] = "1. Which combination of management fits your company?";
|
||||
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
|
||||
$lang->custom->conceptQuestions['storypoint'] = "3. Which of the following units is your company using for scale estimation?";
|
||||
|
||||
$lang->custom->conceptOptions = new stdclass;
|
||||
$lang->custom->conceptOptions->story = array();
|
||||
|
||||
@@ -216,7 +216,7 @@ $lang->custom->workingList['full'] = 'Application Lifecycle Management';
|
||||
$lang->custom->menuTip = 'Click to show/hide the menu. Drag to switch display order.';
|
||||
$lang->custom->saveFail = 'Failed to save!';
|
||||
$lang->custom->page = ' Page';
|
||||
$lang->custom->changeClassicTip = 'The module of Program will be hidden, if you switch to Version 12.5.3 and below.';
|
||||
$lang->custom->changeClassicTip = 'The Program module will be hidden, if you switch to the classic mode.';
|
||||
|
||||
$lang->custom->scoreStatus[1] = 'On';
|
||||
$lang->custom->scoreStatus[0] = 'Off';
|
||||
|
||||
@@ -216,7 +216,7 @@ $lang->custom->workingList['full'] = 'Application Lifecycle Management';
|
||||
$lang->custom->menuTip = "Cliquez pour montrer/cacher le menu. Déplacez pour changer l'ordre d'affichage.";
|
||||
$lang->custom->saveFail = 'Echec de la sauvegarde !';
|
||||
$lang->custom->page = ' Page';
|
||||
$lang->custom->changeClassicTip = 'The module of Program will be hidden, if you switch to Version 12.5.3 and below.';
|
||||
$lang->custom->changeClassicTip = 'The Program module will be hidden, if you switch to the classic mode.';
|
||||
|
||||
$lang->custom->scoreStatus[1] = 'On';
|
||||
$lang->custom->scoreStatus[0] = 'Off';
|
||||
@@ -231,8 +231,9 @@ $lang->custom->moduleName['product'] = $lang->productCommon;
|
||||
$lang->custom->moduleName['productplan'] = 'Plan';
|
||||
$lang->custom->moduleName['execution'] = $lang->custom->execution;
|
||||
|
||||
$lang->custom->conceptQuestions['overview'] = "1. Quelle combinaison de gestion convient le mieux à votre entreprise ?";
|
||||
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
|
||||
$lang->custom->conceptQuestions['overview'] = "1. Quelle combinaison de gestion convient le mieux à votre entreprise ?";
|
||||
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
|
||||
$lang->custom->conceptQuestions['storypoint'] = "3. Which of the following units is your company using for scale estimation?";
|
||||
|
||||
$lang->custom->conceptOptions = new stdclass;
|
||||
$lang->custom->conceptOptions->story = array();
|
||||
|
||||
@@ -216,7 +216,7 @@ $lang->custom->workingList['full'] = 'Quản lý vòng đời ứng dụng'
|
||||
$lang->custom->menuTip = 'Click để hiện/ẩn menu. Kéo thả để chuyển vị trí hiển thị.';
|
||||
$lang->custom->saveFail = 'Lưu thất bại!';
|
||||
$lang->custom->page = '';
|
||||
$lang->custom->changeClassicTip = 'The module of Program will be hidden, if you switch to Version 12.5.3 and below.';
|
||||
$lang->custom->changeClassicTip = 'The Program module will be hidden, if you switch to the classic mode.';
|
||||
|
||||
$lang->custom->scoreStatus[1] = 'On';
|
||||
$lang->custom->scoreStatus[0] = 'Off';
|
||||
@@ -231,8 +231,9 @@ $lang->custom->moduleName['product'] = $lang->productCommon;
|
||||
$lang->custom->moduleName['productplan'] = 'Kế hoạch';
|
||||
$lang->custom->moduleName['execution'] = $lang->custom->execution;
|
||||
|
||||
$lang->custom->conceptQuestions['overview'] = "1. Sự kết hợp quản lý nào phù hợp với công ty của bạn?";
|
||||
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
|
||||
$lang->custom->conceptQuestions['overview'] = "1. Sự kết hợp quản lý nào phù hợp với công ty của bạn?";
|
||||
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
|
||||
$lang->custom->conceptQuestions['storypoint'] = "3. Which of the following units is your company using for scale estimation?";
|
||||
|
||||
$lang->custom->conceptOptions = new stdclass;
|
||||
$lang->custom->conceptOptions->story = array();
|
||||
|
||||
@@ -66,7 +66,7 @@ var $SRBox = $('.table-form .SRBox');
|
||||
$SRBox.each(function(i)
|
||||
{
|
||||
var $this = $(this);
|
||||
var name = $this.html();
|
||||
var name = $this.html();
|
||||
$SRBox.each(function(j)
|
||||
{
|
||||
if(j <= i) return;
|
||||
|
||||
@@ -15,9 +15,8 @@
|
||||
if($sysObject == 'required') continue;
|
||||
common::printLink('custom', $sysObject, "", "<span class='text'>{$lang->custom->$sysObject}</span>", '', "class='btn btn-link' id='{$sysObject}Tab'");
|
||||
}
|
||||
|
||||
common::printLink('custom', 'mode', "", "<span class='text'>{$lang->custom->mode}</span>", '', "class='btn btn-link' id='modeTab'");
|
||||
|
||||
common::printLink('custom', 'mode', "", "<span class='text'>{$lang->custom->mode}</span>", '', "class='btn btn-link' id='modeTab'");
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -29,12 +29,12 @@
|
||||
<label class="radio-inline"><input type="radio" name="mode" value="classic" <?php echo $mode == 'classic'? "checked='checked'" : ''; echo $isDisabled;?> id="modeclassic"><?php echo $lang->upgrade->to15Mode['classic'];?></label>
|
||||
<label class="radio-inline"><input type="radio" name="mode" value="new" <?php echo $mode == 'new'? "checked='checked'" : ''; echo $isDisabled;?> id="modenew"><?php echo $lang->upgrade->to15Mode['new'];?></label>
|
||||
</p>
|
||||
<p class='text-info' id='modeTips'><?php echo $mode == 'new' ? $lang->custom->changeClassicTip : $lang->upgrade->selectedModeTips['new'];?></p>
|
||||
<p class='text-info' id='modeTips'><?php echo $mode == 'classic' ? $lang->custom->changeClassicTip : $lang->upgrade->selectedModeTips['new'];?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><?php echo html::submitButton($lang->custom->switch, $changedMode == 'yes' ? 'disabled' : '');?></td>
|
||||
<td><?php if($changedMode != 'yes') echo html::submitButton($lang->custom->switch);?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
@@ -487,8 +487,8 @@ class doc extends control
|
||||
|
||||
if($doc->contentType == 'markdown')
|
||||
{
|
||||
$doc->content = $this->doc->processMarkdown($doc->content);
|
||||
$doc->digest = $this->doc->processMarkdown($$doc->digest);
|
||||
$doc->content = commonModel::processMarkdown($doc->content);
|
||||
$doc->digest = commonModel::processMarkdown($doc->digest);
|
||||
}
|
||||
|
||||
/* Check priv when lib is product or project. */
|
||||
@@ -916,8 +916,8 @@ class doc extends control
|
||||
|
||||
if($doc->contentType == 'markdown')
|
||||
{
|
||||
$doc->content = $this->doc->processMarkdown($doc->content);
|
||||
$doc->digest = $this->doc->processMarkdown($doc->digest);
|
||||
$doc->content = commonModel::processMarkdown($doc->content);
|
||||
$doc->digest = commonModel::processMarkdown($doc->digest);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1947,25 +1947,4 @@ class docModel extends model
|
||||
if(!isset($treeMenu[$module->parent])) $treeMenu[$module->parent] = '';
|
||||
$treeMenu[$module->parent] .= '<li' . ($treeMenu[$module->id] ? ' class="closed"' : '') . '>' . $li . '</li>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Process markdown.
|
||||
*
|
||||
* @param string $markdown
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function processMarkdown($markdown)
|
||||
{
|
||||
if(empty($markdown)) return false;
|
||||
|
||||
$markdown = str_replace('&', '&', $markdown);
|
||||
|
||||
$hyperdown = $this->app->loadClass('hyperdown');
|
||||
$content = $hyperdown->makeHtml($markdown);
|
||||
|
||||
$content = htmlspecialchars_decode($content);
|
||||
$content = fixer::stripDataTags($content);
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2210,7 +2210,7 @@ class execution extends control
|
||||
$position[] = html::a($browseExecutionLink, $execution->name);
|
||||
$position[] = $this->lang->execution->manageProducts;
|
||||
|
||||
$allProducts = $this->product->getProductPairsByProject($execution->project);
|
||||
$allProducts = $this->config->systemMode == 'classic' ? $this->product->getPairs('noclosed') : $this->product->getProductPairsByProject($execution->project);
|
||||
$linkedProducts = $this->execution->getProducts($execution->id);
|
||||
$linkedBranches = array();
|
||||
|
||||
|
||||
@@ -340,6 +340,12 @@ class executionModel extends model
|
||||
|
||||
$sprint = $this->loadModel('file')->processImgURL($sprint, $this->config->execution->editor->create['id'], $this->post->uid);
|
||||
|
||||
/* Redefines the language entries for the fields in the project table. */
|
||||
foreach(explode(',', $this->config->execution->create->requiredFields) as $field)
|
||||
{
|
||||
if(isset($this->lang->execution->$field)) $this->lang->project->$field = $this->lang->execution->$field;
|
||||
}
|
||||
|
||||
/* Replace required language. */
|
||||
if($this->app->openApp == 'project')
|
||||
{
|
||||
@@ -484,7 +490,7 @@ class executionModel extends model
|
||||
}
|
||||
|
||||
/* Redefines the language entries for the fields in the project table. */
|
||||
foreach(explode(',', $this->config->execution->create->requiredFields) as $field)
|
||||
foreach(explode(',', $this->config->execution->edit->requiredFields) as $field)
|
||||
{
|
||||
if(isset($this->lang->execution->$field)) $this->lang->project->$field = $this->lang->execution->$field;
|
||||
}
|
||||
@@ -1740,12 +1746,12 @@ class executionModel extends model
|
||||
{
|
||||
$this->loadModel('user');
|
||||
$products = isset($_POST['products']) ? $_POST['products'] : $products;
|
||||
$oldProdcuts = $this->dao->select('*')->from(TABLE_PROJECTPRODUCT)->where('project')->eq((int)$executionID)->fetchGroup('product', 'branch');
|
||||
$oldProducts = $this->dao->select('*')->from(TABLE_PROJECTPRODUCT)->where('project')->eq((int)$executionID)->fetchGroup('product', 'branch');
|
||||
$this->dao->delete()->from(TABLE_PROJECTPRODUCT)->where('project')->eq((int)$executionID)->exec();
|
||||
$members = array_keys($this->getTeamMembers($executionID));
|
||||
if(empty($products))
|
||||
{
|
||||
$this->user->updateUserView(array_keys($oldProdcuts), 'product', $members);
|
||||
$this->user->updateUserView(array_keys($oldProducts), 'product', $members);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1760,10 +1766,10 @@ class executionModel extends model
|
||||
|
||||
$oldPlan = 0;
|
||||
$branch = isset($branches[$i]) ? $branches[$i] : 0;
|
||||
if(isset($oldProdcuts[$productID][$branch]))
|
||||
if(isset($oldProducts[$productID][$branch]))
|
||||
{
|
||||
$oldProdcuts= $oldProdcuts[$productID][$branch];
|
||||
$oldPlan = $oldProdcuts>plan;
|
||||
$oldProduct = $oldProducts[$productID][$branch];
|
||||
$oldPlan = $oldProduct->plan;
|
||||
}
|
||||
|
||||
$data = new stdclass();
|
||||
@@ -1775,7 +1781,7 @@ class executionModel extends model
|
||||
$existedProducts[$productID] = true;
|
||||
}
|
||||
|
||||
$oldProductKeys = array_keys($oldProdcuts);
|
||||
$oldProductKeys = array_keys($oldProducts);
|
||||
$needUpdate = array_merge(array_diff($oldProductKeys, $products), array_diff($products, $oldProductKeys));
|
||||
if($needUpdate) $this->user->updateUserView($needUpdate, 'product', $members);
|
||||
}
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
<?php js::set('extra', $extra);?>
|
||||
<style>
|
||||
#navTabs {position: sticky; top: 0; background: #fff; z-index: 950;}
|
||||
#navTabs>li>span {display: inline-block; margin-left: -6px;}
|
||||
#navTabs>li>a {padding: 8px 10px; display: inline-block}
|
||||
#navTabs>li.active>a, .nav-tabs>li.active>span {font-weight: 700; color: #0c64eb;}
|
||||
#navTabs>li {padding: 0px 10px; display: inline-block}
|
||||
#navTabs>li>span {display: inline-block;}
|
||||
#navTabs>li>a {padding: 8px 0px; display: inline-block}
|
||||
#navTabs>li.active>a {font-weight: 700; color: #0c64eb;}
|
||||
#navTabs>li.active>a:before {position: absolute; right: 0; bottom: -1px; left: 0; display: block; height: 2px; content: ' '; background: #0c64eb; }
|
||||
#navTabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover {border: none;}
|
||||
|
||||
@@ -111,8 +112,8 @@ foreach($executions as $projectID => $projectExecutions)
|
||||
<?php $tabActive = ($myExecutions and ($tabActive == 'closed' or $tabActive == 'myExecution')) ? 'myExecution' : 'other';?>
|
||||
<?php if($myExecutions): ?>
|
||||
<ul class="nav nav-tabs" id="navTabs">
|
||||
<li class="<?php if($tabActive == 'myExecution') echo 'active';?>"><?php echo html::a('#myExecution', $lang->execution->involved, '', "data-toggle='tab' class='not-list-item not-clear-menu'");?><span class="text-muted"><?php echo $myExecutions;?></span><li>
|
||||
<li class="<?php if($tabActive == 'other') echo 'active';?>"><?php echo html::a('#other', $lang->project->other, '', "data-toggle='tab' class='not-list-item not-clear-menu'")?><span class="text-muted"><?php echo $others;?></span><li>
|
||||
<li class="<?php if($tabActive == 'myExecution') echo 'active';?>"><?php echo html::a('#myExecution', $lang->execution->involved, '', "data-toggle='tab' class='not-list-item not-clear-menu'");?><span class="label label-light label-badge"><?php echo $myExecutions;?></span><li>
|
||||
<li class="<?php if($tabActive == 'other') echo 'active';?>"><?php echo html::a('#other', $lang->project->other, '', "data-toggle='tab' class='not-list-item not-clear-menu'")?><span class="label label-light label-badge"><?php echo $others;?></span><li>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
<div class="tab-content" id="tabContent">
|
||||
@@ -139,10 +140,10 @@ $(function()
|
||||
$('.nav-tabs li span').hide();
|
||||
$('.nav-tabs li.active').find('span').show();
|
||||
|
||||
$('.nav-tabs>li').click(function()
|
||||
$('.nav-tabs>li a').click(function()
|
||||
{
|
||||
$(this).find('span').show();
|
||||
$(this).siblings('li').find('span').hide();
|
||||
$(this).siblings().show();
|
||||
$(this).parent().siblings('li').find('span').hide();
|
||||
if($(this).attr('class') != 'active') $('#dropMenu').removeClass('show-right-col');
|
||||
$("#dropMenu .search-box").width('auto');
|
||||
})
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<tr>
|
||||
<th class='w-50px'><?php echo $lang->idAB;?></th>
|
||||
<?php if($config->systemMode == 'new' and isset($project) and $project->model == 'scrum'):?>
|
||||
<th class='required' style="width:100%"><?php echo $lang->execution->project;?></th>
|
||||
<th class='w-150px required' style="width:100%"><?php echo $lang->execution->project;?></th>
|
||||
<?php endif;?>
|
||||
<th class='required <?php echo $minWidth?>' style="width:100%"><?php echo $lang->execution->$name;?></th>
|
||||
<th class='w-150px required'><?php echo $lang->execution->$code;?></th>
|
||||
@@ -79,14 +79,14 @@
|
||||
<tr>
|
||||
<td><?php echo sprintf('%03d', $executionID) . html::hidden("executionIDList[$executionID]", $executionID);?></td>
|
||||
<?php if($config->systemMode == 'new' and isset($project) and $project->model == 'scrum'):?>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("projects[$executionID]", $allProjects, $executions[$executionID]->project, "class='form-control chosen'");?></td>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("projects[$executionID]", $allProjects, $executions[$executionID]->project, "class='form-control picker-select'");?></td>
|
||||
<?php endif;?>
|
||||
<td title='<?php echo $executions[$executionID]->name?>'><?php echo html::input("names[$executionID]", $executions[$executionID]->name, "class='form-control'");?></td>
|
||||
<td><?php echo html::input("codes[$executionID]", $executions[$executionID]->code, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'PM', ' hidden')?>' style='overflow:visible'><?php echo html::select("PMs[$executionID]", $pmUsers, $executions[$executionID]->PM, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'PO', ' hidden')?>' style='overflow:visible'><?php echo html::select("POs[$executionID]", $poUsers, $executions[$executionID]->PO, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'QD', ' hidden')?>' style='overflow:visible'><?php echo html::select("QDs[$executionID]", $qdUsers, $executions[$executionID]->QD, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'RD', ' hidden')?>' style='overflow:visible'><?php echo html::select("RDs[$executionID]", $rdUsers, $executions[$executionID]->RD, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'PM', ' hidden')?>' style='overflow:visible'><?php echo html::select("PMs[$executionID]", $pmUsers, $executions[$executionID]->PM, "class='form-control picker-select'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'PO', ' hidden')?>' style='overflow:visible'><?php echo html::select("POs[$executionID]", $poUsers, $executions[$executionID]->PO, "class='form-control picker-select'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'QD', ' hidden')?>' style='overflow:visible'><?php echo html::select("QDs[$executionID]", $qdUsers, $executions[$executionID]->QD, "class='form-control picker-select'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'RD', ' hidden')?>' style='overflow:visible'><?php echo html::select("RDs[$executionID]", $rdUsers, $executions[$executionID]->RD, "class='form-control picker-select'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?>'>
|
||||
<?php
|
||||
if($executions[$executionID]->type == 'stage')
|
||||
@@ -123,7 +123,7 @@
|
||||
<tr>
|
||||
<td colspan='<?php echo count($visibleFields) + 6?>' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::backButton();?>
|
||||
<?php echo html::linkButton($lang->goback, $this->session->executionList, 'self', '', 'btn btn-wide');;?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<?php
|
||||
if(common::hasPriv('execution', 'task'))
|
||||
{
|
||||
echo html::a($this->createLink('execution', 'task', "executionID=$execution->id"), $execution->name, '', "title=$execution->name");
|
||||
echo html::a($this->createLink('execution', 'task', "executionID=$execution->id"), $execution->name, '', "title='{$execution->name}'");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -139,13 +139,19 @@ class group extends control
|
||||
/* Get the group data by id. */
|
||||
$group = $this->group->getByID($groupID);
|
||||
|
||||
$projects = $this->dao->select('*')->from(TABLE_PROJECT)
|
||||
->where('deleted')->eq('0')
|
||||
->beginIF($this->config->systemMode != 'classic')->andWhere('type')->eq('project')->fi()
|
||||
->orderBy('order_desc')
|
||||
->fetchPairs('id', 'name');
|
||||
|
||||
$this->view->title = $this->lang->company->common . $this->lang->colon . $group->name . $this->lang->colon . $this->lang->group->manageView;
|
||||
$this->view->position[] = $group->name;
|
||||
$this->view->position[] = $this->lang->group->manageView;
|
||||
|
||||
$this->view->group = $group;
|
||||
$this->view->programs = $this->dao->select('*')->from(TABLE_PROGRAM)->where('deleted')->eq('0')->andWhere('type')->eq('program')->orderBy('order_desc')->fetchPairs('id', 'name');
|
||||
$this->view->projects = $this->config->systemMode == 'classic' ? $this->dao->select('*')->from(TABLE_PROJECT)->where('deleted')->eq('0')->orderBy('order_desc')->fetchPairs('id', 'name') : $this->dao->select('*')->from(TABLE_PROJECT)->where('deleted')->eq('0')->andWhere('type')->eq('project')->orderBy('order_desc')->fetchPairs('id', 'name');
|
||||
$this->view->projects = $projects;
|
||||
$this->view->products = $this->dao->select('*')->from(TABLE_PRODUCT)->where('deleted')->eq('0')->orderBy('order_desc')->fetchPairs('id', 'name');
|
||||
|
||||
$navGroup = array();
|
||||
|
||||
@@ -129,8 +129,8 @@ $lang->install->account = 'Admin Konto';
|
||||
$lang->install->password = 'Admin Passwort';
|
||||
$lang->install->errorEmptyPassword = 'Passwort sollte nicht leer sein.';
|
||||
|
||||
$lang->install->selectedMode = 'Selection mode';
|
||||
$lang->install->selectedModeTips = 'You can go to the Admin - Custom - Mode to set it later.';
|
||||
$lang->install->selectedMode = 'Selection mode';
|
||||
$lang->install->selectedModeTips = 'You can go to the Admin - Custom - Mode to set it later.';
|
||||
|
||||
$lang->install->groupList['ADMIN']['name'] = 'Admin';
|
||||
$lang->install->groupList['ADMIN']['desc'] = 'System Administrator';
|
||||
|
||||
@@ -129,8 +129,8 @@ $lang->install->account = 'Admin Account';
|
||||
$lang->install->password = 'Admin Password';
|
||||
$lang->install->errorEmptyPassword = 'Password should not be blank.';
|
||||
|
||||
$lang->install->selectedMode = 'Selection mode';
|
||||
$lang->install->selectedModeTips = 'You can go to the Admin - Custom - Mode to set it later.';
|
||||
$lang->install->selectedMode = 'Selection mode';
|
||||
$lang->install->selectedModeTips = 'You can go to the Admin - Custom - Mode to set it later.';
|
||||
|
||||
$lang->install->groupList['ADMIN']['name'] = 'Admin';
|
||||
$lang->install->groupList['ADMIN']['desc'] = 'System Admin';
|
||||
|
||||
@@ -129,8 +129,8 @@ $lang->install->account = 'Compte Admin';
|
||||
$lang->install->password = 'Mot de Passe Admin';
|
||||
$lang->install->errorEmptyPassword = 'Password ne doit pas être vide.';
|
||||
|
||||
$lang->install->selectedMode = 'Selection mode';
|
||||
$lang->install->selectedModeTips = 'You can go to the Admin - Custom - Mode to set it later.';
|
||||
$lang->install->selectedMode = 'Selection mode';
|
||||
$lang->install->selectedModeTips = 'You can go to the Admin - Custom - Mode to set it later.';
|
||||
|
||||
$lang->install->groupList['ADMIN']['name'] = 'Admin';
|
||||
$lang->install->groupList['ADMIN']['desc'] = 'Administrateur';
|
||||
|
||||
@@ -129,8 +129,8 @@ $lang->install->account = 'Tài khoản quản trị';
|
||||
$lang->install->password = 'Mật khẩu quản trị';
|
||||
$lang->install->errorEmptyPassword = 'Mật khẩu không nên là blank.';
|
||||
|
||||
$lang->install->selectedMode = 'Selection mode';
|
||||
$lang->install->selectedModeTips = 'You can go to the Admin - Custom - Mode to set it later.';
|
||||
$lang->install->selectedMode = 'Selection mode';
|
||||
$lang->install->selectedModeTips = 'You can go to the Admin - Custom - Mode to set it later.';
|
||||
|
||||
$lang->install->groupList['ADMIN']['name'] = 'Quản trị';
|
||||
$lang->install->groupList['ADMIN']['desc'] = 'Quản trị hệ thống';
|
||||
|
||||
@@ -123,14 +123,14 @@ $lang->install->save2File = '<div class="alert alert-warning">拷贝上
|
||||
$lang->install->saved2File = '配置信息已经成功保存到" <strong>%s</strong> "中。您后面还可继续修改此文件。';
|
||||
$lang->install->errorNotSaveConfig = '还没有保存配置文件';
|
||||
|
||||
$lang->install->getPriv = '设置帐号';
|
||||
$lang->install->company = '公司名称';
|
||||
$lang->install->account = '管理员帐号';
|
||||
$lang->install->password = '管理员密码';
|
||||
$lang->install->getPriv = '设置帐号';
|
||||
$lang->install->company = '公司名称';
|
||||
$lang->install->account = '管理员帐号';
|
||||
$lang->install->password = '管理员密码';
|
||||
$lang->install->errorEmptyPassword = '密码不能为空';
|
||||
|
||||
$lang->install->selectedMode = '选择模式';
|
||||
$lang->install->selectedModeTips = '后续您还可以去后台-自定义-模式中进行调整';
|
||||
$lang->install->selectedMode = '选择模式';
|
||||
$lang->install->selectedModeTips = '后续您还可以去后台-自定义-模式中进行调整';
|
||||
|
||||
$lang->install->groupList['ADMIN']['name'] = '管理员';
|
||||
$lang->install->groupList['ADMIN']['desc'] = '系统管理员';
|
||||
|
||||
@@ -123,14 +123,14 @@ $lang->install->save2File = '<div class="alert alert-warning">拷貝上
|
||||
$lang->install->saved2File = '配置信息已經成功保存到" <strong>%s</strong> "中。您後面還可繼續修改此檔案。';
|
||||
$lang->install->errorNotSaveConfig = '還沒有保存配置檔案';
|
||||
|
||||
$lang->install->getPriv = '設置帳號';
|
||||
$lang->install->company = '公司名稱';
|
||||
$lang->install->account = '管理員帳號';
|
||||
$lang->install->password = '管理員密碼';
|
||||
$lang->install->getPriv = '設置帳號';
|
||||
$lang->install->company = '公司名稱';
|
||||
$lang->install->account = '管理員帳號';
|
||||
$lang->install->password = '管理員密碼';
|
||||
$lang->install->errorEmptyPassword = '密碼不能為空';
|
||||
|
||||
$lang->install->selectedMode = '選擇模式';
|
||||
$lang->install->selectedModeTips = '後續您還可以去後臺-自定義-模式中進行調整';
|
||||
$lang->install->selectedMode = '選擇模式';
|
||||
$lang->install->selectedModeTips = '後續您還可以去後臺-自定義-模式中進行調整';
|
||||
|
||||
$lang->install->groupList['ADMIN']['name'] = '管理員';
|
||||
$lang->install->groupList['ADMIN']['desc'] = '系統管理員';
|
||||
|
||||
+45
-17
@@ -505,6 +505,15 @@ class product extends control
|
||||
if($product->program) $lines = array('') + $this->product->getLinePairs($product->program);
|
||||
if($this->config->systemMode == 'classic') $lines = array('') + $this->product->getLinePairs();
|
||||
|
||||
/* Get programs. */
|
||||
$programs = $this->loadModel('program')->getTopPairs();
|
||||
if(!isset($programs[$product->program]) and $product->program)
|
||||
{
|
||||
$program = $this->program->getByID($product->program);
|
||||
$programs = array($product->program => $program->name);
|
||||
}
|
||||
|
||||
|
||||
$this->view->title = $this->lang->product->edit . $this->lang->colon . $product->name;
|
||||
$this->view->position[] = html::a($this->createLink($this->moduleName, 'browse'), $product->name);
|
||||
$this->view->position[] = $this->lang->product->edit;
|
||||
@@ -517,7 +526,7 @@ class product extends control
|
||||
$this->view->qdUsers = $qdUsers;
|
||||
$this->view->rdUsers = $rdUsers;
|
||||
$this->view->users = $this->user->getPairs('nodeleted|noclosed');
|
||||
$this->view->programs = array('') + $this->loadModel('program')->getTopPairs();
|
||||
$this->view->programs = array('') + $programs;
|
||||
$this->view->lines = $lines;
|
||||
$this->view->URSRPairs = $this->loadModel('custom')->getURSRPairs();
|
||||
$this->view->canChangeProgram = $canChangeProgram;
|
||||
@@ -586,24 +595,43 @@ class product extends control
|
||||
$rdUsers = $this->user->getPairs('nodeleted|devfirst', $appendRdUsers);
|
||||
if(!empty($this->config->user->moreLink)) $this->config->moreLinks["RD"] = $this->config->user->moreLink;
|
||||
|
||||
/* Get product lines by programs.*/
|
||||
$programs = $this->program->getTopPairs();
|
||||
$lines = array();
|
||||
foreach($programs as $id => $program)
|
||||
$programs = array();
|
||||
$unauthorizedPrograms = array();
|
||||
if($this->config->systemMode == 'new')
|
||||
{
|
||||
$lines[$id] = array('') + $this->product->getLinePairs($id);
|
||||
$programs = $this->program->getTopPairs();
|
||||
|
||||
/* Get unauthorized programs. */
|
||||
$programIDList = array();
|
||||
foreach($products as $product)
|
||||
{
|
||||
if($product->program and !isset($programs[$product->program]) and !in_array($product->program, $programIDList)) $programIDList[] = $product->program;
|
||||
}
|
||||
$unauthorizedPrograms = $this->program->getPairsByList($programIDList);
|
||||
|
||||
/* Get product lines by programs.*/
|
||||
$lines = array(0 => '');
|
||||
foreach($programs + $unauthorizedPrograms as $id => $program)
|
||||
{
|
||||
$lines[$id] = array('') + $this->product->getLinePairs($id);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$lines = array('') + $this->product->getLinePairs();
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->product->batchEdit;
|
||||
$this->view->position[] = $this->lang->product->batchEdit;
|
||||
$this->view->lines = $lines;
|
||||
$this->view->productIDList = $productIDList;
|
||||
$this->view->products = $products;
|
||||
$this->view->poUsers = $poUsers;
|
||||
$this->view->qdUsers = $qdUsers;
|
||||
$this->view->rdUsers = $rdUsers;
|
||||
$this->view->programID = $programID;
|
||||
$this->view->programs = array('') + $programs;
|
||||
$this->view->title = $this->lang->product->batchEdit;
|
||||
$this->view->position[] = $this->lang->product->batchEdit;
|
||||
$this->view->lines = $lines;
|
||||
$this->view->productIDList = $productIDList;
|
||||
$this->view->products = $products;
|
||||
$this->view->poUsers = $poUsers;
|
||||
$this->view->qdUsers = $qdUsers;
|
||||
$this->view->rdUsers = $rdUsers;
|
||||
$this->view->programID = $programID;
|
||||
$this->view->programs = array('' => '') + $programs;
|
||||
$this->view->unauthorizedPrograms = $unauthorizedPrograms;
|
||||
|
||||
unset($this->lang->product->typeList['']);
|
||||
$this->display();
|
||||
@@ -949,7 +977,7 @@ class product extends control
|
||||
$lines = array();
|
||||
if(empty($productID) or $programID) $lines = $this->product->getLinePairs($programID);
|
||||
|
||||
if($productID) die(html::select("lines[$productID]", array('' => '') + $lines, '', "class='form-control chosen'"));
|
||||
if($productID) die(html::select("lines[$productID]", array('' => '') + $lines, '', "class='form-control picker-select'"));
|
||||
if(!$productID) die(html::select('line', array('' => '') + $lines, '', "class='form-control chosen'"));
|
||||
}
|
||||
|
||||
|
||||
@@ -39,14 +39,11 @@ $(function()
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
var checkedProduct = true;
|
||||
$("[id^='productIDList']").each(function()
|
||||
{
|
||||
if(!$(this).prop('checked')) checkedProduct = false;
|
||||
})
|
||||
console.log(checkedProduct);
|
||||
if(checkedProduct) $('.check-all').addClass('checked');
|
||||
if(!checkedProduct) $('.check-all').removeClass('checked');
|
||||
var allCount = $("[id^='productIDList']").length;
|
||||
var checkedCount = $("[id^='productIDList']:checked").length;
|
||||
|
||||
if(allCount == checkedCount) $('.check-all').addClass('checked');
|
||||
if(allCount != checkedCount) $('.check-all').removeClass('checked');
|
||||
}, 100)
|
||||
});
|
||||
});
|
||||
|
||||
@@ -24,6 +24,6 @@ function loadProductLines(programID, productID)
|
||||
var link = createLink('product', 'ajaxGetLine', 'programID=' + programID + '&productID=' + productID);
|
||||
$('#line_' + productID).load(link, function()
|
||||
{
|
||||
$('#lines' + productID).chosen();
|
||||
$('#lines' + productID).picker();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -657,7 +657,7 @@ class productModel extends model
|
||||
|
||||
$productID = (int)$productID;
|
||||
$products[$productID] = new stdClass();
|
||||
$products[$productID]->program = $data->programs[$productID];
|
||||
if($this->config->systemMode == 'new' and isset($data->programs[$productID])) $products[$productID]->program = $data->programs[$productID];
|
||||
$products[$productID]->name = $productName;
|
||||
$products[$productID]->line = (int)$data->lines[$productID];
|
||||
$products[$productID]->PO = $data->POs[$productID];
|
||||
@@ -874,19 +874,23 @@ class productModel extends model
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param int $appendProject
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProjectPairsByProduct($productID, $branch = 0)
|
||||
public function getProjectPairsByProduct($productID, $branch = 0, $appendProject = 0)
|
||||
{
|
||||
return $this->dao->select('t2.id,t2.name')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
$projects = $this->dao->select('t2.id,t2.name')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->where('t1.product')->eq($productID)
|
||||
->andWhere('t2.type')->eq('project')
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->projects)->fi()
|
||||
->beginIF($branch)->andWhere('t1.branch')->in($branch)->fi()
|
||||
->andWhere('t2.deleted')->eq('0')
|
||||
->fetchPairs();
|
||||
->fetchPairs('id', 'name');
|
||||
|
||||
if($appendProject) $projects += $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->in($appendProject)->fetchPairs('id', 'name');
|
||||
return $projects;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1364,7 +1368,7 @@ class productModel extends model
|
||||
if(empty($products)) return array();
|
||||
|
||||
$productKeys = array_keys($products);
|
||||
if($orderBy == 'program_asc')
|
||||
if($orderBy == 'program_asc' and $this->config->systemMode == 'new')
|
||||
{
|
||||
$products = $this->dao->select('t1.id as id, t1.*')->from(TABLE_PRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROGRAM)->alias('t2')->on('t1.program = t2.id')
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
<?php js::set('extra', $extra);?>
|
||||
<style>
|
||||
#navTabs {position: sticky; top: 0; background: #fff; z-index: 950;}
|
||||
#navTabs>li>span {display: inline-block; margin-left: -6px;}
|
||||
#navTabs>li>a {padding: 8px 10px; display: inline-block}
|
||||
#navTabs>li.active>a, .nav-tabs>li.active>span {font-weight: 700; color: #0c64eb;}
|
||||
#navTabs>li {padding: 0px 10px; display: inline-block}
|
||||
#navTabs>li>span {display: inline-block;}
|
||||
#navTabs>li>a {padding: 8px 0px; display: inline-block}
|
||||
#navTabs>li.active>a {font-weight: 700; color: #0c64eb;}
|
||||
#navTabs>li.active>a:before {position: absolute; right: 0; bottom: -1px; left: 0; display: block; height: 2px; content: ' '; background: #0c64eb; }
|
||||
#navTabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover {border: none;}
|
||||
|
||||
#tabContent {margin-top: 10px;}
|
||||
#tabContent {margin-top: 10px; z-index: 900;}
|
||||
#tabContent ul {list-style: none; margin: 0}
|
||||
#tabContent .tab-pane>ul {padding-left: 7px;}
|
||||
#tabContent .tab-pane>ul>li.hide-in-search {position: relative;}
|
||||
@@ -23,7 +24,7 @@
|
||||
#tabContent li>a {margin-top: 5px;display: block; padding: 2px 10px 2px 5px; overflow: hidden; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; border-radius: 4px;}
|
||||
#tabContent li>a.selected {color: #e9f2fb; background-color: #0c64eb;}
|
||||
|
||||
#swapper li.hide-in-search a:focus, #swapper li.hide-in-search a:hover {color: #838a9d; cursor: default;}
|
||||
#swapper li.hide-in-search>a:focus, #swapper li.hide-in-search>a:hover {color: #838a9d; cursor: default;}
|
||||
#swapper li ul li a:focus, #swapper li ul li a:hover, .noProgram li a:focus, .noProgram li a:hover {background: #0c64eb; color: #fff;}
|
||||
</style>
|
||||
<?php
|
||||
@@ -116,8 +117,8 @@ foreach($products as $programID => $programProducts)
|
||||
<?php $tabActive = ($myProducts and ($tabActive == 'closed' or $tabActive == 'myProduct')) ? 'myProduct' : 'other';?>
|
||||
<?php if($myProducts): ?>
|
||||
<ul class="nav nav-tabs" id="navTabs">
|
||||
<li class="<?php if($tabActive == 'myProduct') echo 'active';?>"><?php echo html::a('#myProduct', $lang->product->mine, '', "data-toggle='tab' class='not-list-item not-clear-menu'");?><span class="text-muted"><?php echo $myProducts;?></span><li>
|
||||
<li class="<?php if($tabActive == 'other') echo 'active';?>"><?php echo html::a('#other', $lang->product->other, '', "data-toggle='tab' class='not-list-item not-clear-menu'")?><span class="text-muted"><?php echo $others;?></span><li>
|
||||
<li class="<?php if($tabActive == 'myProduct') echo 'active';?>"><?php echo html::a('#myProduct', $lang->product->mine, '', "data-toggle='tab' class='not-list-item not-clear-menu'");?><span class="label label-light label-badge"><?php echo $myProducts;?></span><li>
|
||||
<li class="<?php if($tabActive == 'other') echo 'active';?>"><?php echo html::a('#other', $lang->product->other, '', "data-toggle='tab' class='not-list-item not-clear-menu'")?><span class="label label-light label-badge"><?php echo $others;?></span><li>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
<div class="tab-content" id="tabContent">
|
||||
@@ -146,10 +147,10 @@ $(function()
|
||||
$('.nav-tabs li span').hide();
|
||||
$('.nav-tabs li.active').find('span').show();
|
||||
|
||||
$('.nav-tabs>li').click(function()
|
||||
$('.nav-tabs>li a').click(function()
|
||||
{
|
||||
$(this).find('span').show();
|
||||
$(this).siblings('li').find('span').hide();
|
||||
$(this).siblings().show();
|
||||
$(this).parent().siblings('li').find('span').hide();
|
||||
if($(this).attr('class') != 'active') $('#dropMenu').removeClass('show-right-col');
|
||||
$("#dropMenu .search-box").width('auto');
|
||||
})
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="productTableList">
|
||||
<?php $lineNames = array();?>
|
||||
<?php foreach($productStructure as $programID => $program):?>
|
||||
<?php
|
||||
$trAttrs = "data-id='program.$programID' data-parent='0' data-nested='true'";
|
||||
@@ -86,7 +87,8 @@
|
||||
<?php endif;?>
|
||||
|
||||
<?php foreach($program as $lineID => $line):?>
|
||||
<?php if(isset($line['lineName'])):?>
|
||||
<?php if(isset($line['lineName']) and !in_array($line['lineName'], $lineNames)):?>
|
||||
<?php $lineNames[] = $line['lineName'];?>
|
||||
<?php
|
||||
if($this->config->systemMode == 'new' and $programID)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,9 @@
|
||||
$full = '';
|
||||
}
|
||||
?>
|
||||
<?php if($this->config->systemMode == 'new'):?>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'program', ' hidden') . zget($requiredFields, 'program', '', ' required');?>'><?php echo $lang->product->program;?></th>
|
||||
<?php endif;?>
|
||||
<th class='required <?php echo $width;?>' style="<?php echo $full;?>"><?php echo $lang->product->name;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'line', ' hidden') . zget($requiredFields, 'line', '', ' required');?>'><?php echo $lang->product->line;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'PO', ' hidden') . zget($requiredFields, 'PO', '', ' required');?>'><?php echo $lang->product->PO;?></th>
|
||||
@@ -73,9 +75,16 @@
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo sprintf('%03d', $productID) . html::hidden("productIDList[$productID]", $productID);?></td>
|
||||
<?php if($this->config->systemMode == 'new'):?>
|
||||
<?php if(isset($unauthorizedPrograms[$products[$productID]->program])):?>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'program', ' hidden')?>' style='overflow:visible'><?php echo html::select("programs[$productID]", $unauthorizedPrograms, $products[$productID]->program, "class='form-control' disabled");?></td>
|
||||
<?php else:?>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'program', ' hidden')?>' style='overflow:visible'><?php echo html::select("programs[$productID]", $programs, $products[$productID]->program, "class='form-control picker-select' onchange='loadProductLines(this.value, $productID)'");?></td>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
<td title='<?php echo $products[$productID]->name?>'><?php echo html::input("names[$productID]", $products[$productID]->name, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'line', ' hidden')?>' style='overflow:visible' id="line_<?php echo $productID;?>"><?php echo html::select("lines[$productID]", isset($lines[$products[$productID]->program]) ? $lines[$products[$productID]->program] : '', $products[$productID]->line, "class='form-control picker-select'");?></td>
|
||||
<?php $productLines = isset($lines[$products[$productID]->program]) ? $lines[$products[$productID]->program] : '';?>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'line', ' hidden')?>' style='overflow:visible' id="line_<?php echo $productID;?>"><?php echo html::select("lines[$productID]", $this->config->systemMode == 'new' ? $productLines : $lines, $products[$productID]->line, "class='form-control picker-select'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'PO', ' hidden')?>' style='overflow:visible'><?php echo html::select("POs[$productID]", $poUsers, $products[$productID]->PO, "class='form-control picker-select'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'QD', ' hidden')?>' style='overflow:visible'><?php echo html::select("QDs[$productID]", $qdUsers, $products[$productID]->QD, "class='form-control picker-select'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'RD', ' hidden')?>' style='overflow:visible'><?php echo html::select("RDs[$productID]", $rdUsers, $products[$productID]->RD, "class='form-control picker-select'");?></td>
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
<?php if($this->config->systemMode == 'new'):?>
|
||||
<tr>
|
||||
<th class='w-140px'><?php echo $lang->product->program;?></th>
|
||||
<td><?php echo html::select('program', $programs, $product->program, "class='form-control chosen'");?></td>
|
||||
<?php $attr = strpos(",{$this->app->user->view->programs},", ",{$product->program},") === false ? 'disabled' : '';?>
|
||||
<?php if($attr == 'disabled') echo html::hidden('program', $product->program);?>
|
||||
<td><?php echo html::select('program', $programs, $product->program, "class='form-control chosen' $attr");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
|
||||
@@ -101,6 +101,22 @@ class programModel extends model
|
||||
return $program;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get program pairs by id list.
|
||||
*
|
||||
* @param string|array $programIDList
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getPairsByList($programIDList = '')
|
||||
{
|
||||
return $this->dao->select('id, name')->from(TABLE_PROGRAM)
|
||||
->where('id')->in($programIDList)
|
||||
->andWhere('`type`')->eq('program')
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get program list.
|
||||
*
|
||||
@@ -728,7 +744,7 @@ class programModel extends model
|
||||
|
||||
/**
|
||||
* Get parent PM by programIdList.
|
||||
*
|
||||
*
|
||||
* @param array $programIdList
|
||||
* @access public
|
||||
* @return void
|
||||
@@ -739,24 +755,24 @@ class programModel extends model
|
||||
|
||||
$parents = array();
|
||||
foreach($objects as $object)
|
||||
{
|
||||
{
|
||||
if($object->parent == 0) continue;
|
||||
foreach(explode(',', $object->path) as $objectID)
|
||||
{
|
||||
{
|
||||
if(empty($objectID) || $objectID == $object->id) continue;
|
||||
$parents[$objectID][] = $object->id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Get all parent PM.*/
|
||||
$parentPM = $this->dao->select('id, PM')->from(TABLE_PROGRAM)->where('id')->in(array_keys($parents))->andWhere('deleted')->eq('0')->fetchAll();
|
||||
|
||||
$parentPMGroup = array();
|
||||
foreach($parentPM as $PM)
|
||||
{
|
||||
{
|
||||
$subPrograms = zget($parents, $PM->id, array());
|
||||
foreach($subPrograms as $subProgramID) $parentPMGroup[$subProgramID][$PM->PM] = $PM->PM;
|
||||
}
|
||||
}
|
||||
|
||||
return $parentPMGroup;
|
||||
}
|
||||
|
||||
@@ -416,7 +416,6 @@ class project extends control
|
||||
->where('t1.project')->eq($projectID)
|
||||
->andWhere('t2.plan')->in(array_keys($oldPlans))
|
||||
->fetchAll('story');
|
||||
$diffResult = array_diff($oldPlans, $_POST['plans']);
|
||||
|
||||
$changes = $this->project->update($projectID);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
@@ -428,6 +427,7 @@ class project extends control
|
||||
}
|
||||
|
||||
/* Link the plan stories. */
|
||||
$diffResult = array_diff($oldPlans, $_POST['plans']);
|
||||
if(!empty($_POST['plans']) and !empty($diffResult))
|
||||
{
|
||||
$this->loadModel('productplan')->linkProject($projectID, $_POST['plans'], $oldPlanStories);
|
||||
@@ -471,6 +471,7 @@ class project extends control
|
||||
$this->view->users = $this->user->getPairs('noclosed|nodeleted');
|
||||
$this->view->project = $project;
|
||||
$this->view->programList = $this->program->getParentPairs();
|
||||
$this->view->program = $this->program->getByID($project->parent);
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->allProducts = array('0' => '') + $allProducts;
|
||||
$this->view->productPlans = $productPlans;
|
||||
@@ -519,14 +520,23 @@ class project extends control
|
||||
$projectIdList = $this->post->projectIdList ? $this->post->projectIdList : die(js::locate($this->session->projectList, 'parent'));
|
||||
$projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->in($projectIdList)->fetchAll('id');
|
||||
|
||||
foreach($projects as $project) $appendPMUsers[$project->PM] = $project->PM;
|
||||
/* Get program list. */
|
||||
$programs = $this->loadModel('program')->getParentPairs();
|
||||
$unauthorizedIDList = array();
|
||||
foreach($projects as $project)
|
||||
{
|
||||
if(!isset($programs[$project->parent]) and !in_array($project->parent, $unauthorizedIDList)) $unauthorizedIDList[] = $project->parent;
|
||||
$appendPMUsers[$project->PM] = $project->PM;
|
||||
}
|
||||
$unauthorizedPrograms = $this->program->getPairsByList($unauthorizedIDList);
|
||||
|
||||
$this->view->title = $this->lang->project->batchEdit;
|
||||
$this->view->position[] = $this->lang->project->batchEdit;
|
||||
|
||||
$this->view->projects = $projects;
|
||||
$this->view->programList = $this->loadModel('program')->getParentPairs();
|
||||
$this->view->PMUsers = $this->loadModel('user')->getPairs('noclosed|nodeleted|pmfirst', $appendPMUsers);
|
||||
$this->view->projects = $projects;
|
||||
$this->view->programs = $programs;
|
||||
$this->view->unauthorizedPrograms = $unauthorizedPrograms;
|
||||
$this->view->PMUsers = $this->loadModel('user')->getPairs('noclosed|nodeleted|pmfirst', $appendPMUsers);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -976,8 +976,8 @@ class projectModel extends model
|
||||
$projectName = $data->names[$projectID];
|
||||
|
||||
$projects[$projectID] = new stdClass();
|
||||
if(isset($data->parents[$projectID])) $projects[$projectID]->parent = $data->parents[$projectID];
|
||||
$projects[$projectID]->name = $projectName;
|
||||
$projects[$projectID]->parent = $data->parents[$projectID];
|
||||
$projects[$projectID]->PM = $data->PMs[$projectID];
|
||||
$projects[$projectID]->begin = $data->begins[$projectID];
|
||||
$projects[$projectID]->end = isset($data->ends[$projectID]) ? $data->ends[$projectID] : LONG_TIME;
|
||||
|
||||
@@ -3,10 +3,11 @@
|
||||
<?php js::set('method', $method);?>
|
||||
<style>
|
||||
#navTabs {position: sticky; top: 0; background: #fff; z-index: 950;}
|
||||
#navTabs>li>span {display: inline-block; margin-left: -6px;}
|
||||
#navTabs>li>a {padding: 8px 10px; display: inline-block}
|
||||
#navTabs>li.active>a, .nav-tabs>li.active>span {font-weight: 700; color: #0c64eb;}
|
||||
#navTabs>li.active>a:before {position: absolute; right: 0; bottom: -1px; left: 0; display: block; height: 2px; content: ' '; background: #0c64eb; }
|
||||
#navTabs>li {padding: 0px 10px; display: inline-block}
|
||||
#navTabs>li>span {display: inline-block;}
|
||||
#navTabs>li>a {padding: 8px 0px; display: inline-block}
|
||||
#navTabs>li.active>a {font-weight: 700; color: #0c64eb;}
|
||||
#navTabs>li.active>a:before {position: absolute; right: 0; bottom: -1px; left: 0; display: block; height: 2px; content: ' '; background: #0c64eb;}
|
||||
#navTabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover {border: none;}
|
||||
|
||||
#tabContent {margin-top: 10px; z-index: 900;}
|
||||
@@ -118,8 +119,8 @@ foreach($projects as $programID => $programProjects)
|
||||
<?php $tabActive = ($myProjects and ($tabActive == 'closed' or $tabActive == 'myProject')) ? 'myProject' : 'other';?>
|
||||
<?php if($myProjects): ?>
|
||||
<ul class="nav nav-tabs" id="navTabs">
|
||||
<li class="<?php if($tabActive == 'myProject') echo 'active';?>"><?php echo html::a('#myProject', $lang->project->myProject, '', "data-toggle='tab' class='not-list-item not-clear-menu'");?><span class="text-muted"><?php echo $myProjects;?></span><li>
|
||||
<li class="<?php if($tabActive == 'other') echo 'active';?>"><?php echo html::a('#other', $lang->project->other, '', "data-toggle='tab' class='not-list-item not-clear-menu'")?><span class="text-muted"><?php echo $others;?></span><li>
|
||||
<li class="<?php if($tabActive == 'myProject') echo 'active';?>"><?php echo html::a('#myProject', $lang->project->myProject, '', "data-toggle='tab' class='not-list-item not-clear-menu'");?><span class="label label-light label-badge"><?php echo $myProjects;?></span><li>
|
||||
<li class="<?php if($tabActive == 'other') echo 'active';?>"><?php echo html::a('#other', $lang->project->other, '', "data-toggle='tab' class='not-list-item not-clear-menu'")?><span class="label label-light label-badge"><?php echo $others;?></span><li>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
<div class="tab-content" id="tabContent">
|
||||
@@ -147,10 +148,10 @@ $(function()
|
||||
$('.nav-tabs li span').hide();
|
||||
$('.nav-tabs li.active').find('span').show();
|
||||
|
||||
$('.nav-tabs>li').click(function()
|
||||
$('.nav-tabs>li a').click(function()
|
||||
{
|
||||
$(this).find('span').show();
|
||||
$(this).siblings('li').find('span').hide();
|
||||
$(this).siblings().show();
|
||||
$(this).parent().siblings('li').find('span').hide();
|
||||
if($(this).attr('class') != 'active') $('#dropMenu').removeClass('show-right-col');
|
||||
$("#dropMenu .search-box").width('auto');
|
||||
})
|
||||
|
||||
@@ -37,7 +37,11 @@
|
||||
<?php $aclList = $project->parent ? $lang->program->subAcls : $lang->project->acls;?>
|
||||
<tr>
|
||||
<td><?php echo sprintf('%03d', $projectID) . html::hidden("projectIdList[$projectID]", $projectID);?></td>
|
||||
<td><?php echo html::select("parents[$projectID]", $programList, $project->parent, "class='form-control chosen' data-id='$projectID' data-name='{$project->name}' data-parent='{$project->parent}'");?></td>
|
||||
<?php if(isset($unauthorizedPrograms[$project->parent])):?>
|
||||
<td><?php echo html::select("parents[$projectID]", $unauthorizedPrograms, $project->parent, "class='form-control chosen' data-id='$projectID' data-name='{$project->name}' data-parent='{$project->parent}' disabled");?></td>
|
||||
<?php else:?>
|
||||
<td><?php echo html::select("parents[$projectID]", $programs, $project->parent, "class='form-control chosen' data-id='$projectID' data-name='{$project->name}' data-parent='{$project->parent}'");?></td>
|
||||
<?php endif;?>
|
||||
<td title='<?php echo $project->name;?>'><?php echo html::input("names[$projectID]", $project->name, "class='form-control'");?></td>
|
||||
<td><?php echo html::select("PMs[$projectID]", $PMUsers, $project->PM, "class='form-control chosen'");?></td>
|
||||
<td>
|
||||
|
||||
@@ -32,7 +32,16 @@
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->program->parent;?></th>
|
||||
<td><?php echo html::select('parent', $programList, $project->parent, "class='form-control chosen'");?></td>
|
||||
<?php
|
||||
$attr = '';
|
||||
if(!isset($programList[$project->parent]))
|
||||
{
|
||||
echo html::hidden('parent', $project->parent);
|
||||
$attr = 'disabled';
|
||||
$programList = array($project->parent => $program->name);
|
||||
}
|
||||
?>
|
||||
<td><?php echo html::select('parent', $programList, $project->parent, "class='form-control chosen' $attr");?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
+34
-35
@@ -129,12 +129,11 @@ class repo extends control
|
||||
|
||||
$this->app->loadLang('action');
|
||||
|
||||
$this->view->title = $this->lang->repo->common . $this->lang->colon . $this->lang->repo->create;
|
||||
$this->view->position[] = $this->lang->repo->create;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|noempty|nodeleted');
|
||||
$this->view->products = $this->loadModel('product')->getProductPairsByProject($objectID);
|
||||
$this->view->gitlabHosts = $this->loadModel('gitlab')->getPairs();
|
||||
$this->view->title = $this->lang->repo->common . $this->lang->colon . $this->lang->repo->create;
|
||||
$this->view->position[] = $this->lang->repo->create;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|noempty|nodeleted');
|
||||
$this->view->products = $this->loadModel('product')->getProductPairsByProject($objectID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -169,24 +168,23 @@ class repo extends control
|
||||
|
||||
if($repo->SCM == 'Gitlab')
|
||||
{
|
||||
$projects = $this->loadModel('gitlab')->apiGetProjects($repo->gitlab, $repo->password);
|
||||
|
||||
$projects = $this->repo->getGitlabProjects($repo->client, $repo->password);
|
||||
$options = array();
|
||||
foreach($projects as $project) $options[$project->id] = $project->name_with_namespace;
|
||||
foreach($projects as $project) $options[$project->id] = $project->name . ':' . $project->http_url_to_repo;
|
||||
|
||||
$this->view->projects = $options;
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->repo->common . $this->lang->colon . $this->lang->repo->edit;
|
||||
$repo->repoType = $repo->id . '-' . $repo->SCM;
|
||||
$this->view->repo = $repo;
|
||||
$this->view->repoID = $repoID;
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|noempty|nodeleted');
|
||||
$this->view->products = $objectID ? $this->loadModel('product')->getProductPairsByProject($objectID) : $this->loadModel('product')->getPairs();
|
||||
$this->view->gitlabHosts = $this->loadModel('gitlab')->getPairs();
|
||||
$repo->repoType = $repo->id . '-' . $repo->SCM;
|
||||
$this->view->repo = $repo;
|
||||
$this->view->repoID = $repoID;
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|noempty|nodeleted');
|
||||
$this->view->products = $objectID ? $this->loadModel('product')->getProductPairsByProject($objectID) : $this->loadModel('product')->getPairs();
|
||||
|
||||
$this->view->title = $this->lang->repo->common . $this->lang->colon . $this->lang->repo->edit;
|
||||
$this->view->position[] = html::a(inlink('maintain'), $this->lang->repo->common);
|
||||
$this->view->position[] = $this->lang->repo->edit;
|
||||
|
||||
@@ -209,9 +207,6 @@ class repo extends control
|
||||
die(js::confirm($this->lang->repo->notice->delete, $this->repo->createLink('delete', "repoID=$repoID&objectID=$objectID&confirm=yes")));
|
||||
}
|
||||
|
||||
/* Delete project relation for gitlab type. */
|
||||
$this->loadModel('gitlab')->deleteProjectRelation($repoID);
|
||||
|
||||
$relationID = $this->dao->select('id')->from(TABLE_RELATION)->where('extra')->eq($repoID)->fetch();
|
||||
if($relationID)
|
||||
{
|
||||
@@ -345,6 +340,7 @@ class repo extends control
|
||||
public function browse($repoID = 0, $branchID = '', $objectID = 0, $path = '', $revision = 'HEAD', $refresh = 0)
|
||||
{
|
||||
$repoID = $this->repo->saveState($repoID, $objectID);
|
||||
if($branchID) $branchID = base64_decode($branchID);
|
||||
|
||||
/* Get path and refresh. */
|
||||
if($this->get->repoPath) $path = $this->get->repoPath;
|
||||
@@ -1109,25 +1105,27 @@ class repo extends control
|
||||
die($reposHtml);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get gitlab projects.
|
||||
*
|
||||
* @param int $host
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetGitlabProjects($host, $projectIdList = '')
|
||||
{
|
||||
$projects = $this->loadModel('gitlab')->apiGetProjects($host);
|
||||
|
||||
if(!$projects) return $this->send(array('message' => array()));
|
||||
$projectIdList = $projectIdList ? explode(',', $projectIdList) : null;
|
||||
/**
|
||||
* Ajax get gitlab projects.
|
||||
*
|
||||
* @param string $host
|
||||
* @param string $token
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetGitlabProjects($host, $token)
|
||||
{
|
||||
$host = helper::safe64decode($host);
|
||||
$projects = $this->repo->getgitlabprojects($host, $token);
|
||||
|
||||
if(!$projects) $this->send(array('message' => array()));
|
||||
|
||||
$options = "<option value=''></option>";
|
||||
foreach($projects as $project)
|
||||
{
|
||||
if(!empty($projectIdList) and $project and !in_array($project->id, $projectIdList)) continue;
|
||||
$options .= "<option value='{$project->id}' data-name='{$project->name}'>{$project->name_with_namespace}</option>";
|
||||
$options .= "<option value='{$project->id}' data-name='{$project->name}'>{$project->name}:{$project->http_url_to_repo}</option>";
|
||||
}
|
||||
|
||||
die($options);
|
||||
}
|
||||
|
||||
@@ -1144,6 +1142,7 @@ class repo extends control
|
||||
{
|
||||
$repo = $this->repo->getRepoByID($repoID);
|
||||
$branches = $this->repo->getBranches($repo);
|
||||
if($branchID) $branchID = base64_decode($branchID);
|
||||
|
||||
$branchesHtml = "<div class='table-row'><div class='table-col col-left'><div class='list-group' style='margin-bottom: 0;'>";
|
||||
foreach($branches as $id => $branchName)
|
||||
|
||||
@@ -6,12 +6,13 @@ $(function()
|
||||
$form = $(this).closest('form');
|
||||
$form.css('min-height', $form.height());
|
||||
})
|
||||
|
||||
$('#gitlabHost').change(function()
|
||||
|
||||
$('#gitlabHost, #gitlabToken').change(function()
|
||||
{
|
||||
host = $('#gitlabHost').val();
|
||||
url = createLink('repo', 'ajaxgetgitlabprojects', "host=" + host);
|
||||
if(host == '') return false;
|
||||
host = Base64.encode($('#gitlabHost').val());
|
||||
token = $('#gitlabToken').val();
|
||||
url = createLink('repo', 'ajaxgetgitlabprojects', "host=" + host + '&token=' + token);
|
||||
if(host == '' || token == '') return false;
|
||||
|
||||
$.get(url, function(response)
|
||||
{
|
||||
@@ -19,13 +20,13 @@ $(function()
|
||||
$('#gitlabProject').chosen().trigger("chosen:updated");;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('#gitlabProject').change(function()
|
||||
{
|
||||
$option = $(this).find('option:selected');
|
||||
$('#name').val($option.data('name'));
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
function scmChanged(scm)
|
||||
@@ -36,7 +37,7 @@ function scmChanged(scm)
|
||||
|
||||
$('.tips-git').removeClass('hidden');
|
||||
$('.tips-svn').addClass('hidden');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$('.account-fields').removeClass('hidden');
|
||||
|
||||
@@ -7,11 +7,12 @@ $(function()
|
||||
$form.css('min-height', $form.height());
|
||||
})
|
||||
|
||||
$('#gitlabHost').change(function()
|
||||
$('#gitlabHost, #gitlabToken').change(function()
|
||||
{
|
||||
host = $('#gitlabHost').val();
|
||||
if(host == '') return false;
|
||||
url = createLink('repo', 'ajaxgetgitlabprojects', "host=" + host);
|
||||
host = Base64.encode($('#gitlabHost').val());
|
||||
token = $('#gitlabToken').val();
|
||||
url = createLink('repo', 'ajaxgetgitlabprojects', "host=" + host + '&token=' + token);
|
||||
if(host == '' || token == '') return false;
|
||||
|
||||
$.get(url, function(response)
|
||||
{
|
||||
@@ -27,6 +28,7 @@ $(function()
|
||||
$('#name').val($option.data('name'));
|
||||
$(this).chosen().trigger("chosen:updated");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function scmChanged(scm)
|
||||
|
||||
@@ -126,7 +126,6 @@ $lang->repo->encodingList['gbk'] = 'GBK';
|
||||
$lang->repo->scmList['Git'] = '本地 Git';
|
||||
$lang->repo->scmList['Gitlab'] = 'Gitlab';
|
||||
$lang->repo->scmList['Subversion'] = 'Subversion';
|
||||
$lang->repo->scmList['Gitlab'] = 'Gitlab';
|
||||
|
||||
$lang->repo->gitlabHost = 'GitLab Server';
|
||||
$lang->repo->gitlabToken = 'GitLab Token';
|
||||
|
||||
+9
-27
@@ -104,7 +104,7 @@ class repoModel extends model
|
||||
|
||||
$branchName = isset($branches[$branch]) ? $branches[$branch] : $branches[0];
|
||||
|
||||
$dropMenuLink = helper::createLink('repo', 'ajaxGetBranchDropMenu', "repID=$repoID&branchID=$branchID&objectID=$objectID");
|
||||
$dropMenuLink = helper::createLink('repo', 'ajaxGetBranchDropMenu', "repID=$repoID&branchID=" . base64_encode($branchID) . "&objectID=$objectID");
|
||||
$output .= "<div class='btn-group'><button id='currentBranch' data-toggle='dropdown' type='button' class='btn btn-limit'>{$branchName} <span class='caret'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
|
||||
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
|
||||
$output .= "</div></div>";
|
||||
@@ -153,8 +153,6 @@ class repoModel extends model
|
||||
if(!$hasPriv) unset($repos[$i]);
|
||||
}
|
||||
}
|
||||
|
||||
if($repo->SCM == 'Gitlab') $repo = $this->processGitlab($repo);
|
||||
}
|
||||
|
||||
return $repos;
|
||||
@@ -198,16 +196,15 @@ class repoModel extends model
|
||||
if(!$this->checkConnection()) return false;
|
||||
|
||||
$data = fixer::input('post')
|
||||
->setIf($this->post->SCM == 'Gitlab', 'password', '')
|
||||
->setIf($this->post->SCM == 'Gitlab', 'path', $this->post->gitlabProject)
|
||||
->setIf($this->post->SCM == 'Gitlab', 'password', $this->post->gitlabToken)
|
||||
->setIf($this->post->SCM == 'Gitlab', 'client', $this->post->gitlabHost)
|
||||
->setIf($this->post->SCM == 'Gitlab', 'extra', $this->post->gitlabProject)
|
||||
->skipSpecial('path,client,account,password')
|
||||
->setDefault('product', '')
|
||||
->join('product', ',')
|
||||
->get();
|
||||
|
||||
/* see this file in 1783G: processGitlab::$repo->path */
|
||||
if($this->post->SCM == 'Gitlab') $data->path = $this->post->gitlabProject;
|
||||
if($this->post->SCM == 'Gitlab') $data->path = sprintf($this->config->repo->gitlab->apiPath, $data->gitlabHost, $this->post->gitlabProject);
|
||||
|
||||
$data->acl = empty($data->acl) ? '' : json_encode($data->acl);
|
||||
|
||||
@@ -229,17 +226,8 @@ class repoModel extends model
|
||||
->exec();
|
||||
|
||||
if(!dao::isError()) $this->rmClientVersionFile();
|
||||
$repoID = $this->dao->lastInsertID();
|
||||
|
||||
$this->loadModel('gitlab');
|
||||
if($this->post->SCM == 'Gitlab')
|
||||
{
|
||||
$this->gitlab->saveProjectRelation($this->post->product, $this->post->gitlabHost, $this->post->gitlabProject);
|
||||
|
||||
/* create webhook for zentao */
|
||||
$this->gitlab->initWebhooks($this->post->product, $this->post->gitlabHost, $this->post->gitlabProject);
|
||||
}
|
||||
return $repoID;
|
||||
return $this->dao->lastInsertID();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -254,9 +242,9 @@ class repoModel extends model
|
||||
$repo = $this->getRepoByID($id);
|
||||
|
||||
$data = fixer::input('post')
|
||||
->setIf($this->post->SCM == 'Gitlab', 'password', '')
|
||||
->setIf($this->post->SCM == 'Gitlab', 'path', $this->post->gitlabProject)
|
||||
->setIf($this->post->SCM == 'Gitlab', 'password', $this->post->gitlabToken)
|
||||
->setIf($this->post->SCM == 'Gitlab', 'client', $this->post->gitlabHost)
|
||||
->setIf($this->post->SCM == 'Gitlab', 'extra', $this->post->gitlabProject)
|
||||
->setDefault('client', 'svn')
|
||||
->setDefault('prefix', $repo->prefix)
|
||||
->setDefault('product', '')
|
||||
@@ -264,6 +252,7 @@ class repoModel extends model
|
||||
->join('product', ',')
|
||||
->get();
|
||||
|
||||
if($this->post->SCM == 'Gitlab') $data->path = sprintf($this->config->repo->gitlab->apiPath, $data->gitlabHost, $this->post->gitlabProject);
|
||||
if($data->path != $repo->path) $data->synced = 0;
|
||||
|
||||
$data->acl = empty($data->acl) ? '' : json_encode($data->acl);
|
||||
@@ -284,7 +273,6 @@ class repoModel extends model
|
||||
if($data->client != $repo->client and !$this->checkClient()) return false;
|
||||
if(!$this->checkConnection()) return false;
|
||||
|
||||
|
||||
if($data->encrypt == 'base64') $data->password = base64_encode($data->password);
|
||||
$this->dao->update(TABLE_REPO)->data($data, $skip = 'gitlabHost,gitlabToken,gitlabProject')
|
||||
->batchCheck($this->config->repo->edit->requiredFields, 'notempty')
|
||||
@@ -295,16 +283,12 @@ class repoModel extends model
|
||||
|
||||
$this->rmClientVersionFile();
|
||||
|
||||
$this->loadModel('gitlab');
|
||||
if($repo->SCM == 'Gitlab') $this->gitlab->saveProjectRelation($this->post->product, $this->post->gitlabHost, $this->post->gitlabProject);
|
||||
if($repo->path != $data->path)
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_REPOHISTORY)->where('repo')->eq($id)->exec();
|
||||
$this->dao->delete()->from(TABLE_REPOFILES)->where('repo')->eq($id)->exec();
|
||||
if($repo->SCM == 'Gitlab') $this->gitlab->initWebhooks($this->post->product, $this->post->gitlabHost, $this->post->gitlabProject);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -388,7 +372,6 @@ class repoModel extends model
|
||||
if(!$repo) return false;
|
||||
|
||||
if($repo->encrypt == 'base64') $repo->password = base64_decode($repo->password);
|
||||
if($repo->SCM == 'Gitlab') $reps = $this->processGitlab($repo);
|
||||
$repo->acl = json_decode($repo->acl);
|
||||
return $repo;
|
||||
}
|
||||
@@ -1754,7 +1737,6 @@ class repoModel extends model
|
||||
{
|
||||
$host = rtrim($host, '/');
|
||||
$host .= '/api/v4/projects';
|
||||
|
||||
$allResults = array();
|
||||
for($page = 1; true; $page ++)
|
||||
{
|
||||
@@ -1768,7 +1750,7 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Process gitlab repo.
|
||||
*
|
||||
*
|
||||
* @param oobject $repo
|
||||
* @access public
|
||||
* @return object
|
||||
|
||||
@@ -31,14 +31,15 @@ css::import($jsRoot . 'misc/highlight/styles/github.css');
|
||||
<div class="page-title">
|
||||
<strong>
|
||||
<?php
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'");
|
||||
$base64BranchID = base64_encode($branchID);
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'");
|
||||
$paths = explode('/', $entry);
|
||||
$fileName = array_pop($paths);
|
||||
$postPath = '';
|
||||
foreach($paths as $pathName)
|
||||
{
|
||||
$postPath .= $pathName . '/';
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
}
|
||||
echo '/' . ' ' . $fileName;
|
||||
echo " <span class='label label-info'>" . $revisionName . '</span>';
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
<?php
|
||||
foreach($branches as $id => $branchName)
|
||||
{
|
||||
echo "<li>" . html::a($this->createLink('repo', 'browse', "repoID=$repoID&branchID=$id&objectID=$objectID"), $branchName, '', "title='{$branchName}' class='text-ellipsis' data-app='{$app->openApp}'") . "</li>";
|
||||
$base64BranchID = base64_encode($id);
|
||||
echo "<li>" . html::a($this->createLink('repo', 'browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID"), $branchName, '', "title='{$branchName}' class='text-ellipsis' data-app='{$app->openApp}'") . "</li>";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
@@ -38,14 +39,15 @@
|
||||
<div class="page-title">
|
||||
<strong>
|
||||
<?php
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'");
|
||||
$base64BranchID = base64_encode($branchID);
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'");
|
||||
$paths= explode('/', $path);
|
||||
$fileName = array_pop($paths);
|
||||
$postPath = '';
|
||||
foreach($paths as $pathName)
|
||||
{
|
||||
$postPath .= $pathName . '/';
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
}
|
||||
echo '/' . ' ' . $fileName;
|
||||
?>
|
||||
@@ -54,7 +56,7 @@
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<span class='last-sync-time'><?php echo $lang->repo->notice->lastSyncTime . $cacheTime?></span>
|
||||
<?php echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID&path=" . $this->repo->encodePath($path) . "&revision=$revision&refresh=1"), "<i class='icon icon-refresh'></i> " . $lang->refresh, '', "class='btn btn-primary' data-app={$app->openApp}");?>
|
||||
<?php echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($path) . "&revision=$revision&refresh=1"), "<i class='icon icon-refresh'></i> " . $lang->refresh, '', "class='btn btn-primary' data-app={$app->openApp}");?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent" class="main-row fade">
|
||||
@@ -80,7 +82,7 @@
|
||||
<td>
|
||||
<?php
|
||||
$infoPath = trim($path . '/' . $info->name, '/');
|
||||
$link = $info->kind == 'dir' ? $this->repo->createLink('browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID&path=" . $this->repo->encodePath($infoPath)) : $this->repo->createLink('view', "repoID=$repoID&objectID=$objectID&entry=" . $this->repo->encodePath($infoPath));
|
||||
$link = $info->kind == 'dir' ? $this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($infoPath)) : $this->repo->createLink('view', "repoID=$repoID&objectID=$objectID&entry=" . $this->repo->encodePath($infoPath));
|
||||
echo html::a($link, $info->name, '', "title='{$info->name}' data-app={$app->openApp}");
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -34,11 +34,15 @@
|
||||
</tr>
|
||||
<tr class='gitlab hide'>
|
||||
<th><?php echo $lang->repo->gitlabHost;?></th>
|
||||
<td class='required'><?php echo html::select('gitlabHost', $gitlabHosts, '', "class='form-control' placeholder='{$lang->repo->placeholder->gitlabHost}'");?>
|
||||
<td><?php echo html::input('gitlabHost', '', "class='form-control' placeholder='{$lang->repo->placeholder->gitlabHost}'");?>
|
||||
</tr>
|
||||
<tr class='gitlab hide'>
|
||||
<th><?php echo $lang->repo->gitlabToken;?></th>
|
||||
<td><?php echo html::input('gitlabToken', '', "class='form-control'");?>
|
||||
</tr>
|
||||
<tr class='gitlab hide'>
|
||||
<th><?php echo $lang->repo->gitlabProject;?></th>
|
||||
<td class='required'><?php echo html::select('gitlabProject', array(''), '', "class='form-control chosen'");?>
|
||||
<td><?php echo html::select('gitlabProject', array(''), '', "class='form-control chosen'");?>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->repo->name; ?></th>
|
||||
|
||||
@@ -29,13 +29,14 @@
|
||||
<div class="page-title">
|
||||
<?php
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'");
|
||||
$paths = explode('/', $entry);
|
||||
$fileName = array_pop($paths);
|
||||
$postPath = '';
|
||||
$paths = explode('/', $entry);
|
||||
$fileName = array_pop($paths);
|
||||
$postPath = '';
|
||||
$base64BranchID = base64_encode($branchID);
|
||||
foreach($paths as $pathName)
|
||||
{
|
||||
$postPath .= $pathName . '/';
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
}
|
||||
echo '/' . ' ' . $fileName;
|
||||
if(strpos($repo->SCM, 'Subversion') === false)
|
||||
|
||||
@@ -34,15 +34,21 @@
|
||||
<tr>
|
||||
<th class='thWidth'><?php echo $lang->repo->type; ?></th>
|
||||
<td style="width:550px"><?php echo html::select('SCM', $lang->repo->scmList, $repo->SCM, "onchange='scmChanged(this.value)' class='form-control'"); ?></td>
|
||||
<td><span class="tips-git"><?php echo $lang->repo->syncTips; ?></span></td>
|
||||
<td>
|
||||
<span class="tips-git"><?php echo $lang->repo->syncTips; ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='gitlab hide'>
|
||||
<th><?php echo $lang->repo->gitlabHost;?></th>
|
||||
<td><?php echo html::select('gitlabHost', $gitlabHosts, $repo->gitlab, "class='form-control' placeholder='{$lang->repo->placeholder->gitlabHost}'");?>
|
||||
<td><?php echo html::input('gitlabHost', $repo->client, "class='form-control' placeholder='{$lang->repo->placeholder->gitlabHost}'");?>
|
||||
</tr>
|
||||
<tr class='gitlab hide'>
|
||||
<th><?php echo $lang->repo->gitlabToken;?></th>
|
||||
<td><?php echo html::input('gitlabToken', $repo->password, "class='form-control'");?>
|
||||
</tr>
|
||||
<tr class='gitlab hide'>
|
||||
<th><?php echo $lang->repo->gitlabProject;?></th>
|
||||
<td><?php echo html::select('gitlabProject', $projects, $repo->project, "class='form-control chosen'");?>
|
||||
<td><?php echo html::select('gitlabProject', $projects, $repo->extra, "class='form-control chosen'");?>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->repo->name; ?></th>
|
||||
@@ -53,8 +59,8 @@
|
||||
<th><?php echo $lang->repo->path; ?></th>
|
||||
<td class='required'><?php echo html::input('path', $repo->path, "class='form-control'"); ?></td>
|
||||
<td class='muted'>
|
||||
<span class="tips-git"><?php echo $lang->repo->example->path->git;?></span>
|
||||
<span class="tips-svn"><?php echo $lang->repo->example->path->svn;?></span>
|
||||
<span class="tips-git"><?php echo $lang->repo->example->path->git;?></span>
|
||||
<span class="tips-svn"><?php echo $lang->repo->example->path->svn;?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -66,8 +72,8 @@
|
||||
<th><?php echo $lang->repo->client;?></th>
|
||||
<td class='required'><?php echo html::input('client', $repo->client, "class='form-control'")?></td>
|
||||
<td class='muted'>
|
||||
<span class="tips-git"><?php echo $lang->repo->example->client->git;?></span>
|
||||
<span class="tips-svn"><?php echo $lang->repo->example->client->svn;?></span>
|
||||
<span class="tips-git"><?php echo $lang->repo->example->client->git;?></span>
|
||||
<span class="tips-svn"><?php echo $lang->repo->example->client->svn;?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="account-fields hide-gitlab">
|
||||
@@ -106,7 +112,7 @@
|
||||
<th></th>
|
||||
<td colspan='2' class='text-center form-actions'>
|
||||
<?php echo html::submitButton(); ?>
|
||||
<?php if(!isonlybody()) echo html::a(inlink('maintain', ""), $lang->goback, '', 'class="btn btn-wide"'); ?>
|
||||
<?php echo html::backButton() ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -45,11 +45,10 @@
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class='text' title='<?php if(strtolower($repo->SCM) == "gitlab") echo $lang->repo->pathTipsForGitlab; else echo $repo->path; ?>'><?php echo $repo->path; ?></td>
|
||||
<td class='text' title='<?php echo $repo->path; ?>'><?php echo $repo->path; ?></td>
|
||||
<td class='text-left c-actions'>
|
||||
<?php
|
||||
common::printIcon('repo', 'edit', "repoID=$repo->id&objectID=$objectID", '', 'list', 'edit');
|
||||
if(strtolower($repo->SCM) == "gitlab") common::printIcon('gitlab', 'importIssue', "repo={$repo->id}", '', 'list', 'link'); // disable button instead of hiding it.
|
||||
if(common::hasPriv('repo', 'delete')) echo html::a($this->createLink('repo', 'delete', "repoID=$repo->id&objectID=$objectID"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->repo->delete}' class='btn'");
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -19,7 +19,7 @@ $typeInfo = $type == 'file' ? '&type=file' : '';
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php $browseLink = $app->session->revisionList != false ? $app->session->revisionList : $this->repo->createLink('browse', "repoID={$repoID}&branchID=$branchID&objectID=$objectID{$preDir}");?>
|
||||
<?php $browseLink = $app->session->revisionList != false ? $app->session->revisionList : $this->repo->createLink('browse', "repoID={$repoID}&branchID=" . base64_encode($branchID) . "&objectID=$objectID{$preDir}");?>
|
||||
<?php echo html::a($browseLink, "<i class='icon icon-back'></i>" . $lang->goback, '', "class='btn btn-link'");?>
|
||||
<div class="divider"></div>
|
||||
<div class="page-title">
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class='cell'>
|
||||
<div class='alert with-icon'>
|
||||
<div class='alert with-icon'>
|
||||
<i class="icon-check-sign"></i>
|
||||
<div class='content'>
|
||||
<h3><?php echo $lang->repo->notice->syncing;?></h3>
|
||||
|
||||
@@ -25,14 +25,15 @@ $version = " <span class=\"label label-info\">$revisionName</span>";
|
||||
<div class="page-title">
|
||||
<strong>
|
||||
<?php
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'");
|
||||
$base64BranchID = base64_encode($branchID);
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'");
|
||||
$paths= explode('/', $entry);
|
||||
$fileName = array_pop($paths);
|
||||
$postPath = '';
|
||||
foreach($paths as $pathName)
|
||||
{
|
||||
$postPath .= $pathName . '/';
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
}
|
||||
echo '/' . ' ' . $fileName;
|
||||
echo $version;
|
||||
|
||||
@@ -406,3 +406,5 @@ $lang->story->categoryList['safe'] = 'Safe';
|
||||
$lang->story->categoryList['experience'] = 'Experience';
|
||||
$lang->story->categoryList['improve'] = 'Improve';
|
||||
$lang->story->categoryList['other'] = 'Other';
|
||||
|
||||
$lang->story->sync2Gitlab = 'Mit Gitlab synchronisieren';
|
||||
|
||||
@@ -487,7 +487,7 @@ class task extends control
|
||||
if($executionID)
|
||||
{
|
||||
$execution = $this->execution->getById($executionID);
|
||||
$this->execution->setMenu($this->execution->getPairs(), $execution->id);
|
||||
$this->execution->setMenu($execution->id);
|
||||
|
||||
/* Set modules and members. */
|
||||
$showAllModule = isset($this->config->task->allModule) ? $this->config->task->allModule : '';
|
||||
|
||||
@@ -935,7 +935,7 @@ class taskModel extends model
|
||||
foreach($teams as $member) $this->dao->insert(TABLE_TEAM)->data($member)->autoCheck()->exec();
|
||||
|
||||
/* Assign the left hours to zero who will be skipped. */
|
||||
$skipMembers = $this->loadModel('execution')->getTeamSkip($oldTask->team, $oldTask->assignedTo, $task->assignedTo);
|
||||
$skipMembers = $this->loadModel('execution')->getTeamSkip($oldTask->team, $oldTask->assignedTo, isset($task->assignedTo) ? $task->assignedTo : $oldTask->assignedTo);
|
||||
foreach($skipMembers as $account => $team) $this->dao->update(TABLE_TEAM)->set('left')->eq(0)->where('root')->eq($taskID)->andWhere('type')->eq('task')->andWhere('account')->eq($account)->exec();
|
||||
|
||||
$task = $this->computeHours4Multiple($oldTask, $task, array(), $autoStatus = false);
|
||||
|
||||
@@ -92,7 +92,7 @@ js::set('dittoNotice', $dittoNotice);
|
||||
<?php
|
||||
$members = array('' => '', 'ditto' => $this->lang->task->ditto);
|
||||
$teamAccounts = !empty($executionTeams[$tasks[$taskID]->execution]) ? array_keys($executionTeams[$tasks[$taskID]->execution]) : array();
|
||||
foreach($teamAccounts as $teamAccount) $members[$teamAccount] = $users[$teamAccount];
|
||||
foreach($teamAccounts as $teamAccount) $members[$teamAccount] = zget($users, $teamAccount);
|
||||
$members['closed'] = 'Closed';
|
||||
|
||||
$taskMembers = array();
|
||||
|
||||
@@ -165,6 +165,20 @@ class upgrade extends control
|
||||
$mode = fixer::input('post')->get('mode');
|
||||
$this->loadModel('setting')->setItem('system.common.global.mode', $mode);
|
||||
|
||||
/* Update sprint concept. */
|
||||
$sprintConcept = 0;
|
||||
if(isset($this->config->custom->sprintConcept))
|
||||
{
|
||||
if($this->config->custom->sprintConcept == 2 and $mode == 'new') $sprintConcept = 1;
|
||||
}
|
||||
elseif(isset($this->config->custom->productProject))
|
||||
{
|
||||
list($productConcept, $projectConcept) = explode('_', $this->config->custom->productProject);
|
||||
if($mode == 'classic') $sprintConcept = $projectConcept;
|
||||
if($mode == 'new' and $projectConcept == 2) $sprintConcept = 1;
|
||||
}
|
||||
$this->setting->setItem('system.custom.sprintConcept', $sprintConcept);
|
||||
|
||||
if($mode == 'classic') $this->locate(inlink('afterExec', "fromVersion=$fromVersion"));
|
||||
if($mode == 'new') $this->locate(inlink('mergeTips'));
|
||||
}
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
div.divider {vertical-align: middle;}
|
||||
|
||||
.main-row {margin-top: 20px; padding: 20px; background: #f1f1f1;}
|
||||
.main-row .side-col .nav li.active div a {background: #006af1; color: #fff; border-radius: 4px;}
|
||||
.main-row .side-col .nav li div a {width: 80%; display: inline-block; padding: 8px 15px;}
|
||||
.main-row .side-col .nav li.active div a {background: #e3f2fd; color: #000; border-radius: 4px;}
|
||||
.main-row .side-col .nav li.currentPage div a {background: #006af1; color: #fff; border-radius: 4px;}
|
||||
.main-row .side-col .nav li div a {width: 80%; display: inline-block; padding: 5px 15px; margin-bottom: 5px;}
|
||||
|
||||
#lineBox > .cell {height: 700px;}
|
||||
#source > .cell {padding: 0; position: relative; height: 700px;}
|
||||
|
||||
+209
-200
@@ -1,37 +1,5 @@
|
||||
$(function()
|
||||
{
|
||||
if($('[id^=productLines]').length > 0)
|
||||
{
|
||||
var checkedProduct = true;
|
||||
var productLine = $('.nav li.active').attr('lineid');
|
||||
var productNum = $("[id^='products\[" + productLine + "\]']").length;
|
||||
var checkedProductNum = $("[id^='products\[" + productLine + "\]']:checked").length;
|
||||
|
||||
if(productNum > checkedProductNum) checkedProduct = false;
|
||||
$("[id^='productLines\[" + productLine + "\]']").prop('checked', checkedProduct);
|
||||
$('#checkAllProducts').prop('checked', checkedProduct);
|
||||
$('#checkAllProjects').prop('checked', checkedProduct);
|
||||
}
|
||||
else if($('[id^=products]').length > 0)
|
||||
{
|
||||
var checkedProduct = true;
|
||||
var productNum = $("[id^='products'").length;
|
||||
var checkedProductNum = $("[id^='products']:checked").length;
|
||||
|
||||
if(productNum > checkedProductNum) checkedProduct = false;
|
||||
$('#checkAllProducts').prop('checked', checkedProduct);
|
||||
$('#checkAllProjects').prop('checked', checkedProduct);
|
||||
}
|
||||
else if($('[id^=sprints]').length > 0)
|
||||
{
|
||||
var checkedProject = true;
|
||||
var projectNum = $("[id^='sprints'").length;
|
||||
var checkedProjectNum = $("[id^='sprints']:checked").length;
|
||||
|
||||
if(projectNum > checkedProjectNum) checkedProject = false;
|
||||
$('#checkAllProjects').prop('checked', checkedProject);
|
||||
}
|
||||
|
||||
/* Define drag to select relevant parameters. */
|
||||
var options = {
|
||||
selector: 'input',
|
||||
@@ -40,108 +8,91 @@ $(function()
|
||||
{
|
||||
$('[data-id=' + e.id + ']').prop('checked', true);
|
||||
|
||||
var lineID = $('.nav li.active').attr('lineid');
|
||||
var lineID = $('.nav li.currentPage').attr('lineid');
|
||||
var checkedLines = true;
|
||||
var checkedProduct = true;
|
||||
var checkedProject = true;
|
||||
var type = $('[data-id=' + e.id + ']').attr('name');
|
||||
|
||||
/* Select the product line of the current page. */
|
||||
if($('.nav li.active').find('[id^=productLines]').prop('checked'))
|
||||
if(typeof(type) != 'undefined' && type.indexOf('productLines') > -1)
|
||||
{
|
||||
var lineID = $('.nav li.active').attr('lineid');
|
||||
$('#checkAllProducts').prop('checked', true);
|
||||
$('#checkAllProjects').prop('checked', true);
|
||||
$("[id^='products\[" + lineID + "\]']").prop('checked', true);
|
||||
$("[id^='sprints\[" + lineID + "\]'").prop('checked', true);
|
||||
if($('.nav li.currentPage').find('[id^=productLines]').prop('checked'))
|
||||
{
|
||||
var lineID = $('.nav li.currentPage').attr('lineid');
|
||||
$('#checkAllProducts').prop('checked', true);
|
||||
$('#checkAllProjects').prop('checked', true);
|
||||
$("[id^='products\[" + lineID + "\]']").prop('checked', true);
|
||||
$("[id^='sprints\[" + lineID + "\]'").prop('checked', true);
|
||||
}
|
||||
}
|
||||
|
||||
/* All products selected. */
|
||||
if($('[id^=productLines]').length > 0)
|
||||
if(typeof(type) != 'undefined' && type.indexOf('products') > -1)
|
||||
{
|
||||
$("[id^='products\[" + lineID + "\]']").each(function()
|
||||
{
|
||||
if(!$(this).prop('checked'))
|
||||
{
|
||||
checkedProduct = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('[data-product=' + $(this).val() +']').prop('checked', true);
|
||||
}
|
||||
})
|
||||
$("[id^='productLines\[" + lineID + "\]']").prop('checked', checkedProduct);
|
||||
}
|
||||
else
|
||||
{
|
||||
$("[id^=products]").each(function()
|
||||
{
|
||||
if(!$(this).prop('checked'))
|
||||
{
|
||||
checkedProduct = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('[data-product=' + $(this).val() +']').prop('checked', true);
|
||||
}
|
||||
})
|
||||
}
|
||||
$('#checkAllProducts').prop('checked', checkedProduct);
|
||||
|
||||
/* All projects selected. */
|
||||
if($('[id^=productLines]').length > 0)
|
||||
{
|
||||
$("[id^='sprints\[" + lineID + "\]']").each(function()
|
||||
if($('[id^=productLines]').length > 0)
|
||||
{
|
||||
if(!$(this).prop('checked'))
|
||||
{
|
||||
checkedProject = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
var productID = $(this).attr('data-product');
|
||||
if(productID && $('[data-productid=' + productID + ']').length > 0 && !$('[data-productid=' + productID + ']').prop('checked')) $('[data-productid=' + productID + ']').prop('checked', true);
|
||||
}
|
||||
})
|
||||
}
|
||||
else if($('[id^=products]').length > 0)
|
||||
{
|
||||
$("[id^=sprints]").each(function()
|
||||
{
|
||||
if(!$(this).prop('checked'))
|
||||
{
|
||||
checkedProject = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
var productID = $(this).attr('data-product');
|
||||
if(productID && $('[data-productid=' + productID + ']').length > 0 && !$('[data-productid=' + productID + ']').prop('checked')) $('[data-productid=' + productID + ']').prop('checked', true);
|
||||
}
|
||||
})
|
||||
}
|
||||
else
|
||||
{
|
||||
var projectNum = $("[id^='sprints'").length;
|
||||
var checkedProjectNum = $("[id^='sprints']:checked").length;
|
||||
|
||||
if(projectNum > checkedProjectNum) checkedProject = false;
|
||||
}
|
||||
$('#checkAllProjects').prop('checked', checkedProject);
|
||||
|
||||
/* All product lines selected. */
|
||||
$('[name^=productLines]').each(function()
|
||||
{
|
||||
if(!$(this).prop('checked'))
|
||||
{
|
||||
checkedLines = false;
|
||||
var checkedProduct = isSelectAll(lineID, 'product');
|
||||
var productID = $('[data-id=' + e.id + ']').val();
|
||||
$('[data-product=' + productID +']').prop('checked', true);
|
||||
if(!$("[id^='productLines\[" + lineID + "\]']").prop('checked')) $("[id^='productLines\[" + lineID + "\]']").prop('checked', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
var productLine = $(this).val();
|
||||
$("[id^='products\[" + productLine + "\]']").prop('checked', true);
|
||||
$("[id^='sprints\[" + productLine + "\]']").prop('checked', true);
|
||||
var checkedProduct = isSelectAll(0, 'product');
|
||||
var productID = $('[data-id=' + e.id + ']').val();
|
||||
$('[data-product=' + productID +']').prop('checked', true);
|
||||
}
|
||||
})
|
||||
$('#checkAllLines').prop('checked', checkedLines);
|
||||
$('#checkAllProducts').prop('checked', checkedProduct);
|
||||
}
|
||||
|
||||
/* All projects selected. */
|
||||
if(typeof(type) != 'undefined' && type.indexOf('sprints') > -1)
|
||||
{
|
||||
if($('[id^=productLines]').length > 0)
|
||||
{
|
||||
var checkedProject = isSelectAll(lineID, 'project');
|
||||
var productID = $('[data-id=' + e.id + ']').attr('data-product');
|
||||
if(productID && $('[data-productid=' + productID + ']').length > 0 && !$('[data-productid=' + productID + ']').prop('checked'))
|
||||
{
|
||||
$('[data-productid=' + productID + ']').prop('checked', true);
|
||||
if(!$("[id^='productLines\[" + lineID + "\]']").prop('checked')) $("[id^='productLines\[" + lineID + "\]']").prop('checked', true);
|
||||
}
|
||||
}
|
||||
else if($('[id^=products]').length > 0)
|
||||
{
|
||||
var checkedProject = isSelectAll(0, 'project');
|
||||
var productID = $('[data-id=' + e.id + ']').attr('data-product');
|
||||
if(productID && $('[data-productid=' + productID + ']').length > 0 && !$('[data-productid=' + productID + ']').prop('checked')) $('[data-productid=' + productID + ']').prop('checked', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
var checkedProject = isSelectAll(0, 'project');
|
||||
}
|
||||
var checkedProduct = isSelectAll(lineID, 'product');
|
||||
$('#checkAllProjects').prop('checked', checkedProject);
|
||||
$('#checkAllProducts').prop('checked', checkedProduct);
|
||||
}
|
||||
|
||||
/* All product lines selected. */
|
||||
if(typeof(type) != 'undefined' && type.indexOf('productLines') > -1)
|
||||
{
|
||||
$('[name^=productLines]').each(function()
|
||||
{
|
||||
if(!$(this).prop('checked'))
|
||||
{
|
||||
checkedLines = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
var productLine = $(this).val();
|
||||
$('[lineid=' + productLine + ']').addClass('active');
|
||||
$("[id^='products\[" + productLine + "\]']").prop('checked', true);
|
||||
$("[id^='sprints\[" + productLine + "\]']").prop('checked', true);
|
||||
}
|
||||
})
|
||||
$('#checkAllLines').prop('checked', checkedLines);
|
||||
}
|
||||
|
||||
/* If the project is checked, the relevant form will be displayed according to the selected mode. */
|
||||
hiddenProject();
|
||||
@@ -166,6 +117,8 @@ $(function()
|
||||
$('[name^=productLines]').prop('checked', true);
|
||||
$('[name^=products]').prop('checked', true);
|
||||
$('[name^=sprints]').prop('checked', true);
|
||||
$('.main-row .side-col .nav li').addClass('active');
|
||||
$('#programName').val($('.main-row .side-col .nav li.currentPage div a').text());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -174,6 +127,8 @@ $(function()
|
||||
$('[name^=productLines]').prop('checked', false);
|
||||
$('[name^=products]').prop('checked', false);
|
||||
$('[name^=sprints]').prop('checked', false);
|
||||
$('.main-row .side-col .nav li').removeClass('active');
|
||||
$('#programName').val('');
|
||||
}
|
||||
|
||||
/* If the project is checked, the relevant form will be displayed according to the selected mode. */
|
||||
@@ -183,13 +138,14 @@ $(function()
|
||||
/* Select all product events. */
|
||||
$('#checkAllProducts').click(function()
|
||||
{
|
||||
var lineID = $('li.active').attr('lineid');
|
||||
var lineID = $('li.currentPage').attr('lineid');
|
||||
if($(this).is(':checked'))
|
||||
{
|
||||
$("[id^='productLines\[" + lineID + "\]']").prop('checked', true);
|
||||
$('#checkAllProjects').prop('checked', true);
|
||||
$('[name^=products]').prop('checked', true);
|
||||
$('[name^=sprints]').prop('checked', true);
|
||||
$('#programName').val($('.main-row .side-col .nav li.currentPage div a').text());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -197,6 +153,7 @@ $(function()
|
||||
$('#checkAllProjects').prop('checked', false);
|
||||
$('[name^=products]').prop('checked', false);
|
||||
$('[name^=sprints]').prop('checked', false);
|
||||
$('#programName').val('');
|
||||
}
|
||||
hiddenProject();
|
||||
})
|
||||
@@ -204,13 +161,14 @@ $(function()
|
||||
/* Select all project events. */
|
||||
$('#checkAllProjects').click(function()
|
||||
{
|
||||
var lineID = $('li.active').attr('lineid');
|
||||
var lineID = $('li.currentPage').attr('lineid');
|
||||
if($(this).is(':checked'))
|
||||
{
|
||||
$("[id^='productLines\[" + lineID + "\]']").prop('checked', true);
|
||||
$('#checkAllProducts').prop('checked', true);
|
||||
$('[name^=products]').prop('checked', true);
|
||||
$('[name^=sprints]').prop('checked', true);
|
||||
$('#programName').val($('.main-row .side-col .nav li.currentPage div a').text());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -218,6 +176,7 @@ $(function()
|
||||
$('#checkAllProducts').prop('checked', false);
|
||||
$('[name^=products]').prop('checked', false);
|
||||
$('[name^=sprints]').prop('checked', false);
|
||||
$('#programName').val('');
|
||||
}
|
||||
hiddenProject();
|
||||
})
|
||||
@@ -243,6 +202,8 @@ $(function()
|
||||
$('#checkAllProjects').prop('checked', true);
|
||||
}
|
||||
$('[data-line=' + value + ']').prop('checked', true);
|
||||
$('[lineid=' + value + ']').addClass('active');
|
||||
$('#programName').val($("[lineid='" + value + "']").find('a').text());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -253,6 +214,10 @@ $(function()
|
||||
$('#checkAllProjects').prop('checked', false);
|
||||
}
|
||||
$('[data-line=' + value + ']').prop('checked', false);
|
||||
$('[lineid=' + value + ']').removeClass('active');
|
||||
$('#programName').val('');
|
||||
$('#programStatus').val('wait');
|
||||
$('#programStatus').trigger('chosen:updated');
|
||||
}
|
||||
|
||||
/* Determine whether all product line buttons are selected. */
|
||||
@@ -306,22 +271,34 @@ $(function()
|
||||
$('#end').removeAttr('disabled');
|
||||
}
|
||||
|
||||
var currentLine = $(this).closest('li').attr('lineid');
|
||||
|
||||
/* Active current li and remove active before li. */
|
||||
$(this).closest('ul').find('li').removeClass('active');
|
||||
$(this).closest('li').addClass('active');
|
||||
$(this).closest('ul').find('li').removeClass('currentPage');
|
||||
$(this).closest('li').addClass('currentPage');
|
||||
|
||||
$('[id^=productLines]').each(function()
|
||||
{
|
||||
var lineID = $(this).val();
|
||||
if($("[id^='productLines\[" + lineID +"\]'").prop('checked') || lineID == currentLine)
|
||||
{
|
||||
$(this).closest('li').addClass('active');
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).closest('li').removeClass('currentPage');
|
||||
$(this).closest('li').removeClass('active');
|
||||
}
|
||||
})
|
||||
|
||||
/* Show current data and hide before data. */
|
||||
var target = $(this).attr('data-target');
|
||||
$('.lineBox').addClass('hidden');
|
||||
$(target).removeClass('hidden');
|
||||
$('#source').find('.lineBox :checkBox').prop('checked', false);
|
||||
|
||||
/* The first group of products is selected by default. */
|
||||
var firstProduct = $(target).find(":checkbox:first").prop('checked', true);
|
||||
$('[data-product=' + firstProduct.val() + ']').prop('checked', true);
|
||||
|
||||
/* Replace program name. */
|
||||
$('#programName').val($(this).text());
|
||||
if($("[id^='productLines\[" + currentLine +"\]'").prop('checked')) $('#programName').val($(this).text());
|
||||
|
||||
/* Replace project name. */
|
||||
var productID = $(target).find('.lineGroup .productList input[name*="product"]').val();
|
||||
@@ -346,10 +323,15 @@ $(function()
|
||||
}
|
||||
else if($(this).closest("li").find('[id^=productLines]').prop('checked'))
|
||||
{
|
||||
var productLine = $('.nav li.active').attr('lineid');
|
||||
$('#checkAllProducts').prop('checked', true);
|
||||
$('#checkAllProjects').prop('checked', true);
|
||||
$('[data-line=' + productLine + ']').prop('checked', true);
|
||||
var productLine = $('.nav li.active').attr('lineid');
|
||||
var objectNum = $('[data-line='+ productLine +']').length;
|
||||
var checkedObjectNum = $('[data-line='+ productLine +']:checked').length;
|
||||
if(objectNum == checkedObjectNum)
|
||||
{
|
||||
$('#checkAllProducts').prop('checked', true);
|
||||
$('#checkAllProjects').prop('checked', true);
|
||||
$('[data-line=' + productLine + ']').prop('checked', true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -357,42 +339,30 @@ $(function()
|
||||
$('#checkAllProjects').prop('checked', false);
|
||||
}
|
||||
|
||||
/* Determine whether all products and all projects buttons are selected. */
|
||||
var checkedProduct = true;
|
||||
var productLine = $('.nav li.active').attr('lineid');
|
||||
var productNum = $("[id^='products\[" + productLine + "\]'").length;
|
||||
var checkedProductNum = $("[id^='products\[" + productLine + "\]']:checked").length;
|
||||
|
||||
if(productNum > checkedProductNum) checkedProduct = false;
|
||||
$('#checkAllProducts').prop('checked', checkedProduct);
|
||||
$('#checkAllProjects').prop('checked', checkedProduct);
|
||||
$("[id^='productLines\[" + productLine + "\]']").prop('checked', checkedProduct);
|
||||
|
||||
/* Determines whether to display an project related form control. */
|
||||
hiddenProject();
|
||||
|
||||
/* If the product line is selected, the product and project are selected by default. */
|
||||
$('[id^=productLines]').each(function()
|
||||
{
|
||||
if($(this).prop('checked'))
|
||||
{
|
||||
$('[data-line=' + $(this).val() +']').prop('checked', true);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
$('[name^=products]').change(function()
|
||||
{
|
||||
setProgramByProduct($(this));
|
||||
|
||||
var checked = true;
|
||||
var lineID = $(this).attr('data-line');
|
||||
var checked = true;
|
||||
var checkedLine = true;
|
||||
var lineID = $(this).attr('data-line');
|
||||
if($('[id^=productLines]').length > 0)
|
||||
{
|
||||
var productNum = $("[id^='products\[" + lineID + "\]'").length;
|
||||
var checkedProductNum = $("[id^='products\[" + lineID + "\]']:checked").length;
|
||||
|
||||
if(productNum > checkedProductNum) checked = false;
|
||||
if(checkedProductNum > 0) $('[lineid=' + lineID + ']').addClass('active');
|
||||
if(checkedProductNum == 0)
|
||||
{
|
||||
$('[lineid=' + lineID + ']').removeClass('active');
|
||||
checkedLine = false;
|
||||
}
|
||||
$("[id^='productLines\[" + lineID + "\]']").prop('checked', checkedLine);
|
||||
}
|
||||
else if($('[id^=products]').length > 0)
|
||||
{
|
||||
@@ -403,7 +373,6 @@ $(function()
|
||||
}
|
||||
|
||||
$('#checkAllProducts').prop('checked', checked);
|
||||
$("[id^='productLines\[" + lineID + "\]']").prop('checked', checked);
|
||||
|
||||
value = $(this).val();
|
||||
if($(this).prop('checked'))
|
||||
@@ -411,26 +380,27 @@ $(function()
|
||||
$('[data-product=' + value + ']').prop('checked', true)
|
||||
|
||||
if(lineID && $('[data-lineid=' + lineID + ']').length > 0 && !$('[data-lineid=' + lineID + ']').prop('checked')) $('[data-lineid=' + lineID + ']').prop('checked', true);
|
||||
|
||||
$('#programName').val($("[lineid='" + lineID + "']").find('a').text());
|
||||
$('#programStatus').val('wait');
|
||||
$('#programStatus').trigger('chosen:updated');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('[data-product=' + value + ']').prop('checked', false)
|
||||
$('#programName').val('');
|
||||
$('#programStatus').val('wait');
|
||||
$('#programStatus').trigger('chosen:updated');
|
||||
}
|
||||
|
||||
var checkedProject = true;
|
||||
if($('[id^=productLines]').length > 0)
|
||||
{
|
||||
var projectNum = $("[id^='sprints\[" + lineID + "\]'").length;
|
||||
var checkedProjectNum = $("[id^='sprints\[" + lineID + "\]']:checked").length;
|
||||
|
||||
if(projectNum > checkedProjectNum) checkedProject = false;
|
||||
checkedProject = isSelectAll(lineID, 'project');
|
||||
}
|
||||
else if($('[id^=products]').length > 0)
|
||||
{
|
||||
var projectNum = $("[id^='sprints'").length;
|
||||
var checkedProjectNum = $("[id^='sprints']:checked").length;
|
||||
|
||||
if(projectNum > checkedProjectNum) checkedProject = false;
|
||||
checkedProject = isSelectAll(0, 'project');
|
||||
}
|
||||
$('#checkAllProjects').prop('checked', checkedProject);
|
||||
|
||||
@@ -443,43 +413,7 @@ $(function()
|
||||
|
||||
$('[name^=sprints]').change(function()
|
||||
{
|
||||
var checked = true;
|
||||
var checkedProduct = true;
|
||||
if($('[id^=productLines]').length > 0)
|
||||
{
|
||||
var lineID = $(this).attr('data-line');
|
||||
var projectNum = $("[id^='sprints\[" + lineID + "\]'").length;
|
||||
var checkedProjectNum = $("[id^='sprints\[" + lineID + "\]']:checked").length;
|
||||
|
||||
if(projectNum > checkedProjectNum) checked = false;
|
||||
|
||||
var productNum = $("[id^='products\[" + lineID + "\]'").length;
|
||||
var checkedProductNum = $("[id^='products\[" + lineID + "\]']:checked").length;
|
||||
if(productNum > checkedProductNum) checkedProduct = false;
|
||||
}
|
||||
else if($('[id^=products]').length > 0)
|
||||
{
|
||||
var projectNum = $("[id^='sprints'").length;
|
||||
var checkedProjectNum = $("[id^='sprints']:checked").length;
|
||||
|
||||
if(projectNum > checkedProjectNum) checked = false;
|
||||
|
||||
var productNum = $("[id^='products'").length;
|
||||
var checkedProductNum = $("[id^='products']:checked").length;
|
||||
|
||||
if(productNum > checkedProductNum) checkedProduct = false;
|
||||
}
|
||||
else if($('[id^=sprints]').length > 0)
|
||||
{
|
||||
var projectNum = $("[id^='sprints'").length;
|
||||
var checkedProjectNum = $("[id^='sprints']:checked").length;
|
||||
|
||||
if(projectNum > checkedProjectNum) checked = false;
|
||||
}
|
||||
|
||||
$('#checkAllProjects').prop('checked', checked);
|
||||
$('#checkAllProducts').prop('checked', checkedProduct);
|
||||
|
||||
var lineID = $(this).attr('data-line');
|
||||
if($(this).prop('checked'))
|
||||
{
|
||||
if(lineID && $('[data-lineid=' + lineID + ']').length > 0 && !$('[data-lineid=' + lineID + ']').prop('checked')) $('[data-lineid=' + lineID + ']').prop('checked', true);
|
||||
@@ -487,8 +421,42 @@ $(function()
|
||||
var productID = $(this).attr('data-product');
|
||||
if(productID && $('[data-productid=' + productID + ']').length > 0 && !$('[data-productid=' + productID + ']').prop('checked')) $('[data-productid=' + productID + ']').prop('checked', true);
|
||||
|
||||
|
||||
$('#programName').val($("[lineid='" + lineID + "']").find('a').text());
|
||||
setProgramByProduct($(':checkbox[data-productid=' + productID + ']'));
|
||||
}
|
||||
|
||||
var checked = true;
|
||||
var checkedProduct = true;
|
||||
if($('[id^=productLines]').length > 0)
|
||||
{
|
||||
var lineID = $(this).attr('data-line');
|
||||
var checkedProductNum = $("[id^='products\[" + lineID + "\]']:checked").length;
|
||||
checked = isSelectAll(lineID, 'project');
|
||||
checkedProduct = isSelectAll(lineID, 'product');
|
||||
|
||||
var checkedLine = true;
|
||||
if(checkedProductNum > 0) $('[lineid=' + lineID + ']').addClass('active');
|
||||
if(checkedProductNum == 0)
|
||||
{
|
||||
$('[lineid=' + lineID + ']').removeClass('active');
|
||||
checkedLine = false;
|
||||
}
|
||||
$("[id^='productLines\["+ lineID +"\]").prop('checked', checkedLine);
|
||||
}
|
||||
else if($('[id^=products]').length > 0)
|
||||
{
|
||||
checked = isSelectAll(0, 'project');
|
||||
checkedProduct = isSelectAll(0, 'product');
|
||||
}
|
||||
else if($('[id^=sprints]').length > 0)
|
||||
{
|
||||
checkedProduct = isSelectAll(0, 'product');
|
||||
}
|
||||
|
||||
$('#checkAllProjects').prop('checked', checked);
|
||||
$('#checkAllProducts').prop('checked', checkedProduct);
|
||||
|
||||
setProgramBegin(programBegin);
|
||||
setProgramEnd(programEnd);
|
||||
setProjectPM();
|
||||
@@ -1063,3 +1031,44 @@ function getProgramStatus(objectType, objectID)
|
||||
if(objectType == 'project') $('#projectStatus').val(data).trigger("chosen:updated");
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Checked all objects.
|
||||
*
|
||||
* @param int lineID
|
||||
* @param string type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function isSelectAll(lineID = 0, type = 'product')
|
||||
{
|
||||
var checked = true;
|
||||
if(lineID)
|
||||
{
|
||||
if(type == 'project')
|
||||
{
|
||||
var objectNum = $("[id^='sprints\[" + lineID + "\]']").length;
|
||||
var checkedObjectNum = $("[id^='sprints\[" + lineID + "\]']:checked").length;
|
||||
}
|
||||
else if(type == 'product')
|
||||
{
|
||||
var objectNum = $("[id^='products\[" + lineID + "\]']").length;
|
||||
var checkedObjectNum = $("[id^='products\[" + lineID + "\]']:checked").length;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(type == 'project')
|
||||
{
|
||||
var objectNum = $("[id^='sprints']").length;
|
||||
var checkedObjectNum = $("[id^='sprints']:checked").length;
|
||||
}
|
||||
else if(type == 'product')
|
||||
{
|
||||
var objectNum = $("[id^='products']").length;
|
||||
var checkedObjectNum = $("[id^='products']:checked").length;
|
||||
}
|
||||
}
|
||||
if(objectNum > checkedObjectNum) checked = false;
|
||||
return checked;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ $lang->upgrade->to15Desc = <<<EOD
|
||||
<br/>
|
||||
<p>You can try the online demo before you decide to enable new features: <a class='text-info' href='http://zentaomax.demo.zentao.net' target='_blank'>New Features Online Demo</a></p>
|
||||
<p>You can also download an introduction PPT to help you understand it:<a class='text-info' href='' target='_blank'> New Features Introduction PPT</a></p>
|
||||
<video src="https://dl.cnezsoft.com/zentao/program.mp4" width="100%" controls ="controls"></video>
|
||||
<video src="https://dl.cnezsoft.com/vedio/zentaoconcepteng0716.mp4" width="100%" controls ="controls"></video>
|
||||
<p style="text-align:center"><small>ZenTao Version 15.0 Introduction</small></p>
|
||||
<br/>
|
||||
<p><strong>How do you like to use ZenTao?</strong></p>
|
||||
|
||||
@@ -69,7 +69,7 @@ $lang->upgrade->to15Desc = <<<EOD
|
||||
<br/>
|
||||
<p>You can try the online demo before you decide to enable new features: <a class='text-info' href='http://zentaomax.demo.zentao.net' target='_blank'>New Features Online Demo</a></p>
|
||||
<p>You can also download an introduction PPT to help you understand it:<a class='text-info' href='' target='_blank'> New Features Introduction PPT</a></p>
|
||||
<video src="https://dl.cnezsoft.com/zentao/program.mp4" width="100%" controls ="controls"></video>
|
||||
<video src="https://dl.cnezsoft.com/vedio/zentaoconcepteng0716.mp4" width="100%" controls ="controls"></video>
|
||||
<p style="text-align:center"><small>ZenTao Version 15.0 Introduction</small></p>
|
||||
<br/>
|
||||
<p><strong>How do you like to use ZenTao?</strong></p>
|
||||
@@ -86,8 +86,8 @@ $lang->upgrade->mergeProgramDesc = <<<EOD
|
||||
<p>You can set {$lang->projectCommon}s as one new project.</p>
|
||||
EOD;
|
||||
|
||||
$lang->upgrade->to15Mode['classic'] = 'Keep the old version';
|
||||
$lang->upgrade->to15Mode['new'] = 'New program management mode';
|
||||
$lang->upgrade->to15Mode['classic'] = 'Keep the classic mode';
|
||||
$lang->upgrade->to15Mode['new'] = 'Use the program mode';
|
||||
|
||||
$lang->upgrade->selectedModeTips['classic'] = 'You can also switch to the new program set management mode in the background-Customize in the future.';
|
||||
$lang->upgrade->selectedModeTips['new'] = 'Switching to the program management mode requires merging the previous data, and the system will guide you to complete this operation.';
|
||||
|
||||
@@ -67,7 +67,7 @@ $lang->upgrade->to15Desc = <<<EOD
|
||||
<br/>
|
||||
<p>You can try the online demo before you decide to enable new features: <a class='text-info' href='http://zentaomax.demo.zentao.net' target='_blank'>New Features Online Demo</a></p>
|
||||
<p>You can also download an introduction PPT to help you understand it:<a class='text-info' href='' target='_blank'> New Features Introduction PPT</a></p>
|
||||
<video src="https://dl.cnezsoft.com/zentao/program.mp4" width="100%" controls ="controls"></video>
|
||||
<video src="https://dl.cnezsoft.com/vedio/zentaoconcepteng0716.mp4" width="100%" controls ="controls"></video>
|
||||
<p style="text-align:center"><small>ZenTao Version 15.0 Introduction</small></p>
|
||||
<br/>
|
||||
<p><strong>How do you like to use ZenTao?</strong></p>
|
||||
|
||||
@@ -67,7 +67,7 @@ $lang->upgrade->to15Desc = <<<EOD
|
||||
<br/>
|
||||
<p>You can try the online demo before you decide to enable new features: <a class='text-info' href='http://zentaomax.demo.zentao.net' target='_blank'>New Features Online Demo</a></p>
|
||||
<p>You can also download an introduction PPT to help you understand it:<a class='text-info' href='' target='_blank'> New Features Introduction PPT</a></p>
|
||||
<video src="https://dl.cnezsoft.com/zentao/program.mp4" width="100%" controls ="controls"></video>
|
||||
<video src="https://dl.cnezsoft.com/vedio/zentaoconcepteng0716.mp4" width="100%" controls ="controls"></video>
|
||||
<p style="text-align:center"><small>ZenTao Version 15.0 Introduction</small></p>
|
||||
<br/>
|
||||
<p><strong>How do you like to use ZenTao?</strong></p>
|
||||
|
||||
@@ -72,7 +72,7 @@ $lang->upgrade->to15Desc = <<<EOD
|
||||
<br/>
|
||||
<p>您可以在线体验最新版本的功能,以决定是否启用新的模式:<a class='text-info' href='http://zentaomax.demo.zentao.net' target='_blank'>最新版演示demo</a></p>
|
||||
<p>您还可以下载新版本功能介绍PPT:<a class='text-info' href='https://dl.cnezsoft.com/zentao/zentaoconcept.pdf' target='_blank'>最新版功能介绍PPT</a></p>
|
||||
<video src="https://dl.cnezsoft.com/zentao/program.mp4" width="100%" controls ="controls"></video>
|
||||
<video src="https://dl.cnezsoft.com/vedio/program0716.mp4" width="100%" controls ="controls"></video>
|
||||
<p style="text-align:center"><small>禅道15.0版本介绍</small></p>
|
||||
<br/>
|
||||
<p><strong>请问您计划如何使用禅道的新版本呢?</strong></p>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<td class='required'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select("programs", $programs, $programID, "class='form-control hidden pgm-exist' onchange='getProjectByProgram(this)'");?>
|
||||
<?php echo html::input("programName", isset($programName) ? $programName : '', "class='form-control pgm-no-exist'");?>
|
||||
<?php echo html::input("programName", '', "class='form-control pgm-no-exist'");?>
|
||||
<span class='input-group-addon'>
|
||||
<div class="checkbox-primary">
|
||||
<input type="checkbox" name="newProgram" value="0" checked onchange="toggleProgram(this)" id="newProgram0" />
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="detail-content article-content">
|
||||
<ul class='nav scrollbar-hover' id='lineList'>
|
||||
<?php foreach($productlines as $line):?>
|
||||
<li <?php if($line->id == $selected) echo "class='active' id='activeLine'";?> lineID='<?php echo $line->id;?>'>
|
||||
<li <?php if($line->id == $selected) echo "class='currentPage' id='activeLine'";?> lineID='<?php echo $line->id;?>'>
|
||||
<div>
|
||||
<?php echo html::checkbox("productLines[$line->id]", array($line->id => ''), '' ,"class='tile'") . html::a("###", $line->name, '', "data-target=#line{$line->id}");?>
|
||||
</div>
|
||||
@@ -45,14 +45,14 @@
|
||||
<?php foreach($lineGroups[$line->id] as $productID => $product):?>
|
||||
<div class='lineGroup'>
|
||||
<div class='productList'>
|
||||
<?php echo html::checkBox("products[$line->id]", array($productID => $product->name), $i == 0 ? $product->id : 0, "title='{$product->name}' data-productid='{$product->id}' data-line='{$line->id}' data-begin='{$product->createdDate}' data-programid='{$product->program}' class='tile'");?>
|
||||
<?php echo html::checkBox("products[$line->id]", array($productID => $product->name), '', "title='{$product->name}' data-productid='{$product->id}' data-line='{$line->id}' data-begin='{$product->createdDate}' data-programid='{$product->program}' class='tile'");?>
|
||||
<?php echo html::hidden("productIdList[$line->id][$productID]", $productID);?>
|
||||
</div>
|
||||
<div class='projectList'>
|
||||
<div class='scroll-handle'>
|
||||
<?php if(isset($productGroups[$productID])):?>
|
||||
<?php foreach($productGroups[$productID] as $sprint):?>
|
||||
<?php echo html::checkBox("sprints[$line->id][$productID]", array($sprint->id => $sprint->name), $i == 0 ? $sprint->id : 0, "title='{$sprint->name}' data-product='{$product->id}' data-line='{$line->id}' data-begin='{$sprint->begin}' data-end='{$sprint->end}' data-status='{$sprint->status}' data-pm='{$sprint->PM}' class='tile'");?>
|
||||
<?php echo html::checkBox("sprints[$line->id][$productID]", array($sprint->id => $sprint->name), '', "title='{$sprint->name}' data-product='{$product->id}' data-line='{$line->id}' data-begin='{$sprint->begin}' data-end='{$sprint->end}' data-status='{$sprint->status}' data-pm='{$sprint->PM}' class='tile'");?>
|
||||
<?php echo html::hidden("sprintIdList[$line->id][$productID][$sprint->id]", $sprint->id);?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
<?php foreach($noMergedProducts as $productID => $product):?>
|
||||
<div class='lineGroup'>
|
||||
<div class='productList'>
|
||||
<?php echo html::checkBox("products", array($product->id => $product->name), $isChecked ? $product->id : '', "data-productid='{$product->id}' data-begin='{$product->createdDate}' data-programid='{$product->program}'");?>
|
||||
<?php echo html::checkBox("products", array($product->id => $product->name), '', "data-productid='{$product->id}' data-begin='{$product->createdDate}' data-programid='{$product->program}'");?>
|
||||
</div>
|
||||
<div class='projectList'>
|
||||
<div class='scroll-handle'>
|
||||
<?php if(isset($productGroups[$productID])):?>
|
||||
<?php foreach($productGroups[$productID] as $sprint):?>
|
||||
<?php echo html::checkBox("sprints[$productID]", array($sprint->id => $sprint->name), $isChecked ? $sprint->id : '', "data-product='{$productID}' data-begin='{$sprint->begin}' data-end='{$sprint->end}' data-status='{$sprint->status}' data-pm='{$sprint->PM}'");?>
|
||||
<?php echo html::checkBox("sprints[$productID]", array($sprint->id => $sprint->name), '', "data-product='{$productID}' data-begin='{$sprint->begin}' data-end='{$sprint->end}' data-status='{$sprint->status}' data-pm='{$sprint->PM}'");?>
|
||||
<?php echo html::hidden("sprintIdList[$productID][$sprint->id]", $sprint->id);?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div class='line-groups sprintGroup'>
|
||||
<?php foreach($noMergedSprints as $sprintID => $sprint):?>
|
||||
<?php echo html::checkBox("sprints", array($sprint->id => $sprint->name), $sprint->id, "data-begin='{$sprint->begin}' data-end='{$sprint->end}' data-status='{$sprint->status}' data-pm='{$sprint->PM}'");?>
|
||||
<?php echo html::checkBox("sprints", array($sprint->id => $sprint->name), '', "data-begin='{$sprint->begin}' data-end='{$sprint->end}' data-status='{$sprint->status}' data-pm='{$sprint->PM}'");?>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -46,7 +46,6 @@
|
||||
<hr/>
|
||||
<div class='panel-footer text-center'>
|
||||
<?php echo html::submitButton($lang->upgrade->start . $lang->upgrade->common);?>
|
||||
<?php echo html::backButton();?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user