.row.tbl-header

.col-xs-12
  %h4
    %a{href: url_for('/nodes')} nodes
    \/ Versions for Node 
    %span.node_title #{@node}

.row

.pull-right
  %form
    %button.ColVis_Button{type: 'button', onclick: 'history.go();'}
      %span.glyphicon.glyphicon-repeat Refresh
.table-responsive
  %table.table.table-condensed.table-striped.table-hover#versionsTable
    %thead
      %tr
        %th Version
        %th Dates
        %th Author
        %th Message
        %th Actions

    %tbody
      - nb = @data.count + 1
      - @data.each do |x|
        %tr
          %td #{nb -= 1}
          %td #{time_from_now x[:date]}
          %td #{x[:author][:name]}
          %td #{x[:message]}
          %td
            - params = "node=#{@node}&group=#{@group}&oid=#{x[:oid]}"
            - params = "#{params}&date=#{x[:date]}&num=#{nb}"
            %a{title: 'configuration',
               href: url_for("/node/version/view?#{params}")}
              %span.glyphicon.glyphicon-cloud-download
              
            %a{title: 'diff', href: url_for("/node/version/diffs?#{params}")}
              %img{src: url_for('/images/diff_15x17.png')}

:javascript

$(function() {
  $('#versionsTable').dataTable({
    dom: 'C<"clear">lfrtip',
    "order": [[0, "desc"]],
    bAutoWidth: false,
    columnDefs: [{
      visible: false,
      targets: [2, 3]
    }]
  });
});