Merge branch 'master' of https://github.com/easysoft/zentaopms
Conflicts: module/productplan/css/view.css module/project/view/grouptask.html.php
This commit is contained in:
@@ -62,7 +62,7 @@ js::set('bugBrowseType', ($browseType == 'bymodule' and $this->session->bugBrows
|
||||
</div>
|
||||
</div>
|
||||
<div class='btn-group'>
|
||||
<div class='btn-group'>
|
||||
<div class='btn-group btn-bug-create'>
|
||||
<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown'>
|
||||
<i class='icon icon-plus'></i> <?php echo $lang->bug->common;?>
|
||||
<span class='caret'></span>
|
||||
@@ -72,7 +72,7 @@ js::set('bugBrowseType', ($browseType == 'bymodule' and $this->session->bugBrows
|
||||
if(commonModel::isTutorialMode())
|
||||
{
|
||||
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&extra=moduleID=$moduleID");
|
||||
echo html::a($this->createLink('tutorial', 'wizard', "module=bug&method=create¶ms=$wizardParams"), $lang->bug->create);
|
||||
echo '<li>' . html::a($this->createLink('tutorial', 'wizard', "module=bug&method=create¶ms=$wizardParams"), $lang->bug->create) . '</li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -17,9 +17,9 @@ class doc extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
public function __construct($moduleName = '', $methodName = '')
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct($moduleName, $methodName);
|
||||
$this->loadModel('user');
|
||||
$this->loadModel('tree');
|
||||
$this->loadModel('action');
|
||||
|
||||
@@ -107,4 +107,56 @@ class git extends control
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax save log.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxSaveLog()
|
||||
{
|
||||
$repoUrl = trim($this->post->repoUrl);
|
||||
$repoRoot = str_replace('\\', '/', trim($this->post->repoRoot));
|
||||
$message = trim($this->post->message);
|
||||
$revision = trim($this->post->revision);
|
||||
$files = $this->post->files;
|
||||
|
||||
/* Ignore git. */
|
||||
if(strpos($repoUrl, '://') === false) die();
|
||||
|
||||
$parsedFiles = array();
|
||||
foreach($files as $file)
|
||||
{
|
||||
$file = trim($file);
|
||||
if(empty($file)) continue;
|
||||
$path = str_replace($repoRoot, '', $file);
|
||||
$parsedFiles[''][] = $path;
|
||||
}
|
||||
|
||||
$objects = $this->git->parseComment($message);
|
||||
if($objects)
|
||||
{
|
||||
$log = new stdclass();
|
||||
$log->author = $this->app->user->account;
|
||||
$log->date = helper::now();
|
||||
$log->msg = $message;
|
||||
$log->revision = $revision;
|
||||
$log->files = $parsedFiles;
|
||||
$this->git->saveAction2PMS($objects, $log, $repoUrl);
|
||||
}
|
||||
die();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get repos.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetRepos()
|
||||
{
|
||||
$repos = $this->git->getRepos();
|
||||
die(json_encode($repos));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,6 +187,25 @@ class gitModel extends model
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get repos.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getRepos()
|
||||
{
|
||||
$repos = array();
|
||||
if(!$this->config->git->repos) return $repos;
|
||||
|
||||
foreach($this->config->git->repos as $repo)
|
||||
{
|
||||
if(empty($repo['path'])) continue;
|
||||
$repos[] = $repo['path'];
|
||||
}
|
||||
return $repos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set repo.
|
||||
*
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<?php common::printIcon('story', 'report', "productID=$productID&browseType=$browseType&moduleID=$moduleID", '', 'button', 'bar-chart'); ?>
|
||||
</div>
|
||||
<div class='btn-group'>
|
||||
<div class='btn-group'>
|
||||
<div class='btn-group create-story-btn'>
|
||||
<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown'>
|
||||
<i class='icon icon-plus'></i> <?php echo $lang->story->common;?>
|
||||
<span class='caret'></span>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.tabs{position:relative;}
|
||||
.tabs .nav-tabs{border-bottom:none;}
|
||||
.tabs .nav-tabs > li{margin-bottom:0px;}
|
||||
.tabs .tab-content {padding: 0; border: none;}
|
||||
.tabs .tab-content .tab-pane .action{position: absolute; right: 0px; top: -1px;}
|
||||
.tabs .tab-content .tab-pane #querybox{margin:0px}
|
||||
.tabs .nav-tabs>li{margin-bottom:0px;}
|
||||
.tabs .tab-content{padding: 0px; border: 0px;}
|
||||
.tabs .tab-content .tab-pane .action{position: absolute; right: 0px; top: 0px;}
|
||||
.tabs .tab-content .tab-pane #querybox{margin:0px; border-left:1px solid #ddd; border-right:1px solid #ddd;}
|
||||
.tabs .tab-content .tab-pane #querybox form{padding-left:0px;}
|
||||
|
||||
.hide-side .col-main {width: 100%;}
|
||||
@@ -20,5 +20,3 @@ input[type=checkbox].ml-10px{margin-left:10px;}
|
||||
.dropdown-list > li > a {display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.53846154; color: #141414; white-space: nowrap;}
|
||||
.dropdown-list > li > a:hover,
|
||||
.dropdown-list > li > a:focus {color: #1a4f85;text-decoration: none;background-color: #ddd;}
|
||||
|
||||
.table-actions {padding-left: 8px;}
|
||||
|
||||
@@ -289,6 +289,14 @@ class project extends control
|
||||
$groupTasks[$task->$groupBy][] = $task;
|
||||
}
|
||||
}
|
||||
/* Process closed data when group by assignedTo. */
|
||||
if($groupBy == 'assignedTo' and isset($groupTasks['Closed']))
|
||||
{
|
||||
$closedTasks = $groupTasks['Closed'];
|
||||
unset($groupTasks['Closed']);
|
||||
$groupTasks['closed'] = $closedTasks;
|
||||
}
|
||||
|
||||
|
||||
/* Assign. */
|
||||
$this->app->loadLang('tree');
|
||||
|
||||
@@ -7,4 +7,5 @@ $(function()
|
||||
{
|
||||
$('#cpmBtn').click(function(){$('#copyProjectModal').modal('show')});
|
||||
$('#copyProjects a').click(function(){setCopyProject($(this).data('id')); $('#copyProjectModal').modal('hide')});
|
||||
$('#productsBox .col-sm-3').width($('#type').closest('td').width());
|
||||
});
|
||||
|
||||
@@ -148,20 +148,13 @@ $lang->project->groups['assignedTo'] = 'By AssignedTo';
|
||||
$lang->project->groups['finishedBy'] = 'By FinishedBy';
|
||||
$lang->project->groups['closedBy'] = 'By ClosedBy';
|
||||
$lang->project->groups['type'] = 'By Type';
|
||||
$lang->project->groups['deadline'] = 'By Deadline';
|
||||
|
||||
$lang->project->groupFilter['story']['all'] = $lang->project->all;
|
||||
$lang->project->groupFilter['story']['linked'] = 'Task Linked to Story';
|
||||
$lang->project->groupFilter['pri']['all'] = $lang->project->all;
|
||||
$lang->project->groupFilter['pri']['setted'] = 'Congfigured';
|
||||
$lang->project->groupFilter['pri']['noset'] = 'Not set';
|
||||
$lang->project->groupFilter['assignedTo']['undone'] = 'Pending';
|
||||
$lang->project->groupFilter['assignedTo']['all'] = $lang->project->all;
|
||||
$lang->project->groupFilter['finishedBy']['done'] = 'Done';
|
||||
$lang->project->groupFilter['finishedBy']['all'] = $lang->project->all;
|
||||
$lang->project->groupFilter['closedBy']['closed'] = 'Closed';
|
||||
$lang->project->groupFilter['closedBy']['all'] = $lang->project->all;
|
||||
$lang->project->groupFilter['deadline']['all'] = $lang->project->all;
|
||||
$lang->project->groupFilter['deadline']['setted'] = 'Configured';
|
||||
|
||||
$lang->project->byQuery = 'Search';
|
||||
|
||||
|
||||
@@ -148,20 +148,13 @@ $lang->project->groups['assignedTo'] = '指派给分组';
|
||||
$lang->project->groups['finishedBy'] = '完成者分组';
|
||||
$lang->project->groups['closedBy'] = '关闭者分组';
|
||||
$lang->project->groups['type'] = '类型分组';
|
||||
$lang->project->groups['deadline'] = '截止分组';
|
||||
|
||||
$lang->project->groupFilter['story']['all'] = $lang->project->all;
|
||||
$lang->project->groupFilter['story']['linked'] = '已关联需求的任务';
|
||||
$lang->project->groupFilter['pri']['all'] = $lang->project->all;
|
||||
$lang->project->groupFilter['pri']['setted'] = '已设置';
|
||||
$lang->project->groupFilter['pri']['noset'] = '未设置';
|
||||
$lang->project->groupFilter['assignedTo']['undone'] = '未完成';
|
||||
$lang->project->groupFilter['assignedTo']['all'] = $lang->project->all;
|
||||
$lang->project->groupFilter['finishedBy']['done'] = '已完成';
|
||||
$lang->project->groupFilter['finishedBy']['all'] = $lang->project->all;
|
||||
$lang->project->groupFilter['closedBy']['closed'] = '已关闭';
|
||||
$lang->project->groupFilter['closedBy']['all'] = $lang->project->all;
|
||||
$lang->project->groupFilter['deadline']['all'] = $lang->project->all;
|
||||
$lang->project->groupFilter['deadline']['setted'] = '已设置';
|
||||
|
||||
$lang->project->byQuery = '搜索';
|
||||
|
||||
|
||||
@@ -25,20 +25,22 @@
|
||||
<table class='table active-disabled table-condensed table-fixed' id='groupTable'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='<?php echo $groupBy == 'story' ? 'w-200px' : 'w-120px'?> text-left'>
|
||||
<th class='w-200px text-left'>
|
||||
<?php echo html::a('###', "<i class='icon-caret-down'></i> " . $lang->task->$groupBy, '', "class='expandAll' data-action='expand'")?>
|
||||
<?php echo html::a('###', "<i class='icon-caret-right'></i> " . $lang->task->$groupBy, '', "class='collapseAll hidden' data-action='collapse'")?>
|
||||
</th>
|
||||
<th><?php echo $lang->task->name;?></th>
|
||||
<th class='w-id'><?php echo $lang->task->id;?></th>
|
||||
<th class='w-pri'> <?php echo $lang->priAB;?></th>
|
||||
<th><?php echo $lang->task->name;?></th>
|
||||
<th class='w-80px'><?php echo $lang->task->status;?></th>
|
||||
<th class='w-80px'><?php echo $lang->task->deadlineAB;?></th>
|
||||
<th class='w-user'><?php echo $lang->task->assignedTo;?></th>
|
||||
<th class='w-user'><?php echo $lang->task->finishedBy;?></th>
|
||||
<th class='w-50px'><?php echo $lang->task->estimateAB;?></th>
|
||||
<th class='w-50px'><?php echo $lang->task->consumedAB;?></th>
|
||||
<th class='w-50px'><?php echo $lang->task->leftAB;?></th>
|
||||
<th class='w-50px'><?php echo $lang->task->progess;?></th>
|
||||
<th class='w-50px'><?php echo $lang->typeAB;?></th>
|
||||
<th class='w-80px'><?php echo $lang->task->deadlineAB;?></th>
|
||||
<th class='w-80px'><?php echo $lang->task->status;?></th>
|
||||
<th class='w-60px'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -52,6 +54,10 @@
|
||||
$totalConsumed = 0.0;
|
||||
$totalLeft = 0.0;
|
||||
?>
|
||||
<?php
|
||||
if($groupBy == 'finishedBy') unset($tasks['']);
|
||||
if($groupBy == 'closedBy') unset($tasks['']);
|
||||
?>
|
||||
<?php foreach($tasks as $groupKey => $groupTasks):?>
|
||||
<?php $i = 0;?>
|
||||
<?php
|
||||
@@ -64,11 +70,8 @@
|
||||
$groupLeft = 0.0;
|
||||
|
||||
$groupName = $groupKey;
|
||||
if($groupBy == 'story' and $groupName == 0) $groupName = $this->lang->task->noStory;
|
||||
if($groupBy == 'story') $groupName = empty($groupName) ? $this->lang->task->noStory : zget($groupByList, $groupKey);
|
||||
if($groupBy == 'assignedTo' and $groupName == '') $groupName = $this->lang->task->noAssigned;
|
||||
if($groupBy == 'finishedBy' and $groupName == '') $groupName = $this->lang->task->noFinished;
|
||||
if($groupBy == 'closedBy' and $groupName == '') $groupName = $this->lang->task->noClosed;
|
||||
if(!empty($groupByList[$groupKey])) $groupName .= '::' . $groupByList[$groupKey];
|
||||
?>
|
||||
<tbody>
|
||||
<?php foreach($groupTasks as $task):?>
|
||||
@@ -76,11 +79,8 @@
|
||||
if(isset($currentFilter) and $currentFilter != 'all')
|
||||
{
|
||||
if($groupBy == 'story' and $currentFilter == 'linked' and empty($task->story)) continue;
|
||||
if($groupBy == 'pri' and $currentFilter == 'setted' and empty($task->pri)) continue;
|
||||
if($groupBy == 'pri' and $currentFilter == 'noset' and !empty($task->pri)) continue;
|
||||
if($groupBy == 'assignedTo' and $currentFilter == 'undone' and $task->status != 'wait' and $task->status != 'doing') continue;
|
||||
if($groupBy == 'finishedBy' and $currentFilter == 'done' and $task->status != 'done') continue;
|
||||
if($groupBy == 'closedBy' and $currentFilter == 'closed' and $task->status != 'closed') continue;
|
||||
if($groupBy == 'deadline' and $currentFilter == 'setted' and $task->deadline == '0000-00-00') continue;
|
||||
}
|
||||
?>
|
||||
<?php $assignedToClass = $task->assignedTo == $app->user->account ? "style='color:red'" : '';?>
|
||||
@@ -121,18 +121,23 @@
|
||||
<?php if($i == 0):?>
|
||||
<td rowspan='<?php echo count($groupTasks) + 1?>' class='groupby text-left'>
|
||||
<?php echo html::a('###', "<i class='icon-caret-down'></i> " . $groupName, '', "class='expandGroup' data-action='expand' title='$groupName'");?>
|
||||
<div class='groupSummary text' style='white-space:normal'>
|
||||
<?php if($groupBy == 'assignedTo' and isset($members[$task->assignedTo])) printf($lang->project->memberHours, $users[$task->assignedTo], $members[$task->assignedTo]->totalHours);?>
|
||||
<?php printf($lang->project->groupSummary, $groupSum, $groupWait, $groupDoing, $groupEstimate, $groupConsumed, $groupLeft);?></div>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td class='text-left'> <?php echo $task->id . $lang->colon; if(!common::printLink('task', 'view', "task=$task->id", $task->name)) echo $task->name;?></td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->task->priList, $task->pri, $task->pri)?>'><?php echo $task->pri == '0' ? '' : zget($lang->task->priList, $task->pri, $task->pri);?></span></td>
|
||||
<td><?php echo $task->id;?></td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->task->priList, $task->pri, $task->pri)?>'><?php echo zget($lang->task->priList, $task->pri, $task->pri);?></span></td>
|
||||
<td class='text-left'><?php if(!common::printLink('task', 'view', "task=$task->id", $task->name)) echo $task->name;?></td>
|
||||
<td class=<?php echo $task->status;?> ><?php echo $lang->task->statusList[$task->status];?></td>
|
||||
<td class=<?php if(isset($task->delay)) echo 'delayed';?>><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
|
||||
<td <?php echo $assignedToClass;?>><?php echo $task->assignedToRealName;?></td>
|
||||
<td><?php echo $users[$task->finishedBy];?></td>
|
||||
<td><?php echo $task->estimate;?></td>
|
||||
<td><?php echo $task->consumed;?></td>
|
||||
<td><?php echo $task->left;?></td>
|
||||
<td class='text-left'><?php echo $task->progess . '%';?></td>
|
||||
<td><?php echo $lang->task->typeList[$task->type];?></td>
|
||||
<td class=<?php if(isset($task->delay)) echo 'delayed';?>><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
|
||||
<td class=<?php echo $task->status;?> ><?php echo $lang->task->statusList[$task->status];?></td>
|
||||
<td>
|
||||
<?php common::printIcon('task', 'edit', "taskid=$task->id", '', 'list');?>
|
||||
<?php common::printIcon('task', 'delete', "projectID=$task->project&taskid=$task->id", '', 'list', '', 'hiddenwin');?>
|
||||
@@ -141,31 +146,20 @@
|
||||
<?php $i++;?>
|
||||
<?php endforeach;?>
|
||||
<?php if($i != 0):?>
|
||||
<tr class='text-center groupdivider'>
|
||||
<td colspan='4' class='text-left'>
|
||||
<div class='text'>
|
||||
<?php if($groupBy == 'assignedTo' and isset($members[$task->assignedTo])) printf($lang->project->memberHours, $users[$task->assignedTo], $members[$task->assignedTo]->totalHours);?>
|
||||
<?php printf($lang->project->noTimeSummary, $groupSum, $groupWait, $groupDoing);?></div>
|
||||
</td>
|
||||
<td><?php echo $groupEstimate;?></td>
|
||||
<td><?php echo $groupConsumed;?></td>
|
||||
<td><?php echo $groupLeft;?></td>
|
||||
<td colspan='4'></td>
|
||||
</tr>
|
||||
<tr class='actie-disabled group-collapse hidden text-center group-title'>
|
||||
<td colspan='5' class='text-left'>
|
||||
<td class='text-left'>
|
||||
<?php echo html::a('###', "<i class='icon-caret-right'></i> " . $groupName, '', "class='collapseGroup' data-action='collapse' title='$groupName'");?>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td colspan='11' class='text-left'>
|
||||
<span class='groupdivider' style='margin-left:10px;'>
|
||||
<span class='text'>
|
||||
<?php if($groupBy == 'assignedTo' and isset($members[$task->assignedTo])) printf($lang->project->memberHours, $users[$task->assignedTo], $members[$task->assignedTo]->totalHours);?>
|
||||
<?php printf($lang->project->noTimeSummary, $groupSum, $groupWait, $groupDoing);?>
|
||||
<?php printf($lang->project->groupSummary, $groupSum, $groupWait, $groupDoing, $groupEstimate, $groupConsumed, $groupLeft);?>
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td><?php echo $groupEstimate;?></td>
|
||||
<td><?php echo $groupConsumed;?></td>
|
||||
<td><?php echo $groupLeft;?></td>
|
||||
<td colspan='4'></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
</tbody>
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
<div class='dropdown-menu pull-right'>
|
||||
<?php
|
||||
echo (common::hasPriv('task', 'create')) ? html::a($this->createLink('task', 'create', "projectID=$story->project&storyID=$story->story&moduleID=$story->module", '', true), $lang->project->wbs, '', "class='kanbanFrame'") : '';
|
||||
echo (common::hasPriv('task', 'batchCreate')) ? html::a($this->createLink('task', 'batchCreate', "projectID=$story->project&storyID=$story->story&iframe=true", '', true), $lang->project->batchWBS, '', "class='kanbanFrame'") : '';
|
||||
echo (common::hasPriv('project', 'unlinkStory')) ? html::a($this->createLink('project', 'unlinkStory', "projectID=$story->project&storyID=$story->story&confirm=no", '', true), $lang->project->unlinkStory, 'hiddenwin') : '';
|
||||
echo (common::hasPriv('story', 'activate') and storyModel::isClickable($story, 'activate')) ? html::a($this->createLink('story', 'activate', "storyID=$story->id", '', 'true'), $lang->story->activate, '', "class='kanbanFrame'") : '';
|
||||
echo (common::hasPriv('story', 'close') and storyModel::isClickable($story, 'close')) ? html::a($this->createLink('story', 'close', "storyID=$story->id", '', 'true'), $lang->story->close, '', "class='kanbanFrame'") : '';
|
||||
|
||||
@@ -253,9 +253,20 @@ class story extends control
|
||||
$sourceList['ditto'] = $this->lang->story->ditto;
|
||||
|
||||
/* Set Custom*/
|
||||
foreach(explode(',', $this->config->story->list->customBatchCreateFields) as $field) $customFields[$field] = $this->lang->story->$field;
|
||||
foreach(explode(',', $this->config->story->list->customBatchCreateFields) as $field)
|
||||
{
|
||||
if($product->type != 'normal') $customFields[$product->type] = $this->lang->product->branchName[$product->type];
|
||||
$customFields[$field] = $this->lang->story->$field;
|
||||
}
|
||||
$showFields = $this->config->story->custom->batchCreateFields;
|
||||
if($product->type == 'normal')
|
||||
{
|
||||
$showFields = str_replace(array(0 => ",branch,", 1 => ",platform,"), '', ",$showFields,");
|
||||
$showFields = trim($showFields, ',');
|
||||
}
|
||||
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->showFields = $this->config->story->custom->batchCreateFields;
|
||||
$this->view->showFields = $showFields;
|
||||
|
||||
$this->view->title = $product->name . $this->lang->colon . $this->lang->story->batchCreate;
|
||||
$this->view->productName = $product->name;
|
||||
|
||||
@@ -245,7 +245,7 @@ class storyModel extends model
|
||||
$stories = fixer::input('post')->get();
|
||||
$batchNum = count(reset($stories));
|
||||
|
||||
$result = $this->loadModel('common')->removeDuplicate('story', $stories, "product={$productID} and branch={$branch}");
|
||||
$result = $this->loadModel('common')->removeDuplicate('story', $stories, "product={$productID}");
|
||||
$stories = $result['data'];
|
||||
|
||||
$module = 0;
|
||||
@@ -272,6 +272,7 @@ class storyModel extends model
|
||||
if(!empty($stories->title[$i]))
|
||||
{
|
||||
$data = new stdclass();
|
||||
$data->branch = $stories->branch[$i];
|
||||
$data->module = $stories->module[$i];
|
||||
$data->plan = $stories->plan[$i];
|
||||
$data->color = $stories->color[$i];
|
||||
@@ -282,7 +283,6 @@ class storyModel extends model
|
||||
$data->status = ($stories->needReview[$i] == 0 and !$forceReview) ? 'active' : 'draft';
|
||||
$data->keywords = $stories->keywords[$i];
|
||||
$data->product = $productID;
|
||||
$data->branch = $branch;
|
||||
$data->openedBy = $this->app->user->account;
|
||||
$data->openedDate = $now;
|
||||
$data->version = 1;
|
||||
|
||||
@@ -38,9 +38,10 @@ foreach(explode(',', $showFields) as $field)
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='w-30px'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo $lang->product->branch;?></th>
|
||||
<th class='w-p15<?php echo zget($visibleFields, 'module', ' hidden')?>'><?php echo $lang->story->module;?></th>
|
||||
<th class='w-p15<?php echo zget($visibleFields, 'plan', ' hidden')?>'><?php echo $lang->story->plan;?></th>
|
||||
<th><?php echo $lang->story->title;?> <span class='required'></span></th>
|
||||
<th <?php if(count($visibleFields) >= 9) echo "class='w-150px'"?>><?php echo $lang->story->title;?> <span class='required'></span></th>
|
||||
<th class='w-80px<?php echo zget($visibleFields, 'source', ' hidden')?>'><?php echo $lang->story->source;?></th>
|
||||
<th class='w-p15<?php echo zget($visibleFields, 'spec', ' hidden')?>'><?php echo $lang->story->spec;?></th>
|
||||
<th class='w-p15<?php echo zget($visibleFields, 'verify', ' hidden')?>'><?php echo $lang->story->verify;?></th>
|
||||
@@ -59,6 +60,7 @@ foreach(explode(',', $showFields) as $field)
|
||||
<?php $source = $i == 0 ? '' : 'ditto';?>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo $i+1;?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branch[$i]", $branches, $branch, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("module[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'plan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plan[$i]", $plans, $planID, "class='form-control chosen'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
@@ -87,6 +89,7 @@ foreach(explode(',', $showFields) as $field)
|
||||
<?php $source = $i - $nextStart == 0 ? '' : 'ditto';?>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo $i+1;?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branch[$i]", $branches, $branch, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("module[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'plan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plan[$i]", $plans, $planID, "class='form-control chosen'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
@@ -111,6 +114,7 @@ foreach(explode(',', $showFields) as $field)
|
||||
<tbody>
|
||||
<tr class='text-center'>
|
||||
<td>%s</td>
|
||||
<td class='text-left<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo html::select("branch[%s]", $branch, $branch, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("module[%s]", $moduleOptionMenu, $moduleID, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'plan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plan[%s]", $plans, $planID, "class='form-control'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
|
||||
@@ -135,4 +135,16 @@ class svn extends control
|
||||
}
|
||||
die();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get repos.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetRepos()
|
||||
{
|
||||
$repos = $this->svn->getRepos();
|
||||
die(json_encode($repos));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,6 +186,25 @@ class svnModel extends model
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get repos.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getRepos()
|
||||
{
|
||||
$repos = array();
|
||||
if(!$this->config->svn->repos) return $repos;
|
||||
|
||||
foreach($this->config->svn->repos as $repo)
|
||||
{
|
||||
if(empty($repo['path'])) continue;
|
||||
$repos[] = $repo['path'];
|
||||
}
|
||||
return $repos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set repo.
|
||||
*
|
||||
|
||||
@@ -1191,6 +1191,9 @@ class taskModel extends model
|
||||
$task->productType = $product->type;
|
||||
}
|
||||
|
||||
/* Set closed realname. */
|
||||
if($task->assignedTo == 'closed') $task->assignedToRealName = 'Closed';
|
||||
|
||||
/* Compute task progess. */
|
||||
if($task->consumed == 0 and $task->left == 0)
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->task->module;?></th>
|
||||
<td id='moduleIdBox' class='w-p25-f'><?php echo html::select('module', $moduleOptionMenu, $task->module, "class='form-control chosen' onchange='setStories(this.value,$project->id)'");?></td>
|
||||
<td class='w-p25-f'></td><td></td>
|
||||
<td></td><td></td><td></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->type;?></th>
|
||||
@@ -45,7 +45,7 @@
|
||||
<?php if(strpos(",$showFields,", ',story,') !== false):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->story;?></th>
|
||||
<td colspan='3'>
|
||||
<td colspan='5'>
|
||||
<div class='input-group'>
|
||||
<?php if(empty($stories)):?>
|
||||
<span id='story'><?php printf($lang->task->noticeLinkStory, html::a($this->createLink('project', 'linkStory', "projectID=$project->id"), $lang->project->linkStory, '_blank'), html::a("javascript:loadStories($project->id)", $lang->refresh));?></span>
|
||||
@@ -59,7 +59,7 @@
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->name;?></th>
|
||||
<td colspan='3'>
|
||||
<td colspan='5'>
|
||||
<div class='row-table'>
|
||||
<div class='col-table'>
|
||||
<div class="input-group w-p100">
|
||||
@@ -113,7 +113,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->desc;?></th>
|
||||
<td colspan='3'><?php echo html::textarea('desc', $task->desc, "rows='10' class='form-control'");?></td>
|
||||
<td colspan='5'><?php echo html::textarea('desc', $task->desc, "rows='10' class='form-control'");?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$hiddenEstStarted = strpos(",$showFields,", ',estStarted,') === false;
|
||||
@@ -124,7 +124,7 @@
|
||||
<tr>
|
||||
<th><?php echo ($hiddenEstStarted and $hiddenDeadline) ? $lang->task->mailto : $lang->task->datePlan;?></th>
|
||||
<?php if(!$hiddenEstStarted or !$hiddenDeadline):?>
|
||||
<td>
|
||||
<td colspan='2'>
|
||||
<div class='input-group' id='dataPlanGroup'>
|
||||
<?php if(!$hiddenEstStarted):?>
|
||||
<?php echo html::input('estStarted', $task->estStarted, "class='form-control form-date' placeholder='{$lang->task->estStarted}'");?>
|
||||
@@ -139,7 +139,7 @@
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<?php if(!$hiddenMailto):?>
|
||||
<?php $colspan = ($hiddenEstStarted and $hiddenDeadline) ? '3' : '2';?>
|
||||
<?php $colspan = ($hiddenEstStarted and $hiddenDeadline) ? '5' : '4';?>
|
||||
<td colspan='<?php echo $colspan?>'>
|
||||
<div id='mailtoGroup' class='input-group'>
|
||||
<?php if(!$hiddenEstStarted or !$hiddenDeadline):?>
|
||||
@@ -154,15 +154,15 @@
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->files;?></th>
|
||||
<td colspan='3'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
<td colspan='5'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->afterSubmit;?></th>
|
||||
<td colspan='3'><?php echo html::radio('after', $lang->task->afterChoices, 'continueAdding');?></td>
|
||||
<td colspan='5'><?php echo html::radio('after', $lang->task->afterChoices, 'continueAdding');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan='3'><?php echo html::submitButton() . html::backButton();?></td>
|
||||
<td colspan='5'><?php echo html::submitButton() . html::backButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<span id='responser'></span>
|
||||
|
||||
Reference in New Issue
Block a user