* finish task #3974.

This commit is contained in:
wangyidong
2018-05-10 10:03:17 +08:00
parent d20a923105
commit 767a210d02
+53 -51
View File
@@ -23,56 +23,58 @@
<?php common::printLink('release', 'create', "productID=$product->id&branch=$branch", "<i class='icon icon-plus'></i> {$lang->release->create}", '', "class='btn btn-primary'");?>
</div>
</div>
<div id="mainContent" class='main-content'>
<table class="main-table table has-sort-head" id='releaseList'>
<thead>
<tr>
<th class='w-id'><?php echo $lang->release->id;?></th>
<th><?php echo $lang->release->name;?></th>
<th><?php echo $lang->release->build;?></th>
<?php if($product->type != 'normal'):?>
<th class='text-center w-100px'><?php echo $lang->product->branch;?></th>
<?php endif;?>
<th class='text-center w-100px'><?php echo $lang->release->date;?></th>
<th class='text-center w-100px'><?php echo $lang->release->status;?></th>
<th class='c-actions-3'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($releases as $release):?>
<tr>
<td><?php echo $release->id;?></td>
<td><?php echo html::a(inlink('view', "release=$release->id"), $release->name);?></td>
<td title='<?php echo $release->buildName?>'><?php echo html::a($this->createLink('build', 'view', "buildID=$release->buildID"), $release->buildName);?></td>
<?php if($product->type != 'normal'):?>
<td class='text-center'><?php echo $branches[$release->branch];?></td>
<?php endif;?>
<td class='text-center'><?php echo $release->date;?></td>
<td class='text-center'><?php echo $lang->release->statusList[$release->status];?></td>
<td class='c-actions'>
<div class='more'>
<?php
if(common::hasPriv('release', 'delete', $release))
{
$deleteURL = $this->createLink('release', 'delete', "releaseID=$release->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"releaseList\",confirmDelete)", '<i class="icon-trash"></i>', '', "class='btn' title='{$lang->release->delete}'");
}
?>
</div>
<?php
if(common::hasPriv('release', 'linkStory')) echo html::a(inlink('view', "releaseID=$release->id&type=story&link=true"), '<i class="icon-link"></i> ', '', "class='btn' title='{$lang->release->linkStory}'");
if(common::hasPriv('release', 'linkBug') and $this->config->global->flow != 'onlyStory') echo html::a(inlink('view', "releaseID=$release->id&type=bug&link=true"), '<i class="icon-bug"></i> ', '', "class='btn' title='{$lang->release->linkBug}'");
if(common::hasPriv('release', 'changeStatus', $release))
{
$changedStatus = $release->status == 'normal' ? 'terminate' : 'normal';
echo html::a(inlink('changeStatus', "releaseID=$release->id&status=$changedStatus"), '<i class="icon-' . ($release->status == 'normal' ? 'pause' : 'play') . '"></i> ', 'hiddenwin', "class='btn' title='{$lang->release->changeStatusList[$changedStatus]}'");
}
common::printIcon('release', 'edit', "release=$release->id", $release, 'list');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div id="mainContent">
<form class='main-table'>
<table class="table table-fixed" id='releaseList'>
<thead>
<tr>
<th class='w-id'><?php echo $lang->release->id;?></th>
<th><?php echo $lang->release->name;?></th>
<th><?php echo $lang->release->build;?></th>
<?php if($product->type != 'normal'):?>
<th class='text-center w-100px'><?php echo $lang->product->branch;?></th>
<?php endif;?>
<th class='text-center w-100px'><?php echo $lang->release->date;?></th>
<th class='text-center w-100px'><?php echo $lang->release->status;?></th>
<th class='c-actions-3'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($releases as $release):?>
<tr>
<td><?php echo $release->id;?></td>
<td><?php echo html::a(inlink('view', "release=$release->id"), $release->name);?></td>
<td title='<?php echo $release->buildName?>'><?php echo html::a($this->createLink('build', 'view', "buildID=$release->buildID"), $release->buildName);?></td>
<?php if($product->type != 'normal'):?>
<td class='text-center'><?php echo $branches[$release->branch];?></td>
<?php endif;?>
<td class='text-center'><?php echo $release->date;?></td>
<td class='text-center'><?php echo $lang->release->statusList[$release->status];?></td>
<td class='c-actions'>
<div class='more'>
<?php
if(common::hasPriv('release', 'delete', $release))
{
$deleteURL = $this->createLink('release', 'delete', "releaseID=$release->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"releaseList\",confirmDelete)", '<i class="icon-trash"></i>', '', "class='btn' title='{$lang->release->delete}'");
}
?>
</div>
<?php
if(common::hasPriv('release', 'linkStory')) echo html::a(inlink('view', "releaseID=$release->id&type=story&link=true"), '<i class="icon-link"></i> ', '', "class='btn' title='{$lang->release->linkStory}'");
if(common::hasPriv('release', 'linkBug') and $this->config->global->flow != 'onlyStory') echo html::a(inlink('view', "releaseID=$release->id&type=bug&link=true"), '<i class="icon-bug"></i> ', '', "class='btn' title='{$lang->release->linkBug}'");
if(common::hasPriv('release', 'changeStatus', $release))
{
$changedStatus = $release->status == 'normal' ? 'terminate' : 'normal';
echo html::a(inlink('changeStatus', "releaseID=$release->id&status=$changedStatus"), '<i class="icon-' . ($release->status == 'normal' ? 'pause' : 'play') . '"></i> ', 'hiddenwin', "class='btn' title='{$lang->release->changeStatusList[$changedStatus]}'");
}
common::printIcon('release', 'edit', "release=$release->id", $release, 'list');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>