mconf/mconf-web

View on GitHub
app/views/join_requests/_invitation.html.haml

Summary

Maintainability
Test Coverage
%div{:class => "thread #{cycle('thread-even','thread-odd')}"}
  .logo-in-thread
    = link_logo_image(jr.candidate, :url => user_path(jr.candidate), :size => '32', :title => jr.candidate.name, :class => "logo logo-user")
  .thread-content
    .thread-actions
      - target = jr.candidate ? jr.candidate.name : jr.email
      - if !jr.processed?
        - if can?(:decline, jr)
          = link_to t('_other.cancel'), decline_space_join_request_path(@space, jr), :data => { :confirm => t('.cancel', :user => target) }, :method => :post, :class => 'btn btn-danger btn-small'
      - else
        %p= t('join_requests.show.already_accepted')

    .thread-title
      = jr.candidate ? link_to(jr.candidate.name, user_path(jr.candidate)) : jr.email
      .user-email
        = "(#{jr.candidate.username}, #{jr.candidate.email})"
      - if jr.is_invite?
        = t('.invited_as') + ':'
        %b= t("activerecord.attributes.roles.name_#{jr.role.name.downcase}")
    .thread-description
      - unless jr.comment.blank?
        %span= t('.message_sent') + ':'
        %span= "\"#{jr.comment}\""