<commit_before>#content.section--primary
  .container
    %h1= title(@person.display_name)

    - if @most_recent_incumbency.nil? || @most_recent_incumbency.house.name == 'House of Lords'
      %p= @person.full_title
      %p= "#{@person.full_name}" unless @person.display_name == @person.full_name

    - unless @person.statuses[:house_membership_status].empty?
      .block--border
        - if @person.statuses[:house_membership_status].include?('Current MP')
          %p
            = t('.mp_for')
            = link_to(@current_incumbency.constituency.name, constituency_path(@current_incumbency.constituency.graph_id))
        = @person.statuses[:house_membership_status].join(' and ')
      - if @current_party_membership && @current_incumbency
        .block--border
          %p= link_to(@current_party_membership.party.name, party_path(@current_party_membership.party.graph_id))

%section
  .container
    - if @current_incumbency && @current_party_membership
      %h2= "#{t('.contact').capitalize}"
      - if @postcode
        - if @postcode_constituency.correct?
          %p= t('.correct_mp', name: @person.display_name)
        - else
          %p
            = t('.incorrect_mp', name: @person.display_name)
            = "#{link_to(@postcode_constituency.members.first.display_name, person_path(@postcode_constituency.members.first.graph_id))}.".html_safe
      - elsif @person.statuses[:house_membership_status].include?('Current MP')
        %h3= t('.check_mp', name: @person.display_name)

        = render partial: 'postcodes/postcode_lookup', locals: { path: people_postcode_lookup_path }
<commit_msg>[WEBSITE-1466][WEBSITE-1494] Update person page to handle images / Update status string below name<commit_after>#content.section--primary
  .container
    .block--border__bottom
      .section--primary__container
        - if !@image
          %img{src: 'http://via.placeholder.com/250x197', alt: 'placeholder'}
        .section--primary__block
          %h1= title(@person.display_name)

          - if @most_recent_incumbency.nil? || @most_recent_incumbency.house.name == 'House of Lords'
            %p= @person.full_title
            %p= "#{@person.full_name}" unless @person.display_name == @person.full_name

          - if @current_party_membership && @current_incumbency
            - current_party_details = link_to(@current_party_membership.party.name, party_path(@current_party_membership.party.graph_id))

          - unless @person.statuses[:house_membership_status].empty?
            - if @person.statuses[:house_membership_status].include?('Current MP')
              %p
                = current_party_details if current_party_details
                = t('.mp_for')
                = link_to(@current_incumbency.constituency.name, constituency_path(@current_incumbency.constituency.graph_id))
            - else
              %p
                = current_party_details if current_party_details
                = @person.statuses[:house_membership_status].join(' and ')


%section
  .container
    - if @current_incumbency && @current_party_membership
      %h2= "#{t('.contact').capitalize}"
      - if @postcode
        - if @postcode_constituency.correct?
          %p= t('.correct_mp', name: @person.display_name)
        - else
          %p
            = t('.incorrect_mp', name: @person.display_name)
            = "#{link_to(@postcode_constituency.members.first.display_name, person_path(@postcode_constituency.members.first.graph_id))}.".html_safe
      - elsif @person.statuses[:house_membership_status].include?('Current MP')
        %h3= t('.check_mp', name: @person.display_name)

        = render partial: 'postcodes/postcode_lookup', locals: { path: people_postcode_lookup_path }

{'fraction_non_alphanumeric': 0.1282463186077644, 'fraction_numerical': 0.00535475234270415, 'mean_word_length': 3.0432900432900434, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7034834', 'n_tokens_mistral': 1180, 'n_tokens_neox': 1157, 'n_words': 168}