metamaps--metamaps/app/views/layouts/_account.html.erb

61 lines
2.2 KiB
Text
Raw Permalink Normal View History

<%#
# @file
# The inner HTML of the account box that comes up in the bottom left
#%>
<% if current_user %>
<% account = current_user %>
<%= image_tag account.image.url(:sixtyfour), :size => "48x48", :class => "sidebarAccountImage" %>
2014-08-12 15:09:53 +00:00
<h3 class="accountHeader"><%= account.name.split[0...1][0] %></h3>
<ul>
2014-08-27 02:51:50 +00:00
<li class="accountListItem accountSettings">
<div class="accountIcon"></div>
<%= link_to "Account", edit_user_url(account) %>
2014-08-27 02:51:50 +00:00
</li>
<% if account.admin %>
2014-08-27 02:51:50 +00:00
<li class="accountListItem accountAdmin">
<div class="accountIcon"></div>
<%= link_to "Admin", metacodes_path %>
2014-08-27 02:51:50 +00:00
</li>
<% end %>
2014-08-27 02:51:50 +00:00
<li class="accountListItem accountInvite openLightbox" data-open="invite">
<div class="accountIcon"></div>
<span>Share Invite</span>
</li>
<li class="accountListItem accountApps">
<div class="accountIcon"></div>
<%= link_to "Apps", oauth_authorized_applications_path %>
</li>
2014-08-27 02:51:50 +00:00
<li class="accountListItem accountLogout">
<div class="accountIcon"></div>
<%= link_to "Sign Out", "/logout", id: "Logout" %>
2014-08-27 02:51:50 +00:00
</li>
</ul>
<% else %>
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { class: "loginAnywhere" }) do |f| %>
2014-08-27 02:51:50 +00:00
<div class="accountImage"></div>
<div class="accountInput accountEmail">
<%= f.email_field :email, :placeholder => "Email" %>
</div>
2014-08-27 02:51:50 +00:00
<div class="accountInput accountPassword">
<%= f.password_field :password, :placeholder => "Password" %>
</div>
2014-08-27 02:51:50 +00:00
<div class="accountSubmit"><%= f.submit "SIGN IN" %></div>
<% if devise_mapping.rememberable? -%>
2014-09-25 17:26:09 +00:00
<div class="accountRememberMe">
<%= f.label :remember_me, "Stay signed in" %>
<%= f.check_box :remember_me %>
<div class="clearfloat"></div>
</div>
<% end -%>
2014-08-27 02:51:50 +00:00
<div class="clearfloat"></div>
2014-09-25 17:26:09 +00:00
<div class="accountForgotPass">
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
<%= link_to "Forgot password?", new_password_path(resource_name) %>
2014-09-25 17:26:09 +00:00
<% end -%>
</div>
<% end %>
<% end %>
2014-10-07 21:46:09 +00:00
<% # Rails.logger.info(stored_location_for(:user)) %>