* Optimize code for task #61174.
This commit is contained in:
@@ -1205,8 +1205,13 @@ class story extends control
|
||||
*/
|
||||
public function view($storyID, $version = 0, $param = 0)
|
||||
{
|
||||
$uri = $this->app->getURI(true);
|
||||
$this->session->set('productList', $uri . "#app={$this->app->tab}", 'product');
|
||||
$uri = $this->app->getURI(true);
|
||||
$tab = $this->app->tab;
|
||||
$buildApp = $tab == 'product' ? 'project' : $tab;
|
||||
$releaseApp = $tab == 'execution' ? 'product' : $tab;
|
||||
$this->session->set('productList', $uri . "#app={$tab}", 'product');
|
||||
$this->session->set('releaseList', $uri, $releaseApp);
|
||||
$this->session->set('buildList', $uri, $buildApp);
|
||||
|
||||
$storyID = (int)$storyID;
|
||||
$story = $this->story->getById($storyID, $version, true);
|
||||
|
||||
@@ -497,11 +497,10 @@
|
||||
<td class='pd-0'>
|
||||
<ul class='list-unstyled'>
|
||||
<?php
|
||||
$misc = isonlybody() ? "showinonlybody" : "class='iframe' data-width='80%'";
|
||||
|
||||
$tab = $app->tab == 'product' ? 'project' : $app->tab;
|
||||
foreach($builds as $build)
|
||||
{
|
||||
echo "<li title='$build->id $build->name'>" . html::a($this->createLink('build', 'view', "buildID=$build->id", '', true), "#$build->id $build->name", '', $misc) . '</li>';
|
||||
echo "<li title='$build->id $build->name'>" . html::a($this->createLink('build', 'view', "buildID=$build->id"), "#$build->id $build->name", '', "data-app='{$tab}'") . '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
@@ -512,11 +511,11 @@
|
||||
<td class='pd-0'>
|
||||
<ul class='list-unstyled'>
|
||||
<?php
|
||||
$misc = isonlybody() ? "showinonlybody" : "class='iframe' data-width='80%'";
|
||||
|
||||
$releaseModule = $app->tab == 'project' ? 'projectrelease' : 'release';
|
||||
$tab = $app->tab == 'execution' ? 'product' : $app->tab;
|
||||
foreach($releases as $release)
|
||||
{
|
||||
echo "<li title='$release->id $release->name'>" . html::a($this->createLink('release', 'view', "release=$release->id", '', true), "#$release->id $release->name", '', $misc) . '</li>';
|
||||
echo "<li title='$release->id $release->name'>" . html::a($this->createLink($releaseModule, 'view', "release=$release->id"), "#$release->id $release->name", '', "data-app='{$tab}'") . '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user