Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 0ac9b68b

Přidáno uživatelem Pavel Fidranský před asi 6 roky(ů)

reworked upload screen

Zobrazit rozdíly:

sources/src/main/webapp/uploadFiles.jsp
9 9
		<link rel="stylesheet" href="css/main.css">
10 10

  
11 11
		<script src="js/libs/jquery-1.8.3.js"></script>
12
		<script src="old/js/diagram.js"></script>
13
		<script src="old/js/user.js"></script>
12
		<script src="js/legacy/diagram.js"></script>
13
		<script src="js/legacy/user.js"></script>
14
		<script src="js/userMenu.js"></script>
14 15

  
15 16
		<title>IMiGEr</title>
16 17
	</head>
17 18

  
18 19
	<body>
19
		<div class="wrapper">
20
			<header class="header" id="header">
21
				<img src="images/logo.png" class="header-logo" alt="logo of University of West Bohemia" title="University of West Bohemia">
22

  
23
				<h2 class="header-title">Interactive Multimodal Graph Explorer</h2>
24

  
25
				<jsp:include page="logged_user.jsp" />
26

  
27
				<nav class="navbar" id="navigation"></nav>
28
			</header>
29

  
30
			<main class="upload-content">
31
				<jsp:include page="logged_user_menu.jsp" />
32

  
33
				<div class="upload-forms">
34
					<c:if test="${not empty errorMessage}">
35
						<p class="errorMessage">${errorMessage}</p>
36
					</c:if>
37

  
38
					<h5>Upload SPADe data:</h5>
39

  
40
					<form action="/" method="post" enctype="multipart/form-data">
41
						<div class="form-field">
42
							<input type="file" name="file">
43
						</div>
44

  
45
						<hr class="verticalSeparator">
46

  
47
						<input type="submit" value="Start visualization">
48
					</form>
49

  
50
					<%--<c:if test="${not empty componentNames}">
51
						<hr class="verticalSeparator">
52

  
53
						<h3>Uploaded components:</h3>
54

  
55
						<ul id="uploadedComponent">
56
							<%
57
							if (request.getParameter("diagram_id") == null) {
58
								request.setAttribute("url_diagram_id", "");
59
							%>
60
								<li id="deleteAll">Delete all <a href="delete-components"><img src="images/button_cancel.png" alt="delete" class="imgDelete"/></a></li>
61
							<%
62
							} else {
63
								request.setAttribute("url_diagram_id", "&diagram_id="+ request.getParameter("diagram_id") +  "&diagram_hash="+ request.getParameter("diagram_hash"));
64
							}
65
							%>
66
							<c:forEach items="${componentNames}" var="componentName">
67
								<li id="${componentName}">${componentName}
68
								<% if (request.getParameter("diagram_id") == null || ( request.getSession().getAttribute("logged_user_id") != null &&
69
										request.getAttribute("diagram_user_id") != null &&
70
										request.getAttribute("diagram_user_id").toString().compareTo(request.getSession().getAttribute("logged_user_id").toString()) == 0  )) { %>
71
									<a href="delete-component?name=${componentName}<%= request.getAttribute("url_diagram_id") %>"><img src="images/button_cancel.png" alt="delete" class="imgDelete"/></a></li>
72
								<% } %>
73
							</c:forEach>
74
						</ul>
75
					</c:if>
76
					<hr class="verticalSeparator">
77

  
78
					<form name="diagramForm" action="graph" method="post">
79
					<input type="submit" value="Start visualization" ${not empty componentNames ? "" : "disabled='disabled'"}>
80
					</form>
81
--%>
20
		<c:set var="HOME_URL" value="${initParam.HOME_URL}"/>
21
		<c:set var="isLoggedIn" value="${sessionScope.isLoggedIn}"/>
22
		<c:set var="user" value="${sessionScope.user}"/>
23

  
24
		<header class="header" id="header">
25
			<img src="images/logo.png" class="header-logo" alt="logo of University of West Bohemia" title="University of West Bohemia">
26

  
27
			<h2 class="header-title">Interactive Multimodal Graph Explorer</h2>
28

  
29
			<%@ include file="userMenu.jsp" %>
30
		</header>
31

  
32
		<main class="upload-content">
33
			<div class="upload-forms">
34
				<c:if test="${not empty errorMessage}">
35
					<p class="alert">${errorMessage}</p>
36
				</c:if>
37

  
38
				<strong>Upload SPADe data:</strong>
39

  
40
				<form method="post" enctype="multipart/form-data">
41
					<div class="form-field">
42
						<input type="file" name="file">
43
					</div>
44

  
45
					<input type="submit" value="Start visualization">
46
				</form>
47
			</div>
48

  
49
			<c:if test="${isLoggedIn}">
50
				<div class="diagrams-menu">
51
					<h3>My diagrams</h3>
52

  
53
					<ul>
54
						<c:forEach items="${diagramsPrivate}" var="diagram">
55
							<li>
56
								<a href="${HOME_URL}graph?diagramId=${diagram.id}">${diagram.name}</a>
57
								<button onclick="return deleteDiagram(${diagram.id});"><img src="images/button_cancel.png" alt="odstranit"></a>
58
							</li>
59
						</c:forEach>
60
					</ul>
82 61
				</div>
83
			</main>
84
		</div>
62
			</c:if>
63

  
64
			<div class="diagrams-menu">
65
				<h3>Public diagrams</h3>
66

  
67
				<ul>
68
					<c:forEach items="${diagramsPublic}" var="diagram">
69
						<li>
70
							<a href="${HOME_URL}graph?diagramId=${diagram.id}">${diagram.name}</a>
71
						</li>
72
					</c:forEach>
73
				</ul>
74
			</div>
75
		</main>
85 76
	</body>
86 77
</html>

Také k dispozici: Unified diff