mirror of
https://github.com/acaloiaro/newsbox
synced 2026-07-21 10:12:26 +00:00
24 lines
720 B
HTML
24 lines
720 B
HTML
<div>
|
|
<%= if (current_user) { %>
|
|
<h1><%= current_user.Email %></h1>
|
|
<%= linkTo(loginPath(), {data-method: "DELETE"}){ %>Sign Out<% } %>
|
|
<% } else { %>
|
|
<div class="auth-wrapper">
|
|
<div class="sign-form">
|
|
<h1>Sign In</h1>
|
|
|
|
<%= formFor(user, {action: loginPath(), method: "POST"}) { %>
|
|
<%= f.InputTag("Email") %>
|
|
<%= f.InputTag("Password", {type: "password"}) %>
|
|
<br/>
|
|
<button class="btn btn-success">Sign In!</button>
|
|
<% } %>
|
|
</div>
|
|
</div>
|
|
<br/>
|
|
<%= linkTo(oauthProviderPath({provider: "github"}), {class: "btn btn-success"}){ %>Github Login<% } %>
|
|
<%= linkTo(newUsersPath(), {class: "btn btn-success"}){ %>Create Account<% } %>
|
|
<br/>
|
|
<% } %>
|
|
</div>
|
|
|