mconf/mconf-web

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

Summary

Maintainability
Test Coverage
%div{:class => "thread #{cycle('thread-even','thread-odd')}"}
  .logo-in-thread
    = link_logo_image(jr.candidate, :size => '32', :url => user_path(jr.candidate), :title => jr.candidate.name, :class => "logo logo-user")
  .thread-content
    .thread-actions
      - if can?(:accept, jr)
        = simple_form_for [@space, jr], url: accept_space_join_request_path(@space, jr), method: :post do |f|
          .btn-group
            %button.btn.btn-default.tooltipped.submit{ name: 'admin', value: 'admin', title: t('_other.accept_admin'), type: 'submit' }
              = icon_add_admin
            %button.btn.btn-default.tooltipped.submit{ name: 'user', value: 'user', title: t('_other.accept_user'), type: 'submit' }
              = icon_add_user

      - if can?(:decline, jr)
        = link_to t('_other.decline'), decline_space_join_request_path(@space, jr), method: :post, class: "btn btn-danger", data: { confirm: t('.decline_confirmation') }

    .thread-title
      = link_to sanitize(jr.candidate.name), user_path(jr.candidate)
      .user-email
        = "(#{jr.candidate.username}, #{jr.candidate.email})"
    .thread-description
      - unless jr.comment.blank?
        %span= t('join_requests.index.user_message') + ':'
        %span= "\"#{jr.comment}\""