-
Notifications
You must be signed in to change notification settings - Fork 1
/
datasets.ftl
152 lines (138 loc) · 6.37 KB
/
datasets.ftl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!-- Macros -->
<#include "libs/header.ftl">
<#include "models/datasets.ftl">
<!-- Template variables -->
<#if !type??>
<#assign title = "datasets">
<#assign showTypeColumn = true>
<#elseif type == "Harmonized">
<#assign title = "harmonized-datasets">
<#assign showTypeColumn = false>
<#else>
<#assign title = "collected-datasets">
<#assign showTypeColumn = false>
</#if>
<!DOCTYPE html>
<html lang="${.lang}">
<head>
<#include "libs/head.ftl">
<title>${config.name!""} | <@message title/></title>
</head>
<body id="${title}-page" class="hold-transition layout-top-nav layout-navbar-fixed">
<div class="wrapper">
<!-- Navbar -->
<#include "libs/top-navbar.ftl">
<!-- /.navbar -->
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<@header title=title breadcrumb=[["${contextPath}/", "home"], [title]]/>
<!-- /.content-header -->
<!-- Main content -->
<div class="content">
<div class="container">
<div id="${title}-callout" class="callout callout-info">
<p>Below please find a list of COVID-19 instruments. </p>
<p>After selecting an instrument, a brief description is provided along a graphical overview on targeted areas. When selecting “Questionnaire items”, a searchable list of items appears.</p>
</div>
<#if datasets?? && datasets?size != 0>
<div id="${title}-card" class="card card-info card-outline">
<div class="card-header">
<h3 class="card-title <#if datasetListDisplays?size gt 1>pt-2</#if>"><@message title/></h3>
<#if datasetListDisplays?size gt 1>
<ul class="nav nav-pills ml-auto float-right">
<#list datasetListDisplays as display>
<#if display == "table">
<li class="nav-item"><a class="nav-link <#if datasetListDefaultDisplay == "table">active</#if>" href="#table" data-toggle="tab">
<i class="fas fa-table"></i></a>
</li>
</#if>
<#if display == "lines">
<li class="nav-item"><a class="nav-link <#if datasetListDefaultDisplay == "lines">active</#if>" href="#lines" data-toggle="tab">
<i class="fas fa-grip-lines"></i></a>
</li>
</#if>
<#if display == "cards">
<li class="nav-item"><a class="nav-link <#if datasetListDefaultDisplay == "cards">active</#if>" href="#cards" data-toggle="tab">
<i class="fas fa-grip-horizontal"></i></a>
</li>
</#if>
</#list>
</ul>
</#if>
</div><!-- /.card-header -->
<div class="card-body">
<#if config.studyDatasetEnabled && config.harmonizationDatasetEnabled>
<div class="mb-4">
<div role="group" class="btn-group">
<button onclick="window.location.href='${contextPath}/datasets';" type="button" class="btn btn-sm btn-info <#if !type??>active</#if>"><@message "all"/></button>
<button onclick="window.location.href='${contextPath}/collected-datasets';" type="button" class="btn btn-sm btn-info <#if type?? && type == "Collected">active</#if>"><@message "collected"/></button>
<button onclick="window.location.href='${contextPath}/harmonized-datasets';" type="button" class="btn btn-sm btn-info <#if type?? && type == "Harmonized">active</#if>"><@message "harmonized"/></button>
</div>
</div>
</#if>
<div class="tab-content">
<#if datasetListDisplays?seq_contains("table")>
<div class="tab-pane <#if datasetListDefaultDisplay == "table">active</#if>" id="table">
<div class="table-responsive">
<table id="${title}" class="table table-bordered table-striped">
<thead>
<@datasetTableHeadModel/>
</thead>
<tbody>
<#list datasets as ds>
<@datasetTableRowModel dataset=ds/>
</#list>
</tbody>
</table>
</div>
</div>
</#if>
<#if datasetListDisplays?seq_contains("lines")>
<div class="tab-pane <#if datasetListDefaultDisplay == "lines">active</#if>" id="lines">
<#list datasets as ds>
<div class="border-bottom mb-3 pb-3" style="min-height: 150px;">
<div class="row">
<@datasetLineModel dataset=ds/>
</div>
</div>
</#list>
</div>
</#if>
<#if datasetListDisplays?seq_contains("cards")>
<div class="tab-pane <#if datasetListDefaultDisplay == "cards">active</#if>" id="cards">
<@datasetCardModel/>
</div>
</#if>
</div>
</div>
</div>
<#else>
<div id="${title}-card" class="card card-info card-outline">
<div class="card-header d-flex p-0">
<h3 class="card-title p-3"><@message "datasets"/></h3>
</div><!-- /.card-header -->
<div class="card-body">
<#if config.openAccess || user??>
<p class="text-muted"><@message "no-datasets"/></p>
<#else>
<p class="text-muted"><@message "sign-in-datasets"/></p>
<button type="button" onclick="location.href='${contextPath}/signin?redirect=${contextPath}/<#if type??>${type?lower_case}-</#if>datasets';" class="btn btn-success btn-lg">
<i class="fas fa-sign-in-alt"></i> <@message "sign-in"/>
</button>
</#if>
</div>
</div>
</#if>
</div><!-- /.container-fluid -->
</div>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<#include "libs/footer.ftl">
</div>
<!-- ./wrapper -->
<#include "libs/scripts.ftl">
<#include "libs/datasets-scripts.ftl">
</body>
</html>