fairmondo/fairmondo

View on GitHub
app/views/users/_profile_img.html.slim

Summary

Maintainability
Test Coverage
.User
  - if user.banned?
    h3.User-title= t('users.deleted.headline')
  - else
    - if (local_assigns.has_key? :show_title) && show_title
      h3.User-title Anbieter*in
    .User-image
      - if user.is_pioneer?
        span.sprite_pioneerbutton
      a href="#{ user_path(user) }" data={ push: true } = image_tag(user.image_url(:profile))
    .User-name
      = link_to user.name, user_path(user), data: { push: true }
    .User-type
      - if user.is_a?(LegalEntity) && !user.ngo
        span.sprite_briefcase
        =< link_to t('users.legal_status.show.legal_entity'), profile_user_path(user), data: { push: true }
      - elsif user.ngo
        span.sprite_briefcase
        =< link_to t('users.legal_status.show.ngo'), profile_user_path(user), data: { push: true }
      - else
        span.sprite_user
        =< t('users.legal_status.show.private_user')
    - if user.vacationing?
      .User-vacation
        = t 'users.states.vacationing'

    = render '/users/ratings', user: user