* code for tutorial.

This commit is contained in:
wangyidong
2019-12-05 13:16:27 +08:00
parent 7d6913d91c
commit bedeaaf39e
3 changed files with 25 additions and 7 deletions
+12 -3
View File
@@ -132,14 +132,23 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
<?php else:?>
<div class='btn-group dropdown-hover'>
<?php
$link = common::hasPriv('bug', 'create') ? $this->createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID") : '###';
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&extra=moduleID=$moduleID");
$link = $this->createLink('tutorial', 'wizard', "module=bug&method=create&params=$wizardParams");
echo html::a($link, "<i class='icon icon-plus'></i> {$lang->bug->create} </span><span class='caret'>", '', "class='btn btn-primary btn-bug-create'");
}
else
{
$link = $this->createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID");
$disabled = '';
if(!common::hasPriv('bug', 'create'))
{
$link = '###';
$disabled = "disabled";
}
echo html::a($link, "<i class='icon icon-plus'></i> {$lang->bug->create} </span><span class='caret'>", '', "class='btn btn-primary $disabled'");
}
$disabled = common::hasPriv('bug', 'create') ? '' : "disabled";
echo html::a($link, "<i class='icon icon-plus'></i> {$lang->bug->create} </span><span class='caret'>", '', "class='btn btn-primary $disabled'");
?>
<ul class='dropdown-menu'>
<?php $disabled = common::hasPriv('bug', 'batchCreate') ? '' : "class='disabled'";?>