From 42864821b772984bfee9abdb2b81bbcb2d0dbf05 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Wed, 7 Dec 2022 07:18:26 +0000 Subject: [PATCH] * Fix action tr width. --- module/zanode/view/browse.html.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/module/zanode/view/browse.html.php b/module/zanode/view/browse.html.php index 6f0063d5c3..60d883ee8e 100644 --- a/module/zanode/view/browse.html.php +++ b/module/zanode/view/browse.html.php @@ -57,7 +57,7 @@ zanode->osName); ?> zanode->status); ?> zanode->hostName); ?> - actions ?> + actions ?> @@ -83,8 +83,14 @@ $rebootAttr = "title='{$lang->zanode->reboot}' target='hiddenwin'"; $rebootAttr .= $node->status == 'suspend' ? ' class="btn disabled"' : "class='btn' target='hiddenwin' onclick='if(confirm(\"{$lang->zanode->confirmReboot}\")==false) return false;'"; - if(common::hasPriv('zahost', 'suspend')) common::printLink('zanode', 'suspend', "zanodeID={$node->id}", " ", '', $suspendAttr); - if(common::hasPriv('zahost', 'resume')) common::printLink('zanode', 'resume', "zanodeID={$node->id}", " ", '', $resumeAttr); + if($node->status == "suspend") + { + if(common::hasPriv('zahost', 'resume')) common::printLink('zanode', 'resume', "zanodeID={$node->id}", " ", '', $resumeAttr); + } + else + { + if(common::hasPriv('zahost', 'suspend')) common::printLink('zanode', 'suspend', "zanodeID={$node->id}", " ", '', $suspendAttr); + } if(common::hasPriv('zahost', 'reboot')) common::printLink('zanode', 'reboot', "zanodeID={$node->id}", " ", '', $rebootAttr); if(common::hasPriv('zahost', 'createImage')) common::printLink('zanode', 'createImage', "zanodeID={$node->id}", " ", '', "class='btn iframe' title='{$lang->zanode->createImage}' data-width='50%'", '', true); if(common::hasPriv('zahost', 'edit')) common::printIcon('zanode', 'edit', "id={$node->id}", $node, 'list');