update profile dropdown, first draft

This commit is contained in:
Andreas N 2015-02-12 16:37:07 +01:00
parent 1c0a70165a
commit 0dfbac0bda
3 changed files with 46 additions and 16 deletions

View File

@ -84,4 +84,20 @@
margin-right: 7px;
margin-bottom: 7px;
z-index: 99;
}
.profile--dropdown {
min-width: 220px;
margin-top: 0px !important;
}
.profile--dropdown-media {
padding: 3px 5px;
}
.profile--dropdown-img {
min-height: 45px;
min-width: 45px;
height: 45px;
width: 45px;
}

View File

@ -27,22 +27,7 @@
%li.hidden-xs{"data-toggle" => "tooltip", "data-placement" => "bottom", title: "Ask a question"}
.btn.btn-link.navbar-btn{name: "toggle-all-ask", "data-target" => "#modal-ask-followers", "data-toggle" => "modal", :type => "button"}
%i.fa.fa-pencil-square-o
%li.dropdown
%a.dropdown-toggle{href: "#", "data-toggle" => "dropdown"}
%img.img-rounded.answerbox--img-small.hidden-xs{src: current_user.profile_picture.url(:small)}
= current_user.screen_name
%b.caret
%ul.dropdown-menu
%li= link_to "View profile", show_user_profile_path(current_user.screen_name)
%li= link_to "Settings", edit_user_registration_path
%li.divider
- if current_user.admin?
%li= link_to "Kontrollzentrum", rails_admin_path
%li= link_to "Sidekiq", sidekiq_web_path
- if current_user.mod?
%li= link_to "Moderation panel", moderation_path
%li.divider
%li= link_to "Logout", destroy_user_session_path, method: :delete
= render "layouts/profile"
- else
%ul.nav.navbar-nav.navbar-right
= nav_entry "Sign in", new_user_session_path

View File

@ -0,0 +1,29 @@
%li.dropdown
%a.dropdown-toggle{href: "#", "data-toggle" => "dropdown"}
%img.img-rounded.answerbox--img.hidden-xs{src: current_user.profile_picture.url(:small)}
%span.visible-xs= current_user.screen_name
%b.caret
%ul.dropdown-menu.profile--dropdown
%li.hidden-xs
.media.profile--dropdown-media
.pull-left
%img.img-rounded.profile--dropdown-img{src: current_user.profile_picture.url(:medium)}
.media-body
- if @user.display_name.blank?
.profile--displayname
= @user.screen_name
- else
.profile--displayname
= @user.display_name
.profile--username
= @user.screen_name
%li= link_to "View profile", show_user_profile_path(current_user.screen_name)
%li= link_to "Settings", edit_user_registration_path
%li.divider
- if current_user.admin?
%li= link_to "Kontrollzentrum", rails_admin_path
%li= link_to "Sidekiq", sidekiq_web_path
- if current_user.mod?
%li= link_to "Moderation panel", moderation_path
%li.divider
%li= link_to "Logout", destroy_user_session_path, method: :delete