2014-01-29 03:46:58 +00:00
|
|
|
<%#
|
|
|
|
# @file
|
|
|
|
# The inner HTML of the account box that comes up in the bottom left
|
|
|
|
#%>
|
|
|
|
|
|
|
|
<% if authenticated? %>
|
|
|
|
<% account = current_user %>
|
|
|
|
<h3 class="accountHeader">Hello <%= account.name.split[0...1][0] %>!</h3>
|
|
|
|
<ul>
|
2014-06-04 19:24:16 +00:00
|
|
|
<li class="accountIcon accountSettings"><%= link_to "Account", edit_user_url(account) %></li>
|
2014-05-17 18:57:03 +00:00
|
|
|
<% if account.admin %>
|
2014-06-09 20:37:09 +00:00
|
|
|
<li class="accountIcon accountAdmin"><%= link_to "Admin", metacodes_path %></li>
|
2014-05-17 18:57:03 +00:00
|
|
|
<% end %>
|
2014-02-07 17:55:11 +00:00
|
|
|
<li class="accountIcon accountInvite openLightbox" data-open="invite"><span>Share Invite</span></li>
|
2014-01-29 03:46:58 +00:00
|
|
|
<li class="accountIcon accountLogout"><%= link_to "Logout", "/sign_out", id: "Logout" %></li>
|
|
|
|
</ul>
|
|
|
|
<% else %>
|
|
|
|
<h3 class="accountHeader">Sign In</h3>
|
|
|
|
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { class: "loginAnywhere" }) do |f| %>
|
|
|
|
<div>
|
|
|
|
<%= f.label :email %>
|
|
|
|
<%= f.email_field :email, :autofocus => true %>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<%= f.label :password %>
|
|
|
|
<%= f.password_field :password %>
|
|
|
|
</div>
|
|
|
|
<% if devise_mapping.rememberable? -%>
|
|
|
|
<div><%= f.check_box :remember_me %> <%= f.label :remember_me %><div class="clearfloat"></div></div>
|
|
|
|
<% end -%>
|
|
|
|
<div>
|
|
|
|
<%= f.submit "Sign in" %><br>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<div class="links">
|
|
|
|
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
|
|
|
|
<%= link_to "Forgot your password?", new_password_path(resource_name) %>
|
|
|
|
<% end -%>
|
|
|
|
<a href="/request">Request Invite</a>
|
|
|
|
</div>
|
|
|
|
<% end %>
|