-
Notifications
You must be signed in to change notification settings - Fork 1
/
dataset.ftl
172 lines (156 loc) · 6.7 KB
/
dataset.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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!-- Macros -->
<#include "libs/header.ftl">
<#include "models/population.ftl">
<#include "models/dce.ftl">
<#include "models/dataset.ftl">
<#include "models/harmonization.ftl">
<#include "models/files.ftl">
<!DOCTYPE html>
<html lang="${.lang}">
<head>
<#include "libs/head.ftl">
<title>${config.name!""} | ${localize(dataset.acronym)}</title>
</head>
<body id="${type?lower_case}-dataset-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 titlePrefix=("Instruments") title=localize(dataset.acronym) subtitle=localize(dataset.name) breadcrumb=[["${contextPath}/", "home"], ["${contextPath}/datasets", "datasets"], [localize(dataset.acronym)]]/>
<!-- /.content-header -->
<!-- Main content -->
<div class="content">
<div class="container">
<#if draft>
<div class="alert alert-warning" role="alert">
<i class="icon fas fa-exclamation-triangle"></i> <@messageArgs code="viewing-draft-version" args=["/dataset/${dataset.id}"]/>
</div>
</#if>
<!-- General Information content -->
<div class="row">
<div class="col-lg-12">
<div class="card card-primary card-outline">
<div class="card-body">
<div class="row">
<div class="col-lg-12">
<h3 class="mb-4">${localize(dataset.name)}</h3>
</div>
</div>
<div class="row">
<div class="col-md-3 col-sm-6 col-12">
<p class="text-muted text-center">
<#if type == "Collected">
<i class="${datasetIcon} fa-4x"></i>
<#else >
<i class="${harmoDatasetIcon} fa-4x"></i>
</#if>
</p>
</div>
<#if config.networkEnabled && !config.singleNetworkEnabled>
<div class="col-md-3 col-sm-6 col-12">
<div class="info-box">
<span class="info-box-icon bg-info">
<a href="${contextPath}/search#lists?type=networks&query=dataset(in(Mica_dataset.id,${dataset.id}))">
<i class="${networkIcon}"></i>
</a>
</span>
<div class="info-box-content">
<span class="info-box-text"><@message "networks"/></span>
<span class="info-box-number" id="network-hits">-</span>
</div>
<!-- /.info-box-content -->
</div>
</div>
</#if>
<div class="col-md-3 col-sm-6 col-12">
<div class="info-box">
<span class="info-box-icon bg-danger" style="background-color: #005E88 !important;">
<a href="${contextPath}/search#lists?type=variables&query=dataset(in(Mica_dataset.id,${dataset.id}))">
<i class="${variableIcon}"></i>
</a>
</span>
<div class="info-box-content">
<span class="info-box-text">Questionnaire items</span>
<span class="info-box-number" id="variable-hits">-</span>
</div>
<!-- /.info-box-content -->
</div>
</div>
</div>
<div class="card-text marked mt-3">
<template>${localize(dataset.description)}</template>
</div>
</div>
<#if study??>
<div class="card-footer">
<@message "associated-study"/>
<a class="btn btn-success ml-2" href="${contextPath}/study/${study.id}">
<i class="${studyIcon}"></i> ${localize(study.acronym)}
</a>
<#if showDatasetContingencyLink>
<a class="btn btn-primary float-right ml-2" href="${contextPath}/dataset-crosstab/${dataset.id}">
<i class="fas fa-cog"></i> <@message "dataset.crosstab.title"/>
</a>
</#if>
<#if cartEnabled && variablesCartEnabled>
<div id="cart-add" class="float-right">
<#if user??>
<button type="button" class="btn btn-link" onclick="onVariablesCartAdd('${dataset.id}')">
<@message "sets.cart.add-to-cart"/> <i class="fas fa-cart-plus"></i>
</button>
<#else>
<button type="button" class="btn btn-link" onclick="window.location.href='${contextPath}/signin?redirect=${contextPath}/dataset/${dataset.id}';">
<@message "sets.cart.add-to-cart"/> <i class="fas fa-cart-plus"></i>
</button>
</#if>
</div>
</#if>
</div>
</#if>
</div>
</div>
</div>
<!-- License -->
<div class="row">
<div class="col-lg-12">
<div class="card card-info card-outline">
<div class="card-header">
<h3 class="card-title">License</h3>
</div>
<div class="card-body">
<div class="card-text">
<#if dataset.model.license??>
<p>${dataset.model.license}</p>
<#else>
<p style="color: red">Error: did not find dataset.model.license - did you update the Harmonized Dataset Configuration in MICA administration and republish this instrument?</p>
</#if>
</div>
</div>
</div>
</div>
</div>
<!-- Dataset model -->
<@datasetModel dataset=dataset type=type/>
<!-- Files -->
<#if showDatasetFiles>
<@datasetFilesBrowser dataset=dataset/>
</#if>
<!-- Variables classifications -->
<#if datasetVariablesClassificationsTaxonomies?? && datasetVariablesClassificationsTaxonomies?size gt 0>
<@variablesClassifications dataset=dataset/>
</#if>
</div>
</div>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<#include "libs/footer.ftl">
</div>
<!-- ./wrapper -->
<#include "libs/scripts.ftl">
<#include "libs/dataset-scripts.ftl">
</body>
</html>