Sha256: cd2a34714b976dbae6df264dd72dd43356633757ae98bd5a891be680206bc7de

Contents?: true

Size: 1.03 KB

Versions: 12

Compression:

Stored size: 1.03 KB

Contents

- if Pugin::Feature::Bandiera.show_list_images?
  %figure
    %a{href: "/people/#{lord.graph_id}", tabindex: "-1"}
      %picture
        - if lord.image_id != "placeholder"
          %img{ src: "#{ENV['IMAGE_SERVICE_URL']}/#{lord.image_id}.jpeg?crop=CU_1:1&width=186&quality=80", alt: "#{lord.display_name}" }
        - else
          %img{ src: "#{Pugin::ASSET_LOCATION_URL}/#{Pugin::ASSET_VERSION}/images/placeholder_members_image.png", alt: "" }

.list--details
  %h2
    %a{href: "/people/#{lord.graph_id}"}= lord.display_name

  -# Currently only takes the most recent incumbency as part of that parliamentary period
  - most_recent_incumbency = lord.most_recent_seat_incumbency

  - if @parliament # parliament lord
    %p= "Member of the #{t('house_of_lords')}"
    %p= lord&.parties&.first&.name

  - elsif most_recent_incumbency&.current? # current lord
    %p= lord.statuses[:house_membership_status].join(' and ')
    %p= lord.try(:current_party).try(:name)

  - else # former lord
    %p= lord.statuses[:house_membership_status].join(' and ')

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pugin-1.6.22 app/views/pugin/people/list/lord/_lord.html.haml
pugin-1.6.21 app/views/pugin/people/list/lord/_lord.html.haml
pugin-1.6.20 app/views/pugin/people/list/lord/_lord.html.haml
pugin-1.6.19 app/views/pugin/people/list/lord/_lord.html.haml
pugin-1.6.18 app/views/pugin/people/list/lord/_lord.html.haml
pugin-1.6.17 app/views/pugin/people/list/lord/_lord.html.haml
pugin-1.6.16 app/views/pugin/people/list/lord/_lord.html.haml
pugin-1.6.15 app/views/pugin/people/list/lord/_lord.html.haml
pugin-1.6.14 app/views/pugin/people/list/lord/_lord.html.haml
pugin-1.6.13 app/views/pugin/people/list/lord/_lord.html.haml
pugin-1.6.12 app/views/pugin/people/list/lord/_lord.html.haml
pugin-1.6.11 app/views/pugin/people/list/lord/_lord.html.haml