Hide views selector if core or obwg is used

This commit is contained in:
Simon Redfern 2016-02-11 16:54:01 +01:00
parent e133393ed1
commit 7ecfea0f27
2 changed files with 13 additions and 1 deletions

View File

@ -242,9 +242,20 @@ class ApiExplorer extends Loggable {
case _ => ""
}
// Headline we display
val showingMessage : String = s"$oBPMessage $psd2Message $obwgMessage APIs (${resources.length})".trim()
logger.info (s"showingMessage is: $showingMessage")
// Used to show / hide the Views selector
val displayViews = if (showCore.getOrElse(false) || showOBWG.getOrElse(false)) {
logger.info("not show views drop down")
"none"
} else {
logger.info("show views drop down")
"block"
}
// Controls when we display the request body.
@ -555,6 +566,7 @@ class ApiExplorer extends Loggable {
".info-box__headline *" #> s"$showingMessage" &
"@version_path *" #> s"$baseVersionUrl" &
"@version_path [href]" #> s"$baseVersionUrl" &
"@views_box [style]" #> s"display: $displayViews;" &
".resource" #> resources.map { i =>
".end-point-anchor [href]" #> s"#${i.id}" & // append the anchor to the current uurl
".content-box__headline *" #> i.summary &

View File

@ -56,7 +56,7 @@
<option value="Choose from..." class="option-box__option">Placeholder</option>
</select>
</div>
<div class="option-box">
<div class="option-box" name="views_box">
<h4 class="option-box__headline">Views</h4>
<!--
<div class="count-box">