* Rewrite batchEdit page of bug.
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,3 +1,9 @@
|
||||
.ke-toolbar .ke-outline[data-name='savetemplate'] {display: none}
|
||||
#modulemenu .nav #dropMenu #searchResult .closed{text-decoration:none;}
|
||||
.nav #moreMenus{cursor: pointer;}
|
||||
|
||||
#batchCreateForm .input-group, #batchEditForm .input-group,
|
||||
#batchCreateForm .input-group .form-control, #batchEditForm .input-group .form-control {position: static;}
|
||||
#batchCreateForm .input-group .colorpicker, #batchEditForm .input-group .colorpicker {z-index: 2;}
|
||||
#batchCreateForm .input-group .colorpicker.open, #batchEditForm .input-group .colorpicker.open {z-index: 5;}
|
||||
|
||||
|
||||
+127
-149
@@ -13,157 +13,135 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<?php js::set('dittoNotice', $this->lang->bug->dittoNotice);?>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['bug']);?></span>
|
||||
<strong><small class='text-muted'><?php echo html::icon($lang->icons['batchEdit']);?></small> <?php echo $lang->bug->common . $lang->colon . $lang->bug->batchEdit;?></strong>
|
||||
<div class='actions'>
|
||||
<button type="button" class="btn btn-default" data-toggle="customModal"><i class='icon icon-cog'></i> </button>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->bug->common . $lang->colon . $lang->bug->batchEdit;?></h2>
|
||||
<div class="pull-right btn-toolbar">
|
||||
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=bug§ion=custom&key=batchEditFields')?>
|
||||
<?php include '../../common/view/customfield.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(isset($suhosinInfo)):?>
|
||||
<div class='alert alert-info'><?php echo $suhosinInfo;?></div>
|
||||
<?php else:?>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
$requiredFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field)$visibleFields[$field] = '';
|
||||
}
|
||||
foreach(explode(',', $this->config->bug->edit->requiredFields) as $field)
|
||||
{
|
||||
if($field)
|
||||
{
|
||||
$requiredFields[$field] = '';
|
||||
if(strpos(",{$config->bug->list->customBatchEditFields},", ",{$field},") !== false) $visibleFields[$field] = '';
|
||||
}
|
||||
}
|
||||
$columns = count($visibleFields) + 2;
|
||||
?>
|
||||
<form class='form-condensed' method='post' target='hiddenwin' action="<?php echo inLink('batchEdit', "productID=$productID");?>">
|
||||
<table class='table table-form table-fixed with-border'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-50px'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-110px<?php echo zget($visibleFields, 'type', ' hidden')?>'>
|
||||
<?php echo $lang->bug->type;?>
|
||||
<?php if(isset($requiredFields['type'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-70px<?php echo zget($visibleFields, 'severity', ' hidden')?>'>
|
||||
<?php echo $lang->bug->severityAB;?>
|
||||
<?php if(isset($requiredFields['severity'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-70px<?php echo zget($visibleFields, 'pri', ' hidden')?>'>
|
||||
<?php echo $lang->bug->pri;?>
|
||||
<?php if(isset($requiredFields['pri'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th <?php if(count($visibleFields) >= 10) echo "class='w-150px'"?>><?php echo $lang->bug->title;?> <span class='required'></span></th>
|
||||
<?php if($branchProduct):?>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'branch', ' hidden')?>'><?php echo $lang->bug->branch;?></th>
|
||||
<?php endif;?>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'productplan', ' hidden')?>'>
|
||||
<?php echo $lang->bug->productplan;?>
|
||||
<?php if(isset($requiredFields['productplan'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>'>
|
||||
<?php echo $lang->bug->assignedTo;?>
|
||||
<?php if(isset($requiredFields['assignedTo'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'deadline', ' hidden')?>'>
|
||||
<?php echo $lang->bug->deadline;?>
|
||||
<?php if(isset($requiredFields['deadline'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-90px<?php echo zget($visibleFields, 'status', ' hidden')?>'><?php echo $lang->bug->status;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'os', ' hidden')?>'>
|
||||
<?php echo $lang->bug->os;?>
|
||||
<?php if(isset($requiredFields['os'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'browser', ' hidden')?>'>
|
||||
<?php echo $lang->bug->browser;?>
|
||||
<?php if(isset($requiredFields['browser'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'keywords', ' hidden')?>'>
|
||||
<?php echo $lang->bug->keywords;?>
|
||||
<?php if(isset($requiredFields['keywords'])) echo " <span class='required'></span>";?>
|
||||
</th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'resolvedBy', ' hidden')?>'><?php echo $lang->bug->resolvedByAB;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'resolution', ' hidden')?>'><?php echo $lang->bug->resolutionAB;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($bugs as $bugID => $bug):?>
|
||||
<?php
|
||||
if(!$productID)
|
||||
|
||||
<?php if(isset($suhosinInfo)):?>
|
||||
<div class='alert alert-info'><?php echo $suhosinInfo;?></div>
|
||||
<?php else:?>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
$requiredFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field)$visibleFields[$field] = '';
|
||||
}
|
||||
foreach(explode(',', $this->config->bug->edit->requiredFields) as $field)
|
||||
{
|
||||
if($field)
|
||||
{
|
||||
$product = $this->product->getByID($bug->product);
|
||||
|
||||
$plans = $this->loadModel('productplan')->getPairs($bug->product, $branch);
|
||||
$plans = array('' => '', 'ditto' => $this->lang->bug->ditto) + $plans;
|
||||
|
||||
$branches = $product->type == 'normal' ? array('' => '') : $this->loadModel('branch')->getPairs($product->id);
|
||||
if($product->type != 'normal')
|
||||
{
|
||||
foreach($branches as $branchID => $branchName) $branches[$branchID] = '/' . $product->name . '/' . $branchName;
|
||||
$branches = array('ditto' => $this->lang->story->ditto) + $branches;
|
||||
}
|
||||
$requiredFields[$field] = '';
|
||||
if(strpos(",{$config->bug->list->customBatchEditFields},", ",{$field},") !== false) $visibleFields[$field] = '';
|
||||
}
|
||||
/**
|
||||
* Remove designchange, newfeature, trackings from the typeList, because should be tracked in story or task.
|
||||
* These thress types if upgrade from bugfree2.x.
|
||||
*/
|
||||
if($bug->type != 'designchange') unset($typeList['designchange']);
|
||||
if($bug->type != 'newfeature') unset($typeList['newfeature']);
|
||||
if($bug->type != 'trackthings') unset($typeList['trackthings']);
|
||||
?>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo $bugID . html::hidden("bugIDList[$bugID]", $bugID);?></td>
|
||||
<td <?php echo zget($visibleFields, 'type', "class='hidden'")?>><?php echo html::select("types[$bugID]", $typeList, $bug->type, 'class=form-control');?></td>
|
||||
<td <?php echo zget($visibleFields, 'severity', "class='hidden'")?>><?php echo html::select("severities[$bugID]", $severityList, $bug->severity, 'class=form-control');?></td>
|
||||
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pris[$bugID]", $priList, $bug->pri, 'class=form-control');?></td>
|
||||
<td style='overflow:visible' title='<?php echo $bug->title?>'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::hidden("colors[$bugID]", $bug->color, "data-provide='colorpicker' data-wrapper='input-group-btn fix-border-right' data-pull-menu-right='false' data-btn-tip='{$lang->bug->colorTag}' data-update-text='#titles\\[{$bugID}\\]'");?>
|
||||
<?php echo html::input("titles[$bugID]", $bug->title, 'class=form-control');?>
|
||||
<div>
|
||||
</td>
|
||||
<?php if($branchProduct):?>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'branch', ' hidden')?>' style='overflow:visible'>
|
||||
<?php $branchProductID = $productID ? $productID : $product->id;?>
|
||||
<?php $disabled = (isset($product) and $product->type == 'normal') ? "disabled='disabled'" : '';?>
|
||||
<?php echo html::select("branches[$bugID]", $branches, $bug->branch, "class='form-control chosen' $disabled");?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'productplan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plans[$bugID]", $plans, $bug->plan, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>' style='overflow:visible'><?php echo html::select("assignedTos[$bugID]", $users, $bug->assignedTo, "class='form-control chosen'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'deadline', ' hidden')?>' style='overflow:visible'><?php echo html::input("deadlines[$bugID]", $bug->deadline, "class='form-control form-date'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'status', "class='hidden'")?>><?php echo html::select("statuses[$bugID]", $statusList, $bug->status, 'class=form-control');?></td>
|
||||
<td <?php echo zget($visibleFields, 'os', "class='hidden'")?>><?php echo html::select("os[$bugID]", $osList, $bug->os, 'class=form-control');?></td>
|
||||
<td <?php echo zget($visibleFields, 'browser', "class='hidden'")?>><?php echo html::select("browsers[$bugID]", $browserList, $bug->browser, 'class=form-control');?></td>
|
||||
<td <?php echo zget($visibleFields, 'keywords', "class='hidden'")?>><?php echo html::input("keywords[$bugID]", $bug->keywords, 'class=form-control');?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'resolvedBy', ' hidden')?>' style='overflow:visible'><?php echo html::select("resolvedBys[$bugID]", $users, $bug->resolvedBy, "class='form-control chosen'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'resolution', "class='hidden'")?>>
|
||||
<table class='w-p100'>
|
||||
<tr>
|
||||
<td class='pd-0'>
|
||||
<?php echo html::select("resolutions[$bugID]", $resolutionList, $bug->resolution, "class=form-control onchange=setDuplicate(this.value,$bugID)");?>
|
||||
</td>
|
||||
<td class='pd-0 w-p50' id='<?php echo 'duplicateBugBox' . $bugID;?>' <?php if($bug->resolution != 'duplicate') echo "style='display:none'";?>>
|
||||
<?php echo html::input("duplicateBugs[$bugID]", '', "class=form-control placeholder='{$lang->bug->duplicateBug}'");?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan='<?php echo $branchProduct ? $columns : ($columns - 1);?>' class='text-center'><?php echo html::submitButton();?></td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=bug§ion=custom&key=batchEditFields')?>
|
||||
<?php include '../../common/view/customfield.html.php';?>
|
||||
}
|
||||
$columns = count($visibleFields) + 2;
|
||||
?>
|
||||
<form class='load-indicator main-form' method='post' target='hiddenwin' action="<?php echo inLink('batchEdit', "productID=$productID")?>" id='batchEditForm'>
|
||||
<table class='table table-form'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-50px'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-110px<?php echo zget($visibleFields, 'type', ' hidden') . zget($requiredFields, 'type', '', ' required');?>'><?php echo $lang->bug->type;?></th>
|
||||
<th class='w-70px<?php echo zget($visibleFields, 'severity', ' hidden') . zget($requiredFields, 'severity', '', ' required');?>'><?php echo $lang->bug->severityAB;?></th>
|
||||
<th class='w-70px<?php echo zget($visibleFields, 'pri', ' hidden') . zget($requiredFields, 'pri', '', ' required');?>'><?php echo $lang->bug->pri;?></th>
|
||||
<th class="required <?php if(count($visibleFields) >= 10) echo ' w-150px';?>"><?php echo $lang->bug->title;?></th>
|
||||
<?php if($branchProduct):?>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'branch', ' hidden')?>'><?php echo $lang->bug->branch;?></th>
|
||||
<?php endif;?>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'productplan', ' hidden') . zget($requiredFields, 'productplan', '', ' required');?>'><?php echo $lang->bug->productplan;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'assignedTo', ' hidden') . zget($requiredFields, 'assignedTo', '', ' required');?>'><?php echo $lang->bug->assignedTo;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'deadline', ' hidden') . zget($requiredFields, 'deadline', '', ' required');?>'><?php echo $lang->bug->deadline;?></th>
|
||||
<th class='w-90px<?php echo zget($visibleFields, 'status', ' hidden')?>'><?php echo $lang->bug->status;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'os', ' hidden') . zget($requiredFields, 'os', '', ' required');?>'><?php echo $lang->bug->os;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'browser', ' hidden') . zget($requiredFields, 'browser', '', ' required');?>'><?php echo $lang->bug->browser;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'keywords', ' hidden') . zget($requiredFields, 'keywords', '', ' required');?>'><?php echo $lang->bug->keywords;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'resolvedBy', ' hidden')?>'><?php echo $lang->bug->resolvedByAB;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'resolution', ' hidden')?>'><?php echo $lang->bug->resolutionAB;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($bugs as $bugID => $bug):?>
|
||||
<?php
|
||||
if(!$productID)
|
||||
{
|
||||
$product = $this->product->getByID($bug->product);
|
||||
|
||||
$plans = $this->loadModel('productplan')->getPairs($bug->product, $branch);
|
||||
$plans = array('' => '', 'ditto' => $this->lang->bug->ditto) + $plans;
|
||||
|
||||
$branches = $product->type == 'normal' ? array('' => '') : $this->loadModel('branch')->getPairs($product->id);
|
||||
if($product->type != 'normal')
|
||||
{
|
||||
foreach($branches as $branchID => $branchName) $branches[$branchID] = '/' . $product->name . '/' . $branchName;
|
||||
$branches = array('ditto' => $this->lang->story->ditto) + $branches;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Remove designchange, newfeature, trackings from the typeList, because should be tracked in story or task.
|
||||
* These thress types if upgrade from bugfree2.x.
|
||||
*/
|
||||
if($bug->type != 'designchange') unset($typeList['designchange']);
|
||||
if($bug->type != 'newfeature') unset($typeList['newfeature']);
|
||||
if($bug->type != 'trackthings') unset($typeList['trackthings']);
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $bugID . html::hidden("bugIDList[$bugID]", $bugID);?></td>
|
||||
<td <?php echo zget($visibleFields, 'type', "class='hidden'")?>><?php echo html::select("types[$bugID]", $typeList, $bug->type, 'class=form-control');?></td>
|
||||
<td <?php echo zget($visibleFields, 'severity', "class='hidden'")?>><?php echo html::select("severities[$bugID]", $severityList, $bug->severity, 'class=form-control');?></td>
|
||||
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pris[$bugID]", $priList, $bug->pri, 'class=form-control');?></td>
|
||||
<td style='overflow:visible' title='<?php echo $bug->title?>'>
|
||||
<div class='input-group'>
|
||||
<div class="input-control has-icon-right">
|
||||
<?php echo html::input("titles[$bugID]", $bug->title, "class='form-control' autocomplete='off' style='color:{$bug->color}'");?>
|
||||
<div class="colorpicker">
|
||||
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown"><span class="cp-title"></span><span class="color-bar" style="background:<?php echo $bug->color;?>"></span><i class="ic"></i></button>
|
||||
<ul class="dropdown-menu clearfix">
|
||||
<li class="heading"><?php echo $lang->story->colorTag;?><i class="icon icon-close"></i></li>
|
||||
</ul>
|
||||
<?php echo html::hidden("colors[$bugID]", $bug->color, "data-provide='colorpicker' data-icon='color' data-wrapper='input-control-icon-right' data-update-color='#titles\\[{$bugID}\\]'");?>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
</td>
|
||||
<?php if($branchProduct):?>
|
||||
<td class='<?php echo zget($visibleFields, 'branch', ' hidden')?>' style='overflow:visible'>
|
||||
<?php $branchProductID = $productID ? $productID : $product->id;?>
|
||||
<?php $disabled = (isset($product) and $product->type == 'normal') ? "disabled='disabled'" : '';?>
|
||||
<?php echo html::select("branches[$bugID]", $branches, $bug->branch, "class='form-control chosen' $disabled");?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td class='<?php echo zget($visibleFields, 'productplan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plans[$bugID]", $plans, $bug->plan, "class='form-control chosen'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>' style='overflow:visible'><?php echo html::select("assignedTos[$bugID]", $users, $bug->assignedTo, "class='form-control chosen'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'deadline', ' hidden')?>' style='overflow:visible'><?php echo html::input("deadlines[$bugID]", $bug->deadline, "class='form-control form-date'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'status', "class='hidden'")?>><?php echo html::select("statuses[$bugID]", $statusList, $bug->status, 'class=form-control');?></td>
|
||||
<td <?php echo zget($visibleFields, 'os', "class='hidden'")?>><?php echo html::select("os[$bugID]", $osList, $bug->os, 'class=form-control');?></td>
|
||||
<td <?php echo zget($visibleFields, 'browser', "class='hidden'")?>><?php echo html::select("browsers[$bugID]", $browserList, $bug->browser, 'class=form-control');?></td>
|
||||
<td <?php echo zget($visibleFields, 'keywords', "class='hidden'")?>><?php echo html::input("keywords[$bugID]", $bug->keywords, 'class=form-control');?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'resolvedBy', ' hidden')?>' style='overflow:visible'><?php echo html::select("resolvedBys[$bugID]", $users, $bug->resolvedBy, "class='form-control chosen'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'resolution', "class='hidden'")?>>
|
||||
<table class='table-borderless w-100px'>
|
||||
<tr>
|
||||
<td class='pd-0'><?php echo html::select("resolutions[$bugID]", $resolutionList, $bug->resolution, "class=form-control onchange=setDuplicate(this.value,$bugID)");?></td>
|
||||
<td class='pd-0 w-p50' id='<?php echo 'duplicateBugBox' . $bugID;?>' <?php if($bug->resolution != 'duplicate') echo "style='display:none'";?>>
|
||||
<?php echo html::input("duplicateBugs[$bugID]", '', "class=form-control placeholder='{$lang->bug->duplicateBug}'");?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan='<?php echo $branchProduct ? $columns : ($columns - 1);?>' class='text-center'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?></td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user