-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbase.html
executable file
·337 lines (306 loc) · 11.4 KB
/
base.html
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="{{ url_for('static', filename='openease.js') }}"></script>
<link type="image/x-icon" rel="shortcut icon" href="{{ url_for('static', filename='img/favicon.png') }}"/>
<script type="text/javascript">
function FlaskUser(){
this.username = '{{ current_user.displayname or current_user.username or "anonymous" }}';
this.mail = '{{ current_user.email }}';
this.isLoggedIn = function() {
return '{{ current_user.is_authenticated }}' == 'True';
};
this.isAdmin = function() {
return '{{ current_user.is_authenticated and current_user.has_role("admin") }}' == 'True';
};
};
const flask_user = new FlaskUser();
{% if current_user.is_authenticated %}
const ros_client = new ROSClient({
flask_user: flask_user,
ros_url: 'ws' + (location.protocol === 'https:'?'s':'') +
'://{{ ros_url }}/ws/{{ ros_container }}/',
authentication: '{{ ros_auth }}',
auth_url: '/api/v1.0/auth_by_session'
});
{% else %}
const ros_client = undefined;
{% endif %}
let on_ros_connect = undefined;
function setROSConnectionHandler(on_connect){
on_ros_connect = on_connect;
};
</script>
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/SCSS/layout.css') }}"/>
{% block head %}{% endblock %}
</head>
<body
{% block bodyargs %}{% endblock %}>
<nav class="navbar fixed-top navbar-expand-lg navbar-dark" id="ease-navbar">
{% block navicon %}{% endblock %}
<a class="navbar-brand ease-brand" href="http://www.open-ease.org">
<img src="{{ url_for('static', filename='img/oe-logo-small.svg') }}">
openEASE
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarNav" aria-controls="navbarNav"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link {{ 'active' if request.path == '/homepage' | safe }}"
href="/">
<i class="fas fa-home"></i>
Home
</a>
</li>
<li class="nav-item">
<a class="nav-link {{ 'active' if '/QA' in request.path | safe }}"
href="/QA">
<i class="fas fa-question"></i>
Query
</a>
</li>
<li class="nav-item">
<a class="nav-link {{ 'active' if request.path == '/neems' | safe }}"
href="/neems">
<i class="fas fa-search"></i>
NEEMs
</a>
</li>
<li class="nav-item">
<a class="nav-link {{ 'active' if request.path == '/tutorials/' | safe }}"
href="/tutorials/">
<i class="fas fa-book-open"></i>
Tutorials
</a>
</li>
<li class="nav-item">
<a class="nav-link {{ 'active' if '/publications' in request.path | safe }}"
href="/publications">
<i class="fas fa-list"></i>
Publications
</a>
</li>
<li class="nav-item">
<a class="nav-link {{ 'active' if '/news' in request.path | safe }}"
href="/news">
<i class="far fa-newspaper"></i>
News
</a>
</li>
</ul>
{% block nav_right %}{% endblock %}
<ul class="navbar-nav text-right">
{% if current_user.is_authenticated %}
{% if current_user.has_role('admin') %}
<!-- Admin Dropdown -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbardrop" data-toggle="dropdown">
<i class="fas fa-user-secret"></i>
Admin
</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="{{ url_for('admin_cookie') }}">Cookies</a>
<a class="dropdown-item" href="{{ url_for('render_neem_hub_settings') }}">NEEM Hub</a>
<a class="dropdown-item" href="{{ url_for('render_oauth_settings') }}">OAuth</a>
<a class="dropdown-item" href="{{ url_for('render_content_settings') }}">Content</a>
</div>
</li>
{% endif %}
<!-- User Dropdown -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbardrop" data-toggle="dropdown">
<i class="fas fa-user"></i>
User
</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="{{ url_for('render_user_data') }}">User Info</a>
<a class="dropdown-item" href="{{ url_for('user.logout') }}"><span class="fas fa-sign-out-alt"></span> Logout</a>
</div>
</li>
{% else %}
<li class="nav-item">
<a class="nav-link" href="{{ url_for('user.register') }}">
<span class="fas fa-user-plus"></span> Sign Up
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('user.login') }}">
<span class="fas fa-sign-in-alt"></span> Login
</a>
</li>
{% endif %}
</ul>
</div>
</nav>
<!-- let all flash messages render here -->
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<div class="alert-box">
{% for category, message in messages %}
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
<span id="flash_alert_span">{{ message }}</span>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
{% endfor %}
</div>
{% endif %}
{% endwith %}
<div class="content">
{% block body %}{% endblock %}
</div>
{% block footer %}
<footer id="footer" class="bg-dark text-white-50">
<!-- copy right text -->
<!--
<div class="footer-copyright text-center py-3">
© <span id="myYear"> </span> Copyright: University of Bremen
<a id="toggle_button" href="#extended_footer" class="arrow-btn" data-toggle="collapse" aria-expanded="false"
aria-controls="extended_footer"><i class="fa fa-angle-double-down"></i></a>
</div>
-->
<div id="extended-footer" class="footer container px-0">
<!-- general info -->
<div class="row footer-row justify-content-center pt-4">
<div class="col-sm-8 pb-2 pb-sm-0">
<div class="row footer-row">
<div class="col-6 col-lg-3 py-1">
<a class="footer-legal-link"
href="/terms-of-use">
Terms of Use
</a>
</div>
<div class="col-6 col-lg-3 py-1">
<a class="footer-legal-link"
href="/citation-policy">
Citation Policy
</a>
</div>
<div class="col-6 col-lg-3 py-1">
<a class="footer-legal-link"
href="/privacy-policy">
Privacy Policy
</a>
</div>
<div class="col-6 col-lg-3 py-1">
<a class="footer-legal-link"
href="/imprint">
Impressum
</a>
</div>
</div>
<hr class="footer-spacer">
<div class="row footer-row">
<div class="footer-information col-md-6">
<h4 class="">
Project Management
</h4>
<div class="">
<p>
Prof. Michael Beetz, PhD
</p>
</div>
<div class="">
<p>
Dr. habil. Hagen Langer
</p>
<p>
Sabine Veit
</p>
</div>
</div>
<div class="footer-information col-md-6">
<h4>Contact Info</h4>
<p>
Homepage: <a class="footer-link" href="https://ai.uni-bremen.de/"
target="_blank" rel="noopener noreferrer">ai.uni-bremen.de</a>
</p>
<p>
E-Mail: <a class="footer-link" href="mailto:[email protected]"
target="_blank" rel="noopener noreferrer">[email protected]</a>
</p>
<p>
Phone: (+49) 421 218 64000
</p>
</div>
</div>
</div>
</div>
<div class="row footer-row justify-content-center">
<!-- logos -->
<div class="col-sm-4">
<!-- Social buttons -->
<li class="col-md-12 col-sm-12" id="footer-social-buttons">
<ul class="list-unstyled list-inline text-center mb-0">
<li class="list-inline-item">
<a href="https://twitter.com/iai_bremen"
target="_blank" rel="noopener noreferrer">
<i class="fab fa-twitter"></i>
</a>
</li>
<li class="list-inline-item">
<a href="https://www.youtube.com/user/agkiunibremen"
target="_blank" rel="noopener noreferrer">
<i class="fab fa-youtube"></i>
</a>
</li>
<li class="list-inline-item">
<a href="http://www.open-ease.org/"
target="_blank" rel="noopener noreferrer">
<i class="fa fas fa-globe"></i>
</a>
</li>
<li class="list-inline-item">
<a href="https://github.com/ease-crc"
target="_blank" rel="noopener noreferrer">
<i class="fab fa-github"></i>
</a>
</li>
</ul>
<!-- Social buttons -->
</div>
<!-- logos -->
</div>
<div class="row footer-row justify-content-center">
<div class="footer-copyright text-center pb-3">
© <span id="myYear"> </span> Copyright:
<a class="footer-link"
href="https://www.uni-bremen.de/"
target="_blank" rel="noopener noreferrer">
University of Bremen
</a>
</div>
</div>
<!-- general info -->
</div>
</footer>
<script type="text/javascript" src="{{ url_for('static', filename='js/form-js/copyright_year.js') }}"></script>
{% endblock %}
</body>
<!-- connect to ROS -->
<script>
if(ros_client) {
ros_client.connect(function(ros) {
console.info('Connected to ROS.');
if(on_ros_connect) {
on_ros_connect(ros);
}
});
}
</script>
<!-- remove flash alert after 5 seconds -->
<script>
$("document").ready(function(){
setTimeout(function(){
$("div.alert").remove();
}, 5000); // 5 secs
});
</script>
</html>