Sha256: 18606b54289dd8825fb64088be6f8390fc431ce63fe8369d8b5d03e7cb106944

Contents?: true

Size: 1.25 KB

Versions: 29

Compression:

Stored size: 1.25 KB

Contents

-if people.empty?
  %ol.list--block
    %li
      .card
        .card__details
          %p
            = "#{I18n.t('no_content.empty_list.members.description')}"
            = params[:letter].nil? ? "" : "#{I18n.t('no_content.empty_list.members.for')} '#{params[:letter].upcase}'"
-else
  %ol.list--block
    - people.each do |person|
      - if person.respond_to?(:graph_id)
        %li
          .card
            .card__details
              %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.any?
                - seat_incumbency = person.seat_incumbencies.select(&:current?).first
                - if seat_incumbency && seat_incumbency.constituency
                  %p= "#{I18n.t('pugin.cards.person-list.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

29 entries across 29 versions & 1 rubygems

Version Path
pugin-1.10.10 app/views/pugin/cards/_person-list.haml
pugin-1.10.9 app/views/pugin/cards/_person-list.haml
pugin-1.10.8 app/views/pugin/cards/_person-list.haml
pugin-1.10.7 app/views/pugin/cards/_person-list.haml
pugin-1.10.6 app/views/pugin/cards/_person-list.haml
pugin-1.10.5 app/views/pugin/cards/_person-list.haml
pugin-1.10.4 app/views/pugin/cards/_person-list.haml
pugin-1.10.3 app/views/pugin/cards/_person-list.haml
pugin-1.10.2 app/views/pugin/cards/_person-list.haml
pugin-1.10.1 app/views/pugin/cards/_person-list.haml
pugin-1.10.0 app/views/pugin/cards/_person-list.haml
pugin-1.9.7 app/views/pugin/cards/_person-list.haml
pugin-1.9.6 app/views/pugin/cards/_person-list.haml
pugin-1.9.5 app/views/pugin/cards/_person-list.haml
pugin-1.9.4 app/views/pugin/cards/_person-list.haml
pugin-1.9.3 app/views/pugin/cards/_person-list.haml
pugin-1.9.2 app/views/pugin/cards/_person-list.haml
pugin-1.9.1 app/views/pugin/cards/_person-list.haml
pugin-1.9.0 app/views/pugin/cards/_person-list.haml
pugin-1.8.9 app/views/pugin/cards/_person-list.haml