* Fix doc create.

This commit is contained in:
zhujinyong
2021-04-02 07:33:26 +08:00
parent 0a33e2e6ed
commit 1a45ed22ac
6 changed files with 45 additions and 10 deletions
+4 -2
View File
@@ -1596,10 +1596,12 @@ class docModel extends model
/**
* Build document module index page create document button.
*
* @param string $type
* @param int $objectID
* @access public
* @return string
*/
public function buildCreateButton4Doc()
public function buildCreateButton4Doc($type, $objectID)
{
$libs = $this->getLibs('all', strpos($this->config->doc->custom->showLibs, 'unclosed') !== false ? 'unclosedProject' : '');
$html = "";
@@ -1613,7 +1615,7 @@ class docModel extends model
{
$class = strpos($this->config->doc->officeTypes, $typeKey) !== false ? 'iframe' : '';
$html .= "<li>";
$html .= html::a(helper::createLink('doc', 'create', "libID=$libID&moduleID=0&type=$typeKey"), $typeName, '', "class='$class'");
$html .= html::a(helper::createLink('doc', 'create', "type=$type&objectID=$objectID&libID=$libID&moduleID=0&type=$typeKey"), $typeName, '', "class='$class' data-app='{$this->app->openApp}'");
$html .= "</li>";
}
$html .="</ul></div>";