createLink('doc', $exportMethod, "libID=$libID&docID=0", 'html', true), " " . $lang->export, '', "class='btn btn-link export' id='$exportMethod'");
}
if(common::hasPriv('doc', 'createLib'))
{
echo html::a(helper::createLink('doc', 'createLib', "type=$type&objectID=$objectID"), ' ' . $this->lang->doc->createLib, '', 'class="btn btn-secondary iframe"');
}
if(common::hasPriv('doc', 'create'))
{
if($libID)
{
$html = "
";
$html .= html::a($this->createLink('doc', 'createBasicInfo', "objectType=$type&objectID=$objectID&libID=$libID&moduleID=$moduleID&type=html", '', true), " {$lang->doc->create}", '', "class='btn btn-primary iframe'");
$html .= "";
$html .= "
';
echo $html;
}
}
?>
- ";
foreach($this->lang->doc->createList as $typeKey => $typeName)
{
if($config->edition != 'max' and $typeKey == 'template') continue;
$class = (strpos($this->config->doc->officeTypes, $typeKey) !== false or strpos($this->config->doc->textTypes, $typeKey) !== false) ? 'iframe' : '';
$module = $typeKey == 'api' ? 'api' : 'doc';
$method = strpos($this->config->doc->textTypes, $typeKey) !== false ? 'createBasicInfo' : 'create';
$params = "objectType=$type&objectID=$objectID&libID=$libID&moduleID=$moduleID&type=$typeKey";
if($typeKey == 'api') $params = "libID=$libID&moduleID=$moduleID";
if($typeKey == 'template') $params = "objectType=$type&objectID=$objectID&libID=$libID&moduleID=$moduleID&type=html&fromGlobal=&from=template";
$html .= "
- "; $html .= html::a(helper::createLink($module, $method, $params, '', $class ? true : false), $typeName, '', "class='$class' data-app='{$this->app->tab}'"); $html .= " "; if($typeKey == 'template') $html .= ''; if($config->edition != 'max' and $typeKey == 'api') $html .= ''; } $html .= '