* Display all reports by report-preview function.
This commit is contained in:
@@ -42,7 +42,7 @@ $lang->mainNav->qa = "{$lang->navIcons['qa']} {$lang->qa->common}|qa|inde
|
||||
$lang->mainNav->devops = "{$lang->navIcons['devops']} DevOps|repo|browse|";
|
||||
$lang->mainNav->kanban = "{$lang->navIcons['kanban']} {$lang->kanban->common}|kanban|space|";
|
||||
$lang->mainNav->doc = "{$lang->navIcons['doc']} {$lang->doc->common}|doc|index|";
|
||||
$lang->mainNav->report = "{$lang->navIcons['report']} {$lang->report->common}|report|productSummary|";
|
||||
$lang->mainNav->report = "{$lang->navIcons['report']} {$lang->report->common}|report|preview|";
|
||||
$lang->mainNav->system = "{$lang->navIcons['system']} {$lang->system->common}|my|team|";
|
||||
$lang->mainNav->admin = "{$lang->navIcons['admin']} {$lang->admin->common}|admin|index|";
|
||||
|
||||
@@ -537,17 +537,17 @@ $lang->doc->menu->api['subMenu']->struct = array('link' => "{$lang->doc->apiStru
|
||||
/* Report menu.*/
|
||||
$lang->report->menu = new stdclass();
|
||||
$lang->report->menu->annual = array('link' => "{$lang->report->annual}|report|annualData|year=&dept=&userID=" . (isset($_SESSION['user']) ? zget($_SESSION['user'], 'id', 0) : 0), 'target' => '_blank');
|
||||
$lang->report->menu->pivotTable = array('link' => "{$lang->report->pivotTable}|report|productsummary", 'alias' => 'projectdeviation,bugcreate,workload,bugassign');
|
||||
$lang->report->menu->pivotTable = array('link' => "{$lang->report->pivotTable}|report|preview");
|
||||
|
||||
/* Report menu order. */
|
||||
$lang->report->menuOrder[5] = 'annual';
|
||||
$lang->report->menuOrder[10] = 'pivotTable';
|
||||
|
||||
$lang->report->menu->pivotTable['subMenu'] = new stdclass();
|
||||
$lang->report->menu->pivotTable['subMenu']->product = array('link' => "{$lang->product->common}|report|productsummary");
|
||||
$lang->report->menu->pivotTable['subMenu']->project = array('link' => "{$lang->project->common}|report|projectdeviation");
|
||||
$lang->report->menu->pivotTable['subMenu']->test = array('link' => "{$lang->qa->common}|report|bugcreate", 'alias' => 'bugassign');
|
||||
$lang->report->menu->pivotTable['subMenu']->staff = array('link' => "{$lang->system->common}|report|workload");
|
||||
$lang->report->menu->pivotTable['subMenu'] = new stdclass();
|
||||
$lang->report->menu->pivotTable['subMenu']->product = array('link' => "{$lang->product->common}|report|preview|dimension=&group=product");
|
||||
$lang->report->menu->pivotTable['subMenu']->project = array('link' => "{$lang->project->common}|report|preview|dimension=&group=project");
|
||||
$lang->report->menu->pivotTable['subMenu']->test = array('link' => "{$lang->qa->common}|report|preview|dimension=&group=test");
|
||||
$lang->report->menu->pivotTable['subMenu']->staff = array('link' => "{$lang->system->common}|report|preview|dimension=&group=staff");
|
||||
|
||||
$lang->report->menu->pivotTable['menuOrder'][5] = 'product';
|
||||
$lang->report->menu->pivotTable['menuOrder'][10] = 'project';
|
||||
|
||||
@@ -1685,6 +1685,7 @@ $lang->tree->methodOrder[30] = 'delete';
|
||||
/* Report. */
|
||||
$lang->resource->report = new stdclass();
|
||||
$lang->resource->report->index = 'index';
|
||||
$lang->resource->report->preview = 'preview';
|
||||
$lang->resource->report->projectDeviation = 'projectDeviation';
|
||||
$lang->resource->report->productSummary = 'productSummary';
|
||||
$lang->resource->report->bugCreate = 'bugCreate';
|
||||
@@ -1694,11 +1695,14 @@ $lang->resource->report->annualData = 'annual';
|
||||
$lang->resource->report->allAnnualData = 'viewEveryoneAnnual';
|
||||
|
||||
$lang->report->methodOrder[0] = 'index';
|
||||
$lang->report->methodOrder[5] = 'projectDeviation';
|
||||
$lang->report->methodOrder[10] = 'productSummary';
|
||||
$lang->report->methodOrder[15] = 'bugCreate';
|
||||
$lang->report->methodOrder[20] = 'workload';
|
||||
$lang->report->methodOrder[25] = 'annual';
|
||||
$lang->report->methodOrder[5] = 'preview';
|
||||
$lang->report->methodOrder[10] = 'projectDeviation';
|
||||
$lang->report->methodOrder[15] = 'productSummary';
|
||||
$lang->report->methodOrder[20] = 'bugCreate';
|
||||
$lang->report->methodOrder[25] = 'bugAssign';
|
||||
$lang->report->methodOrder[30] = 'workload';
|
||||
$lang->report->methodOrder[35] = 'annual';
|
||||
$lang->report->methodOrder[40] = 'allAnnualData';
|
||||
|
||||
/* Search. */
|
||||
$lang->resource->search = new stdclass();
|
||||
|
||||
@@ -44,7 +44,24 @@ class report extends control
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->locate(inlink('productSummary'));
|
||||
$this->locate(inlink('preview'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Preview a report.
|
||||
*
|
||||
* @param int $dimension
|
||||
* @param string $group
|
||||
* @param string $module
|
||||
* @param string $method
|
||||
* @param string $params
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function preview($dimension = 0, $group = '', $module = 'report', $method = '', $params = '')
|
||||
{
|
||||
$this->prepare4Preview($dimension, $group, $module, $method, $params);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,7 @@ function changeParams(obj)
|
||||
for(i=0 ; i < endarray.length ; i++) end = end + endarray[i];
|
||||
}
|
||||
|
||||
link = createLink('report', 'bugcreate', 'begin=' + begin + '&end=' + end + '&product=' + product + '&execution=' + execution);
|
||||
location.href=link;
|
||||
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¶ms=' + params);
|
||||
location.href = link;
|
||||
}
|
||||
|
||||
@@ -6,5 +6,8 @@ $('#conditions input:checkbox').change(function()
|
||||
if($(this).prop('checked')) conditions += $(this).val() + ',';
|
||||
})
|
||||
conditions = conditions.substring(0, conditions.length - 1);
|
||||
location.href = createLink('report', 'productSummary', 'conditions=' + conditions);
|
||||
|
||||
var params = window.btoa('conditions=' + conditions);
|
||||
var link = createLink('report', 'preview', 'dimension=' + dimension + '&group=' + group + '&module=report&method=productSummary¶ms=' + params);
|
||||
location.href = link;
|
||||
})
|
||||
|
||||
@@ -29,6 +29,8 @@ function changeDate(begin, end)
|
||||
end = end + endarray[i];
|
||||
}
|
||||
}
|
||||
link = createLink('report', 'projectdeviation', 'begin=' + begin + '&end=' + end);
|
||||
location.href=link;
|
||||
|
||||
var params = window.btoa('begin=' + begin + '&end=' + end);
|
||||
var link = createLink('report', 'preview', 'dimension=' + dimension + '&group=' + group + '&module=report&method=projectdeviation¶ms=' + params);
|
||||
location.href =l ink;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,8 @@ function changeParams(obj)
|
||||
for(i = 0 ; i < endarray.length ; i++) end = end + endarray[i];
|
||||
}
|
||||
|
||||
var link = createLink('report', 'workload', 'begin=' + begin + '&end=' + end + '&days=' + days + '&workday=' + workday + '&dept=' + dept + '&assign=' + assign);
|
||||
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¶ms=' + params);
|
||||
location.href=link;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
$lang->report->index = 'Home';
|
||||
$lang->report->list = 'Liste';
|
||||
$lang->report->preview = 'View Pivot Table';
|
||||
$lang->report->item = 'Eintrag';
|
||||
$lang->report->value = 'Wert';
|
||||
$lang->report->percent = '%';
|
||||
@@ -53,13 +54,13 @@ $lang->report->dept = 'Abteilung';
|
||||
$lang->report->deviationChart = 'Projektabweichungskurve';
|
||||
|
||||
$lang->reportList = new stdclass();
|
||||
$lang->reportList->project = new stdclass();
|
||||
$lang->reportList->product = new stdclass();
|
||||
$lang->reportList->project = new stdclass();
|
||||
$lang->reportList->test = new stdclass();
|
||||
$lang->reportList->staff = new stdclass();
|
||||
|
||||
$lang->reportList->project->lists[10] = "{$lang->execution->common} Abweichnung|report|projectdeviation";
|
||||
$lang->reportList->product->lists[10] = $lang->productCommon . ' Zusammenfassung|report|productsummary';
|
||||
$lang->reportList->project->lists[10] = "{$lang->execution->common} Abweichnung|report|projectdeviation";
|
||||
$lang->reportList->test->lists[10] = 'Bugs gemeldet|report|bugcreate';
|
||||
$lang->reportList->test->lists[13] = 'Bugs zugeordnet|report|bugassign';
|
||||
$lang->reportList->staff->lists[10] = 'Team Arbeitslast|report|workload';
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->report->index = 'Report Home';
|
||||
$lang->report->list = 'Report';
|
||||
$lang->report->list = 'Pivot Table';
|
||||
$lang->report->preview = 'View Pivot Table';
|
||||
$lang->report->item = 'Item';
|
||||
$lang->report->value = 'Value';
|
||||
$lang->report->percent = '%';
|
||||
@@ -53,13 +54,13 @@ $lang->report->dept = 'Department';
|
||||
$lang->report->deviationChart = 'Project Deviation Chart';
|
||||
|
||||
$lang->reportList = new stdclass();
|
||||
$lang->reportList->project = new stdclass();
|
||||
$lang->reportList->product = new stdclass();
|
||||
$lang->reportList->project = new stdclass();
|
||||
$lang->reportList->test = new stdclass();
|
||||
$lang->reportList->staff = new stdclass();
|
||||
|
||||
$lang->reportList->project->lists[10] = "{$lang->execution->common} Deviation|report|projectdeviation";
|
||||
$lang->reportList->product->lists[10] = $lang->productCommon . ' Summary|report|productsummary';
|
||||
$lang->reportList->project->lists[10] = "{$lang->execution->common} Deviation|report|projectdeviation";
|
||||
$lang->reportList->test->lists[10] = 'Bug Reported Summary|report|bugcreate';
|
||||
$lang->reportList->test->lists[13] = 'Bug Assigned Summary|report|bugassign';
|
||||
$lang->reportList->staff->lists[10] = 'Team Workload Summary|report|workload';
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
$lang->report->index = 'Accueil Rapports';
|
||||
$lang->report->list = 'Rapports';
|
||||
$lang->report->preview = 'View Pivot Table';
|
||||
$lang->report->item = 'Item';
|
||||
$lang->report->value = 'Valeur';
|
||||
$lang->report->percent = '%';
|
||||
@@ -53,13 +54,13 @@ $lang->report->dept = 'Compartiment';
|
||||
$lang->report->deviationChart = 'Courbe de déviation du projet';
|
||||
|
||||
$lang->reportList = new stdclass();
|
||||
$lang->reportList->project = new stdclass();
|
||||
$lang->reportList->product = new stdclass();
|
||||
$lang->reportList->project = new stdclass();
|
||||
$lang->reportList->test = new stdclass();
|
||||
$lang->reportList->staff = new stdclass();
|
||||
|
||||
$lang->reportList->project->lists[10] = "Dérv {$lang->execution->common}|report|projectdeviation";
|
||||
$lang->reportList->product->lists[10] = 'Résumé ' . $lang->productCommon . '|report|productsummary';
|
||||
$lang->reportList->project->lists[10] = "Dérv {$lang->execution->common}|report|projectdeviation";
|
||||
$lang->reportList->test->lists[10] = 'Résumé remontée Bugs|report|bugcreate';
|
||||
$lang->reportList->test->lists[13] = 'Résumé affectation Bugs|report|bugassign';
|
||||
$lang->reportList->staff->lists[10] = 'Résumé charge travail|report|workload';
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
$lang->report->index = 'Trang báo cáo';
|
||||
$lang->report->list = 'Báo cáo';
|
||||
$lang->report->preview = 'View Pivot Table';
|
||||
$lang->report->item = 'Hạng mục';
|
||||
$lang->report->value = 'Giá trị';
|
||||
$lang->report->percent = '%';
|
||||
@@ -51,13 +52,13 @@ $lang->report->dept = 'Phòng/Ban';
|
||||
$lang->report->deviationChart = 'Biểu đồ chênh lệcthực hiệnh';
|
||||
|
||||
$lang->reportList = new stdclass();
|
||||
$lang->reportList->project = new stdclass();
|
||||
$lang->reportList->product = new stdclass();
|
||||
$lang->reportList->project = new stdclass();
|
||||
$lang->reportList->test = new stdclass();
|
||||
$lang->reportList->staff = new stdclass();
|
||||
|
||||
$lang->reportList->project->lists[10] = 'Chênh lệchthực hiện|reportprojectdeviation';
|
||||
$lang->reportList->product->lists[10] = 'Tóm tắt '.$lang->productCommon . '|report|productsummary';
|
||||
$lang->reportList->project->lists[10] = 'Chênh lệchthực hiện|reportprojectdeviation';
|
||||
$lang->reportList->test->lists[10] = 'Báo cáo Bug|report|bugcreate';
|
||||
$lang->reportList->test->lists[13] = 'Bàn giao Bug|report|bugassign';
|
||||
$lang->reportList->staff->lists[10] = 'Lượng công việc đội nhóm|report|workload';
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->report->index = '统计首页';
|
||||
$lang->report->list = '统计报表';
|
||||
$lang->report->list = '透视表';
|
||||
$lang->report->preview = '查看透视表';
|
||||
$lang->report->item = '条目';
|
||||
$lang->report->value = '值';
|
||||
$lang->report->percent = '百分比';
|
||||
@@ -53,13 +54,13 @@ $lang->report->dept = '部门';
|
||||
$lang->report->deviationChart = "{$lang->execution->common}偏差曲线";
|
||||
|
||||
$lang->reportList = new stdclass();
|
||||
$lang->reportList->project = new stdclass();
|
||||
$lang->reportList->product = new stdclass();
|
||||
$lang->reportList->project = new stdclass();
|
||||
$lang->reportList->test = new stdclass();
|
||||
$lang->reportList->staff = new stdclass();
|
||||
|
||||
$lang->reportList->project->lists[10] = "{$lang->execution->common}偏差报表|report|projectdeviation";
|
||||
$lang->reportList->product->lists[10] = $lang->productCommon . '汇总表|report|productsummary';
|
||||
$lang->reportList->project->lists[10] = "{$lang->execution->common}偏差报表|report|projectdeviation";
|
||||
$lang->reportList->test->lists[10] = 'Bug创建表|report|bugcreate';
|
||||
$lang->reportList->test->lists[13] = 'Bug指派表|report|bugassign';
|
||||
$lang->reportList->staff->lists[10] = '员工负载表|report|workload';
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->report->index = '統計首頁';
|
||||
$lang->report->list = '統計報表';
|
||||
$lang->report->list = '透视表';
|
||||
$lang->report->preview = '查看透视表';
|
||||
$lang->report->item = '條目';
|
||||
$lang->report->value = '值';
|
||||
$lang->report->percent = '百分比';
|
||||
@@ -51,13 +52,13 @@ $lang->report->dept = '部門';
|
||||
$lang->report->deviationChart = "{$lang->execution->common}偏差曲綫";
|
||||
|
||||
$lang->reportList = new stdclass();
|
||||
$lang->reportList->project = new stdclass();
|
||||
$lang->reportList->product = new stdclass();
|
||||
$lang->reportList->project = new stdclass();
|
||||
$lang->reportList->test = new stdclass();
|
||||
$lang->reportList->staff = new stdclass();
|
||||
|
||||
$lang->reportList->project->lists[10] = "{$lang->execution->common}偏差報表|report|projectdeviation";
|
||||
$lang->reportList->product->lists[10] = $lang->productCommon . '彙總表|report|productsummary';
|
||||
$lang->reportList->project->lists[10] = "{$lang->execution->common}偏差報表|report|projectdeviation";
|
||||
$lang->reportList->test->lists[10] = 'Bug創建表|report|bugcreate';
|
||||
$lang->reportList->test->lists[13] = 'Bug指派表|report|bugassign';
|
||||
$lang->reportList->staff->lists[10] = '員工負載表|report|workload';
|
||||
|
||||
@@ -1,64 +1,56 @@
|
||||
<?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;?>
|
||||
<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>
|
||||
</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>
|
||||
<?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>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?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;?>
|
||||
|
||||
@@ -1,85 +1,80 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<style>
|
||||
<?php helper::import('../css/bugcreate.css');?>
|
||||
<?php if($this->config->edition != 'open'):?>
|
||||
<style>#mainContent > .side-col.col-lg{width: 235px}</style>
|
||||
<style>.hide-sidebar #sidebar{width: 0 !important}</style>
|
||||
#mainContent > .side-col.col-lg{width: 235px}
|
||||
.hide-sidebar #sidebar{width: 0 !important}
|
||||
<?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;?>
|
||||
</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 include '../../common/view/footer.html.php';?>
|
||||
<?php else:?>
|
||||
<?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 endif;?>
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<script>
|
||||
$('#subNavbar li').not('[data-id=<?php echo $group;?>]').removeClass('active');
|
||||
</script>
|
||||
<?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('dimension', $dimension);?>
|
||||
<?php js::set('group', $group);?>
|
||||
<div id='mainContent' class='main-row'>
|
||||
<div class='side-col col-lg' id='sidebar'>
|
||||
<div class="sidebar-toggle">
|
||||
<i class="icon icon-angle-left"></i>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class='panel'>
|
||||
<div class='panel-heading'>
|
||||
<div class='panel-title'><?php echo $lang->report->list;?></div>
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<div class='list-group'>
|
||||
<?php echo $sidebar;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($this->config->edition == 'open'):?>
|
||||
<div class='panel panel-body' style='padding: 10px 6px'>
|
||||
<div class='text proversion'>
|
||||
<strong class='text-danger small text-latin'>BIZ</strong> <span class='text-important'><?php echo (!empty($config->isINT)) ? $lang->report->proVersionEn : $lang->report->proVersion;?></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='main-col'>
|
||||
<?php if(empty($module) || empty($method)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p><span class="text-muted"><?php echo $lang->error->noData;?></span></p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<?php echo $this->fetch($module, $method, $params);?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -1,114 +1,109 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<style>
|
||||
<?php helper::import('../css/productsummary.css');?>
|
||||
<?php if(common::checkNotCN()):?>
|
||||
<style>#conditions .col-xs { width: 126px; }</style>
|
||||
#conditions .col-xs { width: 126px; }
|
||||
<?php endif;?>
|
||||
<?php if($this->config->edition != 'open'):?>
|
||||
<style>#mainContent > .side-col.col-lg{width: 235px}</style>
|
||||
<style>.hide-sidebar #sidebar{width: 0 !important}</style>
|
||||
#mainContent > .side-col.col-lg{width: 235px}
|
||||
.hide-sidebar #sidebar{width: 0 !important}
|
||||
<?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'>
|
||||
<?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>
|
||||
</div>
|
||||
<?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>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?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>
|
||||
</div>
|
||||
<script><?php helper::import('../js/productsummary.js');?></script>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -1,165 +1,160 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<?php include '../../common/view/chart.html.php';?>
|
||||
<style>
|
||||
<?php helper::import('../css/projectdeviation.css');?>
|
||||
<?php if($this->config->edition != 'open'):?>
|
||||
<style>#mainContent > .side-col.col-lg{width: 235px}</style>
|
||||
<style>.hide-sidebar #sidebar{width: 0 !important}</style>
|
||||
#mainContent > .side-col.col-lg{width: 235px}
|
||||
.hide-sidebar #sidebar{width: 0 !important}
|
||||
<?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">↑</span>' . $deviation;
|
||||
}
|
||||
else if($deviation < 0)
|
||||
{
|
||||
echo '<span class="down">↓</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 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;?>
|
||||
</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/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">↑</span>' . $deviation;
|
||||
}
|
||||
else if($deviation < 0)
|
||||
{
|
||||
echo '<span class="down">↓</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 endif;?>
|
||||
<script>
|
||||
<?php helper::import('../js/projectdeviation.js');?>
|
||||
function initChart()
|
||||
{
|
||||
var data =
|
||||
@@ -188,4 +183,4 @@ function initChart()
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -1,127 +1,122 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<style>
|
||||
<?php helper::import('../css/workload.css');?>
|
||||
<?php if($this->config->edition != 'open'):?>
|
||||
<style>#mainContent > .side-col.col-lg{width: 210px}</style>
|
||||
<style>.hide-sidebar #sidebar{width: 0 !important}</style>
|
||||
#mainContent > .side-col.col-lg{width: 210px}
|
||||
.hide-sidebar #sidebar{width: 0 !important}
|
||||
<?php endif;?>
|
||||
</style>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<?php js::set('weekend', $config->execution->weekend);?>
|
||||
<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->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 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 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>
|
||||
</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 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 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 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>
|
||||
<?php endif;?>
|
||||
</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 include '../../common/view/footer.html.php';?>
|
||||
<?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;?>
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
class reportZen extends report
|
||||
{
|
||||
/**
|
||||
* Prepare for preview a report.
|
||||
*
|
||||
* @param int $dimension
|
||||
* @param string $group
|
||||
* @param string $module
|
||||
* @param string $method
|
||||
* @param string $params
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function prepare4Preview($dimension, $group, $module, $method, $params)
|
||||
{
|
||||
$params = helper::safe64Decode($params);
|
||||
|
||||
if(!$dimension) $dimension = $this->getDefaultDimension();
|
||||
if(!$group) $group = $this->getDefaultGroup($dimension);
|
||||
if(!$module || !$method) list($module, $method, $params) = $this->getDefaultMethod($dimension, $group);
|
||||
|
||||
if(!empty($module) && !empty($method) && !common::hasPriv($module, $method)) common::deny('report', $method);
|
||||
|
||||
$this->view->sidebar = $this->getSidebar($dimension, $group, $module, $method, $params);
|
||||
$this->view->dimension = $dimension;
|
||||
$this->view->group = $group;
|
||||
$this->view->module = $module;
|
||||
$this->view->method = $method;
|
||||
$this->view->params = $params;
|
||||
|
||||
if(empty($this->view->title)) $this->view->title = $this->lang->report->list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get default dimension of report.
|
||||
*
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getDefaultDimension()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get default group of a dimension.
|
||||
*
|
||||
* @param int $dimension
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getDefaultGroup($dimension)
|
||||
{
|
||||
foreach($this->lang->reportList as $group => $list)
|
||||
{
|
||||
if(empty($list->lists)) continue;
|
||||
|
||||
foreach($list->lists as $item)
|
||||
{
|
||||
$items = explode('|', $item);
|
||||
if(count($items) < 3) continue;
|
||||
|
||||
list($label, $module, $method) = $items;
|
||||
|
||||
if(common::hasPriv($module, $method)) return $group;
|
||||
}
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get default module name and method name and params of report in a group.
|
||||
*
|
||||
* @param int $dimension
|
||||
* @param string $group
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDefaultMethod($dimension, $group)
|
||||
{
|
||||
if(empty($this->lang->reportList->$group->lists)) return array('', '', '');
|
||||
|
||||
foreach($this->lang->reportList->$group->lists as $item)
|
||||
{
|
||||
$items = explode('|', $item . '|');
|
||||
if(count($items) < 4) continue;
|
||||
|
||||
list($label, $module, $method, $params) = $items;
|
||||
|
||||
if(common::hasPriv($module, $method)) return array($module, $method, $params);
|
||||
}
|
||||
|
||||
return array('', '', '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get sidebar of report.
|
||||
*
|
||||
* @param int $dimension
|
||||
* @param string $group
|
||||
* @param string $module
|
||||
* @param string $method
|
||||
* @param string $params
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getSidebar($dimension, $group, $module, $method, $params)
|
||||
{
|
||||
if(empty($this->lang->reportList->$group->lists)) return '';
|
||||
|
||||
$sidebar = '';
|
||||
$module = strtolower($module);
|
||||
$method = strtolower($method);
|
||||
|
||||
ksort($this->lang->reportList->$group->lists);
|
||||
foreach($this->lang->reportList->$group->lists as $item)
|
||||
{
|
||||
$items = explode('|', $item . '|');
|
||||
if(count($items) < 4) continue;
|
||||
|
||||
list($label, $moduleName, $methodName, $params) = $items;
|
||||
|
||||
$class = '';
|
||||
if($module == strtolower($moduleName) && $method == strtolower($methodName))
|
||||
{
|
||||
$class = 'selected';
|
||||
|
||||
$this->view->title = $label;
|
||||
}
|
||||
|
||||
$params = helper::safe64Encode($params);
|
||||
if(common::hasPriv($moduleName, $methodName)) $sidebar .= html::a(helper::createLink('report', 'preview', "dimension=$dimension&group=$group&module=$moduleName&method=$methodName¶ms=$params"), '<i class="icon icon-file-text"></i> ' . $label, '', "class='$class' title='$label'");
|
||||
}
|
||||
|
||||
return $sidebar;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user