* Finish task #5335.

This commit is contained in:
chenfei
2019-03-20 17:20:22 +08:00
parent fa5f377d52
commit 1f6c2206c3
12 changed files with 26 additions and 33 deletions
+2
View File
@@ -9,6 +9,8 @@ function showLink(buildID, type, param)
$linkBox.find('[data-ride="table"]').table();
$.toggleQueryBox(true, $linkBox.find('#queryBox'));
});
$('.actions').find("a[href*='" + type + "']").addClass('hidden');
}
$(function()
+2 -2
View File
@@ -60,8 +60,8 @@
<?php if($unlinkedCount):?>
<div class='table-footer'>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar show-always">
<?php echo html::submitButton($lang->build->linkBug, '', 'btn');?>
<div class="table-actions btn-toolbar">
<?php echo html::submitButton($lang->build->linkBug, '', 'btn btn-secondary');?>
</div>
<div class="btn-toolbar">
<?php echo html::a(inlink('view', "buildID={$build->id}&type=bug"), $lang->goback, '', "class='btn'");?>
+1 -1
View File
@@ -64,7 +64,7 @@
<?php if($unlinkedCount):?>
<div class='table-footer'>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar show-always">
<div class="table-actions btn-toolbar">
<?php echo html::submitButton($lang->build->linkStory, '', 'btn btn-secondary');?>
</div>
<div class="btn-toolbar">
-5
View File
@@ -39,11 +39,6 @@ tbody tr td:first-child input{display:none;}
<?php
if(!$build->deleted)
{
if($config->global->flow != 'onlyTest')
{
if(common::hasPriv('build', 'linkStory')) echo html::a(inlink('view', "buildID=$build->id&type=story&link=true"), '<i class="icon-link"></i> ' . $lang->build->linkStory, '', "class='btn btn-link'");
if(common::hasPriv('build', 'linkBug')) echo html::a(inlink('view', "buildID=$build->id&type=bug&link=true"), '<i class="icon-bug"></i> ' . $lang->build->linkBug, '', "class='btn btn-link'");
}
common::printIcon('build', 'edit', "buildID=$build->id", $build);
common::printIcon('build', 'delete', "buildID=$build->id", $build, 'button', 'trash', 'hiddenwin');
}
+2
View File
@@ -9,6 +9,8 @@ function showLink(planID, type, orderBy, param)
$linkBox.find('[data-ride="table"]').table();
$.toggleQueryBox(true, $linkBox.find('#queryBox'));
});
$('.actions').find("a[href*='" + type + "']").addClass('hidden');
}
$(function()
+1 -1
View File
@@ -60,7 +60,7 @@
<?php if($unlinkedCount):?>
<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->linkBug, '', 'btn');?>
<?php echo html::submitButton($lang->productplan->linkBug, '', 'btn btn-secondary');?>
</div>
<?php endif;?>
<div class="btn-toolbar">
+1 -1
View File
@@ -68,7 +68,7 @@
<?php if($unlinkedCount):?>
<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->linkStory, '', 'btn');?>
<?php echo html::submitButton($lang->productplan->linkStory, '', 'btn btn-secondary');?>
</div>
<?php endif;?>
<div class="btn-toolbar">
+13 -18
View File
@@ -37,22 +37,7 @@
<?php
if(!$plan->deleted)
{
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'");
}
if(common::hasPriv('productplan', 'create') and $plan->parent <= '0') echo html::a($this->createLink('productplan', 'create', "product={$plan->product}&branch={$plan->branch}&parent={$plan->id}"), "<i class='icon-treemap-alt'></i>", '', "class='btn btn-link' title='{$this->lang->productplan->children}'");
if(common::hasPriv('productplan', 'create') and $plan->parent <= '0') echo html::a($this->createLink('productplan', 'create', "product={$plan->product}&branch={$plan->branch}&parent={$plan->id}"), "<i class='icon-treemap-alt'></i>" . $this->lang->productplan->children , '', "class='btn btn-link' title='{$this->lang->productplan->children}'");
common::printIcon('productplan', 'edit', "planID=$plan->id", $plan);
common::printIcon('productplan', 'delete', "planID=$plan->id", $plan, 'button', 'trash', 'hiddenwin');
}
@@ -71,12 +56,22 @@
<div class='tab-content'>
<div id='stories' class='tab-pane <?php if($type == 'story') echo 'active'?>'>
<?php $canOrder = common::hasPriv('project', 'storySort');?>
<?php if(common::hasPriv('productplan', 'linkStory')):?>
<div class='actions'>
<?php echo html::a("javascript:showLink($plan->id, \"story\")", '<i class="icon-link"></i> ' . $lang->productplan->linkStory, '', "class='btn btn-primary'");?>
<?php
if(!$plan->deleted)
{
$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-sitemap'></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');
}
if(common::hasPriv('productplan', 'linkStory')) echo html::a("javascript:showLink($plan->id, \"story\")", '<i class="icon-link"></i> ' . $lang->productplan->linkStory, '', "class='btn btn-primary'");
?>
</div>
<?php if(common::hasPriv('productplan', 'linkStory')):?>
<div class='linkBox cell hidden'></div>
<?php endif;?>
<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
+2
View File
@@ -11,6 +11,8 @@ function showLink(releaseID, type, param)
$linkBox.find('[data-ride="table"]').table();
$.toggleQueryBox(true, $linkBox.find('#queryBox'));
});
$('.actions').find("a[href*='" + type + "']").addClass('hidden');
}
$(function()
+1 -1
View File
@@ -64,7 +64,7 @@ $formID = $type == 'leftBug' ? 'unlinkedLeftBugsForm' : 'unlinkedBugsForm';
<?php if($unlinkedCount):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<?php echo html::submitButton($lang->release->linkBug, '', 'btn');?>
<?php echo html::submitButton($lang->release->linkBug, '', 'btn btn-secondary');?>
</div>
<?php endif;?>
<div class="btn-toolbar">
+1 -1
View File
@@ -65,7 +65,7 @@
<?php if($unlinkedCount):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class='table-actions btn-toolbar'>
<?php echo html::submitButton($lang->release->linkStory, '', 'btn');?>
<?php echo html::submitButton($lang->release->linkStory, '', 'btn btn-secondary');?>
</div>
<?php endif;?>
<div class="btn-toolbar">
-3
View File
@@ -33,9 +33,6 @@
<?php
if(!$release->deleted)
{
if(common::hasPriv('release', 'linkStory')) echo html::a(inlink('view', "releaseID=$release->id&type=story&link=true"), '<i class="icon-link"></i> ' . $lang->release->linkStory, '', "class='btn btn-link'");
if(common::hasPriv('release', 'linkBug') and $config->global->flow != 'onlyStory') echo html::a(inlink('view', "releaseID=$release->id&type=bug&link=true"), '<i class="icon-bug"></i> ' . $lang->release->linkBug, '', "class='btn btn-link'");
if(common::hasPriv('release', 'changeStatus', $release))
{
$changedStatus = $release->status == 'normal' ? 'terminate' : 'normal';