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

42 lines
1.5 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
.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)
.hidden-xs= render 'shared/links'