Skip to content

Commit 7b609de

Browse files
brendanx67claude
andcommitted
Simplified support board fallback logic
* Eliminated supportTarget variable by reusing toolSupportBoard directly Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 128a1db commit 7b609de

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

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

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -303,17 +303,12 @@ a { text-decoration: none; }
303303
<%
304304
Container supportContainer = getContainer().getChild("Support");
305305
Container toolSupportBoard = supportContainer != null ? supportContainer.getChild(tool.getName()) : null;
306-
Container supportTarget;
307-
if (toolSupportBoard != null)
308-
supportTarget = toolSupportBoard;
309-
else
310-
supportTarget = ContainerManager.getForPath("/home/support");
306+
if (toolSupportBoard == null)
307+
toolSupportBoard = ContainerManager.getForPath("/home/support");
311308
%>
312-
<% if (supportTarget != null) { %>
309+
<% if (toolSupportBoard != null) { %>
313310
<button id="tool-support-board-btn" class="banner-button-small">Support Board</button>
314-
<%
315-
addHandler("tool-support-board-btn", "click", "window.open(" + q(urlProvider(ProjectUrls.class).getBeginURL(supportTarget)) + ", '_blank', 'noopener,noreferrer')");
316-
%>
311+
<% addHandler("tool-support-board-btn", "click", "window.open(" + q(urlProvider(ProjectUrls.class).getBeginURL(toolSupportBoard)) + ", '_blank', 'noopener,noreferrer')"); %>
317312
<% } %>
318313
</div>
319314
<% if (toolEditor) { %>

0 commit comments

Comments
 (0)