* Add block for program statistic.
This commit is contained in:
@@ -1377,13 +1377,14 @@ class block extends control
|
||||
*/
|
||||
public function printAssignToMeBlock($longBlock = true)
|
||||
{
|
||||
if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true;
|
||||
if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true;
|
||||
if(common::hasPriv('bug', 'view')) $hasViewPriv['bug'] = true;
|
||||
if(common::hasPriv('risk', 'view')) $hasViewPriv['risk'] = true;
|
||||
if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true;
|
||||
if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true;
|
||||
if(common::hasPriv('bug', 'view')) $hasViewPriv['bug'] = true;
|
||||
if(common::hasPriv('risk', 'view')) $hasViewPriv['risk'] = true;
|
||||
|
||||
$params = $this->get->param;
|
||||
$params = json_decode(base64_decode($params));
|
||||
$count = array();
|
||||
|
||||
if(isset($hasViewPriv['todo']))
|
||||
{
|
||||
@@ -1407,6 +1408,7 @@ class block extends control
|
||||
$todo->begin = date::formatTime($todo->begin);
|
||||
$todo->end = date::formatTime($todo->end);
|
||||
}
|
||||
$count['todo'] = count($todos);
|
||||
$this->view->todos = $todos;
|
||||
}
|
||||
if(isset($hasViewPriv['task']))
|
||||
@@ -1420,6 +1422,7 @@ class block extends control
|
||||
if(isset($params->taskNum)) $stmt->limit($params->taskNum);
|
||||
$tasks = $stmt->fetchAll();
|
||||
|
||||
$count['task'] = count($tasks);
|
||||
$this->view->tasks = $tasks;
|
||||
}
|
||||
if(isset($hasViewPriv['bug']))
|
||||
@@ -1433,6 +1436,7 @@ class block extends control
|
||||
if(isset($params->bugNum)) $stmt->limit($params->bugNum);
|
||||
$bugs = $stmt->fetchAll();
|
||||
|
||||
$count['bug'] = count($bugs);
|
||||
$this->view->bugs = $bugs;
|
||||
}
|
||||
if(isset($hasViewPriv['risk']))
|
||||
@@ -1446,11 +1450,13 @@ class block extends control
|
||||
if(isset($params->riskNum)) $stmt->limit($params->riskNum);
|
||||
$risks = $stmt->fetchAll();
|
||||
|
||||
$count['risk'] = count($risks);
|
||||
$this->view->risks = $risks;
|
||||
}
|
||||
|
||||
$this->view->selfCall = $this->selfCall;
|
||||
$this->view->hasViewPriv = $hasViewPriv;
|
||||
$this->view->count = $count;
|
||||
$this->view->longBlock = $longBlock;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -16,7 +16,12 @@
|
||||
<?php foreach($hasViewPriv as $type => $bool):?>
|
||||
<?php if($config->global->flow != 'full' && $config->global->flow != 'onlyTask' && $type == 'task') continue;?>
|
||||
<?php if($config->global->flow != 'full' && $config->global->flow != 'onlyTest' && $type == 'bug') continue;?>
|
||||
<li<?php if($isFirstTab) {echo ' class="active"'; $isFirstTab = false;}?>><a data-tab href='#assigntomeTab-<?php echo $type;?>'><?php echo $lang->block->availableBlocks->$type;?></a></li>
|
||||
<li<?php if($isFirstTab) {echo ' class="active"';}?>>
|
||||
<a data-tab href='#assigntomeTab-<?php echo $type;?>' onClick="changeLabel('<?php echo $type;?>')">
|
||||
<?php echo $lang->block->availableBlocks->$type;?>
|
||||
<span class='label label-light label-badge label-assignto <?php echo $type . "-count "; echo $isFirstTab ? '' : 'hidden'; $isFirstTab = false ?>'><?php echo $count[$type];?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
@@ -36,3 +41,10 @@
|
||||
#assigntomeBlock > .nav {position: absolute; top: -41px; left: 120px;}
|
||||
#assigntomeBlock .block-todoes .todoes-form{top: -50px;}
|
||||
</style>
|
||||
<script>
|
||||
function changeLabel(type)
|
||||
{
|
||||
$('.label-assignto').addClass('hidden');
|
||||
$('.' + type + '-count').removeClass('hidden');
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -62,6 +62,14 @@ html[lang="en"] .product-info .type-info {color: #A6AAB8; text-align: center; po
|
||||
|
||||
.status-count{margin:auto}
|
||||
.status-count tr:first-child td:last-child{color:#000;font-weight:bold}
|
||||
|
||||
.block-statistic .progress-group{margin-top: 20px; height: 65px;}
|
||||
.block-statistic .weekly-title{font-weight: bold; font-size:14px; color: #3C4253;}
|
||||
.block-statistic .weekly-small{font-size:12px; color: #838A9D;}
|
||||
.block-statistic .weekly-progress {font-weight: bold; font-size:24px;}
|
||||
.block-statistic .weekly-name{font-size:14px; color: #838A9D;}
|
||||
.block-statistic .weekly-value{font-size:18px; color: #3C4253;}
|
||||
.block-statistic .col-6 .stage{margin-left: 10px}
|
||||
</style>
|
||||
<script>
|
||||
<?php $blockNavId = 'nav-' . uniqid(); ?>
|
||||
@@ -163,6 +171,71 @@ $(function()
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class="col-6">
|
||||
<div class='table-row text-left weekly-row'>
|
||||
<span class='weekly-title'><?php echo $lang->program->weekly;?></span>
|
||||
<span class='stage text-muted'><?php echo $program->current;?></span>
|
||||
</div>
|
||||
<div class='progress-group col-10 center-block'>
|
||||
<div class='progress-num text-center'>
|
||||
<div class='weekly-title'><?php echo $lang->program->progress;?></div>
|
||||
<div class='weekly-progress'><?php echo $program->progress . '%';?></div>
|
||||
</div>
|
||||
<div class='progress'>
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="82" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $program->progress;?>%"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-row text-center small text-muted with-padding col-10 center-block">
|
||||
<div class="col-4 text-bottom">
|
||||
<div class='weekly-name'><?php echo $lang->program->pv;?></div>
|
||||
<div class='weekly-value'><?php echo $program->pv;?></div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class='weekly-name'><?php echo $lang->program->ev;?></div>
|
||||
<div class='weekly-value'><?php echo $program->ev;?></div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class='weekly-name'><?php echo $lang->program->sv;?></div>
|
||||
<div class='weekly-value'><?php echo $program->sv;?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-6'>
|
||||
<div class='table-row weekly-row with-padding'>
|
||||
<div class='col-4 text-center'>
|
||||
<span class='weekly-title'><?php echo $lang->program->allInput;?></span>
|
||||
</div>
|
||||
<div class='col-8'></div>
|
||||
</div>
|
||||
<div class='progress-group'>
|
||||
<div class="table-row text-center small text-muted with-padding">
|
||||
<div class="col-4 text-bottom">
|
||||
<div class='weekly-name'><?php echo $lang->program->pm;?></div>
|
||||
<div class='weekly-value'><?php echo $program->PM ? $program->PM : $lang->program->emptyPM;?></div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class='weekly-name'><?php echo $lang->program->teamCount;?></div>
|
||||
<div class='weekly-value'><?php echo $program->teamCount;?></div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class='weekly-name'><?php echo $lang->program->budget;?></div>
|
||||
<div class='weekly-value'><?php echo $program->budget;?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-row text-center small text-muted with-padding">
|
||||
<div class="col-4 text-bottom">
|
||||
<div class='weekly-name'><?php echo $lang->program->ac;?></div>
|
||||
<div class='weekly-value'><?php echo $program->ac;?></div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class='weekly-name'><?php echo $lang->program->cv;?></div>
|
||||
<div class='weekly-value'><?php echo $program->cv;?></div>
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -192,6 +192,7 @@ $lang->resource->risk->hangup = 'hangup';
|
||||
$lang->resource->risk->batchCreate = 'batchCreate';
|
||||
$lang->resource->risk->cancel = 'cancel';
|
||||
$lang->resource->risk->track = 'track';
|
||||
$lang->resource->risk->view = 'view';
|
||||
|
||||
$lang->risk->methodOrder[5] = 'browse';
|
||||
$lang->risk->methodOrder[10] = 'create';
|
||||
@@ -203,6 +204,7 @@ $lang->risk->methodOrder[35] = 'hangup';
|
||||
$lang->risk->methodOrder[40] = 'batchCreate';
|
||||
$lang->risk->methodOrder[45] = 'cancel';
|
||||
$lang->risk->methodOrder[50] = 'track';
|
||||
$lang->risk->methodOrder[55] = 'view';
|
||||
|
||||
/* Product. */
|
||||
$lang->resource->product = new stdclass();
|
||||
|
||||
+61
-41
@@ -1,45 +1,64 @@
|
||||
<?php
|
||||
$lang->program->index = 'Project';
|
||||
$lang->program->common = 'Project';
|
||||
$lang->program->stage = 'Stage';
|
||||
$lang->program->name = 'Name';
|
||||
$lang->program->template = 'Template';
|
||||
$lang->program->category = 'Category';
|
||||
$lang->program->desc = 'Description';
|
||||
$lang->program->code = 'Code';
|
||||
$lang->program->copy = 'Copy';
|
||||
$lang->program->begin = 'Begin';
|
||||
$lang->program->end = 'End';
|
||||
$lang->program->status = 'Status';
|
||||
$lang->program->PM = 'Project Manager';
|
||||
$lang->program->create = 'Create';
|
||||
$lang->program->edit = 'Edit';
|
||||
$lang->program->all = 'All';
|
||||
$lang->program->start = 'Start';
|
||||
$lang->program->finish = 'Finish';
|
||||
$lang->program->suspend = 'Suspend';
|
||||
$lang->program->delete = 'Delete';
|
||||
$lang->program->close = 'Close';
|
||||
$lang->program->activate = 'Activate';
|
||||
$lang->program->budget = 'Budget';
|
||||
$lang->program->dateRange = 'Date Range';
|
||||
$lang->program->to = ' to ';
|
||||
$lang->program->realFinished = 'Real finished';
|
||||
$lang->program->realStarted = 'Real started';
|
||||
$lang->program->bygrid = 'Grid';
|
||||
$lang->program->bylist = 'List';
|
||||
$lang->program->mine = 'Participated';
|
||||
$lang->program->group = 'Group';
|
||||
$lang->program->createGroup = 'Create Group';
|
||||
$lang->program->editGroup = 'Edit Group';
|
||||
$lang->program->copyGroup = 'Copy Group';
|
||||
$lang->program->manageView = 'Manage View';
|
||||
$lang->program->managePriv = 'Manage Priv';
|
||||
$lang->program->manageMembers = 'Manage Members';
|
||||
$lang->program->transfer = 'Transfer';
|
||||
$lang->program->setPlanduration = 'Set Planduration';
|
||||
$lang->program->export = 'Export';
|
||||
$lang->program->privway = 'Priv Way';
|
||||
$lang->program->index = 'Project';
|
||||
$lang->program->common = 'Project';
|
||||
$lang->program->stage = 'Stage';
|
||||
$lang->program->name = 'Name';
|
||||
$lang->program->template = 'Template';
|
||||
$lang->program->category = 'Category';
|
||||
$lang->program->desc = 'Description';
|
||||
$lang->program->code = 'Code';
|
||||
$lang->program->copy = 'Copy';
|
||||
$lang->program->begin = 'Begin';
|
||||
$lang->program->end = 'End';
|
||||
$lang->program->status = 'Status';
|
||||
$lang->program->PM = 'Project Manager';
|
||||
$lang->program->create = 'Create';
|
||||
$lang->program->edit = 'Edit';
|
||||
$lang->program->all = 'All';
|
||||
$lang->program->start = 'Start';
|
||||
$lang->program->finish = 'Finish';
|
||||
$lang->program->suspend = 'Suspend';
|
||||
$lang->program->delete = 'Delete';
|
||||
$lang->program->close = 'Close';
|
||||
$lang->program->activate = 'Activate';
|
||||
$lang->program->budget = 'Budget';
|
||||
$lang->program->dateRange = 'Date Range';
|
||||
$lang->program->to = ' to ';
|
||||
$lang->program->realFinished = 'Real finished';
|
||||
$lang->program->realStarted = 'Real started';
|
||||
$lang->program->bygrid = 'Grid';
|
||||
$lang->program->bylist = 'List';
|
||||
$lang->program->mine = 'Participated';
|
||||
$lang->program->group = 'Group';
|
||||
$lang->program->createGroup = 'Create Group';
|
||||
$lang->program->editGroup = 'Edit Group';
|
||||
$lang->program->copyGroup = 'Copy Group';
|
||||
$lang->program->manageView = 'Manage View';
|
||||
$lang->program->managePriv = 'Manage Priv';
|
||||
$lang->program->manageMembers = 'Manage Members';
|
||||
$lang->program->transfer = 'Transfer';
|
||||
$lang->program->setPlanduration = 'Set Planduration';
|
||||
$lang->program->export = 'Export';
|
||||
$lang->program->privway = 'Priv Way';
|
||||
$lang->program->durationEstimation = 'Duration Estimation';
|
||||
$lang->program->progress = 'Program Progress';
|
||||
$lang->program->teamCount = 'The Number Of Team';
|
||||
$lang->program->leftStories = 'Left Stories';
|
||||
$lang->program->leftTasks = 'Left Tasks';
|
||||
$lang->program->leftBugs = 'Left Bugs';
|
||||
$lang->program->children = 'Subprogram';
|
||||
$lang->program->parent = 'Parent Program';
|
||||
$lang->program->allStories = 'All stories';
|
||||
$lang->program->doneStories = 'Done stories';
|
||||
$lang->program->leftStories = 'Left stories';
|
||||
$lang->program->allInput = 'All Input';
|
||||
$lang->program->weekly = 'Program Weekly';
|
||||
$lang->program->pv = 'PV';
|
||||
$lang->program->ev = 'EV';
|
||||
$lang->program->sv = 'SV%';
|
||||
$lang->program->ac = 'AV';
|
||||
$lang->program->cv = 'CV%';
|
||||
$lang->program->pm = 'PM';
|
||||
|
||||
$lang->program->manageGroupMember = 'Manage Group Members';
|
||||
$lang->program->durationEstimation = 'Workload estimate';
|
||||
@@ -80,3 +99,4 @@ $lang->program->scrumDesc = '<strong>Introduction: </strong>Iterate in s
|
||||
$lang->program->cmmi = 'CMMI';
|
||||
$lang->program->cmmiTitle = 'CMMI management';
|
||||
$lang->program->cmmiDesc = '<strong>Introduction: </strong>Standardized management by stages<br><strong>Contains function points: </strong>Estimate, plan, stage, report, etc.';
|
||||
$lang->program->emptyPM = 'No program manager';
|
||||
|
||||
@@ -57,6 +57,14 @@ $lang->program->allStories = '总需求';
|
||||
$lang->program->doneStories = '已完成';
|
||||
$lang->program->leftStories = '剩余需求';
|
||||
$lang->program->allInput = '项目总投入';
|
||||
$lang->program->weekly = '项目周报';
|
||||
$lang->program->pv = 'PV';
|
||||
$lang->program->ev = 'EV';
|
||||
$lang->program->sv = 'SV%';
|
||||
$lang->program->ac = 'AV';
|
||||
$lang->program->cv = 'CV%';
|
||||
$lang->program->pm = '项目负责人';
|
||||
$lang->program->teamCount = '项目成员';
|
||||
|
||||
$lang->program->unitList[''] = '';
|
||||
$lang->program->unitList['yuan'] = '元';
|
||||
@@ -103,3 +111,4 @@ $lang->program->cmmiDesc = '<strong>简介:</strong>按阶段规范
|
||||
$lang->program->cannotCreateChild = '该项目已经有实际的内容,无法直接添加子项目。您可以为当前项目创建一个父项目,然后在新的父项目下面添加子项目。';
|
||||
$lang->program->hasChildren = '该项目有子项目存在,不能删除。';
|
||||
$lang->program->confirmDelete = "您确定删除项目[%s]吗?";
|
||||
$lang->program->emptyPM = '暂无';
|
||||
|
||||
Reference in New Issue
Block a user