* Code for task#41776.

This commit is contained in:
xieqiyu
2021-08-27 11:04:22 +08:00
parent 2191301d6a
commit 0cd7dbe352
4 changed files with 67 additions and 38 deletions
+7 -6
View File
@@ -7,16 +7,17 @@
.board-project {padding: 10px;}
.doing .doing-project:not(:last-child) {padding: 10px; border-bottom: 2px solid #fff;}
.doing .doing-executioni:not(:last-child) {padding: 10px; border-bottom: 2px solid #fff;}
.board-doing {padding: 0px !important; vertical-align: top !important;}
.board-doing div:not(:last-child) .board-doing-project,
.board-doing div:not(:last-child) .board-doing-execution {padding: 10px; border-bottom: 2px solid #fff;}
.doing .doing-project:last-child, .doing-execution:last-child {padding: 10px;}
.board-doing div:last-child .board-doing-project,
.board-doing div:last-child .board-doing-execution {padding: 10px;}
.doing-project .table-row .table-col:last-child, .c-progress {width: 30px;}
.doing-execution .table-row .table-col:last-child, .c-progress {width: 30px;}
.board-doing-project .table-row .table-col:last-child, .c-progress {width: 30px;}
.board-doing-execution .table-row .table-col:last-child, .c-progress {width: 30px;}
.table-row .table-col:first-child {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
table th, td {border: 2px solid #fff !important;}
td.doing {padding: 0px !important;}
#kanban {padding-bottom: 10px}
+13
View File
@@ -131,6 +131,19 @@ $lang->project->moreProject = 'More Project';
$lang->project->days = 'Available Days';
$lang->project->etc = " , etc";
/* Project Kanban. */
$lang->project->typeList = array();
$lang->project->typeList['my'] = 'Projects Ownedbyme';
$lang->project->typeList['other'] = 'Other Projects';
$lang->project->waitProjects = 'Waiting Projects';
$lang->project->doingProjects = 'Ongoing Projects';
$lang->project->doingExecutions = 'Ongoing Executions';
$lang->project->closedProjects = 'Closed Projects';
$lang->project->noProgram = 'Independent Projects';
$lang->project->laneColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#FFC20E', '#00A78E', '#7FBB00', '#424BAC', '#C0E9FF', '#EC2761');
$lang->project->productNotEmpty = 'Please link products or create products.';
$lang->project->existProductName = 'Product name already exists.';
$lang->project->changeProgram = '%s > Change project';
+1
View File
@@ -134,6 +134,7 @@ $lang->project->moreProject = '更多项目';
$lang->project->days = '可用工作日';
$lang->project->etc = "等";
/* Project Kanban. */
$lang->project->typeList = array();
$lang->project->typeList['my'] = '我负责的项目';
$lang->project->typeList['other'] = '其他项目';
+46 -32
View File
@@ -27,7 +27,7 @@
<table class='table no-margin' style='background-color: #efefef;'>
<thead class='text-center'>
<tr>
<th rowspan='2' style="background: #32C5FF; border-bottom: unset !important" class='w-20px'></th>
<th rowspan='2' style="border-right: unset !important" class='w-20px'></th>
<th rowspan='2' style="border-left: unset !important"><?php echo $lang->project->waitProjects;?></th>
<th colspan='2'><?php echo $lang->project->statusList['doing'];?></th>
<th rowspan='2'><?php echo $lang->project->closedProjects;?></th>
@@ -43,50 +43,64 @@
<td class='text-center' style='background: <?php echo $lang->project->laneColorList[$colorIndex];?>; color: #fff; padding-left: 2px; writing-mode: vertical-lr;'><?php echo zget($programPairs, $programID);?></td>
<?php foreach(array('wait','doing','closed') as $status):?>
<?php if($status == 'doing'):?>
<td class='doing'>
<td colspan='2' class='board-doing'>
<?php if(isset($statusList[$status])):?>
<?php foreach($statusList[$status] as $project):?>
<div class='doing-project'>
<div class='board-item' <?php echo "style='border-left: 3px solid " . (isset($project->delay) ? 'red' : "#0BD986") . "'";?>>
<div class='table-row'>
<div class='table-col'>
<span><?php echo $project->name;?></span>
</div>
<div class='table-col'>
<div class="c-progress">
<div class='progress-pie' data-doughnut-size='90' data-color='#3CB371' data-value='<?php echo round($project->hours->progress);?>' data-width='24' data-height='24' data-back-color='#e8edf3'>
<div class='progress-info'><?php echo round($project->hours->progress);?></div>
<div class='table-row'>
<div class='table-col board-doing-project'>
<div class='board-item' <?php echo "style='border-left: 3px solid " . (isset($project->delay) ? 'red' : "#0BD986") . "'";?>>
<div class='table-row'>
<div class='table-col'>
<?php
if(common::hasPriv('project', 'index'))
{
echo html::a($this->createLink('project', 'index', "projectID=$project->id"), $project->name, '', "title='{$project->name}'");
}
else
{
echo "<span title='{$project->name}'>{$project->name}</span>";
}
?>
</div>
<div class='table-col'>
<div class="c-progress">
<div class='progress-pie' data-doughnut-size='90' data-color='#3CB371' data-value='<?php echo round($project->hours->progress);?>' data-width='24' data-height='24' data-back-color='#e8edf3'>
<div class='progress-info'><?php echo round($project->hours->progress);?></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php endforeach;?>
<?php endif;?>
</td>
<td class='doing'>
<?php if(isset($statusList[$status])):?>
<?php foreach($statusList[$status] as $project):?>
<?php if(isset($latestExecutions[$project->id])):?>
<?php $execution = $latestExecutions[$project->id];?>
<div class='doing-execution'>
<div class='board-item' <?php echo "style='border-left: 3px solid " . (isset($execution->delay) ? 'red' : "#0BD986") . "'";?>>
<div class='table-row'>
<div class='table-col'>
<span><?php echo empty($execution) ? '' : $execution->name;?></span>
</div>
<div class='table-col'>
<div class="c-progress">
<div class='progress-pie' data-doughnut-size='90' data-color='#3CB371' data-value='<?php echo round($execution->hours->progress);?>' data-width='24' data-height='24' data-back-color='#e8edf3'>
<div class='progress-info'><?php echo round($execution->hours->progress);?></div>
<div class='table-col board-doing-execution'>
<?php if(isset($latestExecutions[$project->id])):?>
<?php $execution = $latestExecutions[$project->id];?>
<div class='board-item' <?php echo "style='border-left: 3px solid " . (isset($execution->delay) ? 'red' : "#0BD986") . "'";?>>
<div class='table-row'>
<div class='table-col'>
<?php
if(common::hasPriv('execution', 'task'))
{
echo html::a($this->createLink('execution', 'task', "executionID=$execution->id"), $execution->name, '', "title='{$execution->name}'");
}
else
{
echo "<span title='{$execution->name}'>{$execution->name}</span>";
}
?>
</div>
<div class='table-col'>
<div class="c-progress">
<div class='progress-pie' data-doughnut-size='90' data-color='#3CB371' data-value='<?php echo round($execution->hours->progress);?>' data-width='24' data-height='24' data-back-color='#e8edf3'>
<div class='progress-info'><?php echo round($execution->hours->progress);?></div>
</div>
</div>
</div>
</div>
</div>
<?php endif;?>
</div>
</div>
<?php endif;?>
<?php endforeach;?>
<?php endif;?>
</td>