This commit is contained in:
liyuchun
2021-09-08 13:59:46 +08:00
parent 8ea07cce83
commit b8f2ff9f22
+2 -7
View File
@@ -358,7 +358,7 @@ class commonModel extends model
$html .= "<i class='icon icon-plus-solid-circle text-secondary'></i>";
$html .= "</a><ul class='dropdown-menu pull-right create-list'>";
$showCreateList = $lastIsDivider = $needPrintDivider = false;
$showCreateList = $needPrintDivider = false;
$productID = isset($_SESSION['product']) ? $_SESSION['product'] : 0;
if(!$productID and $app->user->view->products) $productID = current(explode(',', $app->user->view->products));
@@ -379,16 +379,11 @@ class commonModel extends model
if(common::hasPriv($objectType, $createMethod))
{
/* Determines whether to print a divider. */
if(!$lastIsDivider and $needPrintDivider and $showCreateList)
if($needPrintDivider and $showCreateList)
{
$html .= '<li class="divider"></li>';
$lastIsDivider = true;
$needPrintDivider = false;
}
else
{
$lastIsDivider = false;
}
$showCreateList = true;
$isOnlyBody = $objectType == 'doc';