%style
  = Diffy::CSS

- content_for :title do
  Division Description Changes —
  = @division.original_name
  —
  = formatted_date(@division.date)
- set_meta_tags description: "All changes made to the description and title of the division: #{@division.name}"

.page-header
  %h1= yield :title

%p
  All changes made to the description and title of this
  division.

%p
  = link_to "View division", @division
  |
  = link_to "Edit description", edit_division_path(@division)

%table.table
  %thead
    %tr
      %th Change
      %th Division
  %tbody
    - @division.wiki_motions.each_with_index do |wiki_motion, index|
      %tr
        %td{width: "16%"}
          = link_to "#{@division.house} vote #{@division.date}##{@division.number}", @division
          %p
            Edited by
            = link_to wiki_motion.user.name, wiki_motion.user
          %p
            on
            = wiki_motion.edit_date.strftime('%F %T')
        %td
          %p Title
          = Diffy::Diff.new(wiki_motion.previous_title.strip, wiki_motion.title.strip).to_s(:html).html_safe
          %p Description
          = Diffy::Diff.new(wiki_motion.previous_description, wiki_motion.description).to_s(:html).html_safe

%style
  = Diffy::CSS

- content_for :title do
  Division Description Changes —
  = @division.original_name
  —
  = formatted_date(@division.date)
- set_meta_tags description: "All changes made to the description and title of the division: #{@division.name}"

.page-header
  %h1= yield :title

%p
  All changes made to the description and title of this
  division.

%p
  = link_to "View division", @division
  |
  = link_to "Edit description", edit_division_path(@division)

%table.table
  %thead
    %tr
      %th Change
      %th Division
  %tbody
    - @division.wiki_motions.each do |wiki_motion|
      %tr
        %td{width: "16%"}
          = link_to "#{@division.house} vote #{@division.date}##{@division.number}", @division
          %p
            Edited by
            = link_to wiki_motion.user.name, wiki_motion.user
          %p
            on
            = wiki_motion.edit_date.strftime('%F %T')
        %td
          %p Title
          = Diffy::Diff.new(wiki_motion.previous_title.strip, wiki_motion.title.strip).to_s(:html).html_safe
          %p Description
          = Diffy::Diff.new(wiki_motion.previous_description, wiki_motion.description).to_s(:html).html_safe

Remove index as it's not used
Remove index as it's not used
