Don't show images if user is not logged in.

This commit is contained in:
Denis Fedoseev 2017-07-19 12:46:58 +09:00
parent 665c374efd
commit 61bd506af0

View file

@ -212,6 +212,24 @@ __DATA__
</body>
</html>
@@ no_logged.html.ep
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" >
<title>Rough, Slow, Stupid, Contrary Photohosting</title>
</head>
<body>
<h1>Rough, Slow, Stupid, Contrary Photohosting</h1>
<form method="post" action="<%= url_for('login') %>" >
<div>
<input type="text" name="username" >
<input type="password" name="password">
<input type="submit" value="Login">
</div>
</form>
</body>
</html>
@@ index.html.ep
<html>
<head>
@ -230,15 +248,6 @@ __DATA__
<input type="submit" value="Upload" >
</div>
</form>
<% } else { %>
<form method="post" action="<%= url_for('login') %>" >
<div>
<input type="text" name="username" >
<input type="password" name="password">
<input type="submit" value="Login">
</div>
</form>
<% } %>
<div>
<% foreach my $image (@$images) { %>
<div>
@ -255,5 +264,15 @@ __DATA__
<div>
<% } %>
</div>
<% } else { %>
<form method="post" action="<%= url_for('login') %>" >
<div>
<input type="text" name="username" >
<input type="password" name="password">
<input type="submit" value="Login">
</div>
</form>
<% } %>
</body>
</html>