forked from railsadminteam/rails_admin
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clean up _current_user stuff (remove call to current_user) and add de…
…stroy_user_session_path, hoping it will be fixed someday (meanwhile fall back to 'users/sign_out' like before.
- Loading branch information
Showing
2 changed files
with
7 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
#header | ||
= render :partial => "rails_admin/main/title" | ||
%h1 | ||
|
||
#user-navigation | ||
%ul.wat-cf | ||
%li= link_to header_icon(:config, t('admin.dashboard.name')), dashboard_path | ||
- if (root_path rescue nil) | ||
%li= link_to header_icon(:home, t('home.name').capitalize), (root_path rescue '/') | ||
- if (current_user rescue nil) | ||
%li= link_to header_icon(:account, current_user.email), (edit_path(:user, current_user) rescue '#') | ||
%li= link_to header_icon(:logout, t("admin.credentials.log_out")), '/users/sign_out', :method => (Devise.sign_out_via rescue :delete) | ||
%li= link_to header_icon(:home, t('home.name').capitalize), (root_path rescue '/') | ||
%li= link_to header_icon(:account, _current_user.email), (edit_path(:user, _current_user) rescue '#') | ||
%li= link_to header_icon(:logout, t("admin.credentials.log_out")), (destroy_user_session_path rescue '/users/sign_out'), :method => (Devise.sign_out_via rescue :delete) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
- if current_user = _current_user | ||
.user_info | ||
= current_user.email | ||
- gravatar = (request.ssl? ? "https://secure" : "http://www")+".gravatar.com/avatar" | ||
= image_tag "#{gravatar}/#{Digest::MD5.hexdigest current_user.email}?s=30", :alt => "" | ||
.user_info | ||
= _current_user.email | ||
- gravatar = (request.ssl? ? "https://secure" : "http://www")+".gravatar.com/avatar" | ||
= image_tag "#{gravatar}/#{Digest::MD5.hexdigest _current_user.email}?s=30", :alt => "" |