Merge branch 'sprint/cyy_bug' into 'sprint/244'
Sprint/cyy bug See merge request easycorp/zentaopms!5575
This commit is contained in:
+13
-7
@@ -97,6 +97,7 @@ $filter->mail->batchdelete = new stdclass();
|
||||
$filter->misc->checkupdate = new stdclass();
|
||||
$filter->file->download = new stdclass();
|
||||
$filter->product->browse = new stdclass();
|
||||
$filter->product->all = new stdclass();
|
||||
$filter->product->default = new stdclass();
|
||||
$filter->product->index = new stdclass();
|
||||
$filter->product->export = new stdclass();
|
||||
@@ -108,6 +109,7 @@ $filter->program->default = new stdclass();
|
||||
$filter->program->pgmproject = new stdclass();
|
||||
$filter->program->prjbrowse = new stdclass();
|
||||
$filter->program->project = new stdclass();
|
||||
$filter->program->product = new stdclass();
|
||||
$filter->program->browse = new stdclass();
|
||||
$filter->program->export = new stdclass();
|
||||
$filter->program->pgmbrowse = new stdclass();
|
||||
@@ -236,6 +238,7 @@ $filter->product->browse->cookie['productStoryOrder'] = 'reg::orderBy';
|
||||
$filter->product->browse->cookie['storyModule'] = 'int';
|
||||
$filter->product->browse->cookie['storyBranch'] = 'int';
|
||||
$filter->product->browse->cookie['treeBranch'] = 'reg::word';
|
||||
$filter->product->all->cookie['showProductBatchEdit'] = 'int';
|
||||
$filter->product->default->cookie['lastProduct'] = 'int';
|
||||
$filter->product->default->cookie['preProductID'] = 'int';
|
||||
$filter->product->index->cookie['preBranch'] = 'reg::word';
|
||||
@@ -247,19 +250,22 @@ $filter->product->dynamic->cookie['preBranch'] = 'reg::word';
|
||||
|
||||
$filter->branch->default->cookie['preBranch'] = 'reg::word';
|
||||
|
||||
$filter->program->default->cookie['lastPGM'] = 'int';
|
||||
$filter->program->default->cookie['lastPRJ'] = 'int';
|
||||
$filter->program->prjbrowse->cookie['programType'] = 'code';
|
||||
$filter->program->project->cookie['involved'] = 'code';
|
||||
$filter->program->browse->cookie['showClosed'] = 'code';
|
||||
$filter->program->export->cookie['checkedItem'] = 'reg::checked';
|
||||
$filter->program->ajaxgetdropmenu->cookie['showClosed'] = 'code';
|
||||
$filter->program->default->cookie['lastPGM'] = 'int';
|
||||
$filter->program->default->cookie['lastPRJ'] = 'int';
|
||||
$filter->program->prjbrowse->cookie['programType'] = 'code';
|
||||
$filter->program->project->cookie['involved'] = 'code';
|
||||
$filter->program->project->cookie['showProjectBatchEdit'] = 'int';
|
||||
$filter->program->product->cookie['showProductBatchEdit'] = 'int';
|
||||
$filter->program->browse->cookie['showClosed'] = 'code';
|
||||
$filter->program->export->cookie['checkedItem'] = 'reg::checked';
|
||||
$filter->program->ajaxgetdropmenu->cookie['showClosed'] = 'code';
|
||||
|
||||
$filter->project->default->cookie['lastProject'] = 'int';
|
||||
$filter->project->default->cookie['lastPRJ'] = 'int';
|
||||
$filter->project->default->cookie['projectMode'] = 'code';
|
||||
$filter->project->default->cookie['kanbanview'] = 'code';
|
||||
$filter->project->browse->cookie['involved'] = 'code';
|
||||
$filter->project->browse->cookie['showProjectBatchEdit'] = 'int';
|
||||
$filter->project->export->cookie['involved'] = 'code';
|
||||
$filter->project->browse->cookie['projectType'] = 'code';
|
||||
$filter->project->story->cookie['storyModuleParam'] = 'int';
|
||||
|
||||
@@ -51,12 +51,7 @@
|
||||
<tr>
|
||||
<td class='c-id'><?php printf('%03d', $project->id);?></td>
|
||||
<td class='c-name text-left' title='<?php echo $project->name?>'>
|
||||
<?php
|
||||
if($project->model === 'waterfall') echo "<span class='project-type-label label label-outline label-warning'>{$lang->project->waterfall}</span> ";
|
||||
if($project->model === 'scrum') echo "<span class='project-type-label label label-outline label-info'>{$lang->project->scrum}</span> ";
|
||||
if($project->model === 'kanban') echo "<span class='project-type-label label label-outline label-info'>{$lang->project->kanban}</span> ";
|
||||
echo html::a($this->createLink('project', 'index', "projectID=$project->id", '', '', $project->id), $project->name, '', "data-group='project'");
|
||||
?>
|
||||
<?php echo html::a($this->createLink('project', 'index', "projectID=$project->id", '', '', $project->id), $project->name, '', "data-group='project' title='{$project->name} ({$this->lang->project->{$project->model}})'");?>
|
||||
</td>
|
||||
<?php if($status == 'openedbyme'):?>
|
||||
<td class='c-status'><span class="status-project status-<?php echo $project->status?>"><?php echo zget($lang->project->statusList, $project->status, '');?></span></td>
|
||||
|
||||
@@ -1289,6 +1289,7 @@ class product extends control
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->showBatchEdit = $this->cookie->showProductBatchEdit;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -38,15 +38,13 @@
|
||||
#sidebar>.cell {width: 100%;}
|
||||
|
||||
th.c-name {width: 400px;}
|
||||
th.c-requirement {width: 290px;}
|
||||
th.c-story {width: 290px;}
|
||||
th.c-bug {width: 200px;}
|
||||
th.c-bug {width: 150px;}
|
||||
th.c-plan {width: 45px;}
|
||||
th.c-release {width: 50px;}
|
||||
th.c-actions {width: 50px;}
|
||||
[lang='en'] .en-wrap-text {white-space: normal; height: 24px; line-height: 1; font-size: 12px;}
|
||||
|
||||
|
||||
#productListForm thead>tr>th,
|
||||
#productListForm tbody>tr>td {text-align: center; text-overflow: unset!important}
|
||||
#productListForm thead>tr>th {padding: 0; line-height: 24px;}
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
$("#" + browseType + "Tab").addClass('btn-active-text');
|
||||
$(function()
|
||||
{
|
||||
$('#productListForm .c-checkbox, #productListForm .check-all').hide();
|
||||
|
||||
$('input[name^="showEdit"]').click(function()
|
||||
{
|
||||
$('#productListForm .c-checkbox, #productListForm .check-all').hide();
|
||||
var showEdit = $(this).is(':checked') ? 1 : 0;
|
||||
if(showEdit) $('#productListForm .c-checkbox, #productListForm .check-all').show();
|
||||
$.cookie('showProductBatchEdit', $(this).is(':checked') ? 1 : 0, {expires: config.cookieLife, path: config.webRoot});
|
||||
setCheckbox();
|
||||
});
|
||||
setCheckbox();
|
||||
|
||||
/* Init table sort. */
|
||||
$('#productTableList').addClass('sortable').sortable(
|
||||
@@ -45,6 +43,23 @@ $(function()
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Set batch edit checkbox.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setCheckbox()
|
||||
{
|
||||
$('#productListForm .c-checkbox, #productListForm .check-all').hide();
|
||||
$('.c-name').css('border-left', 'none');
|
||||
if($.cookie('showProductBatchEdit') == 1)
|
||||
{
|
||||
$('#productListForm .c-checkbox, #productListForm .check-all').show();
|
||||
$('.c-name').css('border-left', '1px solid #ddd');
|
||||
}
|
||||
}
|
||||
|
||||
/* Update parent checkbox */
|
||||
function updatePrarentCheckbox($parent)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<?php $recTotalLabel = $browseType == $key ? " <span class='label label-light label-badge'>{$recTotal}</span>" : '';?>
|
||||
<?php echo html::a(inlink("all", "browseType=$key&orderBy=$orderBy"), "<span class='text'>{$label}</span>" . $recTotalLabel, '', "class='btn btn-link' id='{$key}Tab'");?>
|
||||
<?php endforeach;?>
|
||||
<?php if($canBatchEdit) echo html::checkbox('showEdit', array('1' => $lang->product->edit));?>
|
||||
<?php if($canBatchEdit) echo html::checkbox('showEdit', array('1' => $lang->product->edit), $showBatchEdit);?>
|
||||
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->product->searchStory;?></a>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
@@ -52,11 +52,8 @@
|
||||
<a class='table-nest-toggle table-nest-toggle-global' data-expand-text='<?php echo $lang->expand; ?>' data-collapse-text='<?php echo $lang->collapse; ?>'></a>
|
||||
<?php common::printOrderLink('name', $orderBy, $vars, $lang->product->name);?>
|
||||
</th>
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<th class='c-requirement' colspan="5"><?php echo $lang->story->requirement;?></th>
|
||||
<?php endif;?>
|
||||
<th class="c-story" colspan="5"><?php echo $lang->story->story;?></th>
|
||||
<th class="c-bug" colspan="3"><?php echo $lang->bug->common;?></th>
|
||||
<th class="c-bug" colspan="2"><?php echo $lang->bug->common;?></th>
|
||||
<th class="c-plan" rowspan="2"><?php echo $lang->product->plan;?></th>
|
||||
<th class="c-release" rowspan="2"><?php echo $lang->product->release;?></th>
|
||||
<?php
|
||||
@@ -66,20 +63,12 @@
|
||||
<th class='c-actions' rowspan="2"><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
<tr class="text-center">
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<th style="border-left: 1px solid #ddd;"><?php echo $lang->story->draft;?></th>
|
||||
<th><?php echo $lang->story->activate;?></th>
|
||||
<th><?php echo $lang->story->change;?></th>
|
||||
<th><?php echo $lang->story->statusList['reviewing'];?></th>
|
||||
<th><div class='en-wrap-text'><?php echo $lang->story->completeRate;?></div></th>
|
||||
<?php endif;?>
|
||||
<th style="border-left: 1px solid #ddd;"><?php echo $lang->story->draft;?></th>
|
||||
<th><?php echo $lang->story->activate;?></th>
|
||||
<th><?php echo $lang->story->change;?></th>
|
||||
<th><?php echo $lang->story->statusList['reviewing'];?></th>
|
||||
<th><div class='en-wrap-text'><?php echo $lang->story->completeRate;?></div></th>
|
||||
<th style="border-left: 1px solid #ddd;"><?php echo $lang->bug->activate;?></th>
|
||||
<th><?php echo $lang->close;?></th>
|
||||
<th><?php echo $lang->bug->fixedRate;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -114,20 +103,12 @@
|
||||
<span class="table-nest-icon icon table-nest-toggle"></span>
|
||||
<?php echo $program['programName']?>
|
||||
</td>
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<td><?php echo $program['draftRequirements'];?></td>
|
||||
<td><?php echo $program['activeRequirements'];?></td>
|
||||
<td><?php echo $program['changingRequirements'];?></td>
|
||||
<td><?php echo $program['reviewingRequirements'];?></td>
|
||||
<td><?php echo $program['totalRequirements'] == 0 ? 0 : round($program['closedRequirements'] / $program['totalRequirements'], 3) * 100;?>%</td>
|
||||
<?php endif;?>
|
||||
<td><?php echo $program['draftStories'];?></td>
|
||||
<td><?php echo $program['activeStories'];?></td>
|
||||
<td><?php echo $program['changingStories'];?></td>
|
||||
<td><?php echo $program['reviewingStories'];?></td>
|
||||
<td><?php echo $program['totalStories'] == 0 ? 0 : round($program['closedStories'] / $program['totalStories'], 3) * 100;?>%</td>
|
||||
<td><?php echo $program['unResolvedBugs'];?></td>
|
||||
<td><?php echo $program['closedBugs'];?></td>
|
||||
<td><?php echo ($program['unResolvedBugs'] + $program['fixedBugs']) == 0 ? 0 : round($program['fixedBugs'] / ($program['unResolvedBugs'] + $program['fixedBugs']), 3) * 100;?>%</td>
|
||||
<td><?php echo $program['plans'];?></td>
|
||||
<td><?php echo $program['releases'];?></td>
|
||||
@@ -161,20 +142,12 @@
|
||||
<span class="table-nest-icon icon table-nest-toggle"></span>
|
||||
<?php echo $line['lineName']?>
|
||||
</td>
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<td><?php echo isset($line['draftRequirements']) ? $line['draftRequirements'] : 0;?></td>
|
||||
<td><?php echo isset($line['activeRequirements']) ? $line['activeRequirements'] : 0;?></td>
|
||||
<td><?php echo isset($line['changingRequirements']) ? $line['changingRequirements'] : 0;?></td>
|
||||
<td><?php echo isset($line['reviewingRequirements']) ? $line['reviewingRequirements'] : 0;?></td>
|
||||
<td><?php echo (isset($line['totalRequirements']) and $line['totalRequirements'] != 0) ? round($line['closedRequirements'] / $line['totalRequirements'], 3) * 100 : 0;?>%</td>
|
||||
<?php endif;?>
|
||||
<td><?php echo isset($line['draftStories']) ? $line['draftStories'] : 0;?></td>
|
||||
<td><?php echo isset($line['activeStories']) ? $line['activeStories'] : 0;?></td>
|
||||
<td><?php echo isset($line['changingStories']) ? $line['changingStories'] : 0;?></td>
|
||||
<td><?php echo isset($line['reviewingStories']) ? $line['reviewingStories'] : 0;?></td>
|
||||
<td><?php echo (isset($line['totalStories']) and $line['totalStories'] != 0) ? round($line['closedStories'] / $line['totalStories'], 3) * 100 : 0;?>%</td>
|
||||
<td><?php echo isset($line['unResolvedBugs']) ? $line['unResolvedBugs'] : 0;?></td>
|
||||
<td><?php echo isset($line['closedBugs']) ? $line['closedBugs'] : 0;?></td>
|
||||
<td><?php echo (isset($line['fixedBugs']) and ($line['unResolvedBugs'] + $line['fixedBugs'] != 0)) ? round($line['fixedBugs'] / ($line['unResolvedBugs'] + $line['fixedBugs']), 3) * 100 : 0;?>%</td>
|
||||
<td><?php echo isset($line['plans']) ? $line['plans'] : 0;?></td>
|
||||
<td><?php echo isset($line['releases']) ? $line['releases'] : 0;?></td>
|
||||
@@ -221,20 +194,12 @@
|
||||
echo html::a($this->createLink('product', 'browse', 'productID=' . $product->id), $product->name);
|
||||
?>
|
||||
</td>
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<td><?php echo $product->requirements['draft'];?></td>
|
||||
<td><?php echo $product->requirements['active'];?></td>
|
||||
<td><?php echo $product->requirements['changing'];?></td>
|
||||
<td><?php echo $product->requirements['reviewing'];?></td>
|
||||
<td><?php echo $totalRequirements == 0 ? 0 : round($product->requirements['closed'] / $totalRequirements, 3) * 100;?>%</td>
|
||||
<?php endif;?>
|
||||
<td><?php echo $product->stories['draft'];?></td>
|
||||
<td><?php echo $product->stories['active'];?></td>
|
||||
<td><?php echo $product->stories['changing'];?></td>
|
||||
<td><?php echo $product->stories['reviewing'];?></td>
|
||||
<td><?php echo $totalStories == 0 ? 0 : round($product->stories['closed'] / $totalStories, 3) * 100;?>%</td>
|
||||
<td><?php echo $product->unResolved;?></td>
|
||||
<td><?php echo $product->closedBugs;?></td>
|
||||
<td><?php echo ($product->unResolved + $product->fixedBugs) == 0 ? 0 : round($product->fixedBugs / ($product->unResolved + $product->fixedBugs), 3) * 100;?>%</td>
|
||||
<td><?php echo $product->plans;?></td>
|
||||
<td><?php echo $product->releases;?></td>
|
||||
|
||||
+16
-14
@@ -163,14 +163,15 @@ class program extends control
|
||||
$this->view->program = $program;
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->program->product;
|
||||
$this->view->position[] = $this->lang->program->product;
|
||||
$this->view->programID = $programID;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->products = $this->loadModel('product')->getStats($orderBy, $pager, $browseType, '', 'story', $programID);
|
||||
$this->view->title = $this->lang->program->product;
|
||||
$this->view->position[] = $this->lang->program->product;
|
||||
$this->view->programID = $programID;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->products = $this->loadModel('product')->getStats($orderBy, $pager, $browseType, '', 'story', $programID);
|
||||
$this->view->showBatchEdit = $this->cookie->showProductBatchEdit;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -479,12 +480,13 @@ class program extends control
|
||||
$this->view->title = $this->lang->program->project;
|
||||
$this->view->position[] = $this->lang->program->project;
|
||||
|
||||
$this->view->projectStats = $projectStats;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->programID = $programID;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|pofirst|nodeleted');
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->projectStats = $projectStats;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->programID = $programID;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|pofirst|nodeleted');
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->showBatchEdit = $this->cookie->showProjectBatchEdit;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -3,3 +3,4 @@
|
||||
tbody.sortable > tr > td > span.sort-handler {color: #999;}
|
||||
.icon-move {color: #16a8f8;}
|
||||
.table.has-sort-head thead>tr>th>a:after, .table.has-sort-head thead>tr>th>a:before {top: -4px;}
|
||||
.statistic {margin-left: 10px; color: #838a9d; float: left; position: relative; line-height: 28px;}
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
$(function()
|
||||
{
|
||||
$('input[name^="showEdit"]').click(function()
|
||||
{
|
||||
$.cookie('showProductBatchEdit', $(this).is(':checked') ? 1 : 0, {expires: config.cookieLife, path: config.webRoot});
|
||||
setCheckbox();
|
||||
});
|
||||
setCheckbox();
|
||||
|
||||
$(":checkbox[name^='productIDList']").on('click', function()
|
||||
{
|
||||
updateStatistic()
|
||||
});
|
||||
|
||||
$(".check-all").on('click', function()
|
||||
{
|
||||
if($(":checkbox[name^='productIDList']:not(:checked)").length == 0)
|
||||
{
|
||||
$(":checkbox[name^='productIDList']").prop('checked', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$(":checkbox[name^='productIDList']").prop('checked', true);
|
||||
}
|
||||
updateStatistic()
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Set batch edit checkbox.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setCheckbox()
|
||||
{
|
||||
$('#productListForm .checkbox-primary, #productListForm .check-all').hide();
|
||||
$('#productListForm .product-id').addClass('hidden');
|
||||
if($.cookie('showProductBatchEdit') == 1)
|
||||
{
|
||||
$('#productListForm .checkbox-primary, #productListForm .check-all').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#productListForm .product-id').removeClass('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a statistics prompt statement after the Edit button.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function addStatistic()
|
||||
{
|
||||
var checkedLength = $(":checkbox[name^='productIDList']:checked").length;
|
||||
if(checkedLength > 0)
|
||||
{
|
||||
var summary = checkedProducts.replace('%s', checkedLength);
|
||||
if(cilentLang == "en" && checkedLength < 2) summary = summary.replace('products', 'product');
|
||||
|
||||
var statistic = "<div id='productsSummary' class='statistic'>" + summary + "</div>";
|
||||
$('#productsCount').hide();
|
||||
$('#productsSummary').remove();
|
||||
$('#editBtn').after(statistic);
|
||||
$('.table-actions').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('.table-actions').hide();
|
||||
$('#productsCount').show();
|
||||
$('#productsSummary').addClass('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Anti shake operation for jquery.
|
||||
*
|
||||
* @param fn $fn
|
||||
* @param delay $delay
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function debounce(fn, delay)
|
||||
{
|
||||
var timer = null;
|
||||
return function()
|
||||
{
|
||||
if(timer) clearTimeout(timer);
|
||||
timer = setTimeout(fn, delay)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update statistics.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function updateStatistic()
|
||||
{
|
||||
debounce(addStatistic(), 200)
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
$(function()
|
||||
{
|
||||
$('input[name^="showEdit"]').click(function()
|
||||
{
|
||||
$.cookie('showProjectBatchEdit', $(this).is(':checked') ? 1 : 0, {expires: config.cookieLife, path: config.webRoot});
|
||||
setCheckbox();
|
||||
});
|
||||
setCheckbox();
|
||||
});
|
||||
|
||||
/**
|
||||
* Set batch edit checkbox.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setCheckbox()
|
||||
{
|
||||
$('#projectsForm .checkbox-primary').hide();
|
||||
if($.cookie('showProjectBatchEdit') == 1) $('#projectsForm .checkbox-primary').show();
|
||||
}
|
||||
@@ -53,6 +53,7 @@
|
||||
<?php
|
||||
$icon = '';
|
||||
if($program->type == 'program') $icon = ' icon-program';
|
||||
if($program->type == 'project') $icon = ' icon-common icon-' . $program->model;
|
||||
$class = $program->type == 'program' ? ' table-nest-toggle' : '';
|
||||
?>
|
||||
<span class="table-nest-icon icon <?php echo $class . $icon;?>"></span>
|
||||
|
||||
@@ -11,14 +11,18 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/sortable.html.php';?>
|
||||
<?php js::set('checkedProducts', $lang->product->checkedProducts);?>
|
||||
<?php js::set('cilentLang', $this->app->getClientLang());?>
|
||||
<?php $canBatchEdit = common::hasPriv('product', 'batchEdit');?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<?php if(!isonlybody()):?>
|
||||
<div class="btn-toolbar pull-left">
|
||||
<div class="btn-toolBar pull-left">
|
||||
<?php foreach($lang->product->featureBar['all'] as $key => $label):?>
|
||||
<?php $active = $key == $browseType ? 'btn-active-text' : '';?>
|
||||
<?php if($key == $browseType) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
|
||||
<?php echo html::a(inlink("product", "programID=$programID&browseType=$key&orderBy=$orderBy"), "<span class='text'>{$label}</span>", '', "class='btn btn-link $active'");?>
|
||||
<?php endforeach;?>
|
||||
<?php if($canBatchEdit) echo html::checkbox('showEdit', array('1' => $lang->product->edit), $showBatchEdit);?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printLink('product', 'create', "programID=$programID", '<i class="icon icon-plus"></i> ' . $lang->product->create, '', 'class="btn btn-primary"');?>
|
||||
@@ -34,7 +38,6 @@
|
||||
<div class="main-col">
|
||||
<form class="main-table table-product" data-ride="table" id="productListForm" method="post" action='<?php echo $this->createLink('product', 'batchEdit', "programID=$programID");?>'>
|
||||
<?php $canOrder = common::hasPriv('product', 'updateOrder');?>
|
||||
<?php $canBatchEdit = common::hasPriv('product', 'batchEdit');?>
|
||||
<table id="productList" class="table has-sort-head table-bordered table-fixed">
|
||||
<?php $vars = "programID=$programID&browseType=$browseType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<thead>
|
||||
@@ -48,28 +51,18 @@
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th rowspan="2"><?php common::printOrderLink('name', $orderBy, $vars, $lang->product->name);?></th>
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<th class="w-300px" colspan="4"><?php echo $lang->story->requirement;?></th>
|
||||
<?php endif;?>
|
||||
<th class="w-300px" colspan="4"><?php echo $lang->story->story;?></th>
|
||||
<th class="w-200px" colspan="3"><?php echo $lang->bug->common;?></th>
|
||||
<th class="w-150px" colspan="2"><?php echo $lang->bug->common;?></th>
|
||||
<th class="w-80px" rowspan="2"><?php echo $lang->product->plan;?></th>
|
||||
<th class="w-80px" rowspan="2"><?php echo $lang->product->release;?></th>
|
||||
<th class='c-actions w-70px' rowspan="2"><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
<tr class="text-center">
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<th style="border-left: 1px solid #ddd;"><?php echo $lang->story->draft;?></th>
|
||||
<th><?php echo $lang->story->activate;?></th>
|
||||
<th><?php echo $lang->story->change;?></th>
|
||||
<th><?php echo $lang->story->completeRate;?></th>
|
||||
<?php endif;?>
|
||||
<th style="border-left: 1px solid #ddd;"><?php echo $lang->story->draft;?></th>
|
||||
<th><?php echo $lang->story->activate;?></th>
|
||||
<th><?php echo $lang->story->change;?></th>
|
||||
<th><?php echo $lang->story->completeRate;?></th>
|
||||
<th style="border-left: 1px solid #ddd;"><?php echo $lang->bug->activate;?></th>
|
||||
<th><?php echo $lang->close;?></th>
|
||||
<th><?php echo $lang->bug->fixedRate;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -82,24 +75,16 @@
|
||||
<tr class="text-center" data-id='<?php echo $product->id ?>' data-order='<?php echo $product->code;?>'>
|
||||
<td class='c-id text-left'>
|
||||
<?php if($canBatchEdit):?>
|
||||
<?php echo html::checkbox('productIDList', array($product->id => sprintf('%03d', $product->id)));?>
|
||||
<?php else:?>
|
||||
<?php printf('%03d', $product->id);?>
|
||||
<?php echo html::checkbox('productIDList', array($product->id => sprintf('%03d', $product->id)), '', 'class="id-checkbox ' . (!$showBatchEdit ? 'hidden"' : '"'));?>
|
||||
<?php endif;?>
|
||||
<span class="product-id <?php if($canBatchEdit && $showBatchEdit) echo 'hidden';?>"><?php printf('%03d', $product->id);?></span>
|
||||
</td>
|
||||
<td class="c-name" title='<?php echo $product->name?>'><?php echo html::a($this->createLink('product', 'browse', 'product=' . $product->id), $product->name);?></td>
|
||||
<?php if($this->config->URAndSR):?>
|
||||
<td><?php echo $product->requirements['draft'];?></td>
|
||||
<td><?php echo $product->requirements['active'];?></td>
|
||||
<td><?php echo $product->requirements['changing'];?></td>
|
||||
<td><?php echo $totalRequirements == 0 ? 0 : round($product->requirements['closed'] / $totalRequirements, 3) * 100;?>%</td>
|
||||
<?php endif;?>
|
||||
<td><?php echo $product->stories['draft'];?></td>
|
||||
<td><?php echo $product->stories['active'];?></td>
|
||||
<td><?php echo $product->stories['changing'];?></td>
|
||||
<td><?php echo $totalStories == 0 ? 0 : round($product->stories['closed'] / $totalStories, 3) * 100;?>%</td>
|
||||
<td><?php echo $product->unResolved;?></td>
|
||||
<td><?php echo $product->closedBugs;?></td>
|
||||
<td><?php echo ($product->unResolved + $product->fixedBugs) == 0 ? 0 : round($product->fixedBugs / ($product->unResolved + $product->fixedBugs), 3) * 100;?>%</td>
|
||||
<td><?php echo $product->plans;?></td>
|
||||
<td><?php echo $product->releases;?></td>
|
||||
@@ -118,8 +103,15 @@
|
||||
<?php if($canBatchEdit):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<?php echo html::submitButton($lang->edit, '', 'btn');?>
|
||||
<?php
|
||||
$actionLink = $this->createLink('product', 'batchEdit');
|
||||
echo html::commonButton($lang->edit, "id='editBtn' data-form-action='$actionLink'");
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
$summary = sprintf($lang->product->pageSummary, count($products));
|
||||
echo "<div id='productsCount' class='statistic'>$summary</div>";
|
||||
?>
|
||||
<?php endif;?>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<?php
|
||||
js::set('programID', $programID);
|
||||
js::set('browseType', $browseType);
|
||||
$canBatchEdit = common::hasPriv('project', 'batchEdit');
|
||||
?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolBar pull-left">
|
||||
@@ -24,6 +25,7 @@ js::set('browseType', $browseType);
|
||||
<?php if($browseType == $key) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
|
||||
<?php echo html::a(inlink('project', "programID=$programID&browseType=$key"), $label, '', "class='btn btn-link $active'");?>
|
||||
<?php endforeach;?>
|
||||
<?php if($canBatchEdit) echo html::checkbox('showEdit', array('1' => $lang->project->edit), $showBatchEdit);?>
|
||||
<?php echo html::checkbox('involved ', array('1' => $lang->project->mine), '', $this->cookie->involved ? 'checked=checked' : '');?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
@@ -46,7 +48,6 @@ js::set('browseType', $browseType);
|
||||
$setting = $this->datatable->getSetting('program');
|
||||
?>
|
||||
<table class='table has-sort-head'>
|
||||
<?php $canBatchEdit = common::hasPriv('project', 'batchEdit');?>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php
|
||||
|
||||
@@ -378,6 +378,7 @@ class project extends control
|
||||
$this->view->recTotal = $recTotal;
|
||||
$this->view->recPerPage = $recPerPage;
|
||||
$this->view->pageID = $pageID;
|
||||
$this->view->showBatchEdit = $this->cookie->showProjectBatchEdit;
|
||||
$this->view->allProjectsNum = $this->loadModel('program')->getProjectStats($programID, 'all');
|
||||
|
||||
$this->display();
|
||||
|
||||
@@ -1,30 +1,41 @@
|
||||
$(function()
|
||||
{
|
||||
$('#projectForm .checkbox-primary').hide();
|
||||
$('input[name^="involved"]').click(function()
|
||||
{
|
||||
var involved = $(this).is(':checked') ? 1 : 0;
|
||||
$.cookie('involved', involved, {expires:config.cookieLife, path:config.webRoot});
|
||||
$.cookie('involved', involved, {expires: config.cookieLife, path: config.webRoot});
|
||||
window.location.reload();
|
||||
});
|
||||
|
||||
$('[id="switchButton"]').click(function()
|
||||
{
|
||||
var projectType = $(this).attr('data-type');
|
||||
$.cookie('projectType', projectType, {expires:config.cookieLife, path:config.webRoot});
|
||||
$.cookie('projectType', projectType, {expires: config.cookieLife, path: config.webRoot});
|
||||
window.location.reload();
|
||||
});
|
||||
|
||||
$('input[name^="showEdit"]').click(function()
|
||||
{
|
||||
$('#projectForm .checkbox-primary').hide();
|
||||
var showEdit = $(this).is(':checked') ? 1 : 0;
|
||||
if(showEdit) $('#projectForm .checkbox-primary').show();
|
||||
$.cookie('showProjectBatchEdit', $(this).is(':checked') ? 1 : 0, {expires: config.cookieLife, path: config.webRoot});
|
||||
setCheckbox();
|
||||
});
|
||||
setCheckbox();
|
||||
|
||||
if(!useDatatable) resetNameWidth();
|
||||
});
|
||||
|
||||
/**
|
||||
* Set batch edit checkbox.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setCheckbox()
|
||||
{
|
||||
$('#projectForm .checkbox-primary').hide();
|
||||
if($.cookie('showProjectBatchEdit') == 1) $('#projectForm .checkbox-primary').show();
|
||||
}
|
||||
|
||||
function resetNameWidth()
|
||||
{
|
||||
$name = $('#projectForm thead th.c-name');
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<?php if($browseType == $key) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
|
||||
<?php echo html::a(inlink('browse', "programID=$programID&browseType=$key"), $label, '', "class='btn btn-link $active'");?>
|
||||
<?php endforeach;?>
|
||||
<?php if($canBatchEdit) echo html::checkbox('showEdit', array('1' => $lang->project->edit));?>
|
||||
<?php if($canBatchEdit) echo html::checkbox('showEdit', array('1' => $lang->project->edit), $showBatchEdit);?>
|
||||
<?php if($browseType != 'bysearch') echo html::checkbox('involved', array('1' => $lang->project->mine), '', $this->cookie->involved ? 'checked=checked' : '');?>
|
||||
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->search->common;?></a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user