* Refact view page of product plan.
This commit is contained in:
@@ -14,16 +14,14 @@
|
||||
<div class="modal-content">
|
||||
<?php if($mode == 'edit'):?>
|
||||
<div class='col-sm-3 col-lg-2'>
|
||||
<ul class='list-group'>
|
||||
<?php
|
||||
foreach($lists as $id => $listName)
|
||||
{
|
||||
$listClass = ($id == $listID) ? 'list-group-item active' : 'list-group-item';
|
||||
$listClass = ($id == $listID) ? 'btn btn-block active' : 'btn btn-block';
|
||||
$shareIcon = in_array($id, $globalContacts) ? '<i class="icon icon-share-sign"></i> ' : '';
|
||||
echo html::a(inlink('managecontacts', "listID=$id&mode=edit"), $shareIcon . $listName, '', "class='{$listClass}'");
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?php echo html::a(inlink('managecontacts', "listID=0&mode=new"), '<i class="icon icon-plus"></i> ' . $lang->user->contacts->createList, '', "class='btn btn-block'"); ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -384,16 +384,16 @@ class productplan extends control
|
||||
$allStories = $this->story->getProductStories($this->view->product->id, $plan->branch ? "0,{$plan->branch}" : 0, $moduleID = '0', $status = 'draft,active,changed');
|
||||
}
|
||||
|
||||
$this->view->allStories = $allStories;
|
||||
$this->view->planStories= $this->story->getPlanStories($planID);
|
||||
$this->view->products = $products;
|
||||
$this->view->plan = $plan;
|
||||
$this->view->plans = $this->dao->select('id, end')->from(TABLE_PRODUCTPLAN)->fetchPairs();
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->modules = $this->loadModel('tree')->getOptionMenu($plan->product);
|
||||
$this->view->param = $param;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->allStories = $allStories;
|
||||
$this->view->planStories = $this->story->getPlanStories($planID);
|
||||
$this->view->products = $products;
|
||||
$this->view->plan = $plan;
|
||||
$this->view->plans = $this->dao->select('id, end')->from(TABLE_PRODUCTPLAN)->fetchPairs();
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->modules = $this->loadModel('tree')->getOptionMenu($plan->product);
|
||||
$this->view->param = $param;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
.tabs{position:relative;}
|
||||
.tabs .nav-tabs{border-bottom:none;}
|
||||
.tabs .nav-tabs>li{margin-bottom:0px;}
|
||||
.tabs .tab-content{padding: 0px; border: 0px;}
|
||||
.tabs .tab-content .tab-pane .action{position: absolute; right: 0px; top: 0px;}
|
||||
.tabs .tab-content .tab-pane #querybox{margin:0px; border-left:1px solid #ddd; border-right:1px solid #ddd;}
|
||||
.tabs .tab-content .tab-pane #querybox form{padding-left:0px;}
|
||||
.tabs .tab-content .tab-pane #queryBox{margin:0px; border-left:1px solid #ddd; border-right:1px solid #ddd;}
|
||||
.tabs .tab-content .tab-pane #queryBox form{padding-left:0px;}
|
||||
|
||||
.hide-side .col-main {width: 100%;}
|
||||
.hide-side .col-side .main-side {width: 0; display: none;}
|
||||
@@ -21,10 +19,12 @@ input[type=checkbox].ml-10px{margin-left:10px;}
|
||||
.dropdown-list > li > a:hover,
|
||||
.dropdown-list > li > a:focus {color: #1a4f85;text-decoration: none;background-color: #ddd;}
|
||||
|
||||
.table-actions {padding-left: 5px;}
|
||||
.checkbox.btn{margin-top:0px}
|
||||
#unlinkStoryList, #unlinkBugList{border:1px solid #ddd;}
|
||||
|
||||
.table-footer .text{line-height:30px;}
|
||||
|
||||
#planInfo {border-top: 1px solid #ddd;}
|
||||
#planInfo > div {padding-top: 15px;}
|
||||
|
||||
#querybox form {margin: 0px !important;}
|
||||
#queryBox form {margin: 0px !important;}
|
||||
#moreOrLite {right: 0px !important;}
|
||||
|
||||
@@ -5,7 +5,7 @@ function showLink(planID, type, orderBy, param)
|
||||
{
|
||||
var obj = type == 'story' ? '.tab-pane#stories .linkBox' : '.tab-pane#bugs .linkBox';
|
||||
$(obj).html(data);
|
||||
$('#' + type + 'List').hide();
|
||||
$('#' + type + 'List').closest('form').hide();
|
||||
|
||||
var formID = type == 'story' ? '#unlinkedStoriesForm' : '#unlinkedBugsForm';
|
||||
setTimeout(function(){fixedTfootAction(formID)}, 100);
|
||||
|
||||
@@ -10,65 +10,63 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
$jsRoot = $this->app->getWebRoot() . "js/";
|
||||
include '../../common/view/tablesorter.html.php';
|
||||
?>
|
||||
<div id='querybox' class='show'></div>
|
||||
<div id='queryBox' class='show'></div>
|
||||
<div id='unlinkBugList'>
|
||||
<form method='post' id='unlinkedBugsForm' target='hiddenwin' action='<?php echo $this->createLink('productplan', 'linkBug', "planID=$plan->id&browseType=$browseType¶m=$param&orderBy=$orderBy")?>'>
|
||||
<table class='table table-condensed table-hover table-striped tablesorter table-fixed table-selectable'>
|
||||
<caption class='text-left text-special'><?php echo html::icon('unlink');?> <strong><?php echo $lang->productplan->unlinkedBugs;?></strong></caption>
|
||||
<form class='main-table table-bug' data-ride='table' method='post' id='unlinkedBugsForm' target='hiddenwin' action='<?php echo $this->createLink('productplan', 'linkBug', "planID=$plan->id&browseType=$browseType¶m=$param&orderBy=$orderBy")?>'>
|
||||
<div class='table-header'>
|
||||
<div class='table-statistic'><?php echo html::icon('unlink');?> <strong><?php echo $lang->productplan->unlinkedBugs;?></strong></div>
|
||||
</div>
|
||||
<table class='table'>
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id {sorter:"currency"}'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-pri'> <?php echo $lang->priAB;?></th>
|
||||
<th> <?php echo $lang->bug->title;?></th>
|
||||
<th class='w-user'> <?php echo $lang->openedByAB;?></th>
|
||||
<th class='w-user'> <?php echo $lang->assignedToAB;?></th>
|
||||
<th class='w-status'><?php echo $lang->statusAB;?></th>
|
||||
<tr>
|
||||
<th class='c-id text-center'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-pri'><?php echo $lang->priAB;?></th>
|
||||
<th><?php echo $lang->bug->title;?></th>
|
||||
<th class='w-user'><?php echo $lang->openedByAB;?></th>
|
||||
<th class='w-user'><?php echo $lang->bug->assignedToAB;?></th>
|
||||
<th class='w-80px'><?php echo $lang->bug->status;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $unlinkedCount = 0;?>
|
||||
<?php foreach($allBugs as $bug):?>
|
||||
<?php
|
||||
if(isset($planBugs[$bug->id])) continue;
|
||||
if($bug->plan and helper::diffDate($plans[$bug->plan], helper::today()) > 0) continue;
|
||||
?>
|
||||
<tr>
|
||||
<td class='cell-id'>
|
||||
<input type='checkbox' name='bugs[]' value='<?php echo $bug->id;?>'/>
|
||||
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->id);?>
|
||||
<td class='c-id'>
|
||||
<input class='ml-10px' type='checkbox' name='bugs[]' value='<?php echo $bug->id;?>'/>
|
||||
<?php printf('%03d', $bug->id);?>
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->bug->priList, $bug->pri, $bug->pri);?>'><?php echo zget($lang->bug->priList, $bug->pri, $bug->pri)?></span></td>
|
||||
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', true), $bug->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
|
||||
<td class='text-center'><?php echo $users[$bug->openedBy];?></td>
|
||||
<td class='text-center'><?php echo $users[$bug->assignedTo];?></td>
|
||||
<td class='nobr' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', true), $bug->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
|
||||
<td><?php echo $users[$bug->openedBy];?></td>
|
||||
<td><?php echo $users[$bug->assignedTo];?></td>
|
||||
<td class='text-center bug-<?php echo $bug->status?>'><?php echo $lang->bug->statusList[$bug->status];?></td>
|
||||
</tr>
|
||||
<?php $unlinkedCount++;?>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<?php if($unlinkedCount):?>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='6' class='text-left'>
|
||||
<?php if(count($allBugs))
|
||||
{
|
||||
echo "<div class='table-actions clearfix'>";
|
||||
echo html::selectButton() . html::submitButton($lang->productplan->linkBug);
|
||||
echo html::a(inlink('view', "planID=$plan->id&type=bug&orderBy=$orderBy"), $lang->goback, '', "class='btn'");
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
<td colspan='6' class='text-left table-footer'>
|
||||
<div class='clearfix'>
|
||||
<?php echo html::selectButton() . html::submitButton($lang->productplan->linkBug);?>
|
||||
<?php echo html::a(inlink('view', "planID=$plan->id&type=bug&orderBy=$orderBy"), $lang->goback, '', "class='btn'");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<?php endif;?>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
ajaxGetSearchForm('#bugs .linkBox #querybox');
|
||||
ajaxGetSearchForm('#bugs .linkBox #queryBox');
|
||||
setModal();
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -10,69 +10,68 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
$jsRoot = $this->app->getWebRoot() . "js/";
|
||||
include '../../common/view/tablesorter.html.php';
|
||||
?>
|
||||
<div id='querybox' class='show'></div>
|
||||
<div id='queryBox' class='show'></div>
|
||||
<div id='unlinkStoryList'>
|
||||
<form class="main-table table-story" data-ride="table" method="post" target='hiddenwin' id='unlinkedStoriesForm' action="<?php echo $this->createLink('productplan', 'linkStory', "planID=$plan->id&browseType=$browseType¶m=$param&orderBy=$orderBy")?>">
|
||||
<table class="table has-sort-head" id='storyList'>
|
||||
<caption class='text-left text-special'><?php echo html::icon('unlink');?> <strong><?php echo $lang->productplan->unlinkedStories;?></strong></caption>
|
||||
<div class='table-header'>
|
||||
<div class='table-statistic'><?php echo html::icon('unlink');?> <strong><?php echo $lang->productplan->unlinkedStories;?></strong></div>
|
||||
</div>
|
||||
<table class='table'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-id {sorter:"currency"}'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-pri'> <?php echo $lang->priAB;?></th>
|
||||
<th class='w-200px text-left'> <?php echo $lang->story->plan;?></th>
|
||||
<th class='w-150px text-left'> <?php echo $lang->story->module;?></th>
|
||||
<th> <?php echo $lang->story->title;?></th>
|
||||
<th class='w-user'> <?php echo $lang->openedByAB;?></th>
|
||||
<th class='w-user'> <?php echo $lang->assignedToAB;?></th>
|
||||
<th class='w-30px'> <?php echo $lang->story->estimateAB;?></th>
|
||||
<th class='w-status'><?php echo $lang->statusAB;?></th>
|
||||
<th class='w-60px'> <?php echo $lang->story->stageAB;?></th>
|
||||
<th class='c-id text-center'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-pri'><?php echo $lang->priAB;?></th>
|
||||
<th class='w-200px'><?php echo $lang->story->plan;?></th>
|
||||
<th class='w-150px'><?php echo $lang->story->module;?></th>
|
||||
<th><?php echo $lang->story->title;?></th>
|
||||
<th class='w-user'><?php echo $lang->openedByAB;?></th>
|
||||
<th class='w-user'><?php echo $lang->assignedToAB;?></th>
|
||||
<th class='w-50px'><?php echo $lang->story->estimateAB;?></th>
|
||||
<th class='w-80px'><?php echo $lang->statusAB;?></th>
|
||||
<th class='w-80px text-center'><?php echo $lang->story->stageAB;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $unlinkedCount = 0;?>
|
||||
<?php foreach($allStories as $story):?>
|
||||
<?php if(isset($planStories[$story->id])) continue; ?>
|
||||
<?php if(isset($planStories[$story->id])) continue;?>
|
||||
<tr>
|
||||
<td class='cell-id'>
|
||||
<input type='checkbox' name='stories[]' value='<?php echo $story->id;?>'/>
|
||||
<?php echo html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->id);?>
|
||||
<td class='c-id'>
|
||||
<input class='ml-10px' type='checkbox' name='stories[]' value='<?php echo $story->id;?>'/>
|
||||
<?php printf('%03d', $story->id);?>
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->story->priList, $story->pri, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri)?></span></td>
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri)?></span></td>
|
||||
<td><?php echo $story->planTitle;?></td>
|
||||
<td title='<?php echo $modules[$story->module]?>'><?php echo $modules[$story->module];?></td>
|
||||
<td class='text-left nobr' title='<?php echo $story->title?>'><?php echo html::a($this->createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
|
||||
<td class='text-center'><?php echo zget($users, $story->openedBy);?></td>
|
||||
<td class='text-center'><?php echo zget($users, $story->assignedTo);?></td>
|
||||
<td class='text-center'><?php echo $story->estimate;?></td>
|
||||
<td class='text-center story-<?php echo $story->status?>'><?php echo $lang->story->statusList[$story->status];?></td>
|
||||
<td class='nobr' title='<?php echo $story->title?>'><?php echo html::a($this->createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
|
||||
<td><?php echo zget($users, $story->openedBy);?></td>
|
||||
<td><?php echo zget($users, $story->assignedTo);?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
<td><span class='status-<?php echo $story->status?>'><span class='label label-dot'></span> <?php echo $lang->story->statusList[$story->status];?></span></td>
|
||||
<td class='text-center'><?php echo $lang->story->stageList[$story->stage];?></td>
|
||||
</tr>
|
||||
<?php $unlinkedCount++;?>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<?php if($unlinkedCount):?>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='10' class='text-left'>
|
||||
<?php if(count($allStories))
|
||||
{
|
||||
echo "<div class='table-actions clearfix'>";
|
||||
echo html::selectButton() . html::submitButton($lang->story->linkStory);
|
||||
echo html::a(inlink('view', "planID=$plan->id&type=story&orderBy=$orderBy"), $lang->goback, '', "class='btn'");
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
<div class='clearfix'>
|
||||
<?php echo html::selectButton() . html::submitButton($lang->story->linkStory);?>
|
||||
<?php echo html::a(inlink('view', "planID=$plan->id&type=story&orderBy=$orderBy"), $lang->goback, '', "class='btn'");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<?php endif;?>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
ajaxGetSearchForm('#stories .linkBox #querybox');
|
||||
$(function()
|
||||
{
|
||||
ajaxGetSearchForm('#stories .linkBox #queryBox');
|
||||
setModal();
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -14,79 +14,90 @@
|
||||
<?php js::set('confirmUnlinkStory', $lang->productplan->confirmUnlinkStory)?>
|
||||
<?php js::set('confirmUnlinkBug', $lang->productplan->confirmUnlinkBug)?>
|
||||
<?php js::set('planID', $plan->id);?>
|
||||
<?php $browseLink = $app->session->productPlanList != false ? $app->session->productPlanList : $this->createLink('productplan', 'browse', "productID=$plan->product&branch=$plan->branch");?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php echo html::a($browseLink, '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-link'");?>
|
||||
<div class='divider'></div>
|
||||
<div class='page-title'>
|
||||
<span class='label label-id'><?php echo $plan->id;?></span>
|
||||
<span class='text'><?php echo $plan->title;?></span>
|
||||
<?php if($product->type !== 'normal') echo "<span title='{$lang->product->branchName[$product->type]}' class='label label-branch label-badge'>" . $branches[$branch] . '</span>';?>
|
||||
<span class='label label-info label-badge'><?php echo $plan->begin . '~' . $plan->end;?></span>
|
||||
<?php echo $plan->title;?>
|
||||
<?php if($plan->deleted):?>
|
||||
<span class='label label-danger'><?php echo $lang->plan->deleted;?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!$plan->deleted):?>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<div class='btn-group'>
|
||||
<?php common::printIcon('story', 'batchCreate', "productID=$plan->product&branch=$plan->branch&moduleID=0&story=0&project=0&plan={$plan->id}", $plan, 'button', 'plus');?>
|
||||
<?php common::printIcon('story', 'create', "productID=$plan->product&branch=$plan->branch&moduleID=0&storyID=0&projectID=0&bugID=0&planID=$plan->id", $plan, 'button', 'plus');?>
|
||||
</div>
|
||||
<?php if(common::hasPriv('productplan', 'linkStory'))
|
||||
<?php
|
||||
$browseLink = $this->session->productPlanList ? $this->session->productPlanList : inlink('browse', "planID=$plan->id");
|
||||
if(!$plan->deleted)
|
||||
{
|
||||
//echo html::a(inlink('view', "planID=$plan->id&type=story&orderBy=id_desc&link=true"), '<i class="icon-link"></i> ' . $lang->productplan->linkStory, '', "class='btn btn-secondary'");
|
||||
echo html::a("javascript:showLink($plan->id, \"story\")", '<i class="icon-link"></i> ' . $lang->productplan->linkStory, '', "class='btn btn-primary'");
|
||||
}
|
||||
if(common::hasPriv('productplan', 'linkBug') and $config->global->flow != 'onlyStory')
|
||||
{
|
||||
//echo html::a(inlink('view', "planID=$plan->id&type=bug&orderBy=id_desc&link=true"), '<i class="icon-bug"></i> ' . $lang->productplan->linkBug, '', "class='btn btn-secondary'");
|
||||
echo html::a("javascript:showLink($plan->id, \"bug\")", '<i class="icon-bug"></i> ' . $lang->productplan->linkBug, '', "class='btn btn-primary'");
|
||||
echo "<div class='btn-group' id='createActionMenu'>";
|
||||
$batchMisc = common::hasPriv('story', 'batchCreate') ? 'btn btn-link' : "disabled";
|
||||
$batchLink = common::hasPriv('story', 'batchCreate') ? $this->createLink('story', 'batchCreate', "productID=$plan->product&branch=$plan->branch&moduleID=0&story=0&project=0&plan={$plan->id}") : '#';
|
||||
echo html::a($batchLink, "<i class='icon icon-plus'></i><span class='text'>" . $lang->story->batchCreate . '</span>', '', "class='$batchMisc'");
|
||||
common::printIcon('story', 'create', "productID=$plan->product&branch=$plan->branch&moduleID=0&storyID=0&projectID=0&bugID=0&planID=$plan->id", $plan, 'button', 'plus');
|
||||
echo "</div>";
|
||||
|
||||
if(common::hasPriv('productplan', 'linkStory'))
|
||||
{
|
||||
echo html::a(inlink('view', "planID=$plan->id&type=story&orderBy=id_desc&link=true"), '<i class="icon-link"></i> ' . $lang->productplan->linkStory, '', "class='btn btn-link'");
|
||||
}
|
||||
if(common::hasPriv('productplan', 'linkBug') and $config->global->flow != 'onlyStory')
|
||||
{
|
||||
echo html::a(inlink('view', "planID=$plan->id&type=bug&orderBy=id_desc&link=true"), '<i class="icon-bug"></i> ' . $lang->productplan->linkBug, '', "class='btn btn-link'");
|
||||
}
|
||||
common::printIcon('productplan', 'edit', "planID=$plan->id", $plan);
|
||||
common::printIcon('productplan', 'delete', "planID=$plan->id", $plan, 'button', '', 'hiddenwin');
|
||||
}
|
||||
common::printBack($browseLink, 'btn btn-link');
|
||||
?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class='row-table'>
|
||||
<div class='col-main'>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-col'>
|
||||
<div class='main'>
|
||||
<div class='tabs'>
|
||||
<?php $countStories = count($planStories); $countBugs = count($planBugs);?>
|
||||
<ul class='nav nav-tabs'>
|
||||
<li class='<?php if($type == 'story') echo 'active'?>'><a href='#stories' data-toggle='tab'><?php echo html::icon($lang->icons['story']) . ' ' . $lang->productplan->linkedStories;?></a></li>
|
||||
<?php if($config->global->flow != 'onlyStory'):?>
|
||||
<li class='<?php if($type == 'bug') echo 'active'?>'><a href='#bugs' data-toggle='tab'><?php echo html::icon($lang->icons['bug']) . ' ' . $lang->productplan->linkedBugs;?></a></li>
|
||||
<?php endif;?>
|
||||
<li><a href='#planInfo' data-toggle='tab'><?php echo html::icon($lang->icons['plan']) . ' ' . $lang->productplan->view;?></a></li>
|
||||
<li><a href='#planInfo' data-toggle='tab'><?php echo html::icon($lang->icons['plan']) . ' ' . $lang->productplan->view;?></a></li>
|
||||
</ul>
|
||||
<div class='tab-content'>
|
||||
<div id='stories' class='tab-pane <?php if($type == 'story') echo 'active'?>'>
|
||||
<?php if(common::hasPriv('productplan', 'linkStory')):?>
|
||||
<?php $canOrder = common::hasPriv('project', 'storySort');?>
|
||||
<div class='action'>
|
||||
<?php //echo html::a("javascript:showLink($plan->id, \"story\")", '<i class="icon-link"></i> ' . $lang->productplan->linkStory, '', "class='btn btn-sm btn-primary'");?>
|
||||
<?php echo html::a("javascript:showLink($plan->id, \"story\")", '<i class="icon-link"></i> ' . $lang->productplan->linkStory, '', "class='btn btn-sm btn-primary'");?>
|
||||
</div>
|
||||
<div class='linkBox'></div>
|
||||
<?php endif;?>
|
||||
<form class="main-table table-story" data-ride="table" method="post" id='storyForm' action="<?php echo inlink('batchUnlinkStory', "planID=$plan->id&orderBy=$orderBy");?>">
|
||||
<table class="table has-sort-head" id='storyList'>
|
||||
<form class='main-table table-story' data-ride='table' method='post' target='hiddenwin' action="<?php echo inlink('batchUnlinkStory', "planID=$plan->id&orderBy=$orderBy");?>">
|
||||
<table class='table has-sort-head' id='storyList'>
|
||||
<?php $canBatchUnlink = common::hasPriv('productplan', 'batchUnlinkStory');?>
|
||||
<?php $vars = "planID={$plan->id}&type=story&orderBy=%s&link=$link¶m=$param"; ?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='c-id {sorter:false}' > <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class='c-id'>
|
||||
<?php if($canBatchUnlink):?>
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
|
||||
<label></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<?php if($canOrder):?>
|
||||
<th class='w-70px {sorter:false}'><?php common::printOrderLink('order', $orderBy, $vars, $lang->productplan->updateOrder);?></th>
|
||||
<th class='w-70px'><?php common::printOrderLink('order', $orderBy, $vars, $lang->productplan->updateOrder);?></th>
|
||||
<?php endif;?>
|
||||
<th class='w-pri {sorter:false}'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='w-150px text-left {sorter:false}'><?php common::printOrderLink('module', $orderBy, $vars, $lang->story->module);?></th>
|
||||
<th class='text-left {sorter:false}'><?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
|
||||
<th class='w-user {sorter:false}'><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='w-user {sorter:false}'><?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
|
||||
<th class='w-70px {sorter:false}'><?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
|
||||
<th class='w-70px {sorter:false}'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th class='w-80px {sorter:false}'><?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
|
||||
<th class='w-50px {sorter:false}'><?php echo $lang->actions?></th>
|
||||
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='w-150px'><?php common::printOrderLink('module', $orderBy, $vars, $lang->story->module);?></th>
|
||||
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
|
||||
<th class='w-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='w-user'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
|
||||
<th class='w-70px'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
|
||||
<th class='w-70px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th class='w-80px'> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
|
||||
<th class='w-50px'> <?php echo $lang->actions?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class='sortable'>
|
||||
@@ -100,21 +111,26 @@
|
||||
$viewLink = $this->createLink('story', 'view', "storyID=$story->id");
|
||||
$totalEstimate += $story->estimate;
|
||||
?>
|
||||
<tr class='text-center' data-id='<?php echo $story->id;?>'>
|
||||
<td class='cell-id'>
|
||||
<input type='checkbox' name='storyIDList[]' value='<?php echo $story->id;?>'/>
|
||||
<?php echo html::a($viewLink, sprintf("%03d", $story->id));?>
|
||||
<tr data-id='<?php echo $story->id;?>'>
|
||||
<td class='c-id'>
|
||||
<div class="checkbox-primary">
|
||||
<?php if($canBatchUnlink):?>
|
||||
<input type='checkbox' name='storyIDList[]' value='<?php echo $story->id;?>'/>
|
||||
<label></label>
|
||||
<?php endif;?>
|
||||
<?php echo sprintf('%03d', $story->id);?>
|
||||
</div>
|
||||
</td>
|
||||
<?php if($canOrder):?><td class='sort-handler'><i class='icon-move'></i></td><?php endif;?>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->story->priList, $story->pri, $story->pri)?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
|
||||
<td class='text-left nobr'><?php echo zget($modulePairs, $story->module, '');?></td>
|
||||
<td class='text-left nobr' title='<?php echo $story->title?>'><?php echo html::a($viewLink , $story->title);?></td>
|
||||
<td><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
|
||||
<td class='nobr'><?php echo zget($modulePairs, $story->module, '');?></td>
|
||||
<td class='nobr' title='<?php echo $story->title?>'><?php echo html::a($viewLink , $story->title);?></td>
|
||||
<td><?php echo zget($users, $story->openedBy);?></td>
|
||||
<td><?php echo zget($users, $story->assignedTo);?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
<td class='story-<?php echo $story->status?>'><?php echo $lang->story->statusList[$story->status];?></td>
|
||||
<td class='status-<?php echo $story->status?>'><span class='label label-dot'></span> <?php echo $lang->story->statusList[$story->status];?><span></td>
|
||||
<td><?php echo $lang->story->stageList[$story->stage];?></td>
|
||||
<td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if(common::hasPriv('productplan', 'unlinkStory'))
|
||||
{
|
||||
@@ -126,222 +142,230 @@
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='<?php echo $canOrder ? 11 : 10;?>'>
|
||||
<div class='table-actions clearfix'>
|
||||
<?php if(count($planStories)):?>
|
||||
<?php echo html::selectButton();?>
|
||||
<?php
|
||||
$disabled = $canBatchUnlink ? '' : "disabled='disabled'";
|
||||
$actionLink = inlink('batchUnlinkStory', "planID=$plan->id&orderBy=$orderBy");
|
||||
?>
|
||||
<div class='btn-group dropup'>
|
||||
<?php echo html::commonButton($lang->productplan->unlinkStory, ($canBatchUnlink ? '' : 'disabled') . "onclick=\"setFormAction('$actionLink', 'hiddenwin', this)\"");?>
|
||||
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu'>
|
||||
<?php
|
||||
$class = "class='disabled'";
|
||||
|
||||
$canBatchClose = common::hasPriv('story', 'batchClose');
|
||||
$actionLink = $this->createLink('story', 'batchClose', "productID=$plan->product");
|
||||
$misc = $canBatchClose ? "onclick=\"setFormAction('$actionLink', '', this)\"" : $class;
|
||||
echo "<li>" . html::a('#', $lang->close, '', $misc) . "</li>";
|
||||
|
||||
$canBatchEdit = common::hasPriv('story', 'batchEdit');
|
||||
$actionLink = $this->createLink('story', 'batchEdit', "productID=$plan->product&projectID=0&branch=$branch");
|
||||
$misc = $canBatchEdit ? "onclick=\"setFormAction('$actionLink', '', this)\"" : $class;
|
||||
echo "<li>" . html::a('#', $lang->edit, '', $misc) . "</li>";
|
||||
|
||||
if(common::hasPriv('story', 'batchReview'))
|
||||
{
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->story->review, '', "id='reviewItem'");
|
||||
echo "<ul class='dropdown-menu'>";
|
||||
unset($lang->story->reviewResultList['']);
|
||||
unset($lang->story->reviewResultList['revert']);
|
||||
foreach($lang->story->reviewResultList as $key => $result)
|
||||
{
|
||||
$actionLink = $this->createLink('story', 'batchReview', "result=$key");
|
||||
if($key == 'reject')
|
||||
{
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('#', $result, '', "id='rejectItem'");
|
||||
echo "<ul class='dropdown-menu'>";
|
||||
unset($lang->story->reasonList['']);
|
||||
unset($lang->story->reasonList['subdivided']);
|
||||
unset($lang->story->reasonList['duplicate']);
|
||||
|
||||
foreach($lang->story->reasonList as $key => $reason)
|
||||
{
|
||||
$actionLink = $this->createLink('story', 'batchReview', "result=reject&reason=$key");
|
||||
echo "<li>";
|
||||
echo html::a('#', $reason, '', "onclick=\"setFormAction('$actionLink','hiddenwin', this)\"");
|
||||
echo "</li>";
|
||||
}
|
||||
echo '</ul></li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<li>' . html::a('#', $result, '', "onclick=\"setFormAction('$actionLink','hiddenwin', this)\"") . '</li>';
|
||||
}
|
||||
}
|
||||
echo '</ul></li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<li>' . html::a('javascript:;', $lang->story->review, '', $class) . '</li>';
|
||||
}
|
||||
|
||||
if(common::hasPriv('story', 'batchChangeBranch') and $this->session->currentProductType != 'normal')
|
||||
{
|
||||
$withSearch = count($branches) > 8;
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->product->branchName[$this->session->currentProductType], '', "id='branchItem'");
|
||||
echo "<div class='dropdown-menu" . ($withSearch ? ' with-search':'') . "'>";
|
||||
echo '<ul class="dropdown-list">';
|
||||
foreach($branches as $branchID => $branchName)
|
||||
{
|
||||
$actionLink = $this->createLink('story', 'batchChangeBranch', "branchID=$branchID");
|
||||
echo "<li class='option' data-key='$branchID'>" . html::a('#', $branchName, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin', this)\"") . "</li>";
|
||||
}
|
||||
echo '</ul>';
|
||||
if($withSearch) echo "<div class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></div>";
|
||||
echo '</div></li>';
|
||||
}
|
||||
|
||||
if(common::hasPriv('story', 'batchChangeModule'))
|
||||
{
|
||||
$withSearch = count($modules) > 8;
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->story->moduleAB, '', "id='moduleItem'");
|
||||
echo "<div class='dropdown-menu" . ($withSearch ? ' with-search':'') . "'>";
|
||||
echo '<ul class="dropdown-list">';
|
||||
foreach($modules as $moduleId => $module)
|
||||
{
|
||||
$actionLink = $this->createLink('story', 'batchChangeModule', "moduleID=$moduleId");
|
||||
echo "<li class='option' data-key='$moduleId'>" . html::a('#', $module, '', "onclick=\"setFormAction('$actionLink','hiddenwin', this)\"") . "</li>";
|
||||
}
|
||||
echo '</ul>';
|
||||
if($withSearch) echo "<div class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></div>";
|
||||
echo '</div></li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<li>' . html::a('javascript:;', $lang->story->moduleAB, '', $class) . '</li>';
|
||||
}
|
||||
|
||||
if(common::hasPriv('story', 'batchChangePlan'))
|
||||
{
|
||||
unset($plans['']);
|
||||
unset($plans[$plan->id]);
|
||||
$plans = array(0 => $lang->null) + $plans;
|
||||
$withSearch = count($plans) > 8;
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->story->planAB, '', "id='planItem'");
|
||||
echo "<div class='dropdown-menu" . ($withSearch ? ' with-search':'') . "'>";
|
||||
echo '<ul class="dropdown-list">';
|
||||
foreach($plans as $planID => $planName)
|
||||
{
|
||||
$actionLink = $this->createLink('story', 'batchChangePlan', "planID=$planID&oldPlanID=$plan->id");
|
||||
echo "<li class='option' data-key='$planID'>" . html::a('#', $planName, '', "onclick=\"setFormAction('$actionLink','hiddenwin', this)\"") . "</li>";
|
||||
}
|
||||
echo '</ul>';
|
||||
if($withSearch) echo "<div class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></div>";
|
||||
echo '</div></li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<li>' . html::a('javascript:;', $lang->story->planAB, '', $class) . '</li>';
|
||||
}
|
||||
|
||||
if(common::hasPriv('story', 'batchChangeStage'))
|
||||
{
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->story->stageAB, '', "id='stageItem'");
|
||||
echo "<ul class='dropdown-menu'>";
|
||||
$lang->story->stageList[''] = $lang->null;
|
||||
foreach($lang->story->stageList as $key => $stage)
|
||||
{
|
||||
$actionLink = $this->createLink('story', 'batchChangeStage', "stage=$key");
|
||||
echo "<li>" . html::a('#', $stage, '', "onclick=\"setFormAction('$actionLink','hiddenwin', this)\"") . "</li>";
|
||||
}
|
||||
echo '</ul></li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<li>' . html::a('javascript:;', $lang->story->stageAB, '', $class) . '</li>';
|
||||
}
|
||||
|
||||
if(common::hasPriv('story', 'batchAssignTo'))
|
||||
{
|
||||
$withSearch = count($users) > 10;
|
||||
$actionLink = $this->createLink('story', 'batchAssignTo', "productID=$plan->product");
|
||||
echo html::select('assignedTo', $users, '', 'class="hidden"');
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript::', $lang->story->assignedTo, '', 'id="assignItem"');
|
||||
echo "<div class='dropdown-menu" . ($withSearch ? ' with-search':'') . "'>";
|
||||
echo '<ul class="dropdown-list">';
|
||||
foreach ($users as $key => $value)
|
||||
{
|
||||
if(empty($key) or $key == 'closed') continue;
|
||||
echo "<li class='option' data-key='$key'>" . html::a("javascript:$(\".table-actions #assignedTo\").val(\"$key\");setFormAction(\"$actionLink\", false, \"#storyList\")", $value, '', '') . '</li>';
|
||||
}
|
||||
echo "</ul>";
|
||||
if($withSearch) echo "<div class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></div>";
|
||||
echo "</div></li>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<li>' . html::a('javascript:;', $lang->story->assignedTo, '', $class) . '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class='text'><?php echo $summary;?></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<?php if($countStories && $canBatchUnlink):?>
|
||||
<div class='table-footer'>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class='table-actions btn-toolbar'>
|
||||
<?php
|
||||
$disabled = $canBatchUnlink ? '' : "disabled='disabled'";
|
||||
$actionLink = inlink('batchUnlinkStory', "planID=$plan->id&orderBy=$orderBy");
|
||||
?>
|
||||
<div class='btn-group dropup'>
|
||||
<?php echo html::commonButton($lang->productplan->unlinkStory, ($canBatchUnlink ? '' : 'disabled') . "onclick=\"setFormAction('$actionLink', 'hiddenwin', this)\"");?>
|
||||
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu'>
|
||||
<?php
|
||||
$class = "class='disabled'";
|
||||
|
||||
$canBatchClose = common::hasPriv('story', 'batchClose');
|
||||
$actionLink = $this->createLink('story', 'batchClose', "productID=$plan->product");
|
||||
$misc = $canBatchClose ? "onclick=\"setFormAction('$actionLink', '', this)\"" : $class;
|
||||
echo "<li>" . html::a('#', $lang->close, '', $misc) . "</li>";
|
||||
|
||||
$canBatchEdit = common::hasPriv('story', 'batchEdit');
|
||||
$actionLink = $this->createLink('story', 'batchEdit', "productID=$plan->product&projectID=0&branch=$branch");
|
||||
$misc = $canBatchEdit ? "onclick=\"setFormAction('$actionLink', '', this)\"" : $class;
|
||||
echo "<li>" . html::a('#', $lang->edit, '', $misc) . "</li>";
|
||||
|
||||
if(common::hasPriv('story', 'batchReview'))
|
||||
{
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->story->review, '', "id='reviewItem'");
|
||||
echo "<ul class='dropdown-menu'>";
|
||||
unset($lang->story->reviewResultList['']);
|
||||
unset($lang->story->reviewResultList['revert']);
|
||||
foreach($lang->story->reviewResultList as $key => $result)
|
||||
{
|
||||
$actionLink = $this->createLink('story', 'batchReview', "result=$key");
|
||||
if($key == 'reject')
|
||||
{
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('#', $result, '', "id='rejectItem'");
|
||||
echo "<ul class='dropdown-menu'>";
|
||||
unset($lang->story->reasonList['']);
|
||||
unset($lang->story->reasonList['subdivided']);
|
||||
unset($lang->story->reasonList['duplicate']);
|
||||
|
||||
foreach($lang->story->reasonList as $key => $reason)
|
||||
{
|
||||
$actionLink = $this->createLink('story', 'batchReview', "result=reject&reason=$key");
|
||||
echo "<li>";
|
||||
echo html::a('#', $reason, '', "onclick=\"setFormAction('$actionLink','hiddenwin', this)\"");
|
||||
echo "</li>";
|
||||
}
|
||||
echo '</ul></li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<li>' . html::a('#', $result, '', "onclick=\"setFormAction('$actionLink','hiddenwin', this)\"") . '</li>';
|
||||
}
|
||||
}
|
||||
echo '</ul></li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<li>' . html::a('javascript:;', $lang->story->review, '', $class) . '</li>';
|
||||
}
|
||||
|
||||
if(common::hasPriv('story', 'batchChangeBranch') and $this->session->currentProductType != 'normal')
|
||||
{
|
||||
$withSearch = count($branches) > 8;
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->product->branchName[$this->session->currentProductType], '', "id='branchItem'");
|
||||
echo "<div class='dropdown-menu" . ($withSearch ? ' with-search':'') . "'>";
|
||||
echo '<ul class="dropdown-list">';
|
||||
foreach($branches as $branchID => $branchName)
|
||||
{
|
||||
$actionLink = $this->createLink('story', 'batchChangeBranch', "branchID=$branchID");
|
||||
echo "<li class='option' data-key='$branchID'>" . html::a('#', $branchName, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin', this)\"") . "</li>";
|
||||
}
|
||||
echo '</ul>';
|
||||
if($withSearch) echo "<div class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></div>";
|
||||
echo '</div></li>';
|
||||
}
|
||||
|
||||
if(common::hasPriv('story', 'batchChangeModule'))
|
||||
{
|
||||
$withSearch = count($modules) > 8;
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->story->moduleAB, '', "id='moduleItem'");
|
||||
echo "<div class='dropdown-menu" . ($withSearch ? ' with-search':'') . "'>";
|
||||
echo '<ul class="dropdown-list">';
|
||||
foreach($modules as $moduleId => $module)
|
||||
{
|
||||
$actionLink = $this->createLink('story', 'batchChangeModule', "moduleID=$moduleId");
|
||||
echo "<li class='option' data-key='$moduleId'>" . html::a('#', $module, '', "onclick=\"setFormAction('$actionLink','hiddenwin', this)\"") . "</li>";
|
||||
}
|
||||
echo '</ul>';
|
||||
if($withSearch) echo "<div class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></div>";
|
||||
echo '</div></li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<li>' . html::a('javascript:;', $lang->story->moduleAB, '', $class) . '</li>';
|
||||
}
|
||||
|
||||
if(common::hasPriv('story', 'batchChangePlan'))
|
||||
{
|
||||
unset($plans['']);
|
||||
unset($plans[$plan->id]);
|
||||
$plans = array(0 => $lang->null) + $plans;
|
||||
$withSearch = count($plans) > 8;
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->story->planAB, '', "id='planItem'");
|
||||
echo "<div class='dropdown-menu" . ($withSearch ? ' with-search':'') . "'>";
|
||||
echo '<ul class="dropdown-list">';
|
||||
foreach($plans as $planID => $planName)
|
||||
{
|
||||
$actionLink = $this->createLink('story', 'batchChangePlan', "planID=$planID&oldPlanID=$plan->id");
|
||||
echo "<li class='option' data-key='$planID'>" . html::a('#', $planName, '', "onclick=\"setFormAction('$actionLink','hiddenwin', this)\"") . "</li>";
|
||||
}
|
||||
echo '</ul>';
|
||||
if($withSearch) echo "<div class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></div>";
|
||||
echo '</div></li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<li>' . html::a('javascript:;', $lang->story->planAB, '', $class) . '</li>';
|
||||
}
|
||||
|
||||
if(common::hasPriv('story', 'batchChangeStage'))
|
||||
{
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->story->stageAB, '', "id='stageItem'");
|
||||
echo "<ul class='dropdown-menu'>";
|
||||
$lang->story->stageList[''] = $lang->null;
|
||||
foreach($lang->story->stageList as $key => $stage)
|
||||
{
|
||||
$actionLink = $this->createLink('story', 'batchChangeStage', "stage=$key");
|
||||
echo "<li>" . html::a('#', $stage, '', "onclick=\"setFormAction('$actionLink','hiddenwin', this)\"") . "</li>";
|
||||
}
|
||||
echo '</ul></li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<li>' . html::a('javascript:;', $lang->story->stageAB, '', $class) . '</li>';
|
||||
}
|
||||
|
||||
if(common::hasPriv('story', 'batchAssignTo'))
|
||||
{
|
||||
$withSearch = count($users) > 10;
|
||||
$actionLink = $this->createLink('story', 'batchAssignTo', "productID=$plan->product");
|
||||
echo html::select('assignedTo', $users, '', 'class="hidden"');
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript::', $lang->story->assignedTo, '', 'id="assignItem"');
|
||||
echo "<div class='dropdown-menu" . ($withSearch ? ' with-search':'') . "'>";
|
||||
echo '<ul class="dropdown-list">';
|
||||
foreach ($users as $key => $value)
|
||||
{
|
||||
if(empty($key) or $key == 'closed') continue;
|
||||
echo "<li class='option' data-key='$key'>" . html::a("javascript:$(\".table-actions #assignedTo\").val(\"$key\");setFormAction(\"$actionLink\", false, \"#storyList\")", $value, '', '') . '</li>';
|
||||
}
|
||||
echo "</ul>";
|
||||
if($withSearch) echo "<div class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></div>";
|
||||
echo "</div></li>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<li>' . html::a('javascript:;', $lang->story->assignedTo, '', $class) . '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='text'><?php echo $summary;?></div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</form>
|
||||
</div>
|
||||
<div id='bugs' class='tab-pane <?php if($type == 'bug') echo 'active';?>'>
|
||||
<?php if(common::hasPriv('productplan', 'linkBug')):?>
|
||||
<div class='action'>
|
||||
<?php //echo html::a("javascript:showLink($plan->id, \"bug\")", '<i class="icon-bug"></i> ' . $lang->productplan->linkBug, '', "class='btn btn-sm btn-primary'");?>
|
||||
<?php echo html::a("javascript:showLink($plan->id, \"bug\")", '<i class="icon-bug"></i> ' . $lang->productplan->linkBug, '', "class='btn btn-sm btn-primary'");?>
|
||||
</div>
|
||||
<div class='linkBox'></div>
|
||||
<?php endif;?>
|
||||
<form method='post' target='hiddenwin' action="<?php echo inLink('batchUnlinkBug', "planID=$plan->id&orderBy=$orderBy");?>">
|
||||
<table class='table tablesorter table-condensed table-hover table-striped table-fixed table-selectable' id='bugList'>
|
||||
<form class='main-table table-bug' data-ride='table' method='post' target='hiddenwin' action="<?php echo inLink('batchUnlinkBug', "planID=$plan->id&orderBy=$orderBy");?>">
|
||||
<table class='table has-sort-head' id='bugList'>
|
||||
<?php $canBatchUnlink = common::hasPriv('productplan', 'batchUnlinkBug');?>
|
||||
<?php $vars = "planID={$plan->id}&type=bug&orderBy=%s&link=$link¶m=$param"; ?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-id {sorter:false}'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class='w-pri {sorter:false}'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='{sorter:false}'> <?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
|
||||
<th class='w-user {sorter:false}'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='w-user {sorter:false}'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
|
||||
<th class='w-status {sorter:false}'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th class='w-50px {sorter:false}'> <?php echo $lang->actions?></th>
|
||||
<th class='c-id'>
|
||||
<?php if($canBatchUnlink):?>
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
|
||||
<label></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='w-80px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
|
||||
<th class='w-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='w-user'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->bug->assignedToAB);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></th>
|
||||
<th class='w-50px'> <?php echo $lang->actions?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $canBatchUnlink = common::hasPriv('productPlan', 'batchUnlinkBug');?>
|
||||
<?php foreach($planBugs as $bug):?>
|
||||
<tr class='text-center'>
|
||||
<td class='cell-id'>
|
||||
<input type='checkbox' name='unlinkBugs[]' value='<?php echo $bug->id;?>'/>
|
||||
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), sprintf("%03d", $bug->id));?>
|
||||
<tr>
|
||||
<td class='c-id'>
|
||||
<div class="checkbox-primary">
|
||||
<?php if($canBatchUnlink):?>
|
||||
<input type='checkbox' name='unlinkBugs[]' value='<?php echo $bug->id;?>'/>
|
||||
<label></label>
|
||||
<?php endif;?>
|
||||
<?php echo sprintf('%03d', $bug->id);?>
|
||||
</div>
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->bug->priList, $bug->pri, $bug->pri)?>'><?php echo zget($lang->bug->priList, $bug->pri, $bug->pri);?></span></td>
|
||||
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?></td>
|
||||
<td class='nobr' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?></td>
|
||||
<td><?php echo zget($users, $bug->openedBy);?></td>
|
||||
<td><?php echo zget($users, $bug->assignedTo);?></td>
|
||||
<td class='bug-<?php echo $bug->status?>'><?php echo $lang->bug->statusList[$bug->status];?></td>
|
||||
<td>
|
||||
<td class='status-<?php echo $bug->status?>'><span class='label label-dot'></span> <?php echo $lang->bug->statusList[$bug->status];?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if(common::hasPriv('productplan', 'unlinkBug'))
|
||||
{
|
||||
@@ -353,58 +377,55 @@
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='7'>
|
||||
<div class='table-actions clearfix'>
|
||||
<?php
|
||||
if(count($planBugs) and $canBatchUnlink)
|
||||
{
|
||||
echo html::selectButton();
|
||||
echo html::submitButton($lang->productplan->batchUnlink);
|
||||
}
|
||||
?>
|
||||
<div class='text'><?php echo sprintf($lang->productplan->bugSummary, count($planBugs));?> </div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<?php if($countBugs && $canBatchUnlink):?>
|
||||
<div class='table-footer'>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<?php echo html::submitButton($lang->productplan->batchUnlink);?>
|
||||
</div>
|
||||
<div class='text'><?php echo sprintf($lang->productplan->bugSummary, count($planBugs));?></div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</form>
|
||||
</div>
|
||||
<div id='planInfo' class='tab-pane'>
|
||||
<div class="row-table">
|
||||
<div class="col-main">
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->productplan->info?></legend>
|
||||
<table class='table table-data table-condensed table-borderless'>
|
||||
<tr>
|
||||
<th class='w-80px strong'><?php echo $lang->productplan->title;?></th>
|
||||
<td><?php echo $plan->title;?></td>
|
||||
</tr>
|
||||
<?php if($product->type != 'normal'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->product->branch;?></th>
|
||||
<td><?php echo $branches[$plan->branch];?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->productplan->begin;?></th>
|
||||
<td><?php echo $plan->begin;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->productplan->end;?></th>
|
||||
<td><?php echo $plan->end == '2030-01-01' ? $lang->productplan->future : $plan->end;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->productplan->desc;?></th>
|
||||
<td><?php echo $plan->desc;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="col-side">
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
<div class="main-row">
|
||||
<div class="main-col col-8">
|
||||
<div class='cell'>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo $lang->productplan->info?></div>
|
||||
<div class='detail-content'>
|
||||
<table class='table table-data table-condensed table-borderless'>
|
||||
<tr>
|
||||
<th class='w-80px strong'><?php echo $lang->productplan->title;?></th>
|
||||
<td><?php echo $plan->title;?></td>
|
||||
</tr>
|
||||
<?php if($product->type != 'normal'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->product->branch;?></th>
|
||||
<td><?php echo $branches[$plan->branch];?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->productplan->begin;?></th>
|
||||
<td><?php echo $plan->begin;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->productplan->end;?></th>
|
||||
<td><?php echo $plan->end == '2030-01-01' ? $lang->productplan->future : $plan->end;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->productplan->desc;?></th>
|
||||
<td><?php echo $plan->desc;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -413,19 +434,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainActions">
|
||||
<div class="btn-toolbar">
|
||||
<?php
|
||||
if(!$plan->deleted)
|
||||
{
|
||||
common::printIcon('productplan', 'edit', "planID=$plan->id", $plan);
|
||||
common::printIcon('productplan', 'delete', "planID=$plan->id", $plan, 'button', '', 'hiddenwin');
|
||||
echo "<div class='divider'></div>";
|
||||
}
|
||||
common::printBack($browseLink);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('param', helper::safe64Decode($param))?>
|
||||
<?php js::set('link', $link)?>
|
||||
<?php js::set('planID', $plan->id)?>
|
||||
|
||||
Reference in New Issue
Block a user