Merge branch 'master' into sprint/biz17

This commit is contained in:
qixinzhi
2023-03-06 09:04:52 +08:00
353 changed files with 9864 additions and 2480 deletions
+2 -3
View File
@@ -17,7 +17,6 @@ function changeParams(obj)
for(i=0 ; i < endarray.length ; i++) end = end + endarray[i];
}
var params = window.btoa('begin=' + begin + '&end=' + end + '&product=' + product + '&execution=' + execution);
var link = createLink('report', 'preview', 'dimension=' + dimension + '&group=' + group + '&module=report&method=bugcreate&params=' + params);
location.href = link;
link = createLink('report', 'bugcreate', 'begin=' + begin + '&end=' + end + '&product=' + product + '&execution=' + execution);
location.href=link;
}
+1 -4
View File
@@ -6,8 +6,5 @@ $('#conditions input:checkbox').change(function()
if($(this).prop('checked')) conditions += $(this).val() + ',';
})
conditions = conditions.substring(0, conditions.length - 1);
var params = window.btoa('conditions=' + conditions);
var link = createLink('report', 'preview', 'dimension=' + dimension + '&group=' + group + '&module=report&method=productSummary&params=' + params);
location.href = link;
location.href = createLink('report', 'productSummary', 'conditions=' + conditions);
})
+2 -4
View File
@@ -29,8 +29,6 @@ function changeDate(begin, end)
end = end + endarray[i];
}
}
var params = window.btoa('begin=' + begin + '&end=' + end);
var link = createLink('report', 'preview', 'dimension=' + dimension + '&group=' + group + '&module=report&method=projectdeviation&params=' + params);
location.href = link;
link = createLink('report', 'projectdeviation', 'begin=' + begin + '&end=' + end);
location.href=link;
}
+1 -2
View File
@@ -22,8 +22,7 @@ function changeParams(obj)
for(i = 0 ; i < endarray.length ; i++) end = end + endarray[i];
}
var params = window.btoa('begin=' + begin + '&end=' + end + '&days=' + days + '&workday=' + workday + '&dept=' + dept + '&assign=' + assign);
var link = createLink('report', 'preview', 'dimension=' + dimension + '&group=' + group + '&module=report&method=workload&params=' + params);
var link = createLink('report', 'workload', 'begin=' + begin + '&end=' + end + '&days=' + days + '&workday=' + workday + '&dept=' + dept + '&assign=' + assign);
location.href = link;
}
+56 -50
View File
@@ -1,56 +1,62 @@
<?php include '../../common/view/header.html.php';?>
<?php if($this->config->edition != 'open'):?>
<style>#mainContent > .side-col.col-lg{width: 235px}</style>
<style>.hide-sidebar #sidebar{width: 0 !important}</style>
<?php endif;?>
<?php if(empty($assigns)):?>
<div class="cell">
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->error->noData;?></span></p>
<div id='mainContent' class='main-row'>
<div class='side-col col-lg' id='sidebar'>
<?php include 'blockreportlist.html.php';?>
</div>
<div class='main-col'>
<?php if(empty($assigns)):?>
<div class="cell">
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->error->noData;?></span></p>
</div>
<?php else:?>
<div class='cell'>
<div class='panel'>
<div class="panel-heading">
<div class="panel-title"><?php echo $title;?></div>
<nav class="panel-actions btn-toolbar"></nav>
</div>
<div data-ride='table'>
<table class='table table-condensed table-striped table-bordered table-fixed no-margin' id='bugAssign'>
<thead>
<tr class='colhead text-center'>
<th><?php echo $lang->report->user;?></th>
<th><?php echo $lang->report->product;?></th>
<th><?php echo $lang->report->bugTotal;?></th>
<th><?php echo $lang->report->total;?></th>
</tr>
</thead>
<tbody>
<?php foreach($assigns as $account => $assign):?>
<?php if(!array_key_exists($account, $users)) continue;?>
<tr class="a-center text-center">
<td rowspan="<?php echo count($assign['bug']);?>"><?php echo $users[$account];?></td>
<?php $id = 1;?>
<?php foreach($assign['bug'] as $product => $count):?>
<?php if($id != 1) echo '<tr class="a-center text-center">';?>
<td>
<?php $viewLink = empty($count['projectID']) ? $this->createLink('product', 'view', "product={$count['productID']}") : $this->createLink('project', 'view', "projectID={$count['projectID']}");?>
<?php echo html::a($viewLink, $product);?>
</td>
<td><?php echo $count['count'];?></td>
<?php if($id == 1):?>
<td rowspan="<?php echo count($assign['bug']);?>">
<?php echo $assign['total']['count'];?>
</td>
<?php endif;?>
<?php if($id != 1) echo '</tr>'; $id ++;?>
<?php endforeach;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
</div>
<?php endif;?>
</div>
</div>
<?php else:?>
<div class='cell'>
<div class='panel'>
<div class="panel-heading">
<div class="panel-title"><?php echo $title;?></div>
<nav class="panel-actions btn-toolbar"></nav>
</div>
<div data-ride='table'>
<table class='table table-condensed table-striped table-bordered table-fixed no-margin' id='bugAssign'>
<thead>
<tr class='colhead text-center'>
<th><?php echo $lang->report->user;?></th>
<th><?php echo $lang->report->product;?></th>
<th><?php echo $lang->report->bugTotal;?></th>
<th><?php echo $lang->report->total;?></th>
</tr>
</thead>
<tbody>
<?php foreach($assigns as $account => $assign):?>
<?php if(!array_key_exists($account, $users)) continue;?>
<tr class="a-center text-center">
<td rowspan="<?php echo count($assign['bug']);?>"><?php echo $users[$account];?></td>
<?php $id = 1;?>
<?php foreach($assign['bug'] as $product => $count):?>
<?php if($id != 1) echo '<tr class="a-center text-center">';?>
<td>
<?php $viewLink = empty($count['projectID']) ? $this->createLink('product', 'view', "product={$count['productID']}") : $this->createLink('project', 'view', "projectID={$count['projectID']}");?>
<?php echo html::a($viewLink, $product);?>
</td>
<td><?php echo $count['count'];?></td>
<?php if($id == 1):?>
<td rowspan="<?php echo count($assign['bug']);?>">
<?php echo $assign['total']['count'];?>
</td>
<?php endif;?>
<?php if($id != 1) echo '</tr>'; $id ++;?>
<?php endforeach;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
</div>
</div>
<script><?php helper::import('../js/bugassign.js');?></script>
<?php endif;?>
<?php include '../../common/view/footer.html.php';?>
+83 -78
View File
@@ -1,80 +1,85 @@
<style>
<?php helper::import('../css/bugcreate.css');?>
<?php if($this->config->edition != 'open'):?>
#mainContent > .side-col.col-lg{width: 235px}
.hide-sidebar #sidebar{width: 0 !important}
<?php endif;?>
</style>
<?php if(empty($bugs)):?>
<div class="cell">
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->error->noData;?></span></p>
</div>
</div>
<?php else:?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<div class='cell'>
<div class="row" id='conditions'>
<div class='col-sm-4'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->report->bugOpenedDate;?></span>
<div class='datepicker-wrapper datepicker-date'><?php echo html::input('begin', $begin, "class='form-control form-date' onchange='changeParams(this)'");?></div>
<span class='input-group-addon'><?php echo $lang->report->to;?></span>
<div class='datepicker-wrapper datepicker-date'><?php echo html::input('end', $end, "class='form-control form-date' onchange='changeParams(this)'");?></div>
</div>
</div>
<div class='col-sm-4'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->report->product;?></span>
<?php echo html::select('product', $products, $product, "class='form-control chosen' onchange='changeParams(this)'");?>
</div>
</div>
<div class='col-sm-4'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->execution->common;?></span>
<?php echo html::select('execution', $executions, $execution, "class='form-control chosen' onchange='changeParams(this)'");?>
</div>
</div>
</div>
</div>
<div class='cell'>
<div class='panel'>
<div class="panel-heading">
<div class="panel-title"><?php echo $title;?></div>
<nav class="panel-actions btn-toolbar"></nav>
</div>
<div data-ride='table'>
<table class='table table-condensed table-striped table-bordered table-fixed no-margin' id="bug">
<thead>
<tr class='colhead text-center'>
<th><?php echo $lang->bug->openedBy;?></th>
<th><?php echo $lang->bug->unResolved;?></th>
<?php foreach($lang->bug->resolutionList as $resolutionType => $resolution):?>
<?php if(empty($resolutionType)) continue;?>
<th><?php echo $resolution;?></th>
<?php endforeach;?>
<th title='<?php echo $lang->report->validRateTips;?>'><?php echo $lang->report->validRate;?></th>
<th><?php echo $lang->report->total;?></th>
</tr>
</thead>
<tbody>
<?php foreach($bugs as $user => $bug):?>
<?php if(!isset($users[$user])) continue;?>
<tr class="text-center">
<td><?php echo $users[$user];?></td>
<td><?php echo isset($bug['']) ? $bug[''] : 0;?></td>
<?php foreach($lang->bug->resolutionList as $resolutionType => $resolution):?>
<?php if(empty($resolutionType)) continue;?>
<td><?php echo isset($bug[$resolutionType]) ? $bug[$resolutionType] : 0;?></td>
<?php endforeach;?>
<td title='<?php echo $lang->report->validRateTips;?>'><?php echo round($bug['validRate'] * 100, 2) . '%';?></td>
<td><?php echo $bug['all'];?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
</div>
</div>
<script><?php helper::import('../js/bugcreate.js');?></script>
<?php if($this->config->edition != 'open'):?>
<style>#mainContent > .side-col.col-lg{width: 235px}</style>
<style>.hide-sidebar #sidebar{width: 0 !important}</style>
<?php endif;?>
<div id='mainContent' class='main-row'>
<div class='side-col col-lg' id='sidebar'>
<?php include 'blockreportlist.html.php';?>
</div>
<div class='main-col'>
<div class='cell'>
<div class="row" id='conditions'>
<div class='col-sm-4'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->report->bugOpenedDate;?></span>
<div class='datepicker-wrapper datepicker-date'><?php echo html::input('begin', $begin, "class='form-control form-date' onchange='changeParams(this)'");?></div>
<span class='input-group-addon'><?php echo $lang->report->to;?></span>
<div class='datepicker-wrapper datepicker-date'><?php echo html::input('end', $end, "class='form-control form-date' onchange='changeParams(this)'");?></div>
</div>
</div>
<div class='col-sm-4'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->report->product;?></span>
<?php echo html::select('product', $products, $product, "class='form-control chosen' onchange='changeParams(this)'");?>
</div>
</div>
<div class='col-sm-4'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->execution->common;?></span>
<?php echo html::select('execution', $executions, $execution, "class='form-control chosen' onchange='changeParams(this)'");?>
</div>
</div>
</div>
</div>
<?php if(empty($bugs)):?>
<div class="cell">
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->error->noData;?></span></p>
</div>
</div>
<?php else:?>
<div class='cell'>
<div class='panel'>
<div class="panel-heading">
<div class="panel-title"><?php echo $title;?></div>
<nav class="panel-actions btn-toolbar"></nav>
</div>
<div data-ride='table'>
<table class='table table-condensed table-striped table-bordered table-fixed no-margin' id="bug">
<thead>
<tr class='colhead text-center'>
<th><?php echo $lang->bug->openedBy;?></th>
<th><?php echo $lang->bug->unResolved;?></th>
<?php foreach($lang->bug->resolutionList as $resolutionType => $resolution):?>
<?php if(empty($resolutionType)) continue;?>
<th><?php echo $resolution;?></th>
<?php endforeach;?>
<th title='<?php echo $lang->report->validRateTips;?>'><?php echo $lang->report->validRate;?></th>
<th><?php echo $lang->report->total;?></th>
</tr>
</thead>
<tbody>
<?php foreach($bugs as $user => $bug):?>
<?php if(!isset($users[$user])) continue;?>
<tr class="text-center">
<td><?php echo $users[$user];?></td>
<td><?php echo isset($bug['']) ? $bug[''] : 0;?></td>
<?php foreach($lang->bug->resolutionList as $resolutionType => $resolution):?>
<?php if(empty($resolutionType)) continue;?>
<td><?php echo isset($bug[$resolutionType]) ? $bug[$resolutionType] : 0;?></td>
<?php endforeach;?>
<td title='<?php echo $lang->report->validRateTips;?>'><?php echo round($bug['validRate'] * 100, 2) . '%';?></td>
<td><?php echo $bug['all'];?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
</div>
</div>
<?php endif;?>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+102 -97
View File
@@ -1,109 +1,114 @@
<style>
<?php helper::import('../css/productsummary.css');?>
<?php include '../../common/view/header.html.php';?>
<?php if(common::checkNotCN()):?>
#conditions .col-xs { width: 126px; }
<style>#conditions .col-xs { width: 126px; }</style>
<?php endif;?>
<?php if($this->config->edition != 'open'):?>
#mainContent > .side-col.col-lg{width: 235px}
.hide-sidebar #sidebar{width: 0 !important}
<style>#mainContent > .side-col.col-lg{width: 235px}</style>
<style>.hide-sidebar #sidebar{width: 0 !important}</style>
<?php endif;?>
</style>
<?php if(empty($products)):?>
<div class="cell">
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->error->noData;?></span></p>
<div id='mainContent' class='main-row'>
<div class='side-col col-lg' id='sidebar'>
<?php include 'blockreportlist.html.php';?>
</div>
</div>
<?php else:?>
<div class='cell'>
<div class='panel'>
<div class="panel-heading">
<div class="panel-title">
<div id='conditions'>
<div><?php echo $title;?></div>
<div class='condition-options'>
<div class="checkbox-primary inline-block">
<input type="checkbox" name="closedProduct" value="closedProduct" id="closedProduct" <?php if(strpos($conditions, 'closedProduct') !== false) echo "checked='checked'"?> />
<label for="closedProduct"><?php echo $lang->report->closedProduct?></label>
</div>
<div class="checkbox-primary inline-block">
<input type="checkbox" name="overduePlan" value="overduePlan" id="overduePlan" <?php if(strpos($conditions, 'overduePlan') !== false) echo "checked='checked'"?> />
<label for="overduePlan"><?php echo $lang->report->overduePlan?></label>
<div class='main-col'>
<?php if(empty($products)):?>
<div class="cell">
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->error->noData;?></span></p>
</div>
</div>
<?php else:?>
<div class='cell'>
<div class='panel'>
<div class="panel-heading">
<div class="panel-title">
<div id='conditions'>
<div><?php echo $title;?></div>
<div class='condition-options'>
<div class="checkbox-primary inline-block">
<input type="checkbox" name="closedProduct" value="closedProduct" id="closedProduct" <?php if(strpos($conditions, 'closedProduct') !== false) echo "checked='checked'"?> />
<label for="closedProduct"><?php echo $lang->report->closedProduct?></label>
</div>
<div class="checkbox-primary inline-block">
<input type="checkbox" name="overduePlan" value="overduePlan" id="overduePlan" <?php if(strpos($conditions, 'overduePlan') !== false) echo "checked='checked'"?> />
<label for="overduePlan"><?php echo $lang->report->overduePlan?></label>
</div>
</div>
</div>
</div>
<nav class="panel-actions btn-toolbar"></nav>
</div>
<div data-ride='table'>
<table class='table table-condensed table-striped table-bordered table-fixed no-margin' id='productList'>
<thead>
<tr>
<th><?php echo $lang->product->name;?></th>
<th class='c-user'><?php echo $lang->report->PO;?></th>
<th><?php echo $lang->productplan->common;?></th>
<th class="c-date"><?php echo $lang->productplan->begin;?></th>
<th class="c-date"><?php echo $lang->productplan->end;?></th>
<th class="c-count"><?php echo $lang->story->statusList['draft'];?></th>
<th class="c-count"><?php echo $lang->story->statusList['reviewing'];?></th>
<th class="c-count"><?php echo $lang->story->statusList['active'];?></th>
<th class="c-count"><?php echo $lang->story->statusList['changing'];?></th>
<th class="c-count"><?php echo $lang->story->statusList['closed'];?></th>
<th class="c-count"><?php echo $lang->report->total;?></th>
</tr>
</thead>
<tbody>
<?php $color = false;?>
<?php foreach($products as $product):?>
<tr class="text-center">
<?php $count = isset($product->plans) ? count($product->plans) : 1;?>
<td class='c-name text-left' title="<?php echo $product->name;?>" rowspan="<?php echo $count;?>"><?php echo "<p>" . html::a($this->createLink('product', 'view', "product=$product->id"), $product->name) . "</p>";?></td>
<td class='text-left' rowspan="<?php echo $count;?>"><?php echo "<p>" . zget($users, $product->PO) . '</p>';?></td>
<?php if(isset($product->plans)):?>
<?php $id = 1;?>
<?php foreach($product->plans as $plan):?>
<?php $class = $color ? 'rowcolor' : '';?>
<?php if($id != 1) echo "<tr class='text-center'>"?>
<?php $child = (isset($plan->parent) and $plan->parent > 0 and isset($product->plans[$plan->parent])) ? ' child' : '';?>
<td align='left' class="text-left <?php echo $class . $child;?>" title="<?php echo $plan->title;?>"><?php echo $plan->title;?></td>
<td class="<?php echo $class;?>"><?php echo $plan->begin == '2030-01-01' ? $lang->productplan->future : $plan->begin;?></td>
<td class="<?php echo $class;?>"><?php echo $plan->end == '2030-01-01' ? $lang->productplan->future : $plan->end;?></td>
<?php
$draftCount = isset($plan->status['draft']) ? $plan->status['draft'] : 0;
$reviewingCount = isset($plan->status['reviewing']) ? $plan->status['reviewing'] : 0;
$activeCount = isset($plan->status['active']) ? $plan->status['active'] : 0;
$changedCount = isset($plan->status['changing']) ? $plan->status['changing'] : 0;
$closedCount = isset($plan->status['closed']) ? $plan->status['closed'] : 0;
?>
<td class="<?php echo $class;?>"><?php echo $draftCount;?></td>
<td class="<?php echo $class;?>"><?php echo $reviewingCount;?></td>
<td class="<?php echo $class;?>"><?php echo $activeCount;?></td>
<td class="<?php echo $class;?>"><?php echo $changedCount;?></td>
<td class="<?php echo $class;?>"><?php echo $closedCount;?></td>
<td class="<?php echo $class;?>"><?php echo $draftCount + $reviewingCount + $activeCount + $changedCount + $closedCount;?></td>
<?php if($id != 1) echo "</tr>"?>
<?php $id ++;?>
<?php $color = !$color;?>
<?php endforeach;?>
<?php else:?>
<?php $class = $color ? 'rowcolor' : '';?>
<td class="<?php echo $class;?>"></td>
<td class="<?php echo $class;?>"></td>
<td class="<?php echo $class;?>"></td>
<td class="<?php echo $class;?>">0</td>
<td class="<?php echo $class;?>">0</td>
<td class="<?php echo $class;?>">0</td>
<td class="<?php echo $class;?>">0</td>
<td class="<?php echo $class;?>">0</td>
<td class="<?php echo $class;?>">0</td>
<?php $color = !$color;?>
<?php endif;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
</div>
<nav class="panel-actions btn-toolbar"></nav>
</div>
<div data-ride='table'>
<table class='table table-condensed table-striped table-bordered table-fixed no-margin' id='productList'>
<thead>
<tr>
<th><?php echo $lang->product->name;?></th>
<th class='c-user'><?php echo $lang->report->PO;?></th>
<th><?php echo $lang->productplan->common;?></th>
<th class="c-date"><?php echo $lang->productplan->begin;?></th>
<th class="c-date"><?php echo $lang->productplan->end;?></th>
<th class="c-count"><?php echo $lang->story->statusList['draft'];?></th>
<th class="c-count"><?php echo $lang->story->statusList['reviewing'];?></th>
<th class="c-count"><?php echo $lang->story->statusList['active'];?></th>
<th class="c-count"><?php echo $lang->story->statusList['changing'];?></th>
<th class="c-count"><?php echo $lang->story->statusList['closed'];?></th>
<th class="c-count"><?php echo $lang->report->total;?></th>
</tr>
</thead>
<tbody>
<?php $color = false;?>
<?php foreach($products as $product):?>
<tr class="text-center">
<?php $count = isset($product->plans) ? count($product->plans) : 1;?>
<td class='c-name text-left' title="<?php echo $product->name;?>" rowspan="<?php echo $count;?>"><?php echo "<p>" . html::a($this->createLink('product', 'view', "product=$product->id"), $product->name) . "</p>";?></td>
<td class='text-left' rowspan="<?php echo $count;?>"><?php echo "<p>" . zget($users, $product->PO) . '</p>';?></td>
<?php if(isset($product->plans)):?>
<?php $id = 1;?>
<?php foreach($product->plans as $plan):?>
<?php $class = $color ? 'rowcolor' : '';?>
<?php if($id != 1) echo "<tr class='text-center'>"?>
<?php $child = (isset($plan->parent) and $plan->parent > 0 and isset($product->plans[$plan->parent])) ? ' child' : '';?>
<td align='left' class="text-left <?php echo $class . $child;?>" title="<?php echo $plan->title;?>"><?php echo $plan->title;?></td>
<td class="<?php echo $class;?>"><?php echo $plan->begin == '2030-01-01' ? $lang->productplan->future : $plan->begin;?></td>
<td class="<?php echo $class;?>"><?php echo $plan->end == '2030-01-01' ? $lang->productplan->future : $plan->end;?></td>
<?php
$draftCount = isset($plan->status['draft']) ? $plan->status['draft'] : 0;
$reviewingCount = isset($plan->status['reviewing']) ? $plan->status['reviewing'] : 0;
$activeCount = isset($plan->status['active']) ? $plan->status['active'] : 0;
$changedCount = isset($plan->status['changing']) ? $plan->status['changing'] : 0;
$closedCount = isset($plan->status['closed']) ? $plan->status['closed'] : 0;
?>
<td class="<?php echo $class;?>"><?php echo $draftCount;?></td>
<td class="<?php echo $class;?>"><?php echo $reviewingCount;?></td>
<td class="<?php echo $class;?>"><?php echo $activeCount;?></td>
<td class="<?php echo $class;?>"><?php echo $changedCount;?></td>
<td class="<?php echo $class;?>"><?php echo $closedCount;?></td>
<td class="<?php echo $class;?>"><?php echo $draftCount + $reviewingCount + $activeCount + $changedCount + $closedCount;?></td>
<?php if($id != 1) echo "</tr>"?>
<?php $id ++;?>
<?php $color = !$color;?>
<?php endforeach;?>
<?php else:?>
<?php $class = $color ? 'rowcolor' : '';?>
<td class="<?php echo $class;?>"></td>
<td class="<?php echo $class;?>"></td>
<td class="<?php echo $class;?>"></td>
<td class="<?php echo $class;?>">0</td>
<td class="<?php echo $class;?>">0</td>
<td class="<?php echo $class;?>">0</td>
<td class="<?php echo $class;?>">0</td>
<td class="<?php echo $class;?>">0</td>
<td class="<?php echo $class;?>">0</td>
<?php $color = !$color;?>
<?php endif;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<?php endif;?>
</div>
</div>
<script><?php helper::import('../js/productsummary.js');?></script>
<?php endif;?>
<?php include '../../common/view/footer.html.php';?>
+157 -155
View File
@@ -1,160 +1,163 @@
<style>
<?php helper::import('../css/projectdeviation.css');?>
<?php if($this->config->edition != 'open'):?>
#mainContent > .side-col.col-lg{width: 235px}
.hide-sidebar #sidebar{width: 0 !important}
<?php endif;?>
</style>
<?php if(empty($executions)):?>
<div class="cell">
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->error->noData;?></span></p>
</div>
</div>
<?php else:?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php include '../../common/view/chart.html.php';?>
<?php $chartData = array('labels' => array(), 'data' => array());?>
<div class='cell'>
<div class="row" id='conditions'>
<div class='w-220px col-md-3 col-sm-6'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->report->execution . $lang->report->begin;?></span>
<div class='datepicker-wrapper datepicker-date'><?php echo html::input('date', $begin, "class='form-control form-date' onchange='changeDate(this.value, \"$end\")'");?></div>
</div>
</div>
<div class='w-220px col-md-3 col-sm-6'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->report->execution . $lang->report->end;?></span>
<div class='datepicker-wrapper datepicker-date'><?php echo html::input('date', $end, "class='form-control form-date' onchange='changeDate(\"$begin\", this.value)'");?></div>
</div>
</div>
</div>
</div>
<div class='cell'>
<div class='panel'>
<div class="panel-heading">
<div class="panel-title">
<?php echo $title;?>
<i class="icon icon-exclamation-sign icon-rotate-180"></i>
<span class="hidden" id="desc"><?php echo $lang->report->deviationDesc;?></span>
</div>
<nav class="panel-actions btn-toolbar"></nav>
</div>
<div data-ride='table'>
<table class='table table-condensed table-striped table-bordered table-fixed no-margin' id='executionList'>
<thead>
<tr class='colhead'>
<th class='c-id'><?php echo $lang->report->id;?></th>
<th><?php echo $lang->report->project;?></th>
<th><?php echo $lang->report->execution;?></th>
<th class="c-hours"><?php echo $lang->report->estimate;?></th>
<th class="c-hours"><?php echo $lang->report->consumed;?></th>
<th class="c-deviation"><?php echo $lang->report->deviation;?></th>
<th class="c-deviation-rate"><?php echo $lang->report->deviationRate;?></th>
</tr>
</thead>
<tbody>
<?php foreach($executions as $id => $execution):?>
<tr class="text-center">
<td><?php echo $id;?></td>
<td class="text-left" title="<?php echo $execution->projectName;?>">
<?php echo $execution->name ? $execution->projectName : html::a($this->createLink('project', 'index', "projectID=$execution->projectID"), $execution->projectName);?>
</td>
<td class="text-left" title="<?php echo $execution->name;?>">
<?php if($execution->multiple):?>
<?php echo $execution->name ? html::a($this->createLink('execution', 'view', "executionID=$id"), $execution->name) : '';?>
<?php else:?>
<?php echo $lang->null;?>
<?php endif;?>
</td>
<td><?php echo round($execution->estimate, 2);?></td>
<td><?php echo round($execution->consumed, 2);?></td>
<?php $deviation = round($execution->consumed - $execution->estimate, 2);?>
<td class="deviation">
<?php
if($deviation > 0)
{
echo '<span class="up">&uarr;</span>' . $deviation;
}
else if($deviation < 0)
{
echo '<span class="down">&darr;</span>' . abs($deviation);
}
else
{
echo '<span class="zero">0</span>';
}
?>
</td>
<td class="deviation">
<?php
$num = $execution->estimate ? round($deviation / $execution->estimate * 100, 2) : 'n/a';
if($num >= 50)
{
echo '<span class="u50">' . $num . '%</span>';
}
elseif($num >= 30)
{
echo '<span class="u30">' . $num . '%</span>';
}
elseif($num >= 10)
{
echo '<span class="u10">' . $num . '%</span>';
}
elseif($num > 0)
{
echo '<span class="u0">' . abs($num) . '%</span>';
}
elseif($num <= -20)
{
echo '<span class="d20">' . abs($num) . '%</span>';
}
elseif($num < 0)
{
echo '<span class="d0">' . abs($num) . '%</span>';
}
elseif($num == 'n/a')
{
echo '<span class="zero">' . $num . '</span>';
}
else
{
echo '<span class="zero">' . abs($num) . '%</span>';
}
$chartData['labels'][] = $execution->name;
$chartData['data'][] = $deviation;
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
</div>
</div>
<?php if(!empty($chartData)):?>
<div class="cell">
<?php
if(count($chartData['labels']) > 30)
{
$chartData['labels'] = array_slice($chartData['labels'], 0, 30);
$chartData['data'] = array_slice($chartData['data'], 0, 30);
}
?>
<div class='panel'>
<div class='panel-heading'>
<div class='panel-title'><?php echo $lang->report->deviationChart?></div>
</div>
<div class='panel-body'>
<canvas id='deviationChart' width='800' height='300' data-bezier-curve='false' data-responsive='true'></canvas>
</div>
</div>
</div>
<?php if($this->config->edition != 'open'):?>
<style>#mainContent > .side-col.col-lg{width: 235px}</style>
<style>.hide-sidebar #sidebar{width: 0 !important}</style>
<?php endif;?>
<?php $chartData = array('labels' => array(), 'data' => array());?>
<div id='mainContent' class='main-row'>
<div class='side-col col-lg' id='sidebar'>
<?php include 'blockreportlist.html.php';?>
</div>
<div class='main-col'>
<div class='cell'>
<div class="row" id='conditions'>
<div class='w-220px col-md-3 col-sm-6'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->report->execution . $lang->report->begin;?></span>
<div class='datepicker-wrapper datepicker-date'><?php echo html::input('date', $begin, "class='form-control form-date' onchange='changeDate(this.value, \"$end\")'");?></div>
</div>
</div>
<div class='w-220px col-md-3 col-sm-6'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->report->execution . $lang->report->end;?></span>
<div class='datepicker-wrapper datepicker-date'><?php echo html::input('date', $end, "class='form-control form-date' onchange='changeDate(\"$begin\", this.value)'");?></div>
</div>
</div>
</div>
</div>
<?php if(empty($executions)):?>
<div class="cell">
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->error->noData;?></span></p>
</div>
</div>
<?php else:?>
<div class='cell'>
<div class='panel'>
<div class="panel-heading">
<div class="panel-title">
<?php echo $title;?>
<i class="icon icon-exclamation-sign icon-rotate-180"></i>
<span class="hidden" id="desc"><?php echo $lang->report->deviationDesc;?></span>
</div>
<nav class="panel-actions btn-toolbar"></nav>
</div>
<div data-ride='table'>
<table class='table table-condensed table-striped table-bordered table-fixed no-margin' id='executionList'>
<thead>
<tr class='colhead'>
<th class='c-id'><?php echo $lang->report->id;?></th>
<th><?php echo $lang->report->project;?></th>
<th><?php echo $lang->report->execution;?></th>
<th class="c-hours"><?php echo $lang->report->estimate;?></th>
<th class="c-hours"><?php echo $lang->report->consumed;?></th>
<th class="c-deviation"><?php echo $lang->report->deviation;?></th>
<th class="c-deviation-rate"><?php echo $lang->report->deviationRate;?></th>
</tr>
</thead>
<tbody>
<?php foreach($executions as $id => $execution):?>
<tr class="text-center">
<td><?php echo $id;?></td>
<td class="text-left" title="<?php echo $execution->projectName;?>">
<?php echo $execution->name ? $execution->projectName : html::a($this->createLink('project', 'index', "projectID=$execution->projectID"), $execution->projectName);?>
</td>
<td class="text-left" title="<?php echo $execution->name;?>">
<?php if($execution->multiple):?>
<?php echo $execution->name ? html::a($this->createLink('execution', 'view', "executionID=$id"), $execution->name) : '';?>
<?php else:?>
<?php echo $lang->null;?>
<?php endif;?>
</td>
<td><?php echo round($execution->estimate, 2);?></td>
<td><?php echo round($execution->consumed, 2);?></td>
<?php $deviation = round($execution->consumed - $execution->estimate, 2);?>
<td class="deviation">
<?php
if($deviation > 0)
{
echo '<span class="up">&uarr;</span>' . $deviation;
}
else if($deviation < 0)
{
echo '<span class="down">&darr;</span>' . abs($deviation);
}
else
{
echo '<span class="zero">0</span>';
}
?>
</td>
<td class="deviation">
<?php
$num = $execution->estimate ? round($deviation / $execution->estimate * 100, 2) : 'n/a';
if($num >= 50)
{
echo '<span class="u50">' . $num . '%</span>';
}
elseif($num >= 30)
{
echo '<span class="u30">' . $num . '%</span>';
}
elseif($num >= 10)
{
echo '<span class="u10">' . $num . '%</span>';
}
elseif($num > 0)
{
echo '<span class="u0">' . abs($num) . '%</span>';
}
elseif($num <= -20)
{
echo '<span class="d20">' . abs($num) . '%</span>';
}
elseif($num < 0)
{
echo '<span class="d0">' . abs($num) . '%</span>';
}
elseif($num == 'n/a')
{
echo '<span class="zero">' . $num . '</span>';
}
else
{
echo '<span class="zero">' . abs($num) . '%</span>';
}
$chartData['labels'][] = $execution->name;
$chartData['data'][] = $deviation;
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<?php endif;?>
<?php if(!empty($chartData)):?>
<div class="cell">
<?php
if(count($chartData['labels']) > 30)
{
$chartData['labels'] = array_slice($chartData['labels'], 0, 30);
$chartData['data'] = array_slice($chartData['data'], 0, 30);
}
?>
<div class='panel'>
<div class='panel-heading'>
<div class='panel-title'><?php echo $lang->report->deviationChart?></div>
</div>
<div class='panel-body'>
<canvas id='deviationChart' width='800' height='300' data-bezier-curve='false' data-responsive='true'></canvas>
</div>
</div>
</div>
<?php endif;?>
</div>
</div>
<script>
<?php helper::import('../js/projectdeviation.js');?>
function initChart()
{
var data =
@@ -179,8 +182,7 @@ function initChart()
datasetStroke: true,
scaleShowBeyondLine: false,
tooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>h"
});
}
</script>
<?php endif;?>
<?php include '../../common/view/footer.html.php';?>
+115 -110
View File
@@ -1,122 +1,127 @@
<style>
<?php helper::import('../css/workload.css');?>
<?php if($this->config->edition != 'open'):?>
#mainContent > .side-col.col-lg{width: 210px}
.hide-sidebar #sidebar{width: 0 !important}
<?php endif;?>
</style>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php if($this->config->edition != 'open'):?>
<style>#mainContent > .side-col.col-lg{width: 210px}</style>
<style>.hide-sidebar #sidebar{width: 0 !important}</style>
<?php endif;?>
<?php js::set('weekend', $config->execution->weekend);?>
<div class='cell'>
<form method='post'>
<div class="row" id='conditions'>
<div class='col-sm-2'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->report->dept;?></span>
<?php echo html::select('dept', $depts, $dept, "class='form-control chosen' onchange='changeParams(this)'");?>
</div>
</div>
<div class='col-sm-4'>
<div class='input-group input-group-sm'>
<span class='input-group-addon'><?php echo $lang->report->beginAndEnd;?></span>
<div class='datepicker-wrapper datepicker-date'><?php echo html::input('begin', $begin, "class='form-control' style='padding-right:10px' onchange='changeParams(this)'");?></div>
<span class='input-group-addon fix-border'><?php echo $lang->report->to;?></span>
<div class='datepicker-wrapper datepicker-date'><?php echo html::input('end', $end, "class='form-control' style='padding-right:10px' onchange='changeParams(this)'");?></div>
</div>
</div>
<div class='col-sm-2'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->report->diffDays;?></span>
<?php echo html::input('days', $days, "class='form-control' style='text-align:center'");?>
</div>
</div>
<div class='col-sm-4'>
<div class="row">
<div class="col-sm-5">
<div id='mainContent' class='main-row'>
<div class='side-col col-lg' id='sidebar'>
<?php include 'blockreportlist.html.php';?>
</div>
<div class='main-col'>
<div class='cell'>
<form method='post'>
<div class="row" id='conditions'>
<div class='col-sm-2'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->report->workday;?></span>
<?php echo html::input('workday', $workday, "class='form-control'");?>
<span class='input-group-addon'><?php echo $lang->report->dept;?></span>
<?php echo html::select('dept', $depts, $dept, "class='form-control chosen' onchange='changeParams(this)'");?>
</div>
</div>
<div class="col-sm-4">
<?php echo html::select('assign', $lang->report->assign, $assign, "class='form-control' onchange='changeParams(this)'");?>
<div class='col-sm-4'>
<div class='input-group input-group-sm'>
<span class='input-group-addon'><?php echo $lang->report->beginAndEnd;?></span>
<div class='datepicker-wrapper datepicker-date'><?php echo html::input('begin', $begin, "class='form-control' style='padding-right:10px' onchange='changeParams(this)'");?></div>
<span class='input-group-addon fix-border'><?php echo $lang->report->to;?></span>
<div class='datepicker-wrapper datepicker-date'><?php echo html::input('end', $end, "class='form-control' style='padding-right:10px' onchange='changeParams(this)'");?></div>
</div>
</div>
<div class="col-sm-3">
<?php echo html::submitButton($lang->report->query, '', 'btn btn-primary btn-block');?>
<div class='col-sm-2'>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->report->diffDays;?></span>
<?php echo html::input('days', $days, "class='form-control' style='text-align:center'");?>
</div>
</div>
<div class='col-sm-4'>
<div class="row">
<div class="col-sm-5">
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->report->workday;?></span>
<?php echo html::input('workday', $workday, "class='form-control'");?>
</div>
</div>
<div class="col-sm-4">
<?php echo html::select('assign', $lang->report->assign, $assign, "class='form-control' onchange='changeParams(this)'");?>
</div>
<div class="col-sm-3">
<?php echo html::submitButton($lang->report->query, '', 'btn btn-primary btn-block');?>
</div>
</div>
</div>
</div>
</form>
</div>
<?php if(empty($workload)):?>
<div class="cell">
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->error->noData;?></span></p>
</div>
</div>
<?php else:?>
<div class='cell'>
<div class='panel'>
<div class="panel-heading">
<div class="panel-title"><?php echo $title;?>
<a data-toggle='tooltip' title='<?php echo $lang->report->workloadDesc;?>'><i class='icon-help'></i></a>
</div>
<nav class="panel-actions btn-toolbar"></nav>
</div>
<div data-ride='table'>
<table class='table table-condensed table-striped table-bordered table-fixed no-margin' id="workload">
<thead>
<tr class='colhead text-center'>
<th class="c-user"><?php echo $lang->report->user;?></th>
<th class="c-project"><?php echo $lang->report->project ;?>
<th><?php echo $lang->report->execution;?></th>
<th class="c-count"><?php echo $lang->report->task;?></th>
<th class="c-hours"><?php echo $lang->report->remain;?></th>
<th class="c-count"><?php echo $lang->report->taskTotal;?></th>
<th class="c-hours"><?php echo $lang->report->manhourTotal;?></th>
<th class="c-workload"><?php echo $lang->report->workloadAB;?></th>
</tr>
</thead>
<tbody>
<?php $color = false;?>
<?php foreach($workload as $account => $load):?>
<?php if(!isset($users[$account])) continue;?>
<tr class="text-center">
<?php $userTimes = 1; $userCount = 0;?>
<?php foreach($load['task']['project'] as $projectName => $info) foreach($info['execution'] as $executionName => $executionInfo) $userCount ++;?>
<td class="<?php echo $class;?>" rowspan="<?php echo $userCount;?>"><?php echo $users[$account];?></td>
<?php foreach($load['task']['project'] as $projectName => $info):?>
<?php $projectTimes = 1; $projectCount = 0;?>
<?php foreach($info['execution'] as $executionName => $executionInfo) $projectCount ++ ;?>
<?php foreach($info['execution'] as $executionName => $executionInfo):?>
<?php if($projectTimes != 1 || $userTimes != 1) echo "<tr>";?>
<?php if($projectTimes == 1):?>
<td class="text-center" rowspan="<?php echo $projectCount;?>" title="<?php echo $projectName;?>"><?php echo html::a($this->createLink('project', 'view', "projectID={$info['projectID']}"), $projectName);?></td>
<?php endif;?>
<?php if($executionInfo['multiple']):?>
<td class="text-center" title="<?php echo $executionName;?>"><?php echo html::a($this->createLink('execution', 'view', "executionID={$executionInfo['executionID']}"), $executionName);?></td>
<?php else:?>
<td class='text-center'><?php echo $lang->null;?></td>
<?php endif;?>
<td class="text-center"><?php echo $executionInfo['count'];?></td>
<td class="text-center"><?php echo $executionInfo['manhour'];?></td>
<?php if($userTimes == 1):?>
<td rowspan="<?php echo $userCount;?>"><?php echo $load['total']['count'];?></td>
<td rowspan="<?php echo $userCount;?>"><?php echo $load['total']['manhour'];?></td>
<td rowspan="<?php echo $userCount;?>"><?php echo round($load['total']['manhour'] / $allHour * 100, 2) . '%';?></td>
<?php endif;?>
<?php if($projectTimes != 1 || $userTimes != 1) echo "</tr>";?>
<?php $projectTimes ++; $userTimes ++;?>
<?php $color = !$color;?>
<?php endforeach;?>
<?php endforeach;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
</div>
</div>
</form>
</div>
<?php if(empty($workload)):?>
<div class="cell">
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->error->noData;?></span></p>
<?php endif;?>
</div>
</div>
<?php else:?>
<div class='cell'>
<div class='panel'>
<div class="panel-heading">
<div class="panel-title"><?php echo $title;?>
<a data-toggle='tooltip' title='<?php echo $lang->report->workloadDesc;?>'><i class='icon-help'></i></a>
</div>
<nav class="panel-actions btn-toolbar"></nav>
</div>
<div data-ride='table'>
<table class='table table-condensed table-striped table-bordered table-fixed no-margin' id="workload">
<thead>
<tr class='colhead text-center'>
<th class="c-user"><?php echo $lang->report->user;?></th>
<th class="c-project"><?php echo $lang->report->project ;?>
<th><?php echo $lang->report->execution;?></th>
<th class="c-count"><?php echo $lang->report->task;?></th>
<th class="c-hours"><?php echo $lang->report->remain;?></th>
<th class="c-count"><?php echo $lang->report->taskTotal;?></th>
<th class="c-hours"><?php echo $lang->report->manhourTotal;?></th>
<th class="c-workload"><?php echo $lang->report->workloadAB;?></th>
</tr>
</thead>
<tbody>
<?php $color = false;?>
<?php foreach($workload as $account => $load):?>
<?php if(!isset($users[$account])) continue;?>
<tr class="text-center">
<?php $userTimes = 1; $userCount = 0;?>
<?php foreach($load['task']['project'] as $projectName => $info) foreach($info['execution'] as $executionName => $executionInfo) $userCount ++;?>
<td class="<?php echo $class;?>" rowspan="<?php echo $userCount;?>"><?php echo $users[$account];?></td>
<?php foreach($load['task']['project'] as $projectName => $info):?>
<?php $projectTimes = 1; $projectCount = 0;?>
<?php foreach($info['execution'] as $executionName => $executionInfo) $projectCount ++ ;?>
<?php foreach($info['execution'] as $executionName => $executionInfo):?>
<?php if($projectTimes != 1 || $userTimes != 1) echo "<tr>";?>
<?php if($projectTimes == 1):?>
<td class="text-center" rowspan="<?php echo $projectCount;?>" title="<?php echo $projectName;?>"><?php echo html::a($this->createLink('project', 'view', "projectID={$info['projectID']}"), $projectName);?></td>
<?php endif;?>
<?php if($executionInfo['multiple']):?>
<td class="text-center" title="<?php echo $executionName;?>"><?php echo html::a($this->createLink('execution', 'view', "executionID={$executionInfo['executionID']}"), $executionName);?></td>
<?php else:?>
<td class='text-center'><?php echo $lang->null;?></td>
<?php endif;?>
<td class="text-center"><?php echo $executionInfo['count'];?></td>
<td class="text-center"><?php echo $executionInfo['manhour'];?></td>
<?php if($userTimes == 1):?>
<td rowspan="<?php echo $userCount;?>"><?php echo $load['total']['count'];?></td>
<td rowspan="<?php echo $userCount;?>"><?php echo $load['total']['manhour'];?></td>
<td rowspan="<?php echo $userCount;?>"><?php echo round($load['total']['manhour'] / $allHour * 100, 2) . '%';?></td>
<?php endif;?>
<?php if($projectTimes != 1 || $userTimes != 1) echo "</tr>";?>
<?php $projectTimes ++; $userTimes ++;?>
<?php $color = !$color;?>
<?php endforeach;?>
<?php endforeach;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
</div>
</div>
<script><?php helper::import('../js/workload.js');?></script>
<?php endif;?>
<?php include '../../common/view/footer.html.php';?>