diff --git a/app/views/notes/index.html.erb b/app/views/notes/index.html.erb index 26f8ec891..1a389e457 100644 --- a/app/views/notes/index.html.erb +++ b/app/views/notes/index.html.erb @@ -2,36 +2,26 @@

Notes

- - - - - - - - - - - - <% @notes.each do |note| %> - - - - - - - + <%= table_for @notes, class: "striped autofit" do |t| %> + <% t.column "Post" do |note| %> + <%= link_to note.post_id, note.post %> + <% end %> + <% t.column "Note" do |note| %> + <%= link_to "#{note.id}.#{note.version}", post_path(note.post_id, anchor: "note-#{note.id}") %> + <%= link_to "»", note_versions_path(search: { note_id: note.id }) %> + <% end %> + <% t.column "Body", class: "col-expand" do |note| %> + <%= note.body %> + <% unless note.is_active? %> + (deleted) <% end %> - -
PostNoteCreated byCreated atBody
<%= link_to note.post_id, post_path(note.post_id) %> - <%= link_to "#{note.id}.#{note.version}", post_path(note.post_id, anchor: "note-#{note.id}") %> - <%= link_to "»", note_versions_path(search: {note_id: note.id}) %> - <%= link_to_user note.creator %><%= compact_time(note.created_at) %> - <%= h(note.body) %> - <% unless note.is_active? %> - (deleted) - <% end %> -
+ <% end %> + <% t.column "Created" do |note| %> + <%= link_to_user note.creator %> + <%= link_to "»", notes_path(search: { creator_name: note.creator.name }) %> +
<%= time_ago_in_words_tagged(note.created_at) %>
+ <% end %> + <% end %> <%= numbered_paginator(@notes) %>