- content_for :title do
  = @member.name
  compared to '#{@policy.name}'

%h1
  = image_tag(@member.large_image_url, alt: "Photo of #{@member.name_without_title}")
  = yield :title

#secondnavtabs
  %ul.nav.nav-tabs
    - if @policy
      = nav_link("Summary", member_path2(@member, dmp: @policy.id), "Show every vote cast by this MP", @display.nil?)
      = nav_link("Full description", member_path2(@member, display: "motions", dmp: @policy.id), "Also show descriptions of every vote", @display == "motions")
    - else
      = nav_link("Summary", member_path2(@member, display: "allvotes"), "Show every vote cast by this MP", @display.nil? || @display == "allvotes")
      = nav_link("Full description", member_path2(@member, display: "motions"), "Also show descriptions of every vote", @display == "motions")

    = nav_link("Policy comparisons", member_path2(@member, display: "alldreams"), "Show all Policies and how this MP voted on them", @display == "alldreams")

= render "policy_comparison", member: @member, agreement_fraction_with_policy: @agreement_fraction_with_policy, policy: @policy, display: @display, number_of_votes_on_policy: @number_of_votes_on_policy, policy_member_distance: @policy_member_distance

- content_for :title do
  = @member.name
  compared to '#{@policy.name}'

%h1
  = image_tag(@member.large_image_url, alt: "Photo of #{@member.name_without_title}")
  = yield :title

#secondnavtabs
  %ul.nav.nav-tabs
    = nav_link("Summary", member_path2(@member, dmp: @policy.id), "Show every vote cast by this MP", @display.nil?)
    = nav_link("Full description", member_path2(@member, display: "motions", dmp: @policy.id), "Also show descriptions of every vote", @display == "motions")
    = nav_link("Policy comparisons", member_path2(@member, display: "alldreams"), "Show all Policies and how this MP voted on them", @display == "alldreams")

= render "policy_comparison", member: @member, agreement_fraction_with_policy: @agreement_fraction_with_policy, policy: @policy, display: @display, number_of_votes_on_policy: @number_of_votes_on_policy, policy_member_distance: @policy_member_distance

Remove unused code in view
Remove unused code in view
