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

This commit is contained in:
wangyidong
2016-04-19 11:13:49 +08:00
5 changed files with 14 additions and 2 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ js::set('bugBrowseType', $this->session->bugBrowseType);
</li>
<?php foreach($app->customMenu['featurebar'] as $type => $featurebar):?>
<?php if($featurebar['status'] == 'hide') continue;?>
<li id='<?php echo $type?>Tab'><?php echo html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=unclosed&param=0"), $featurebar['link'])?></li>
<li id='<?php echo $type?>Tab'><?php echo html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$type&param=0"), $featurebar['link'])?></li>
<?php endforeach;?>
<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i>&nbsp;<?php echo $lang->bug->byQuery;?></a></li>
</ul>
+1
View File
@@ -38,6 +38,7 @@ $lang->project->totalConsumed = 'Done';
$lang->project->totalLeft = 'Left';
$lang->project->Left = 'Left';
$lang->project->progess = 'Progess';
$lang->project->hours = 'Estimate %s Consumed %s Left %s';
$lang->project->viewBug = 'View bug';
$lang->project->noProduct = "No {$lang->productCommon}";
$lang->project->createStory = "Create story";
+1
View File
@@ -38,6 +38,7 @@ $lang->project->totalConsumed = '总消耗';
$lang->project->totalLeft = '总剩余';
$lang->project->Left = '剩余';
$lang->project->progess = '进度';
$lang->project->hours = '预计 %s 消耗 %s 剩余 %s';
$lang->project->viewBug = '查看bug';
$lang->project->noProduct = "无{$lang->productCommon}{$lang->projectCommon}";
$lang->project->createStory = "新增需求";
+7
View File
@@ -1952,6 +1952,9 @@ class projectModel extends model
$this->loadModel('story');
$this->loadModel('task');
static $users;
if(empty($users)) $users = $this->loadModel('user')->getPairs('noletter');
if($node->children)
{
foreach ($node->children as $child)
@@ -1995,6 +1998,10 @@ class projectModel extends model
$taskItem->color = $task->color;
$taskItem->pri = $task->pri;
$taskItem->status = $task->status;
$taskItem->estimate = $task->estimate;
$taskItem->consumed = $task->consumed;
$taskItem->left = $task->left;
$taskItem->assignedTo = $users[$task->assignedTo];
$taskItem->url = helper::createLink('task', 'view', "task=$task->id");
$taskItem->storyChanged = $task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion;
+4 -1
View File
@@ -43,8 +43,10 @@ $('#treeTab').addClass('active');
$(function()
{
var hoursFormat = '<?php echo $lang->project->hours ?>';
var viewLevel = '<?php echo $level ?>' || 'custom';
var data = $.parseJSON('<?php echo json_encode($tree, JSON_HEX_QUOT | JSON_HEX_APOS);?>');
console.log('data', data);
var $tree = $('#projectTree');
var statusMap = $.parseJSON('<?php echo json_encode($lang->task->statusList);?>');
var selectCustomLevel = function() {$('.tree-view-btn.active').removeClass('active').filter('[data-type="custom"]').addClass('active');};
@@ -98,7 +100,8 @@ $(function()
$tr.append($('<td width="30"/>').append('<span class="pri' + task.pri + '">' + task.pri + '</span>'));
$tr.append($('<td/>').addClass('text-left').append($('<a>').attr({href: task.url}).text('#' + task.id + ' ' + task.title).css('color', task.color)));
$tr.append($('<td width="70"/>').addClass(task.storyChanged ? 'warning' : task.status).text(statusMap[task.status]));
$tr.append($('<td width="70"/>').addClass(task.storyChanged ? 'warning' : task.status).text(statusMap[task.status]));
$tr.append($('<td width="90"/>').html(task.assignedTo ? ('<i class="icon icon-user text-muted"></i> ' + task.assignedTo) : ''));
$tr.append($('<td width="140"/>').text(hoursFormat.replace('%s', task.estimate).replace('%s', task.consumed).replace('%s', task.left)));
$tr.append($('<td width="130"/>').html(task.buttons));
$tbody.append($tr);
});