-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve navbar #2310
Improve navbar #2310
Conversation
$ CI_ORM=active_record CI_DB_ADAPTER=sqlite3 rspec ./spec/integration/rails_admin_spec.rb:134
Run options:
include {:locations=>{"./spec/integration/rails_admin_spec.rb"=>[134]}}
exclude {:mongoid=>true, :skip_active_record=>true}
Randomized with seed 3788
.
Top 1 slowest examples (0.74006 seconds, 99.9% of total time):
RailsAdmin secondary navigation does not cause error when email is nil
0.74006 seconds ./spec/integration/rails_admin_spec.rb:134
Finished in 0.74083 seconds (files took 2.86 seconds to load)
1 example, 0 failures
Randomized with seed 3788 😕 |
Devise 3.5.1 is causing the failure |
What a lucky man, master branch also fails 🍀 ~/dev/rails_admin on master $ CI_ORM=active_record CI_DB_ADAPTER=sqlite3 rspec ./spec/integration/rails_admin_spec.rb:134
Run options:
include {:locations=>{"./spec/integration/rails_admin_spec.rb"=>[134]}}
exclude {:mongoid=>true, :skip_active_record=>true}
Randomized with seed 53656
F
Failures:
1) RailsAdmin secondary navigation does not cause error when email is nil
Failure/Error: visit dashboard_path
ActionView::Template::Error:
undefined method `devise_scope' for #<User:0x007ff5a3889c30> |
line-height: 1; | ||
.navbar { | ||
/* Application name */ | ||
.brand { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tagliala Could you change in this PR the css selector .brand
in .navbar-brand
please? 😄
These are stylesheets for the bootstrap2 markup.
If you prefer I could do a PR after the merge of this one.
Thanks!
👍 |
@dalpo thanks Completely removed the old css rules. I didn't like that old brown label |
Failures due to #2311 |
Thanks to you @tagliala! Great work 😄 |
could you please re-run the Travis build? |
This bothered me a long time 😄 . Great work 👍 |
thanks! honestly the "log out" red label is still bothering me but... one thing at a time :) |
@mshibuya I see that you are planning a 0.7 milestone? |
link_to _current_user.email, url_for(action: edit_action.action_name, model_name: abstract_model.to_param, id: _current_user.id, controller: 'rails_admin/main') | ||
link_to url_for(action: edit_action.action_name, model_name: abstract_model.to_param, id: _current_user.id, controller: 'rails_admin/main') do | ||
html = [] | ||
html << image_tag("#{(request.ssl? ? 'https://secure' : 'http://www')}.gravatar.com/avatar/#{Digest::MD5.hexdigest _current_user.email}?s=30", alt: '') if _current_user.email.present? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tagliala What do you think about to add the 'img-rounded' (or the 'img-circle') class to the avatar image?
Take a look at http://getbootstrap.com/css/#images-shapes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not anymore a big fan of circled avatars because they cut out part of the user profile picture.
btw no problems for me if authors decide to go for img-circle
, I will edit this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be nice to go for a more modern/consolidated user drop down. I'll try and find an example, but you've probably seen them before - the ones where you click the username/image and a drop down appears with a profile and logout link. It would solve the red "danger-label" as mentioned above and tidy up the top nav bar... Just a thought!
@tagliala and how about a |
@rikkipitt it makes sense, but I would leave this decision to the authors. No problem to edit this PR |
Merged in, thanks! |
Moves gravatar near user email
Removes alt attribute from gravatar (useless md5 encoded email)
Also adds support for collapsed navbar
Before
After