* Finish task #8194.

This commit is contained in:
holan20180123
2020-11-12 14:18:08 +08:00
parent 728ff92cf6
commit 4e69741e70
7 changed files with 36 additions and 24 deletions
+8 -1
View File
@@ -107,8 +107,15 @@ class docModel extends model
}
}
/* Determines whether the doc lib is editable. */
$docLib = new stdClass();
$docLib->product = $productID;
$docLib->project = $projectID;
$changeAllowed = common::checkObjectChangeAllowed('doc', $docLib);
$lib = isset($lib) ? $lib : new stdClass();
$actions = $this->setFastMenu($fastLib);
$actions .= common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib', "type={$type}&objectID={$currentLib}"), "<i class='icon icon-plus'></i> " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe'") : '';
$actions .= ($changeAllowed and common::hasPriv('doc', 'createLib', $lib)) ? html::a(helper::createLink('doc', 'createLib', "type={$type}&objectID={$currentLib}"), "<i class='icon icon-plus'></i> " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe'") : '';
$this->lang->TRActions = $actions;
}