AgileVentures/osra

View on GitHub
app/views/users/_sponsors.html.haml

Summary

Maintainability
Test Coverage
.row
  - if sponsors.empty?
    .center
      No Sponsors found
  - else
    .table-responsive
      %table.table.table-hover{name: 'sponsors'}
        %thead
          %tr
            %th
              Osra Num
            %th
              Name
            %th
              Status
            %th
              Start Date
            %th
              Request Fulfilled
            %th
              Sponsor Type
            %th
              Country
        %tbody
          - sponsors.each do |sponsor|
            %tr
              %td
                = link_to sponsor.osra_num, sponsor_path(sponsor)
              %td
                = link_to sponsor.name, sponsor_path(sponsor)
              %td
                = sponsor.status.name
              %td
                = format_full_date sponsor.start_date
              %td
                = sponsor.request_fulfilled ? 'Yes' : 'No'
                (#{sponsor.active_sponsorship_count}/#{sponsor.requested_orphan_count})
              %td
                = sponsor.sponsor_type.name
              %td
                = en_ar_country(sponsor.country)
.pagination
  = will_paginate sponsors, will_paginate_render_options(param_name: param_name)