Changeset View
Changeset View
Standalone View
Standalone View
web/templates/layout/app.html.eex
<!DOCTYPE html> | <!DOCTYPE html> | ||||
<html lang="en"> | <html lang="en"> | ||||
<head> | <head> | ||||
<meta charset="utf-8"> | <meta charset="utf-8"> | ||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||||
<meta name="viewport" content="width=device-width, initial-scale=1"> | <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||
<meta name="description" content=""> | <meta name="description" content=""> | ||||
<meta name="author" content=""> | <meta name="author" content=""> | ||||
<title>Kolab Real Time Communication</title> | <title>Kolab Real Time Communication</title> | ||||
<link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>"> | <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>"> | ||||
</head> | </head> | ||||
<body> | <body> | ||||
<div class="container"> | <div class="container"> | ||||
<header class="header"> | <header class="header"> | ||||
<%= if @conn.assigns[:user] do %> | |||||
<nav role="navigation"> | <nav role="navigation"> | ||||
<ul class="nav nav-pills pull-right"> | <ul class="nav nav-pills pull-right"> | ||||
<li><a href="/login">Login</a></li> | <li><%= link gettext("Logout"), to: "/auth/logout" %></li> | ||||
</ul> | </ul> | ||||
</nav> | </nav> | ||||
<% else %> | |||||
<%= form_for @conn, "/auth/default/callback", [as: :logon], fn f -> %> | |||||
<%= text_input f, :username, placeholder: gettext("Username") %> | |||||
<%= password_input f, :password, placeholder: gettext("Password") %> | |||||
<%= submit gettext("Log in"), class: "btn btn-primary" %> | |||||
<% end %> | |||||
<% end %> | |||||
<span class="logo"></span> | <span class="logo"></span> | ||||
</header> | </header> | ||||
<p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p> | <p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p> | ||||
<p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p> | <p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p> | ||||
<main role="main"> | <main role="main"> | ||||
<%= render @view_module, @view_template, assigns %> | <%= render @view_module, @view_template, assigns %> | ||||
</main> | </main> | ||||
</div> <!-- /container --> | </div> <!-- /container --> | ||||
<script src="<%= static_path(@conn, "/js/app.js") %>"></script> | <script src="<%= static_path(@conn, "/js/app.js") %>"></script> | ||||
</body> | </body> | ||||
</html> | </html> |