* Finish task #8406.

This commit is contained in:
holan20180123
2020-11-17 17:17:38 +08:00
parent 8b15401fc5
commit a34b9be905
2 changed files with 8 additions and 4 deletions
+7 -3
View File
@@ -136,19 +136,23 @@ js::set('foldAll', $lang->project->treeLevel['root']);
</ul>
</div>
<?php endif;?>
<?php
$checkObject = new stdclass();
$checkObject->project = $projectID;
?>
<?php if(!common::checkNotCN()):?>
<?php
$link = $this->createLink('task', 'batchCreate', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : ''));
if($canBeChanged and common::hasPriv('task', 'batchCreate')) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->batchCreate}", '', "class='btn btn btn-secondary'");
if($canBeChanged and common::hasPriv('task', 'batchCreate', $checkObject)) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->batchCreate}", '', "class='btn btn btn-secondary'");
$link = $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : ""));
if($canBeChanged and common::hasPriv('task', 'create')) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->create}", '', "class='btn btn-primary'");
if($canBeChanged and common::hasPriv('task', 'create', $checkObject)) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->create}", '', "class='btn btn-primary'");
?>
<?php else:?>
<?php
echo "<div class='btn-group dropdown-hover'>";
$link = $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : ""));
if($canBeChanged and common::hasPriv('task', 'create')) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->create} </span><span class='caret'>", '', "class='btn btn-primary'");
if($canBeChanged and common::hasPriv('task', 'create' $checkObject)) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->create} </span><span class='caret'>", '', "class='btn btn-primary'");
?>
<ul class='dropdown-menu'>
<?php $disabled = common::hasPriv('task', 'batchCreate') ? '' : "class='disabled'";?>