name : (isset($branch) ? $branch : $module->name);
$removeType = isset($product) ? 'byproduct' : (isset($branch) ? 'bybranch' : 'bymodule');
$removeLink = inlink('story', "executionID=$execution->id&orderBy=$orderBy&type=$removeType¶m=0&recTotal=0&recPerPage={$pager->recPerPage}");
?>
", '', "class='text-muted'");?>
createLink('execution', 'story', "executionID=$execution->id&orderBy=order_desc&type=all"), "{$lang->story->allStories}" . ($type == 'all' ? " {$pager->recTotal}" : ''), '', "class='btn btn-link" . ($type == 'all' ? " btn-active-text" : '') . "'");
echo html::a($this->createLink('execution', 'story', "executionID=$execution->id&orderBy=order_desc&type=unclosed"), "{$lang->story->unclosed}" . ($type == 'unclosed' ? " {$pager->recTotal}" : ''), '', "class='btn btn-link" . ($type == 'unclosed' ? " btn-active-text" : '') . "'");
}
if(common::hasPriv('execution', 'storykanban')) echo html::a($this->createLink('execution', 'storykanban', "executionID=$execution->id"), "{$lang->execution->kanban}", '', "class='btn btn-link'");
?>
product->searchStory;?>
id", " " . $lang->story->export, '', "class='btn btn-link export iframe' data-app='execution'");
if(common::canModify('execution', $execution))
{
$this->lang->story->create = $this->lang->execution->createStory;
if($productID and !$this->loadModel('story')->checkForceReview())
{
$storyModuleID = (int)$this->cookie->storyModuleParam;
$createStoryLink = $this->createLink('story', 'create', "productID=$productID&branch=0&moduleID={$storyModuleID}&story=0&execution=$execution->id");
$batchCreateLink = $this->createLink('story', 'batchCreate', "productID=$productID&branch=0&moduleID={$storyModuleID}&story=0&execution=$execution->id");
$buttonLink = '';
$buttonTitle = '';
if(common::hasPriv('story', 'batchCreate'))
{
$buttonLink = $batchCreateLink;
$buttonTitle = $lang->story->batchCreate;
}
if(common::hasPriv('story', 'create'))
{
$buttonLink = $createStoryLink;
$buttonTitle = $lang->story->create;
}
$hidden = empty($buttonLink) ? 'hidden' : '';
echo "
";
echo html::a($buttonLink, " $buttonTitle", '', "class='btn btn-secondary $hidden' data-app='execution'");
if($common::hasPriv('story', 'create') and common::hasPriv('story', 'batchCreate'))
{
if(!($isAllProduct and count($products) > 1)) echo "";
echo "
';
}
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("execution=$execution->id");
echo html::a($this->createLink('tutorial', 'wizard', "module=execution&method=linkStory¶ms=$wizardParams"), " {$lang->execution->linkStory}",'', "class='btn btn-link link-story-btn'");
}
else
{
echo "- ";
echo '
- ' . html::a($createStoryLink, $lang->story->create, '', "data-app='execution'") . ' '; echo '
- ' . html::a($batchCreateLink, $lang->story->batchCreate, '', "data-app='execution'") . ' '; echo '
";
$buttonLink = '';
$buttonTitle = '';
$dataToggle = '';
if(common::hasPriv('execution', 'importPlanStories'))
{
$buttonLink = '#linkStoryByPlan';
$buttonTitle = $lang->execution->linkStoryByPlan;
$dataToggle = 'data-toggle="modal"';
}
if(common::hasPriv('execution', 'linkStory'))
{
$buttonLink = inlink('linkStory', "execution=$execution->id");
$buttonTitle = $lang->execution->linkStory;
$dataToggle = '';
}
$hidden = empty($buttonLink) ? 'hidden' : '';
echo html::a($buttonLink, " $buttonTitle", '', "class='btn btn-primary $hidden' $dataToggle");
if(common::hasPriv('execution', 'linkStory') and common::hasPriv('execution', 'importPlanStories'))
{
echo "";
echo "
';
}
}
?>
- ";
echo '
- ' . html::a(inlink('linkStory', "execution=$execution->id"), $lang->execution->linkStory). " "; echo '
- ' . html::a('#linkStoryByPlan', $lang->execution->linkStoryByPlan, '', 'data-toggle="modal"') . " "; echo '