show.html.haml 1.12 KB
Newer Older
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
1
.row
2 3 4
  = link_to '#aside', class: 'show-aside' do
    %i.fa.fa-angle-left
  %section.col-md-8
5
    %h3.page-title
6
      = image_tag avatar_icon(@user.email, 90), class: "avatar avatar-tile s90", alt: ''
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
7
      = @user.name
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
8
      - if @user == current_user
9
        .pull-right
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
10
          = link_to profile_path, class: 'btn' do
11
            %i.fa.fa-pencil-square-o
12
            Edit Profile settings
13
      %br
14
      %span.user-show-username #{@user.username}
15 16
      %br
      %small member since #{@user.created_at.stamp("Nov 12, 2031")}
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
17
    .clearfix
18 19

    - if @groups.any?
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
20
      %h4 Groups
21 22
      = render 'groups', groups: @groups
      %hr
23

24 25 26 27 28
    .hidden-xs
      .user-calendar
        %h4.center.light
          %i.fa.fa-spinner.fa-spin
      %hr
29
    %h4
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
30
      User Activity
31 32 33 34 35 36 37

      - if current_user
        %span.rss-icon.pull-right
          = link_to user_path(@user, :atom, { private_token: current_user.private_token }) do
            %strong
              %i.fa.fa-rss

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
38
    = render @events
39
  %aside.col-md-4
40
    = render 'profile', user: @user
41
    = render 'projects'
42 43 44 45

:coffeescript
  $ ->
    $(".user-calendar").load("#{user_calendar_path}")