Projekt

Obecné

Profil

Stáhnout (3.7 KB) Statistiky
| Větev: | Tag: | Revize:
1
<%@page contentType="text/html" pageEncoding="UTF-8"%>
2
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
3

    
4
<c:set var="APP_NAME" value="IMiGEr"/>
5
<c:set var="APP_HOME_URL" value="${initParam.HOME_URL}"/>
6
<c:set var="isLoggedIn" value="${sessionScope.isLoggedIn}"/>
7
<c:set var="user" value="${sessionScope.user}"/>
8

    
9
<!DOCTYPE html>
10
<html>
11
	<head>
12
		<meta charset="utf-8">
13

    
14
		<link rel="stylesheet" href="css/main.css">
15

    
16
		<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
		<script src="js/errors/abstractMethodError.js"></script>
24
		<script src="js/errors/httpError.js"></script>
25

    
26
		<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
		<script src="js/utils/ajax.js"></script>
31
		<script src="js/utils/dom.js"></script>
32

    
33
		<script src="js/constants.js"></script>
34

    
35
		<script src="js/app.js"></script>
36
		<script src="js/uploadFilesApp.js"></script>
37

    
38
		<title>${APP_NAME}</title>
39
	</head>
40

    
41
	<body class="${isLoggedIn ? 'loggedIn' : 'loggedOut'}">
42
		<header class="header" id="header">
43
			<img src="images/logo_cs.svg" class="header-logo" alt="logo of University of West Bohemia" title="University of West Bohemia">
44

    
45
			<h2 class="header-title">Interactive Multimodal Graph Explorer</h2>
46

    
47
			<div class="user-menu loggedInOnly">
48
				<span class="username" id="usernameLabel">${user.username}</span>
49
				<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
		</header>
57

    
58
		<main>
59
			<div class="upload-form">
60
				<h3>New diagram</h3>
61

    
62
				<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
						<label for="file">Select JSON data file:</label><br>
69
						<input type="file" name="file" id="file">
70
					</div>
71

    
72
					<div class="form-field">
73
						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
					</div>
77

    
78
					<button type="submit">Start visualization</button>
79
				</form>
80
			</div>
81

    
82
			<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

    
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
						</li>
94
					</c:forEach>
95
				</ul>
96
			</div>
97

    
98
			<div class="diagrams-menu">
99
				<h3>Public diagrams</h3>
100

    
101
				<ul id="publicDiagramList">
102
					<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
	
111
		<script>
112
			const app = new UploadFilesApp('${APP_NAME}', '${APP_HOME_URL}');
113

    
114
			document.addEventListener('DOMContentLoaded', () => {
115
				app.run();
116
			});
117
		</script>
118
	</body>
119
</html>
(5-5/5)