%p{:align => "center", :style => "font-size: 89%"}
  Sort by:
  - if @sort == "name"
    %b Name
  - else
    = link_to "Name", division_path(params.merge(sort: "name"), false)
  -# For senate hide this to match php app
  -# This isn't actually desired so change this
  - if @house == "representatives"
    |
    - if @sort == "constituency"
      %b Constituency
    - else
      = link_to "Constituency", division_path(params.merge(sort: "constituency"), false)
  |
  - if @sort.nil?
    %b Party
  - else
    = link_to "Party", division_path(params.merge(sort: nil), false)
  |
  - if @sort == "vote"
    %b Vote
  - else
    = link_to "Vote", division_path(params.merge(sort: "vote"), false)

%p{:align => "center", :style => "font-size: 89%"}
  Sort by:
  - if @sort == "name"
    %b Name
  - else
    = link_to "Name", division_path(params.merge(sort: "name", dmp: nil), false)
  -# For senate hide this to match php app
  -# This isn't actually desired so change this
  - if @house == "representatives"
    |
    - if @sort == "constituency"
      %b Constituency
    - else
      = link_to "Constituency", division_path(params.merge(sort: "constituency", dmp: nil), false)
  |
  - if @sort.nil?
    %b Party
  - else
    = link_to "Party", division_path(params.merge(sort: nil, dmp: nil), false)
  |
  - if @sort == "vote"
    %b Vote
  - else
    = link_to "Vote", division_path(params.merge(sort: "vote", dmp: nil), false)

Sort links don't pass on dmp value
Sort links don't pass on dmp value
