show.html.haml 2.13 KB
Newer Older
Douwe Maan's avatar
Douwe Maan committed
1 2 3
- page_title    @user.name
- header_title  @user.name, user_path(@user)

4
= content_for :meta_tags do
5
  = auto_discovery_link_tag(:atom, user_url(@user, format: :atom), title: "#{@user.name} activity")
6

7 8
= render 'shared/show_aside'

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
9
.row
10
  %section.col-md-7
11
    .header-with-avatar
12
      = link_to avatar_icon(@user.email, 400), target: '_blank' do
13
        = image_tag avatar_icon(@user.email, 90), class: "avatar avatar-tile s90", alt: ''
14 15 16
      %h3
        = @user.name
        - if @user == current_user
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
17
          .pull-right.hidden-xs
18
            = link_to profile_path, class: 'btn btn-sm' do
19 20
              = icon('user')
              Profile settings
21
        - elsif current_user
22
          #report_abuse.pull-right
23
            %span.dropdown
24 25 26 27 28 29 30 31 32 33
              - if @user.abuse_report
                %span.light.dropdown-toggle.btn.btn-sm.btn-close{title: abuse_report_button_title(@user)}
                  = icon('exclamation-circle')
              - else
                %a.light.dropdown-toggle.btn.btn-sm{href: '#', "data-toggle" => "dropdown"}
                  = icon('exclamation-circle')
                %ul.dropdown-menu.dropdown-menu-right
                  %li
                    = link_to new_abuse_report_path(user_id: @user.id), title: abuse_report_button_title(@user) do
                      Report abuse
34

35 36 37 38 39 40
      .username
        @#{@user.username}
      .description
        - if @user.bio.present?
          = @user.bio

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
41
    .clearfix
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
42 43

    - if @groups.any?
44 45 46 47
      .prepend-top-20
        %h4 Groups
        = render 'groups', groups: @groups
        %hr
48

49 50 51 52
    .hidden-xs
      .user-calendar
        %h4.center.light
          %i.fa.fa-spinner.fa-spin
53
      .user-calendar-activities
54
      %hr
55
    %h4
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
56
      User Activity
57 58 59 60 61 62 63

      - 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

64 65
    .content_list
    = spinner
66
  %aside.col-md-5
67
    = render 'profile', user: @user
Douwe Maan's avatar
Douwe Maan committed
68
    = render 'projects', projects: @projects, contributed_projects: @contributed_projects
69 70

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