Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
biopet.biopet
Commits
e91e3f4c
Commit
e91e3f4c
authored
Mar 30, 2017
by
Peter van 't Hof
Browse files
Fixing template
parent
19a8db89
Changes
1
Hide whitespace changes
Inline
Side-by-side
biopet-core/src/main/resources/nl/lumc/sasc/biopet/core/report/main.ssp
View file @
e91e3f4c
...
...
@@ -2,14 +2,17 @@
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
#import(scala.concurrent.Await)
#import(scala.concurrent.duration.Duration)
#import(scala.concurrent.Future)
<
%@
var
summary:
SummaryDb
%
>
<
%@
var
indexPage:
ReportPage
%
>
<
%@
var
indexPage:
Future
[
ReportPage
]
%
>
<
%@
var
reportName:
String
%
>
<
%@
var
page:
ReportPage
%
>
<
%@
var
path:
List
[
String
]
%
>
<
%@
var
args:
Map
[
String
,
Any
]
%
>
<
%@
var
rootPath:
String
%
>
#{
val iPage = Await.result(indexPage, Duration.Inf)
def createMenu(page: ReportPage, path: List[String] = Nil, first: Boolean = true): String = {
val buffer: StringBuffer = new StringBuffer()
...
...
@@ -55,7 +58,7 @@
}
def getSubPage(path:List[String]): ReportPage = {
path.foldLeft(i
ndex
Page)((c, p) => {
path.foldLeft(iPage)((c, p) => {
val foundPages = c.subPages.filter(_._1 == p)
require(foundPages.size == 1, "Name of page not found or duplicate is found, page:: " + p + " in path: " + path)
Await.result(foundPages.head._2, Duration.Inf)
...
...
@@ -115,9 +118,9 @@
<ul
class=
"nav navbar-nav"
>
<li
class=
"root #if (path.isEmpty) active #end"
>
<a
class=
"navbar-brand"
href=
"${rootPath}index.html"
>
${reportName}
#if (i
ndex
Page.subPages.nonEmpty)
<b
class=
"caret"
></b>
#end
#if (iPage.subPages.nonEmpty)
<b
class=
"caret"
></b>
#end
</a>
${unescape(createMenu(i
ndex
Page))}
${unescape(createMenu(iPage))}
</li>
</ul>
</div>
...
...
@@ -130,9 +133,9 @@
#if(t =
=
0)
<
li
class=
"root"
>
<a
href=
"${rootPath}index.html"
>
Home
#if (i
ndex
Page.subPages.nonEmpty)
<b
class=
"caret"
></b>
#end
#if (iPage.subPages.nonEmpty)
<b
class=
"caret"
></b>
#end
</a>
${unescape(createMenu(i
ndex
Page, Nil, false))}
${unescape(createMenu(iPage, Nil, false))}
</li>
#else
<li
class=
"root #if (t == path.size) active #end"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment