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> </body>
</html> </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 @@ index.html.ep
<html> <html>
<head> <head>
@ -230,15 +248,6 @@ __DATA__
<input type="submit" value="Upload" > <input type="submit" value="Upload" >
</div> </div>
</form> </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> <div>
<% foreach my $image (@$images) { %> <% foreach my $image (@$images) { %>
<div> <div>
@ -255,5 +264,15 @@ __DATA__
<div> <div>
<% } %> <% } %>
</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> </body>
</html> </html>