* Finish task #9009.

This commit is contained in:
holan20180123
2021-01-12 16:20:49 +08:00
parent 71b30750dc
commit 4f0bad8b61
6 changed files with 94 additions and 63 deletions
+9 -19
View File
@@ -15,23 +15,15 @@
<?php js::set('confirmDelete', $lang->release->confirmDelete)?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<div class="btn-group">
<?php echo html::a('javascript:;', "<span class='text'>{$product->name}</span> <span class='caret'></span>", '', "class='btn btn-link btn-limit' style='border-radius: 2px;' data-toggle='dropdown'")?>
<ul class="dropdown-menu" style="max-height:240px; max-width: 300px; overflow-y:auto">
<?php foreach($products as $product): ?>
<li><?php echo html::a($this->inLink('browse', "productID=$product->id&branch=0&type=$type", '', '', $this->session->PRJ), $product->name);?></li>
<?php endforeach;?>
</ul>
</div>
<?php
echo html::a(inlink('browse', "productID={$product->id}&branch=$branch&type=all"), "<span class='text'>{$lang->release->all}</span>" . ($type == 'all' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$product->id}&branch=$branch&type=normal"), "<span class='text'>{$lang->release->statusList['normal']}</span>" . ($type == 'normal' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$product->id}&branch=$branch&type=terminate"), "<span class='text'>{$lang->release->statusList['terminate']}</span>" . ($type == 'terminate' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "type=all"), "<span class='text'>{$lang->release->all}</span>" . ($type == 'all' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "type=normal"), "<span class='text'>{$lang->release->statusList['normal']}</span>" . ($type == 'normal' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "type=terminate"), "<span class='text'>{$lang->release->statusList['terminate']}</span>" . ($type == 'terminate' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "'");
?>
</div>
<div class="btn-toolbar pull-right">
<?php if(common::canModify('project', $project)):?>
<?php common::printLink('projectrelease', 'create', "productID=$product->id&branch=$branch", "<i class='icon icon-plus'></i> {$lang->release->create}", '', "class='btn btn-primary'");?>
<?php common::printLink('projectrelease', 'create', '', "<i class='icon icon-plus'></i> {$lang->release->create}", '', "class='btn btn-primary'");?>
<?php endif;?>
</div>
</div>
@@ -41,7 +33,7 @@
<p>
<span class="text-muted"><?php echo $lang->release->noRelease;?></span>
<?php if(common::canModify('project', $project) and common::hasPriv('projectrelease', 'create')):?>
<?php echo html::a($this->createLink('projectrelease', 'create', "productID=$product->id&branch=$branch"), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
<?php echo html::a($this->createLink('projectrelease', 'create'), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
</div>
@@ -51,10 +43,9 @@
<tr>
<th class='w-id'><?php echo $lang->release->id;?></th>
<th><?php echo $lang->release->name;?></th>
<th class='w-product'><?php echo $lang->release->product;?></th>
<th class='w-project'><?php echo $lang->executionCommon;?></th>
<th class='w-100px'><?php echo $lang->release->build;?></th>
<?php if(isset($product->type) and $product->type != 'normal'):?>
<th class='text-center w-100px'><?php echo $lang->product->branch;?></th>
<?php endif;?>
<th class='c-date text-center w-100px'><?php echo $lang->release->date;?></th>
<th class='text-center w-90px'><?php echo $lang->release->status;?></th>
<?php
@@ -75,10 +66,9 @@
echo html::a(inlink('view', "release=$release->id"), $release->name) . $flagIcon;
?>
</td>
<td title='<?php echo $release->productName?>'><?php echo $release->productName?></td>
<td title='<?php echo $release->executionName?>'><?php echo $release->executionName?></td>
<td title='<?php echo $release->buildName?>'><?php echo empty($release->project) ? $release->buildName : html::a($this->createLink('build', 'view', "buildID=$release->buildID"), $release->buildName);?></td>
<?php if(isset($product->type) and $product->type != 'normal'):?>
<td class='text-center' title='<?php echo zget($branches, $release->branch, '');?>'><?php echo $branches[$release->branch];?></td>
<?php endif;?>
<td class='text-center'><?php echo $release->date;?></td>
<?php $status = $this->processStatus('release', $release);?>
<td class='c-status text-center' title='<?php echo $status;?>'>