Projekt

Obecné

Profil

Stáhnout (3.7 KB) Statistiky
| Větev: | Tag: | Revize:
1 1e2b2c27 Tomáš Šimandl
<%@page contentType="text/html" pageEncoding="UTF-8"%>
2
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
3
4 3817d6f3 Pavel Fidranský
<c:set var="APP_NAME" value="IMiGEr"/>
5
<c:set var="APP_HOME_URL" value="${initParam.HOME_URL}"/>
6 2a2f32c2 Pavel Fidranský
<c:set var="isLoggedIn" value="${sessionScope.isLoggedIn}"/>
7
<c:set var="user" value="${sessionScope.user}"/>
8
9 1e2b2c27 Tomáš Šimandl
<!DOCTYPE html>
10
<html>
11
	<head>
12
		<meta charset="utf-8">
13
14
		<link rel="stylesheet" href="css/main.css">
15
16 f8464192 Pavel Fidranský
		<script id="htmlTags" type="application/json"><%@ include file="node_modules/html-tags/html-tags.json" %></script>
17
		<script id="svgTags" type="application/json"><%@ include file="node_modules/svg-tags/lib/svg-tags.json" %></script>
18
19
		<script src="js/components/generic/popup.js"></script>
20
		<script src="js/components/loginPopup.js"></script>
21
		<script src="js/components/registerPopup.js"></script>
22
23 3817d6f3 Pavel Fidranský
		<script src="js/errors/abstractMethodError.js"></script>
24 edd0c51e Pavel Fidranský
		<script src="js/errors/httpError.js"></script>
25 3817d6f3 Pavel Fidranský
26 b49c7d52 Pavel Fidranský
		<script src="js/events/loggedInEvent.js"></script>
27
		<script src="js/events/loggedOutEvent.js"></script>
28
		<script src="js/events/registeredEvent.js"></script>
29
30 edd0c51e Pavel Fidranský
		<script src="js/utils/ajax.js"></script>
31 f8464192 Pavel Fidranský
		<script src="js/utils/dom.js"></script>
32 3817d6f3 Pavel Fidranský
33 edd0c51e Pavel Fidranský
		<script src="js/constants.js"></script>
34 3817d6f3 Pavel Fidranský
35
		<script src="js/app.js"></script>
36
		<script src="js/uploadFilesApp.js"></script>
37
38
		<title>${APP_NAME}</title>
39 1e2b2c27 Tomáš Šimandl
	</head>
40
41 2a2f32c2 Pavel Fidranský
	<body class="${isLoggedIn ? 'loggedIn' : 'loggedOut'}">
42 0ac9b68b Pavel Fidranský
		<header class="header" id="header">
43 7561b8da Pavel Fidranský
			<img src="images/logo_cs.svg" class="header-logo" alt="logo of University of West Bohemia" title="University of West Bohemia">
44 0ac9b68b Pavel Fidranský
45
			<h2 class="header-title">Interactive Multimodal Graph Explorer</h2>
46
47 65c37e8b Pavel Fidranský
			<div class="user-menu loggedInOnly">
48 c044ee46 Pavel Fidranský
				<span class="username" id="usernameLabel">${user.username}</span>
49 65c37e8b Pavel Fidranský
				<button class="button" id="logoutButton">Log out</button>
50
			</div>
51
52
			<div class="user-menu loggedOutOnly">
53
				<button class="button" id="toggleLoginPopupButton">Log in</button>
54
				<button class="button" id="toggleRegisterPopupButton">Register</button>
55
			</div>
56 0ac9b68b Pavel Fidranský
		</header>
57
58 26feb57f Pavel Fidranský
		<main>
59
			<div class="upload-form">
60
				<h3>New diagram</h3>
61
62 0ac9b68b Pavel Fidranský
				<c:if test="${not empty errorMessage}">
63
					<p class="alert">${errorMessage}</p>
64
				</c:if>
65
66
				<form method="post" enctype="multipart/form-data">
67
					<div class="form-field">
68 d8b87a02 Pavel Fidranský
						<label for="file">Select JSON data file:</label><br>
69 26feb57f Pavel Fidranský
						<input type="file" name="file" id="file">
70 0ac9b68b Pavel Fidranský
					</div>
71
72 f19bcf07 Tomáš Šimandl
					<div class="form-field">
73 3c3bc9ca Pavel Fidranský
						Select type of data file:<br>
74
						<label for="spade"><input type="radio" name="jsonFileFormat" value="spade" id="spade" checked> Spade JSON</label><br>
75
						<label for="raw"><input type="radio" name="jsonFileFormat" value="raw" id="raw"> Raw JSON</label><br>
76 f19bcf07 Tomáš Šimandl
					</div>
77
78 26feb57f Pavel Fidranský
					<button type="submit">Start visualization</button>
79 0ac9b68b Pavel Fidranský
				</form>
80
			</div>
81
82 2a2f32c2 Pavel Fidranský
			<div class="diagrams-menu loggedInOnly">
83
				<h3>My diagrams</h3>
84
85
				<ul id="privateDiagramList">
86
					<c:forEach items="${diagramsPrivate}" var="diagram">
87
						<li>
88
							<a href="${HOME_URL}graph?diagramId=${diagram.id}">${diagram.name}</a>
89 3817d6f3 Pavel Fidranský
90
							<button class="button remove-diagram-button" data-id="${diagram.id}" data-name="${diagram.name}">
91
								<img src="images/button_cancel.png" alt="odstranit">
92
							</button>
93 2a2f32c2 Pavel Fidranský
						</li>
94
					</c:forEach>
95
				</ul>
96
			</div>
97 0ac9b68b Pavel Fidranský
98
			<div class="diagrams-menu">
99
				<h3>Public diagrams</h3>
100
101 d8b87a02 Pavel Fidranský
				<ul id="publicDiagramList">
102 0ac9b68b Pavel Fidranský
					<c:forEach items="${diagramsPublic}" var="diagram">
103
						<li>
104
							<a href="${HOME_URL}graph?diagramId=${diagram.id}">${diagram.name}</a>
105
						</li>
106
					</c:forEach>
107
				</ul>
108
			</div>
109
		</main>
110 3817d6f3 Pavel Fidranský
	
111
		<script>
112
			const app = new UploadFilesApp('${APP_NAME}', '${APP_HOME_URL}');
113
114
			document.addEventListener('DOMContentLoaded', () => {
115
				app.run();
116
			});
117
		</script>
118 1e2b2c27 Tomáš Šimandl
	</body>
119
</html>