* Finish task #8194.

This commit is contained in:
holan20180123
2020-11-16 11:00:05 +08:00
parent c0e6591afe
commit e9750cfe26
2 changed files with 9 additions and 8 deletions
+4 -8
View File
@@ -136,23 +136,19 @@ 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(common::hasPriv('task', 'batchCreate', $checkObject)) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->batchCreate}", '', "class='btn btn btn-secondary'");
if($changeAllowed and common::hasPriv('task', 'batchCreate')) 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(common::hasPriv('task', 'create', $checkObject)) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->create}", '', "class='btn btn-primary'");
if($changeAllowed and common::hasPriv('task', 'create')) 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(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'");
if($changeAllowed 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'");
?>
<ul class='dropdown-menu'>
<?php $disabled = common::hasPriv('task', 'batchCreate') ? '' : "class='disabled'";?>
@@ -184,7 +180,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->task->noTask;?></span>
<?php if(common::hasPriv('task', 'create', $checkObject)):?>
<?php if($changeAllowed and common::hasPriv('task', 'create')):?>
<?php echo html::a($this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : "")), "<i class='icon icon-plus'></i> " . $lang->task->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>