Sha256: b0f8d501870da89307df52ae9c3631c717b9a21abbc2792ebf6599bef551a07b

Contents?: true

Size: 994 Bytes

Versions: 1

Compression:

Stored size: 994 Bytes

Contents

-if people.empty?
  %ol.list
    %li.list__item
      %p= t('no_content.empty_list.members.description', letter: letter.upcase)
-else
  %ol.list
    - people.each do |person|
      - if person.respond_to?(:graph_id)
        %li.list__item
          %h2
            %a{:href => "/people/#{person.graph_id}"}= person.display_name
          - if !person.statuses[:house_membership_status].empty? && !person.statuses[:house_membership_status].include?('Current MP')
            %p= person.statuses[:house_membership_status].join(' and ')

          - if !person.constituencies.empty?
            - seat_incumbency = person.seat_incumbencies.select(&:current?).first
            - unless seat_incumbency.nil?
              %p= "#{t('current_mp_for')} #{seat_incumbency.constituency.name}"
          - if !person.parties.empty?
            - party_membership = person.party_memberships.select(&:current?).first
            - unless party_membership.nil?
              %p= party_membership.party.name

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pugin-0.5.0 app/views/pugin/cards/_person-list.html.haml