* Finish task #54801.
This commit is contained in:
+9
-18
@@ -540,22 +540,15 @@ class buildModel extends model
|
||||
|
||||
if($type == 'browse')
|
||||
{
|
||||
if(common::hasPriv('build', 'linkstory') and common::hasPriv('build', 'view') and common::canBeChanged('build', $build))
|
||||
{
|
||||
echo html::a(helper::createLink('build', 'view', "{$params}&type=story&link=true"), "<i class='icon icon-link'></i>", '', "class='btn' title='{$this->lang->build->linkStory}' data-app='{$tab}'");
|
||||
}
|
||||
$executionID = $tab == 'execution' ? $extraParams['executionID'] : $build->execution;
|
||||
|
||||
if(common::hasPriv('build', 'linkstory') and common::canBeChanged('build', $build)) $menu .= $this->buildMenu('build', 'view', "{$params}&type=story&link=true", $build, $type, 'link', '', '', '', "data-app={$tab}", $this->lang->build->linkStory);
|
||||
|
||||
$menu .= $this->buildMenu('testtask', 'create', "product=$build->product&execution={$executionID}&build=$build->id", $build, $type, 'bullhorn', '', '', '', "data-app='{$tab}'");
|
||||
if($tab == 'execution')
|
||||
{
|
||||
$this->lang->execution->bug = $this->lang->execution->viewBug;
|
||||
$menu .= $this->buildMenu('execution', 'bug', "execution={$extraParams['executionID']}&productID={$extraParams['productID']}&orderBy=status&build=$build->id", $build, $type);
|
||||
}
|
||||
if($tab == 'project')
|
||||
{
|
||||
$this->lang->build->view = $this->lang->project->bug;
|
||||
$menu .= $this->buildMenu('build', 'view', "buildID=$build->id&type=generatedBug", $build, $type, 'bug', '', '', '', "data-app='project'");
|
||||
}
|
||||
|
||||
if($tab == 'execution') $menu .= $this->buildMenu('execution', 'bug', "execution={$extraParams['executionID']}&productID={$extraParams['productID']}&orderBy=status&build=$build->id", $build, $type, '', '', '', '', $this->lang->execution->viewBug);
|
||||
if($tab == 'project') $menu .= $this->buildMenu('build', 'view', "{$params}&type=generatedBug", $build, $type, 'bug', '', '', '', "data-app='project'", $this->lang->project->bug);
|
||||
|
||||
$menu .= $this->buildMenu('build', 'edit', $params, $build, $type);
|
||||
$menu .= $this->buildMenu('build', 'delete', $params, $build, $type, 'trash', 'hiddenwin');
|
||||
}
|
||||
@@ -566,10 +559,8 @@ class buildModel extends model
|
||||
|
||||
$menu .= $this->buildFlowMenu('build', $build, 'view', 'direct');
|
||||
|
||||
$editClickable = $this->buildMenu('build', 'edit', $params, $build, $type, '', '', '', '', '', '', false);
|
||||
$deleteClickable = $this->buildMenu('build', 'delete', $params, $build, $type, '', '', '', '', '', '', false);
|
||||
if(common::hasPriv('build', 'edit') and $editClickable) echo html::a(helper::createLink('build', 'edit', $params), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->build->edit}' data-app='{$app->tab}'");
|
||||
if(common::hasPriv('build', 'delete') and $deleteClickable) echo html::a(helper::createLink('build', 'delete', $params), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->build->delete}' target='hiddenwin' data-app='{$app->tab}'");
|
||||
if(common::hasPriv('build', 'edit')) echo html::a(helper::createLink('build', 'edit', $params), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->build->edit}' data-app='{$app->tab}'");
|
||||
if(common::hasPriv('build', 'delete')) echo html::a(helper::createLink('build', 'delete', $params), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->build->delete}' target='hiddenwin' data-app='{$app->tab}'");
|
||||
}
|
||||
|
||||
return $menu;
|
||||
|
||||
@@ -710,8 +710,8 @@ class releaseModel extends model
|
||||
$menu .= $this->buildFlowMenu('release', $release, 'view', 'direct');
|
||||
$menu .= "<div class='divider'></div>";
|
||||
|
||||
$menu .= $this->buildMenu('release', 'edit', $params, $release, 'view');
|
||||
$menu .= $this->buildMenu('release', 'delete', $params, $release, 'view', 'trash', 'hiddenwin');
|
||||
if(common::hasPriv('release', 'edit', $release)) $menu .= html::a(helper::createLink('release', 'edit', $params), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'");
|
||||
if(common::hasPriv('release', 'delete', $release)) $menu .= html::a(helper::createLink('release', 'delete', $params), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'");
|
||||
|
||||
return $menu;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user