.tabbable
  %ul.nav.nav-tabs
    %li.active
      = link_to "Proposal", "#proposal-content", "data-toggle"=>"tab"
    %li
      = link_to "History", "#history-content", "data-toggle"=>"tab"
  .tab-content
    #proposal-content.tab-pane.active
      = render 'proposal'
    #history-content.tab-pane
      .col-md-12
        %table.table
          %thead
            %th
              %b Who
            %th
              %b Timestamp
            %th
              %b Modification Type
            %th
              %b Changes
          %tbody
          - @event.versions.each do |version|
            %tr
              %td
                - if !version.whodunnit.nil?
                  = User.find(version.whodunnit).name
                - else
                  No user (probably via the console)
              %td
                = version.created_at
              %td
                = version.event
              %td
                - version.changeset.each_key do |key|
                  = "#{key}: #{version.changeset[key][0]} -> #{version.changeset[key][1]}"
                  %br

