* Adjust code.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
$(function()
|
||||
{
|
||||
if($('#storyList thead th.c-title').width() < 150) $('#storyList thead th.c-title').width(150);
|
||||
|
||||
$('#storyList').on('sort.sortable', function(e, data)
|
||||
{
|
||||
var list = '';
|
||||
|
||||
@@ -211,33 +211,6 @@
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<!--
|
||||
<tr>
|
||||
<th class='c-id {sorter:false}'>
|
||||
<?php if($canBatchAction):?>
|
||||
<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='c-sort'><?php common::printOrderLink('order', $orderBy, $vars, $lang->execution->orderAB);?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-pri' title=<?php echo $lang->execution->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='c-name'><?php common::printOrderLink('title', $orderBy, $vars, $lang->execution->storyTitle);?></th>
|
||||
<th class='c-category'><?php common::printOrderLink('category', $orderBy, $vars, $lang->story->category);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='c-assignedTo text-center'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
|
||||
<th class='c-estimate text-right'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
|
||||
<th class='c-status'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th class='c-stage'> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
|
||||
<th title='<?php echo $lang->story->taskCount?>' class='c-count'><?php echo $lang->story->taskCountAB;?></th>
|
||||
<th title='<?php echo $lang->story->bugCount?>' class='c-count'><?php echo $lang->story->bugCountAB;?></th>
|
||||
<th title='<?php echo $lang->story->caseCount?>' class='c-count'><?php echo $lang->story->caseCountAB;?></th>
|
||||
<th class='c-actions-7 text-center'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
-->
|
||||
</thead>
|
||||
<tbody id='storyTableList' class='sortable'>
|
||||
<?php foreach($stories as $key => $story):?>
|
||||
@@ -251,108 +224,6 @@
|
||||
$this->story->printCell($value, $story, $users, '', $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases, $useDatatable ? 'datatable' : 'table', '', $execution, $showBranch, $productID);
|
||||
}
|
||||
?>
|
||||
<!--
|
||||
<td class='cell-id'>
|
||||
<?php if($canBatchAction):?>
|
||||
<?php echo html::checkbox('storyIdList', array($story->id => '')) . html::a(helper::createLink('story', 'view', "storyID=$story->id&version=$story->version&from=execution¶m=$execution->id"), sprintf('%03d', $story->id), null, "data-app='execution'");?>
|
||||
<?php else:?>
|
||||
<?php printf('%03d', $story->id);?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<?php if($canOrder):?>
|
||||
<td class='sort-handler c-sort'><i class='icon-move'></i></td>
|
||||
<?php endif;?>
|
||||
<td class='c-pri'><span class='label-pri <?php echo 'label-pri-' . $story->pri?>' title='<?php echo zget($lang->story->priList, $story->pri, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
|
||||
<td class='c-name' title="<?php echo $story->title?>">
|
||||
<?php if($showBranch) $showBranch = isset($this->config->execution->story->showBranch) ? $this->config->execution->story->showBranch : 1;?>
|
||||
<?php if(isset($branchGroups[$story->product][$story->branch]) and $showBranch) echo "<span class='label label-outline label-badge' title={$branchGroups[$story->product][$story->branch]}>" . $branchGroups[$story->product][$story->branch] . '</span>';?>
|
||||
<?php if(!empty($story->module) and isset($modulePairs[$story->module])) echo "<span class='label label-gray label-badge'>{$modulePairs[$story->module]}</span> ";?>
|
||||
<?php if($story->parent > 0) echo "<span class='label'>{$lang->story->childrenAB}</span>";?>
|
||||
<?php echo html::a($storyLink,$story->title, null, "style='color: $story->color' data-app='execution'");?>
|
||||
</td>
|
||||
<td class='c-category' title='<?php echo zget($lang->story->categoryList, $story->category);?>'><?php echo zget($lang->story->categoryList, $story->category);?></td>
|
||||
<td class='c-user' title='<?php echo zget($users, $story->openedBy);?>'><?php echo zget($users, $story->openedBy);?></td>
|
||||
<td class='c-assignedTo <?php if(zget($users, $story->assignedTo) == 'Closed') echo 'closed-story'?> text-center' title='<?php echo zget($users, $story->assignedTo);?>'><?php $this->loadModel('story')->printAssignedHtml($story,$users);?></td>
|
||||
<td class='c-estimate text-right' title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
|
||||
<?php $status = $this->processStatus('story', $story);?>
|
||||
<td class='c-status' title='<?php echo $status;?>'>
|
||||
<span class='status-story status-<?php echo $story->status;?>'><?php echo $status;?></span>
|
||||
</td>
|
||||
<td class='c-stage'><?php echo $lang->story->stageList[$story->stage];?></td>
|
||||
<td class='linkbox c-count'>
|
||||
<?php
|
||||
$tasksLink = $this->createLink('story', 'tasks', "storyID=$story->id&executionID=$execution->id");
|
||||
$storyTasks[$story->id] > 0 ? print(html::a($tasksLink, $storyTasks[$story->id], '', 'class="iframe"')) : print(0);
|
||||
?>
|
||||
<td class='c-count'>
|
||||
<?php
|
||||
$bugsLink = $this->createLink('story', 'bugs', "storyID=$story->id&executionID=$execution->id");
|
||||
$storyBugs[$story->id] > 0 ? print(html::a($bugsLink, $storyBugs[$story->id], '', 'class="iframe"')) : print(0);
|
||||
?>
|
||||
</td>
|
||||
<td class='c-count'>
|
||||
<?php
|
||||
$casesLink = $this->createLink('story', 'cases', "storyID=$story->id&executionID=$execution->id");
|
||||
$storyCases[$story->id] > 0 ? print(html::a($casesLink, $storyCases[$story->id], '', 'class="iframe"')) : print(0);
|
||||
?>
|
||||
</td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
$hasDBPriv = common::hasDBPriv($execution, 'execution');
|
||||
if($canBeChanged)
|
||||
{
|
||||
$param = "executionID={$execution->id}&story={$story->id}&moduleID={$story->module}";
|
||||
|
||||
$story->reviewer = isset($story->reviewer) ? $story->reviewer : array();
|
||||
$story->notReview = isset($story->notReview) ? $story->notReview : array();
|
||||
|
||||
if(common::hasPriv('story', 'review'))
|
||||
{
|
||||
$reviewDisabled = in_array($app->user->account, $story->notReview) and ($story->status == 'draft' or $story->status == 'changed') ? '' : 'disabled';
|
||||
$story->from = 'execution';
|
||||
common::printIcon('story', 'review', "story={$story->id}&from=story", $story, 'list', 'search', '', $reviewDisabled, false, "data-group=execution");
|
||||
}
|
||||
|
||||
if(common::hasPriv('story', 'recall'))
|
||||
{
|
||||
$recallDisabled = empty($story->reviewedBy) and strpos('draft,changed', $story->status) !== false and !empty($story->reviewer) ? '' : 'disabled';
|
||||
common::printIcon('story', 'recall', "story={$story->id}", $story, 'list', 'undo', 'hiddenwin', $recallDisabled, '', '', $lang->story->recall);
|
||||
}
|
||||
|
||||
$lang->task->create = $lang->execution->wbs;
|
||||
$toTaskDisabled = strpos('draft,closed', $story->status) !== false ? 'disabled' : '';
|
||||
if(commonModel::isTutorialMode())
|
||||
{
|
||||
$wizardParams = helper::safe64Encode($param);
|
||||
echo html::a($this->createLink('tutorial', 'wizard', "module=task&method=create¶ms=$wizardParams"), "<i class='icon-plus'></i>",'', "class='btn btn-task-create' title='{$lang->execution->wbs}' data-app='execution'");
|
||||
}
|
||||
else
|
||||
{
|
||||
if($hasDBPriv) common::printIcon('task', 'create', $param, '', 'list', 'plus', '', 'btn-task-create ' . $toTaskDisabled);
|
||||
}
|
||||
|
||||
$lang->task->batchCreate = $lang->execution->batchWBS;
|
||||
if($hasDBPriv) common::printIcon('task', 'batchCreate', "executionID={$execution->id}&story={$story->id}", '', 'list', 'pluses', '', $toTaskDisabled);
|
||||
|
||||
$lang->testcase->batchCreate = $lang->testcase->create;
|
||||
if($productID and $hasDBPriv and common::hasPriv('testcase', 'create'))
|
||||
{
|
||||
echo html::a($this->createLink('testcase', 'create', "productID=$story->product&branch=$story->branch&moduleID=$story->module&form=¶m=0&storyID=$story->id"), '<i class="icon-testcase-create icon-sitemap"></i>', '', "class='btn' title='{$lang->testcase->create}' data-app='qa'");
|
||||
}
|
||||
|
||||
if($canBeChanged and common::hasPriv('execution', 'storyEstimate', $execution))
|
||||
{
|
||||
common::printIcon('execution', 'storyEstimate', "executionID=$execution->id&storyID=$story->id", '', 'list', 'estimate', '', 'iframe', true, "data-width='600px'");
|
||||
}
|
||||
|
||||
if($canBeChanged and common::hasPriv('execution', 'unlinkStory', $execution))
|
||||
{
|
||||
common::printIcon('execution', 'unlinkStory', "executionID=$execution->id&storyID=$story->id&confirm=no", '', 'list', 'unlink', 'hiddenwin');
|
||||
}
|
||||
}
|
||||
?>
|
||||
-->
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user