* adjust for page.

This commit is contained in:
wangyidong
2018-05-17 14:43:35 +08:00
parent 897346d6f9
commit 6e6c82be2b
24 changed files with 325 additions and 337 deletions
+2 -6
View File
@@ -58,19 +58,15 @@
<?php endforeach;?>
</tbody>
</table>
<?php if($unlinkedCount):?>
<div class='table-footer'>
<?php if($unlinkedCount):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<<<<<<< HEAD
<?php echo html::submitButton($lang->build->linkBug, '', 'btn btn-default');?>
=======
<?php echo html::submitButton($lang->build->linkBug, '', 'btn');?>
>>>>>>> d31cb467eea5b5badeb0fe21a7c21ac7e1b3b15e
</div>
<?php endif;?>
<?php echo html::a(inlink('view', "buildID={$build->id}&type=bug"), $lang->goback, '', "class='btn'");?>
</div>
<?php endif;?>
</form>
</div>
<script>
+2 -6
View File
@@ -62,19 +62,15 @@
<?php endforeach;?>
</tbody>
</table>
<?php if($unlinkedCount):?>
<div class='table-footer'>
<?php if($unlinkedCount):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<<<<<<< HEAD
<?php echo html::submitButton($lang->build->linkStory, '', 'btn btn-default');?>
=======
<?php echo html::submitButton($lang->build->linkStory, '', 'btn');?>
>>>>>>> d31cb467eea5b5badeb0fe21a7c21ac7e1b3b15e
</div>
<?php endif;?>
<?php echo html::a(inlink('view', "buildID={$build->id}&type=story"), $lang->goback, '', "class='btn'");?>
</div>
<?php endif;?>
</form>
</div>
<script>
-5
View File
@@ -1,5 +0,0 @@
$(function()
{
var outerH =$('.outer').css('min-height').replace('px', '');
$('#url-content').height(outerH - 180);
})
+18 -3
View File
@@ -164,7 +164,7 @@ class docModel extends model
}
$actions .= html::a(helper::createLink('doc', 'createLib'), "<i class='icon icon-folder-plus'></i> " . $this->lang->doc->createLib, '', "class='btn btn-secondary' data-toggle='modal'");
$actions .= html::a(helper::createLink('doc', 'createLib'), "<i class='icon icon-folder-plus'></i> " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe'");
if($libID) $actions .= html::a(helper::createLink('doc', 'create', "libID=$libID"), "<i class='icon icon-plus'></i> " . $this->lang->doc->create, '', "class='btn btn-primary'");
$this->lang->modulePageActions = $actions;
@@ -286,6 +286,7 @@ class docModel extends model
*/
public function getDocsByBrowseType($libID, $browseType, $queryID, $moduleID, $sort, $pager)
{
$allLibs = array_keys($this->getLibs('all'));
if($browseType == "all")
{
$docs = $this->getDocs($libID, 0, $sort, $pager);
@@ -295,6 +296,7 @@ class docModel extends model
$docs = $this->dao->select('*')->from(TABLE_DOC)
->where('deleted')->eq(0)
->beginIF($libID)->andWhere('lib')->in($libID)->fi()
->andWhere('lib')->in($allLibs)
->andWhere('addedBy')->eq($this->app->user->account)
->orderBy($sort)
->page($pager)
@@ -311,6 +313,7 @@ class docModel extends model
$docs = $this->dao->select('*')->from(TABLE_DOC)
->where('deleted')->eq(0)
->andWhere('id')->in($docIdList)
->andWhere('lib')->in($allLibs)
->orderBy('editedDate_desc')
->page($pager)
->fetchAll('id');
@@ -348,6 +351,7 @@ class docModel extends model
$docs = $this->dao->select('*')->from(TABLE_DOC)
->where('deleted')->eq(0)
->beginIF($libID)->andWhere('lib')->in($libID)->fi()
->andWhere('lib')->in($allLibs)
->andWhere('collector')->like("%,{$this->app->user->account},%")
->orderBy($sort)
->page($pager)
@@ -398,13 +402,24 @@ class docModel extends model
{
if(!$this->checkPriv($doc)) unset($docs[$docID]);
}
$docs = $this->dao->select('*')->from(TABLE_DOC)->where('id')->in(array_keys($docs))->orderBy($sort)->page($pager)->fetchAll();
$docs = $this->dao->select('*')->from(TABLE_DOC)
->where('id')->in(array_keys($docs))
->andWhere('lib')->in($allLibs)
->orderBy($sort)
->page($pager)
->fetchAll();
}
elseif($browseType == 'fastsearch')
{
if(!$this->post->searchDoc) return array();
$docIdList = $this->getPrivDocs($libID, $moduleID);
$docs = $this->dao->select('*')->from(TABLE_DOC)->where('id')->in($docIdList)->andWhere('title')->like("%{$this->post->searchDoc}%")->orderBy($sort)->page($pager)->fetchAll();
$docs = $this->dao->select('*')->from(TABLE_DOC)
->where('id')->in($docIdList)
->andWhere('title')->like("%{$this->post->searchDoc}%")
->andWhere('lib')->in($allLibs)
->orderBy($sort)
->page($pager)
->fetchAll();
}
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'doc');
+41 -45
View File
@@ -15,52 +15,48 @@
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<i class='icon icon-plus'></i>
<span class='prefix'><?php echo html::icon($lang->icons['doclib']);?></span>
<?php echo $lang->doc->createLib;?>
</h2>
<h2><?php echo $lang->doc->createLib;?></h2>
</div>
<form method='post' target='hiddenwin' >
<table class='table table-form'>
<tr>
<th class='w-80px'><?php echo $lang->doc->libType?></th>
<td><?php echo html::select('libType', $libTypeList, $type, "class='form-control'")?></td>
</tr>
<tr class='product'>
<th><?php echo $lang->doc->product?></th>
<td><?php echo html::select('product', $products, $type == 'product' ? $objectID : '', "class='form-control chosen'")?></td>
</tr>
<tr class='project hidden'>
<th><?php echo $lang->doc->project?></th>
<td><?php echo html::select('project', $projects, $type == 'project' ? $objectID : '', "class='form-control chosen'")?></td>
</tr>
<tr>
<th><?php echo $lang->doclib->name?></th>
<td><?php echo html::input('name', '', "class='form-control' autocomplete='off'")?></td>
</tr>
<tr>
<th><?php echo $lang->doclib->control;?></th>
<td><?php echo html::radio('acl', $lang->doc->aclList, 'open', "onchange='toggleAcl(this.value)'")?></td>
</tr>
<tr id='whiteListBox' class='hidden'>
<th><?php echo $lang->doc->whiteList;?></th>
<td>
<div class='input-group'>
<span class='input-group-addon groups-addon'><?php echo $lang->doclib->group?></span>
<?php echo html::select('groups[]', $groups, '', "class='form-control chosen' multiple")?>
</div>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->doclib->user?></span>
<?php echo html::select('users[]', $users, '', "class='form-control chosen' multiple")?>
</div>
</td>
</tr>
<tr>
<td class='text-center' colspan='2'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?></td>
</tr>
</table>
</form>
</div>
<form method='post' target='hiddenwin' >
<table class='table table-form'>
<tr>
<th class='w-80px'><?php echo $lang->doc->libType?></th>
<td><?php echo html::select('libType', $libTypeList, $type, "class='form-control'")?></td>
</tr>
<tr class='product'>
<th><?php echo $lang->doc->product?></th>
<td><?php echo html::select('product', $products, $type == 'product' ? $objectID : '', "class='form-control chosen'")?></td>
</tr>
<tr class='project hidden'>
<th><?php echo $lang->doc->project?></th>
<td><?php echo html::select('project', $projects, $type == 'project' ? $objectID : '', "class='form-control chosen'")?></td>
</tr>
<tr>
<th><?php echo $lang->doclib->name?></th>
<td><?php echo html::input('name', '', "class='form-control' autocomplete='off'")?></td>
</tr>
<tr>
<th><?php echo $lang->doclib->control;?></th>
<td><?php echo html::radio('acl', $lang->doc->aclList, 'open', "onchange='toggleAcl(this.value)'")?></td>
</tr>
<tr id='whiteListBox' class='hidden'>
<th><?php echo $lang->doc->whiteList;?></th>
<td>
<div class='input-group'>
<span class='input-group-addon groups-addon'><?php echo $lang->doclib->group?></span>
<?php echo html::select('groups[]', $groups, '', "class='form-control chosen' multiple")?>
</div>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->doclib->user?></span>
<?php echo html::select('users[]', $users, '', "class='form-control chosen' multiple")?>
</div>
</td>
</tr>
<tr>
<td class='text-center' colspan='2'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?></td>
</tr>
</table>
</form>
</div>
<?php include '../../common/view/footer.lite.html.php';?>
+1 -1
View File
@@ -38,7 +38,7 @@
<?php
if(!isset($browseType)) $browseType = '';
if(!isset($orderBy)) $orderBy = '';
common::printIcon('task', 'report', "project=$projectID&browseType=$browseType", '', 'button', 'bar-chart');
common::printIcon('task', 'report', "project=$projectID&browseType=$browseType", '', 'button', 'bar-chart muted');
?>
<div class="btn-group">
<button class="btn btn-link" data-toggle="dropdown"><i class="icon icon-export muted"></i> <span class="text"><?php echo $lang->export;?></span> <span class="caret"></span></button>
+6 -4
View File
@@ -16,7 +16,9 @@
<?php js::set('roles', $roles);?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<span class='btn btn-link btn-active-text'><span class='text'><?php echo $lang->project->manageMembers;?></div></span>
<span class='btn btn-link btn-active-text'>
<?php echo html::a($this->createLink('project', 'managemembers', "projectID={$project->id}"), "<span class='text'> {$lang->project->manageMembers}</span>");?>
</span>
<div class='input-group space w-200px'>
<span class='input-group-addon'><?php echo $lang->project->selectDept?></span>
<?php echo html::select('dept', $depts, $dept, "class='form-control chosen' onchange='setDeptUsers(this)' data-placeholder='{$lang->project->selectDeptTitle}'");?>
@@ -65,7 +67,7 @@
<?php foreach($members2Import as $member2Import):?>
<tr class='addedItem'>
<td><?php echo html::select("accounts[]", $users, $member2Import->account, "class='select-2 chosen' onchange='setRole(this.value, $i)'");?></td>
<td><?php echo html::select("accounts[]", $users, $member2Import->account, "class='form-control chosen' onchange='setRole(this.value, $i)'");?></td>
<td><input type='text' name='roles[]' id='role<?php echo $i;?>' class='form-control' value='<?php echo $member2Import->role;?>' /></td>
<td><input type='text' name='days[]' id='days<?php echo $i;?>' class='form-control' value='<?php echo $project->days?>'/></td>
<td>
@@ -84,7 +86,7 @@
<?php foreach($deptUsers as $deptAccount => $userName):?>
<?php if(!isset($users[$deptAccount])) continue;?>
<tr class='addedItem'>
<td><?php echo html::select("accounts[]", $users, $deptAccount, "class='select-2 chosen' onchange='setRole(this.value, $i)'");?></td>
<td><?php echo html::select("accounts[]", $users, $deptAccount, "class='form-control chosen' onchange='setRole(this.value, $i)'");?></td>
<td><input type='text' name='roles[]' id='role<?php echo $i;?>' class='form-control' value='<?php echo $roles[$deptAccount]?>'/></td>
<td><input type='text' name='days[]' id='days<?php echo $i;?>' class='form-control' value='<?php echo $project->days?>'/></td>
<td>
@@ -103,7 +105,7 @@
<?php for($j = 0; $j < 5; $j ++):?>
<tr class='addedItem'>
<td><?php echo html::select("accounts[]", $users, '', "class='select-2 chosen' onchange='setRole(this.value, $i)'");?></td>
<td><?php echo html::select("accounts[]", $users, '', "class='form-control chosen' onchange='setRole(this.value, $i)'");?></td>
<td><input type='text' name='roles[]' id='role<?php echo ($i);?>' class='form-control' /></td>
<td><input type='text' name='days[]' id='days<?php echo ($i);?>' class='form-control' value='<?php echo $project->days?>'/></td>
<td>
+1 -1
View File
@@ -90,7 +90,7 @@ js::set('browseType', $browseType);
<?php
if(!isset($browseType)) $browseType = '';
if(!isset($orderBy)) $orderBy = '';
common::printIcon('task', 'report', "project=$projectID&browseType=$browseType", '', 'button', 'bar-chart');
common::printIcon('task', 'report', "project=$projectID&browseType=$browseType", '', 'button', 'bar-chart muted');
?>
<div class="btn-group">
+1
View File
@@ -37,3 +37,4 @@ td .deviation{padding-left:20px; text-align:left;}
.checkboxes {margin-bottom: 10px;}
.checkboxes .checkbox-primary {margin-bottom: 5px;}
.fixed-header-copy thead tr th{color:#fff !important;}
-4
View File
@@ -1,4 +0,0 @@
$(document).ready(function()
{
setTimeout(function(){fixedTheadOfList('#bugAssign')}, 100);
});
-5
View File
@@ -1,8 +1,3 @@
$(document).ready(function()
{
setTimeout(function(){fixedTheadOfList('#bug')}, 100);
});
function changeParams(obj)
{
var begin = $('.main .row').find('#begin').val();
-5
View File
@@ -1,8 +1,3 @@
$(document).ready(function()
{
setTimeout(function(){fixedTheadOfList('#productList')}, 100);
});
$('#conditions input:checkbox').change(function()
{
var conditions = '';
-1
View File
@@ -1,7 +1,6 @@
$(document).ready(function()
{
initChart();
setTimeout(function(){fixedTheadOfList('#projectList')}, 100);
});
function changeDate(begin, end)
-5
View File
@@ -1,8 +1,3 @@
$(document).ready(function()
{
setTimeout(function(){fixedTheadOfList('#workload')}, 100);
});
function changeParams(obj)
{
var begin = $('.main .row').find('#begin').val();
+31 -29
View File
@@ -15,36 +15,38 @@
<div class="panel-title"><?php echo $title;?></div>
<nav class="panel-actions btn-toolbar"></nav>
</div>
<table class='table table-condensed table-striped table-bordered table-fixed' id='bugAssign'>
<thead>
<tr class='colhead'>
<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">
<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">';?>
<td><?php echo html::a($this->createLink('product', 'view', "product={$count['productID']}"), $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 ++;?>
<div data-ride='table'>
<table class='table table-condensed table-striped table-bordered table-fixed' id='bugAssign'>
<thead>
<tr class='colhead'>
<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">
<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">';?>
<td><?php echo html::a($this->createLink('product', 'view', "product={$count['productID']}"), $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;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
</tbody>
</table>
</div>
</div>
</div>
</div>
+31 -29
View File
@@ -38,35 +38,37 @@
<div class="panel-title"><?php echo $title;?></div>
<nav class="panel-actions btn-toolbar"></nav>
</div>
<table class='table table-condensed table-striped table-bordered table-fixed' id="bug">
<thead>
<tr class='colhead'>
<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 data-ride='table'>
<table class='table table-condensed table-striped table-bordered table-fixed' id="bug">
<thead>
<tr class='colhead'>
<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>
</div>
+62 -60
View File
@@ -32,67 +32,69 @@
<div class="panel-title"><?php echo $title;?></div>
<nav class="panel-actions btn-toolbar"></nav>
</div>
<table class='table table-condensed table-striped table-bordered table-fixed' id='productList'>
<thead>
<tr class='colhead'>
<th width='200'><?php echo $lang->product->name;?></th>
<th width='120'><?php echo $lang->product->PO;?></th>
<th><?php echo $lang->productplan->common;?></th>
<th width="100"><?php echo $lang->productplan->begin;?></th>
<th width="100"><?php echo $lang->productplan->end;?></th>
<th class="w-70px"><?php echo $lang->story->statusList['draft'];?></th>
<th class="w-70px"><?php echo $lang->story->statusList['active'];?></th>
<th class="w-70px"><?php echo $lang->story->statusList['changed'];?></th>
<th class="w-70px"><?php echo $lang->story->statusList['closed'];?></th>
<th class="w-70px"><?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='text-left' 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'>"?>
<td align='left' class="<?php echo $class;?>"><?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;
$activeCount = isset($plan->status['active']) ? $plan->status['active'] : 0;
$changedCount = isset($plan->status['changed']) ? $plan->status['changed'] : 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 $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 + $activeCount + $changedCount + $closedCount;?></td>
<?php if($id != 1) echo "</tr>"?>
<?php $id ++;?>
<?php $color = !$color;?>
<div data-ride='table'>
<table class='table table-condensed table-striped table-bordered table-fixed' id='productList'>
<thead>
<tr>
<th class='w-200px'><?php echo $lang->product->name;?></th>
<th class='w-120px'><?php echo $lang->product->PO;?></th>
<th><?php echo $lang->productplan->common;?></th>
<th class="w-100px"><?php echo $lang->productplan->begin;?></th>
<th class="w-100px"><?php echo $lang->productplan->end;?></th>
<th class="w-70px"><?php echo $lang->story->statusList['draft'];?></th>
<th class="w-70px"><?php echo $lang->story->statusList['active'];?></th>
<th class="w-70px"><?php echo $lang->story->statusList['changed'];?></th>
<th class="w-70px"><?php echo $lang->story->statusList['closed'];?></th>
<th class="w-70px"><?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='text-left' 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'>"?>
<td align='left' class="<?php echo $class;?>"><?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;
$activeCount = isset($plan->status['active']) ? $plan->status['active'] : 0;
$changedCount = isset($plan->status['changed']) ? $plan->status['changed'] : 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 $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 + $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;?>"></td>
<td class="<?php echo $class;?>"></td>
<td class="<?php echo $class;?>"></td>
<td class="<?php echo $class;?>"></td>
<td class="<?php echo $class;?>"></td>
<?php $color = !$color;?>
<?php endif;?>
</tr>
<?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;?>"></td>
<td class="<?php echo $class;?>"></td>
<td class="<?php echo $class;?>"></td>
<td class="<?php echo $class;?>"></td>
<td class="<?php echo $class;?>"></td>
<?php $color = !$color;?>
<?php endif;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
</tbody>
</table>
</div>
</div>
</div>
</div>
+74 -72
View File
@@ -29,86 +29,88 @@
<div class="panel-title"><?php echo $title;?></div>
<nav class="panel-actions btn-toolbar"></nav>
</div>
<table class='table table-condensed table-striped table-bordered table-fixed' id='projectList'>
<thead>
<tr class='colhead'>
<th class='w-id'><?php echo $lang->report->id;?></th>
<th><?php echo $lang->report->project;?></th>
<th class="w-100px"><?php echo $lang->report->estimate;?></th>
<th class="w-100px"><?php echo $lang->report->consumed;?></th>
<th class="w-100px"><?php echo $lang->report->deviation;?></th>
<th class="w-100px"><?php echo $lang->report->deviationRate;?></th>
</tr>
</thead>
<tbody>
<?php $chartData = array();?>
<?php foreach($projects as $id =>$project):?>
<tr class="text-center">
<td><?php echo $id;?></td>
<td class="text-left"><?php echo html::a($this->createLink('project', 'view', "projectID=$id"), $project->name);?></td>
<td><?php echo $project->estimate;?></td>
<td><?php echo $project->consumed;?></td>
<?php $deviation = $project->consumed - $project->estimate;?>
<td class="deviation">
<?php
if($deviation > 0)
<div data-ride='table'>
<table class='table table-condensed table-striped table-bordered table-fixed' id='projectList'>
<thead>
<tr class='colhead'>
<th class='w-id'><?php echo $lang->report->id;?></th>
<th><?php echo $lang->report->project;?></th>
<th class="w-100px"><?php echo $lang->report->estimate;?></th>
<th class="w-100px"><?php echo $lang->report->consumed;?></th>
<th class="w-100px"><?php echo $lang->report->deviation;?></th>
<th class="w-100px"><?php echo $lang->report->deviationRate;?></th>
</tr>
</thead>
<tbody>
<?php $chartData = array();?>
<?php foreach($projects as $id =>$project):?>
<tr class="text-center">
<td><?php echo $id;?></td>
<td class="text-left"><?php echo html::a($this->createLink('project', 'view', "projectID=$id"), $project->name);?></td>
<td><?php echo $project->estimate;?></td>
<td><?php echo $project->consumed;?></td>
<?php $deviation = $project->consumed - $project->estimate;?>
<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 = $project->estimate ? round($deviation / $project->estimate * 100, 2) : 'n/a';
if($num >= 50)
{
echo '<span class="up">&uarr;</span>' . $deviation;
echo '<span class="u50">' . $num . '%</span>';
}
else if($deviation < 0)
elseif($num >= 30)
{
echo '<span class="down">&darr;</span>' . abs($deviation);
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">0</span>';
echo '<span class="zero">' . abs($num) . '%</span>';
}
?>
</td>
<td class="deviation">
<?php
$num = $project->estimate ? round($deviation / $project->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'][] = $project->name;
$chartData['data'][] = $deviation;
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
$chartData['labels'][] = $project->name;
$chartData['data'][] = $deviation;
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
</div>
</div>
<?php if($chartData):?>
+45 -43
View File
@@ -56,49 +56,51 @@
<div class="panel-title"><?php echo $title;?></div>
<nav class="panel-actions btn-toolbar"></nav>
</div>
<table class='table table-condensed table-striped table-bordered table-fixed' id="workload">
<thead>
<tr class='colhead'>
<th class="w-200px"><?php echo $lang->report->user;?></th>
<th><?php echo $lang->report->project;?></th>
<th class="w-100px"><?php echo $lang->report->task;?></th>
<th class="w-100px"><?php echo $lang->report->remain;?></th>
<th class="w-100px"><?php echo $lang->report->taskTotal;?></th>
<th class="w-100px"><?php echo $lang->report->manhourTotal;?></th>
<th class="w-100px"><?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">
<td rowspan="<?php echo count($load['task']);?>"><?php echo $users[$account];?></td>
<?php $id = 1;?>
<?php foreach($load['task'] as $project => $info):?>
<?php $class = $color ? 'rowcolor' : '';?>
<?php if($id != 1) echo '<tr class="text-center">';?>
<td class="<?php echo $class;?>"><?php echo html::a($this->createLink('project', 'view', "projectID={$info['projectID']}"), $project);?></td>
<td class="<?php echo $class;?> text-center"><?php echo $info['count'];?></td>
<td class="<?php echo $class;?> text-center"><?php echo $info['manhour'];?></td>
<?php if($id == 1):?>
<td rowspan="<?php echo count($load['task']);?>" class="text-center">
<?php echo $load['total']['count'];?>
</td>
<td rowspan="<?php echo count($load['task']);?>" class="text-center">
<?php echo $load['total']['manhour'];?>
</td>
<td rowspan="<?php echo count($load['task']);?>" class="text-center">
<?php echo round($load['total']['manhour'] / $allHour * 100, 2) . '%';?>
</td>
<?php endif;?>
<?php if($id != 1) echo '</tr>'; $id ++;?>
<?php $color = !$color;?>
<?php endforeach;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div data-ride='table'>
<table class='table table-condensed table-striped table-bordered table-fixed' id="workload">
<thead>
<tr class='colhead'>
<th class="w-200px"><?php echo $lang->report->user;?></th>
<th><?php echo $lang->report->project;?></th>
<th class="w-100px"><?php echo $lang->report->task;?></th>
<th class="w-100px"><?php echo $lang->report->remain;?></th>
<th class="w-100px"><?php echo $lang->report->taskTotal;?></th>
<th class="w-100px"><?php echo $lang->report->manhourTotal;?></th>
<th class="w-100px"><?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">
<td rowspan="<?php echo count($load['task']);?>"><?php echo $users[$account];?></td>
<?php $id = 1;?>
<?php foreach($load['task'] as $project => $info):?>
<?php $class = $color ? 'rowcolor' : '';?>
<?php if($id != 1) echo '<tr class="text-center">';?>
<td class="<?php echo $class;?>"><?php echo html::a($this->createLink('project', 'view', "projectID={$info['projectID']}"), $project);?></td>
<td class="<?php echo $class;?> text-center"><?php echo $info['count'];?></td>
<td class="<?php echo $class;?> text-center"><?php echo $info['manhour'];?></td>
<?php if($id == 1):?>
<td rowspan="<?php echo count($load['task']);?>" class="text-center">
<?php echo $load['total']['count'];?>
</td>
<td rowspan="<?php echo count($load['task']);?>" class="text-center">
<?php echo $load['total']['manhour'];?>
</td>
<td rowspan="<?php echo count($load['task']);?>" class="text-center">
<?php echo round($load['total']['manhour'] / $allHour * 100, 2) . '%';?>
</td>
<?php endif;?>
<?php if($id != 1) echo '</tr>'; $id ++;?>
<?php $color = !$color;?>
<?php endforeach;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
</div>
</div>
</div>
+1 -2
View File
@@ -46,8 +46,7 @@
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control w-p98'");?></td>
</tr>
<tr>
<th></th>
<td colspan='2'>
<td colspan='3' class='text-center'>
<?php echo html::submitButton();?>
<?php echo html::linkButton($lang->goback, $this->session->taskList);?>
</td>
+2 -3
View File
@@ -27,12 +27,11 @@
<form method='post' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th><?php echo $lang->comment;?></th>
<th class='w-50px'><?php echo $lang->comment;?></th>
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control'");?></td>
</tr>
<tr>
<th></th>
<td>
<td colspan='2' class='text-center'>
<?php echo html::submitButton($lang->task->cancel);?>
<?php echo html::linkButton($lang->goback, $this->session->taskList);?>
</td>
+2 -3
View File
@@ -27,12 +27,11 @@
<form method='post' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th><?php echo $lang->comment;?></th>
<th class='w-50px'><?php echo $lang->comment;?></th>
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control'");?></td>
</tr>
<tr>
<th></th>
<td>
<td colspan='2' class='text-center'>
<?php echo html::submitButton($lang->task->close);?>
<?php echo html::linkButton($lang->goback, $this->session->taskList);?>
</td>
+4 -4
View File
@@ -36,10 +36,10 @@
<?php echo html::input('name', $task->name, 'class="form-control" autocomplete="off" placeholder="' . $lang->task->name . '"');?>
<?php if(empty($task->children) and empty($task->parent) and $task->type != 'affair'):?>
<span class='input-group-addon'>
<label class='checkbox-inline'>
<input type='checkBox' name='multiple' value='1' <?php echo empty($task->team) ? '' : 'checked';?> />
<?php echo $lang->task->multipleAB;?>
</label>
<div class='checkbox-primary'>
<input type='checkBox' name='multiple' id='multiple' value='1' <?php echo empty($task->team) ? '' : 'checked';?> />
<label for='multiple'><?php echo $lang->task->multipleAB;?></label>
</div>
</span>
<?php endif;?>
</div>
+1 -1
View File
@@ -31,7 +31,7 @@
<td><?php echo html::textarea('comment', '', "rows='6' class='form-control'");?></td>
</tr>
<tr>
<td colspan='2'>
<td colspan='2' class='text-center'>
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
<?php echo html::linkButton($lang->goback, $this->session->taskList, '', '', 'btn btn-wide');?>
</td>