Sha256: a2cb13540fcfb0decb213fe88852c4385d072a4c80938a88ee04614191be9d14

Contents?: true

Size: 1.12 KB

Versions: 28

Compression:

Stored size: 1.12 KB

Contents

.card
  - if Pugin::Feature::Bandiera.show_list_images?
    %figure.avatar--round
      %a{ href: "/people/#{lord.graph_id}", aria: { hidden: "true" }, 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: "" }

  .card__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

28 entries across 28 versions & 1 rubygems

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