Retrospring/app/views/shared/_sidebar.html.haml

51 lines
1.9 KiB
Plaintext

.panel.panel-default.hidden-xs
.panel-body
%p
Welcome,
= current_user.screen_name
- unless inbox_count.nil?
%p
%strong
You have
= pluralize(inbox_count, 'new question')
in your inbox!
.row
%a{href: show_user_followers_path(current_user.screen_name)}
.col-md-6.col-sm-6.col-xs-6
%h4.entry-text#follower-count= current_user.follower_count
%h6.entry-subtext Followers
%a{href: show_user_friends_path(current_user.screen_name)}
.col-md-6.col-sm-6.col-xs-6
%h4.entry-text#friend-count= current_user.friend_count
%h6.entry-subtext Following
.row
.col-md-6.col-sm-6.col-xs-6
%h4.entry-text#asked-count= current_user.asked_count
%h6.entry-subtext Questions
.col-md-6.col-sm-6.col-xs-6
%h4.entry-text#answered-count= current_user.answered_count
%h6.entry-subtext Answers
.row
.col-md-6.col-sm-6.col-xs-6
%h4.entry-text#asked-count= current_user.commented_count
%h6.entry-subtext Comments
.col-md-6.col-sm-6.col-xs-6
%h4.entry-text#answered-count= current_user.smiled_count
%h6.entry-subtext Smiles
.panel.panel-default.hidden-xs
.panel-body
%ul.nav.nav-pills.nav-stacked
= nav_entry "Timeline", root_path
= nav_entry "Public", public_timeline_path
- current_user.groups.each do |group|
= nav_entry group.display_name, group_timeline_path(group.name)
- unless @group.nil?
.panel.panel-default.profile--panel.hidden-xs
.panel-heading
%h3.panel-title Members
.panel-body
- @group.members.each do |member|
%a{href: show_user_profile_path(member.user.screen_name), title: member.user.screen_name, data: { toggle: :tooltip, placement: :top }}
%img.img-rounded.answerbox--img-small{src: member.user.profile_picture.url(:medium)}
.hidden-xs= render 'shared/links'