Skip to content

Commit 773b64f

Browse files
vagishaCopilot
andauthored
Hide "Support Board" button when no target container can be resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent b277993 commit 773b64f

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

SkylineToolsStore/src/org/labkey/skylinetoolsstore/view/SkylineToolDetails.jsp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ a { text-decoration: none; }
300300
<% } %>
301301
</div>
302302

303-
<button id="tool-support-board-btn" class="banner-button-small">Support Board</button>
304303
<%
305304
Container supportContainer = getContainer().getChild("Support");
306305
Container toolSupportBoard = supportContainer != null ? supportContainer.getChild(tool.getName()) : null;
@@ -309,9 +308,13 @@ a { text-decoration: none; }
309308
supportTarget = toolSupportBoard;
310309
else
311310
supportTarget = ContainerManager.getForPath("/home/support");
312-
if (supportTarget != null)
311+
%>
312+
<% if (supportTarget != null) { %>
313+
<button id="tool-support-board-btn" class="banner-button-small">Support Board</button>
314+
<%
313315
addHandler("tool-support-board-btn", "click", "window.open(" + q(urlProvider(ProjectUrls.class).getBeginURL(supportTarget)) + ", '_blank', 'noopener,noreferrer')");
314316
%>
317+
<% } %>
315318
</div>
316319
<% if (toolEditor) { %>
317320
<div class="menuMouseArea sprocket">

0 commit comments

Comments
 (0)