60 lines
2.2 KiB
Text
60 lines
2.2 KiB
Text
<%#
|
|
# @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" %>
|
|
<h3 class="accountHeader"><%= account.name.split[0...1][0] %></h3>
|
|
<ul>
|
|
<li class="accountListItem accountSettings">
|
|
<div class="accountIcon"></div>
|
|
<%= link_to "Account", edit_user_url(account) %>
|
|
</li>
|
|
<% if account.admin %>
|
|
<li class="accountListItem accountAdmin">
|
|
<div class="accountIcon"></div>
|
|
<%= link_to "Admin", metacodes_path %>
|
|
</li>
|
|
<% end %>
|
|
<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>
|
|
<li class="accountListItem accountLogout">
|
|
<div class="accountIcon"></div>
|
|
<%= link_to "Sign Out", "/logout", id: "Logout" %>
|
|
</li>
|
|
</ul>
|
|
<% else %>
|
|
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { class: "loginAnywhere" }) do |f| %>
|
|
<div class="accountImage"></div>
|
|
<div class="accountInput accountEmail">
|
|
<%= f.email_field :email, :placeholder => "Email" %>
|
|
</div>
|
|
<div class="accountInput accountPassword">
|
|
<%= f.password_field :password, :placeholder => "Password" %>
|
|
</div>
|
|
<div class="accountSubmit"><%= f.submit "SIGN IN" %></div>
|
|
<% if devise_mapping.rememberable? -%>
|
|
<div class="accountRememberMe">
|
|
<%= f.label :remember_me, "Stay signed in" %>
|
|
<%= f.check_box :remember_me %>
|
|
<div class="clearfloat"></div>
|
|
</div>
|
|
<% end -%>
|
|
<div class="clearfloat"></div>
|
|
<div class="accountForgotPass">
|
|
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
|
|
<%= link_to "Forgot password?", new_password_path(resource_name) %>
|
|
<% end -%>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<% # Rails.logger.info(stored_location_for(:user)) %>
|