Skip to content

Commit

Permalink
SAK-31341 add the ability for a tool to suppress it's own title (saka…
Browse files Browse the repository at this point in the history
  • Loading branch information
steveswinsburg authored and adrianfish committed Jun 10, 2016
1 parent ac95f68 commit f3c47d3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,11 @@ public Map includeTool(HttpServletResponse res, HttpServletRequest req,
toolMap.put("toolRenderResult", renderResult);
toolMap.put("hasRenderResult", Boolean.TRUE);
toolMap.put("toolUrl", toolUrl);

// Allow a tool to suppress the rendering of its title nav. Defaults to false if not specified, and title nav is rendered.
// Set suppressTitle = true to suppress
boolean suppressTitle = BooleanUtils.toBoolean(placement.getConfig().getProperty("suppressTitle"));
toolMap.put("suppressTitle", suppressTitle);

Session s = SessionManager.getCurrentSession();
ToolSession ts = s.getToolSession(placement.getId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@

<!-- start include tool -->
<!-- start Tool Col2 -->

<!-- start Tool Header -->

#if (${tool.suppressTitle})
<!-- Tool has requested the title be suppressed -->
#else

#if (${tool.hasRenderResult})
<nav class="Mrphs-toolTitleNav Mrphs-container Mrphs-container--toolTitleNav">
Expand Down Expand Up @@ -299,19 +305,22 @@
</nav><!-- End of nav.portlet portlet-title wrapper -->

#end ## END of IF (${tool.hasRenderResult})

<!-- end Tool Col2 -->
<!-- start Tool Body -->

#parse("/vm/morpheus/snippets/toolBody-snippet.vm")

<!-- end Tool Body -->

<!-- end include tool -->

</div>

#end ## END of IF ( ${tool.suppressTitle} )

<!-- end Tool Col2 -->
<!-- start Tool Body -->

#parse("/vm/morpheus/snippets/toolBody-snippet.vm")

<!-- end Tool Body -->

<!-- end include tool -->

</div>

<!-- end Tool Container -->

<!-- end Tool Container -->

#end ## END of IF ($tool)

Expand Down

0 comments on commit f3c47d3

Please sign in to comment.