* Code for task #43985,#43984.

This commit is contained in:
孙广明
2021-11-03 16:02:02 +08:00
parent 55d9d675b6
commit 373b4746d0
2 changed files with 50 additions and 2 deletions
+3
View File
@@ -41,3 +41,6 @@
.title {font-size: 20px !important;}
.article-content.comment {width: 100% !important;}
.tree-group .tree-actions{display: none}
.tree-group:hover .tree-actions{display: inline}
+47 -2
View File
@@ -2371,7 +2371,29 @@ EOT;
{
$treeMenu[$module->id] .= '<span class="tail-info">' . zget($users, $doc->editedBy) . ' &nbsp;' . $doc->editedDate . '</span>';
}
$treeMenu[$module->id] .= html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$libID&docID={$doc->id}"), "<i class='icon icon-file-text text-muted'></i> &nbsp;" . $doc->title, '', "data-app='{$this->app->tab}' class='doc-title' title='{$doc->title}'");
$treeMenu[$module->id] .= "<div class='tree-group'><span class='module-name'>" . html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$libID&docID={$doc->id}"), "<i class='icon icon-file-text text-muted'></i> &nbsp;" . $doc->title, '', "data-app='{$this->app->tab}' class='doc-title' title='{$doc->title}'") . '</span>';
$treeMenu[$module->id] .= "<div class='tree-actions pull-right'>";
$treeMenu[$module->id] .= html::a(helper::createLink('tree', 'edit', "module=$module->id&type=doc"), "<i class='icon icon-edit'></i>", '', "data-toggle='modal' title={$this->lang->doc->editType}");
$treeMenu[$module->id] .= "<a class='tree-action' href='javascript:;' data-toggle='dropdown'><i class='icon icon-plus'></i></a>";
$treeMenu[$module->id] .= "<ul class='dropdown-menu'>";
foreach($this->lang->doc->typeList as $typeKey => $typeName)
{
$class = strpos($this->config->doc->officeTypes, $typeKey) !== false ? 'iframe' : '';
$icon = zget($this->config->doc->iconList, $typeKey);
$treeMenu[$module->id] .= "<li>";
$treeMenu[$module->id] .= html::a(helper::createLink('doc', 'create', "objectType=$type&objectID=$objectID&libID=$libID&moduleID=0&type=$typeKey", '', $class ? true : false), "<i class='icon-$icon icon'></i> " . $typeName, '', "class='$class' data-app='{$this->app->tab}'");
$treeMenu[$module->id] .= "</li>";
if($typeKey == 'url') $treeMenu[$module->id] .= '<li class="divider"></li>';
}
if(common::hasPriv('doc', 'createLib'))
{
$treeMenu[$module->id] .= '<li class="divider"></li>';
$treeMenu[$module->id] .= '<li>' . html::a(helper::createLink('doc', 'createLib', "type=$type&objectID=$objectID"), "<i class='icon-doc-lib icon'></i> " . $this->lang->doc->createLib, '', "class='iframe' data-width='70%'") . '</li>';
}
$treeMenu[$module->id] .= "</ul>";
$treeMenu[$module->id] .= "<a class='sort-handler tree-action' href='javascript:;' data-type='sort' title={$this->lang->tree->dragAndSort}><i class='icon icon-move'></i></a>";
$treeMenu[$module->id] .= '</div></div>';
$treeMenu[$module->id] .= '</li>';
}
@@ -2384,7 +2406,30 @@ EOT;
}
else
{
$li = "<a title='{$module->name}'>" . $module->name . '</a>';
$li = "<div class='tree-group'><span class='module-name'><a title='{$module->name}'>" . $module->name . '</a></span>';
$li .= "<div class='tree-actions pull-right'>";
$li .= html::a(helper::createLink('tree', 'edit', "module=$module->id&type=doc"), "<i class='icon icon-edit'></i>", '', "data-toggle='modal' title={$this->lang->doc->editType}");
$li .= html::a(helper::createLink('tree', 'browse', "rootID=$libID&type=doc&module=$module->id", '', 1), "<i class='icon icon-split'></i>", '', "class='iframe' title={$this->lang->doc->editType}");
$li .= "<a class='tree-action' href='javascript:;' data-toggle='dropdown'><i class='icon icon-plus'></i></a>";
$li .= "<ul class='dropdown-menu'>";
foreach($this->lang->doc->typeList as $typeKey => $typeName)
{
$class = strpos($this->config->doc->officeTypes, $typeKey) !== false ? 'iframe' : '';
$icon = zget($this->config->doc->iconList, $typeKey);
$li .= "<li>";
$li .= html::a(helper::createLink('doc', 'create', "objectType=$type&objectID=$objectID&libID=$libID&moduleID=0&type=$typeKey", '', $class ? true : false), "<i class='icon-$icon icon'></i> " . $typeName, '', "class='$class' data-app='{$this->app->tab}'");
$li .= "</li>";
if($typeKey == 'url') $li .= '<li class="divider"></li>';
}
if(common::hasPriv('doc', 'createLib'))
{
$li .= '<li class="divider"></li>';
$li .= '<li>' . html::a(helper::createLink('doc', 'createLib', "type=$type&objectID=$objectID"), "<i class='icon-doc-lib icon'></i> " . $this->lang->doc->createLib, '', "class='iframe' data-width='70%'") . '</li>';
}
$li .= "</ul>";
$li .= "<a class='sort-handler tree-action' href='javascript:;' data-type='sort' title={$this->lang->tree->dragAndSort}><i class='icon icon-move'></i></a>";
$li .= '</div></div>';
}
if($treeMenu[$module->id])
{