* Finish task #70015.
This commit is contained in:
@@ -8,3 +8,4 @@
|
||||
.dropdown-list > li > a:focus {color: #1a4f85; text-decoration: none; background-color: #ddd;}
|
||||
|
||||
.btn-toolbar .nav-title {float: left; display: inline-block; padding: 6px 12px; margin-bottom: 0; font-size: 13px; font-weight: bolder; line-height: 18px; text-align: center; white-space: nowrap; vertical-align: middle;}
|
||||
#myStoryForm table tbody tr td.c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #EDEEF2; margin: 0 4px 0 0;}
|
||||
|
||||
@@ -10,3 +10,4 @@
|
||||
.table td.c-hours {padding-right: 12px;}
|
||||
.main-table tbody > tr.table-children > td:first-child::before {width: 3px;}
|
||||
@-moz-document url-prefix() {.main-table tbody > tr.table-children > td:first-child::before {width: 4px;};}
|
||||
.c-actions-6 {width: 185px;}
|
||||
|
||||
@@ -114,8 +114,15 @@
|
||||
echo common::buildIconButton('story', 'review', "$vars&from=product&storyType=requirement", $story, 'list', 'search', '', 'iframe', true);
|
||||
}
|
||||
echo common::buildIconButton('story', 'recall', "$vars&from=list&storyType=requirement", $story, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall);
|
||||
echo common::buildIconButton('story', 'close', "$vars&from=&storyType=requirement", $story, 'list', '', '', 'iframe', true);
|
||||
echo common::buildIconButton('story', 'edit', "$vars&from=default&storyType=requirement", $story, 'list', '', '', 'iframe', true, "data-width='95%'");
|
||||
|
||||
$storyType = 'storyType=requirement';
|
||||
if((common::hasPriv('story', 'change', '', $storyType) or (strpos('draft,changing', $story->status) !== false and common::hasPriv('story', 'submitReview', '', $storyType)) or (strpos('active,reviewing,closed', $story->status) !== false and common::hasPriv('story', 'review', '', $storyType)) or common::hasPriv('story', 'recall', '', $storyType) or common::hasPriv('story', 'edit', '', $storyType)) and common::hasPriv('story', 'close', '', $storyType))
|
||||
{
|
||||
echo "<div class='dividing-line'></div>";
|
||||
}
|
||||
|
||||
echo common::buildIconButton('story', 'close', "$vars&from=&storyType=requirement", $story, 'list', '', '', 'iframe', true);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
@@ -163,8 +170,13 @@
|
||||
}
|
||||
|
||||
common::printIcon('story', 'recall', "$vars&from=list&storyType=story", $child, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall);
|
||||
common::printIcon('story', 'close', "$vars&from=&storyType=story", $child, 'list', '', '', 'iframe', true);
|
||||
common::printIcon('story', 'edit', "$vars&from=default&storyType=story", $child, 'list');
|
||||
$storyType = 'storyType=story';
|
||||
if((common::hasPriv('story', 'change', '', $storyType) or (strpos('draft,changing', $story->status) !== false and common::hasPriv('story', 'submitReview', '', $storyType)) or (strpos('active,reviewing,closed', $story->status) !== false and common::hasPriv('story', 'review', '', $storyType)) or common::hasPriv('story', 'recall', '', $storyType) or common::hasPriv('story', 'edit', '', $storyType)) and common::hasPriv('story', 'close', '', $storyType))
|
||||
{
|
||||
echo "<div class='dividing-line'></div>";
|
||||
}
|
||||
common::printIcon('story', 'close', "$vars&from=&storyType=story", $child, 'list', '', '', 'iframe', true);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -116,9 +116,19 @@
|
||||
}
|
||||
|
||||
echo common::buildIconButton('story', 'recall', $vars, $story, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall);
|
||||
echo common::buildIconButton('story', 'close', $vars, $story, 'list', '', '', 'iframe', true);
|
||||
echo common::buildIconButton('story', 'edit', $vars, $story, 'list', '', '', 'iframe', true, "data-width='95%'");
|
||||
echo common::buildIconButton('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap', '', 'iframe', true, "data-width='95%'");
|
||||
|
||||
if((common::hasPriv('story', 'change') or (strpos('draft,changing', $story->status) !== false and common::hasPriv('story', 'submitReview')) or (strpos('active,reviewing,closed', $story->status) !== false and common::hasPriv('story', 'review')) or common::hasPriv('story', 'recall') or common::hasPriv('story', 'edit')) and (common::hasPriv('testcase', 'create') or common::hasPriv('story', 'close')))
|
||||
{
|
||||
echo "<div class='dividing-line'></div>";
|
||||
}
|
||||
|
||||
echo common::buildIconButton('testcase', 'create', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap', '', 'iframe', true, "data-width='95%'");
|
||||
if(common::hasPriv('testcase', 'create') and common::hasPriv('story', 'close') )
|
||||
{
|
||||
echo "<div class='dividing-line'></div>";
|
||||
}
|
||||
echo common::buildIconButton('story', 'close', $vars, $story, 'list', '', '', 'iframe', true);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
@@ -165,9 +175,17 @@
|
||||
common::printIcon('story', 'review', $vars, $child, 'list', 'search', '', 'iframe', true);
|
||||
}
|
||||
common::printIcon('story', 'recall', $vars, $child, 'list', 'undo', 'hiddenwin', '', '', '', $lang->story->recall);
|
||||
common::printIcon('story', 'close', $vars, $child, 'list', '', '', 'iframe', true);
|
||||
common::printIcon('story', 'edit', $vars, $child, 'list', '', '', 'iframe', true, "data-width='95%'");
|
||||
common::printIcon('story', 'createCase', "productID=$child->product&branch=$child->branch&module=0&from=¶m=0&$vars", $child, 'list', 'sitemap', '', 'iframe', true, "data-width='95%'");
|
||||
if((common::hasPriv('story', 'change') or (strpos('draft,changing', $story->status) !== false and common::hasPriv('story', 'submitReview')) or (strpos('active,reviewing,closed', $story->status) !== false and common::hasPriv('story', 'review')) or common::hasPriv('story', 'recall') or common::hasPriv('story', 'edit')) and (common::hasPriv('testcase', 'create') or common::hasPriv('story', 'close')))
|
||||
{
|
||||
echo "<div class='dividing-line'></div>";
|
||||
}
|
||||
common::printIcon('testcase', 'create', "productID=$child->product&branch=$child->branch&module=0&from=¶m=0&$vars", $child, 'list', 'sitemap', '', 'iframe', true, "data-width='95%'");
|
||||
if(common::hasPriv('testcase', 'create') and common::hasPriv('story', 'close') )
|
||||
{
|
||||
echo "<div class='dividing-line'></div>";
|
||||
}
|
||||
common::printIcon('story', 'close', $vars, $child, 'list', '', '', 'iframe', true);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
+17
-11
@@ -4193,7 +4193,6 @@ class storyModel extends model
|
||||
if($action == 'close') return $story->status != 'closed';
|
||||
if($action == 'activate') return $story->status == 'closed';
|
||||
if($action == 'assignto') return $story->status != 'closed';
|
||||
if($action == 'createcase') return $story->type != 'requirement';
|
||||
if($action == 'batchcreate' and $story->parent > 0) return false;
|
||||
if($action == 'batchcreate' and $story->type == 'requirement' and $story->status != 'closed') return strpos('draft,reviewing,changing', $story->status) === false;
|
||||
if($action == 'batchcreate' and $config->vision == 'lite' and ($story->status == 'active' and ($story->stage == 'wait' or $story->stage == 'projected'))) return true;
|
||||
@@ -4260,9 +4259,10 @@ class storyModel extends model
|
||||
$menu .= $this->buildMenu('story', 'recall', $params . "&from=list&confirm=no&storyType=$story->type", $story, $type, 'undo', 'hiddenwin', 'showinonlybody', false, '', $title);
|
||||
|
||||
$menu .= $this->buildMenu('story', 'edit', $params . "&kanbanGroup=default&storyType=$story->type", $story, $type, '', '', 'showinonlybody');
|
||||
$vars = "storyType={$story->type}";
|
||||
if(in_array($this->app->tab, array('product', 'project')))
|
||||
{
|
||||
if((common::hasPriv('story', 'change') or common::hasPriv('story', 'recall') or (strpos('draft,changing', $story->status) !== false and common::hasPriv('story', 'submitReview')) or (strpos('active,reviewing,closed', $story->status) !== false and common::hasPriv('story', 'review')) or common::hasPriv('story', 'edit')) and ($storyType == 'story' and common::hasPriv('story', 'batchCreate') or common::hasPriv('testcase', 'create') or ($storyType == 'requirement' and common::hasPriv('story', 'close'))))
|
||||
if((common::hasPriv('story', 'change', '', $vars) or common::hasPriv('story', 'recall', '', $vars) or (strpos('draft,changing', $story->status) !== false and common::hasPriv('story', 'submitReview', '', $vars)) or (strpos('active,reviewing,closed', $story->status) !== false and common::hasPriv('story', 'review', '', $vars)) or common::hasPriv('story', 'edit', '', $vars)) and ($this->app->tab == 'product' and (common::hasPriv('story', 'batchCreate', '', 'storyType=story')) or ($story->type == 'story' and common::hasPriv('testcase', 'create')) or common::hasPriv('story', 'close', '', $vars) or ($this->app->tab == 'project' and common::hasPriv('projectstory', 'unlinkStory'))))
|
||||
{
|
||||
$menu .= "<div class='dividing-line'></div>";
|
||||
}
|
||||
@@ -4271,7 +4271,7 @@ class storyModel extends model
|
||||
if($this->app->tab == 'product' and $storyType == 'requirement')
|
||||
{
|
||||
$menu .= $this->buildMenu('story', 'close', $params . "&from=&storyType=$story->type", $story, $type, '', '', 'iframe', true);
|
||||
if(common::hasPriv('story', 'close') and (common::hasPriv('testcase', 'create') or common::hasPriv('story', 'createCase')))
|
||||
if(common::hasPriv('story', 'close', '', $vars) and (common::hasPriv('story', 'batchCreate', '', 'storyType=story') or ($story->type == 'story' and common::hasPriv('testcase', 'create'))))
|
||||
{
|
||||
$menu .= "<div class='dividing-line'></div>";
|
||||
}
|
||||
@@ -4432,26 +4432,32 @@ class storyModel extends model
|
||||
$this->lang->task->batchCreate = $this->lang->execution->batchWBS;
|
||||
if($hasDBPriv) $menu .= common::printIcon('task', 'batchCreate', "executionID=$executionID&story={$story->id}", '', 'list', 'pluses', '', $toTaskDisabled);
|
||||
|
||||
if(((strpos('draft,changing', $story->status) !== false and common::hasPriv('story', 'submitReview')) or (strpos('active,reviewing,closed', $story->status) !== false and common::hasPriv('story', 'review')) or common::hasPriv('story', 'recall') or common::hasPriv('task', 'create') or common::hasPriv('task', 'batchCreate')) and (($hasDBPriv and common::hasPriv('testcase', 'create')) or common::hasPriv('execution', 'storyEstimate', $execution) or common::hasPriv('execution', 'unlinkStory', $execution)))
|
||||
if(((strpos('draft,changing', $story->status) !== false and common::hasPriv('story', 'submitReview')) or (strpos('active,reviewing,closed', $story->status) !== false and common::hasPriv('story', 'review')) or common::hasPriv('story', 'recall') or common::hasPriv('task', 'create') or common::hasPriv('task', 'batchCreate')) and (($hasDBPriv and common::hasPriv('testcase', 'create')) or common::hasPriv('execution', 'storyEstimate', $execution) or common::hasPriv('execution', 'unlinkStory', $execution) or common::hasPriv('execution', 'unlinkStory', $execution)))
|
||||
{
|
||||
$menu .= "<div class='dividing-line'></div>";
|
||||
}
|
||||
|
||||
if(common::hasPriv('execution', 'storyEstimate', $execution))
|
||||
{
|
||||
$menu .= $this->buildMenu('execution', 'storyEstimate', "executionID=$executionID&storyID=$story->id", $story, $type, 'estimate', '', 'iframe', true, "data-width='470px'");
|
||||
}
|
||||
|
||||
if(common::hasPriv('execution', 'unlinkStory', $execution))
|
||||
{
|
||||
$menu .= common::printIcon('execution', 'unlinkStory', "executionID=$executionID&storyID=$story->id&confirm=no", '', 'list', 'unlink', 'hiddenwin');
|
||||
$menu .= common::buildIconButton('execution', 'storyEstimate', "executionID=$executionID&storyID=$story->id", '', 'list', 'estimate', '', 'iframe', true, "data-width='470px'");
|
||||
}
|
||||
|
||||
$this->lang->testcase->batchCreate = $this->lang->testcase->create;
|
||||
if($hasDBPriv and common::hasPriv('testcase', 'create'))
|
||||
{
|
||||
$menu .= html::a(helper::createLink('testcase', 'create', "productID=$story->product&branch=$story->branch&moduleID=$story->module&form=¶m=0&storyID=$story->id"), '<i class="icon-testcase-create icon-sitemap"></i>', '', "class='btn' title='{$this->lang->testcase->create}' data-app='qa'");
|
||||
$menu .= common::buildIconButton('testcase', 'create', "productID=$story->product&branch=$story->branch&moduleID=$story->module&form=¶m=0&storyID=$story->id", '', 'list', 'sitemap', '', '', '', "data-app='qa'");
|
||||
}
|
||||
|
||||
if((common::hasPriv('execution', 'storyEstimate', $execution) or ($hasDBPriv and common::hasPriv('testcase', 'create'))) and common::hasPriv('execution', 'unlinkStory', $execution))
|
||||
{
|
||||
$menu .= "<div class='dividing-line'></div>";
|
||||
}
|
||||
|
||||
if(common::hasPriv('execution', 'unlinkStory', $execution))
|
||||
{
|
||||
$menu .= common::buildIconButton('execution', 'unlinkStory', "executionID=$executionID&storyID=$story->id&confirm=no", '', 'list', 'unlink', 'hiddenwin');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
common::printIcon('story', 'close', "storyID=$child->id&from=&storyType=$child->type", $child, 'list', '', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('story', 'activate', "storyID=$child->id&storyType=$child->type", $child, 'list', '', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('story', 'edit', "storyID=$child->id&kanbanGroup=default&storyType=$child->type", $child, 'list');
|
||||
common::printIcon('story', 'createCase', "productID=$child->product&branch=$child->branch&module=0&from=¶m=0&story={$child->id}", $child, 'list', 'sitemap');
|
||||
common::printIcon('testcase', 'create', "productID=$child->product&branch=$child->branch&module=0&from=¶m=0&story={$child->id}", $child, 'list', 'sitemap');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user