2014-01-29 03:46:58 +00:00
|
|
|
<%#
|
|
|
|
# @file
|
|
|
|
# The inner HTML of the account box that comes up in the bottom left
|
|
|
|
#%>
|
|
|
|
|
2016-03-25 00:16:27 +00:00
|
|
|
<% if current_user %>
|
2014-01-29 03:46:58 +00:00
|
|
|
<% account = current_user %>
|
2016-03-25 00:16:27 +00:00
|
|
|
<%= 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>
|
2014-01-29 03:46:58 +00:00
|
|
|
<ul>
|
2016-11-24 21:48:44 +00:00
|
|
|
<% if current_user.present? %>
|
|
|
|
<li class="accountListItem accountNotifications <%= user_has_unread_notifications? ? 'unread' : 'read' %>">
|
|
|
|
<div class="accountIcon">
|
|
|
|
<% if user_has_unread_notifications? %>
|
|
|
|
<div class="unread-notifications-dot"></div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<%= link_to "Notifications", notifications_path %>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
2014-08-27 02:51:50 +00:00
|
|
|
<li class="accountListItem accountSettings">
|
|
|
|
<div class="accountIcon"></div>
|
2016-08-16 14:25:07 +00:00
|
|
|
<%= link_to "Account", edit_user_url(account) %>
|
2014-08-27 02:51:50 +00:00
|
|
|
</li>
|
2014-05-17 18:57:03 +00:00
|
|
|
<% if account.admin %>
|
2014-08-27 02:51:50 +00:00
|
|
|
<li class="accountListItem accountAdmin">
|
|
|
|
<div class="accountIcon"></div>
|
2016-08-16 14:25:07 +00:00
|
|
|
<%= link_to "Admin", metacodes_path %>
|
2014-08-27 02:51:50 +00:00
|
|
|
</li>
|
2014-05-17 18:57:03 +00:00
|
|
|
<% end %>
|
2016-10-22 08:46:39 +00:00
|
|
|
<li class="accountListItem accountApps">
|
|
|
|
<div class="accountIcon"></div>
|
|
|
|
<%= link_to "Apps", oauth_authorized_applications_path %>
|
|
|
|
</li>
|
2016-11-24 16:07:57 +00:00
|
|
|
<li class="accountListItem accountInvite openLightbox" data-open="invite">
|
|
|
|
<div class="accountIcon"></div>
|
|
|
|
<span>Share Invite</span>
|
|
|
|
</li>
|
2014-08-27 02:51:50 +00:00
|
|
|
<li class="accountListItem accountLogout">
|
|
|
|
<div class="accountIcon"></div>
|
2016-08-16 14:25:07 +00:00
|
|
|
<%= link_to "Sign Out", "/logout", id: "Logout" %>
|
2014-08-27 02:51:50 +00:00
|
|
|
</li>
|
2014-01-29 03:46:58 +00:00
|
|
|
</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" %>
|
2014-01-29 03:46:58 +00:00
|
|
|
</div>
|
2014-08-27 02:51:50 +00:00
|
|
|
<div class="accountInput accountPassword">
|
|
|
|
<%= f.password_field :password, :placeholder => "Password" %>
|
2014-01-29 03:46:58 +00:00
|
|
|
</div>
|
2014-08-27 02:51:50 +00:00
|
|
|
<div class="accountSubmit"><%= f.submit "SIGN IN" %></div>
|
2014-01-29 03:46:58 +00:00
|
|
|
<% 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>
|
2014-01-29 03:46:58 +00:00
|
|
|
<% 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' %>
|
2016-08-16 14:25:07 +00:00
|
|
|
<%= link_to "Forgot password?", new_password_path(resource_name) %>
|
2014-09-25 17:26:09 +00:00
|
|
|
<% end -%>
|
|
|
|
</div>
|
2014-01-29 03:46:58 +00:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2014-10-07 21:46:09 +00:00
|
|
|
|
|
|
|
<% # Rails.logger.info(stored_location_for(:user)) %>
|