mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-16 04:09:59 +01:00
update profile dropdown, first draft
This commit is contained in:
parent
1c0a70165a
commit
0dfbac0bda
3 changed files with 46 additions and 16 deletions
|
@ -85,3 +85,19 @@
|
||||||
margin-bottom: 7px;
|
margin-bottom: 7px;
|
||||||
z-index: 99;
|
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;
|
||||||
|
}
|
|
@ -27,22 +27,7 @@
|
||||||
%li.hidden-xs{"data-toggle" => "tooltip", "data-placement" => "bottom", title: "Ask a question"}
|
%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"}
|
.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
|
%i.fa.fa-pencil-square-o
|
||||||
%li.dropdown
|
= render "layouts/profile"
|
||||||
%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
|
|
||||||
- else
|
- else
|
||||||
%ul.nav.navbar-nav.navbar-right
|
%ul.nav.navbar-nav.navbar-right
|
||||||
= nav_entry "Sign in", new_user_session_path
|
= nav_entry "Sign in", new_user_session_path
|
||||||
|
|
29
app/views/layouts/_profile.html.haml
Normal file
29
app/views/layouts/_profile.html.haml
Normal 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
|
Loading…
Reference in a new issue