Sha256: 34f9547a828e7e4790c96200cd746f81234ae7fc94a28e6449ed583412a65506

Contents?: true

Size: 1.17 KB

Versions: 21

Compression:

Stored size: 1.17 KB

Contents

-if people.empty?
  %ol.list--block
    %li
      .list--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
          .list--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.empty?
              - seat_incumbency = person.seat_incumbencies.select(&:current?).first
              - unless seat_incumbency.nil?
                %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

21 entries across 21 versions & 1 rubygems

Version Path
pugin-1.6.6 app/views/pugin/cards/_person-list.haml
pugin-1.6.5 app/views/pugin/cards/_person-list.haml
pugin-1.6.4 app/views/pugin/cards/_person-list.haml
pugin-1.6.3 app/views/pugin/cards/_person-list.haml
pugin-1.6.1 app/views/pugin/cards/_person-list.haml
pugin-1.6.0 app/views/pugin/cards/_person-list.haml
pugin-1.5.1 app/views/pugin/cards/_person-list.haml
pugin-1.5.0 app/views/pugin/cards/_person-list.haml
pugin-1.4.1 app/views/pugin/cards/_person-list.haml
pugin-1.4.0 app/views/pugin/cards/_person-list.haml
pugin-1.3.1 app/views/pugin/cards/_person-list.haml
pugin-1.3.0 app/views/pugin/cards/_person-list.haml
pugin-1.2.5 app/views/pugin/cards/_person-list.haml
pugin-1.2.4 app/views/pugin/cards/_person-list.haml
pugin-1.2.3 app/views/pugin/cards/_person-list.haml
pugin-1.2.2 app/views/pugin/cards/_person-list.haml
pugin-1.2.1 app/views/pugin/cards/_person-list.haml
pugin-1.2.0 app/views/pugin/cards/_person-list.haml
pugin-1.1.2 app/views/pugin/cards/_person-list.haml
pugin-1.0.1.pre app/views/pugin/cards/_person-list.haml