<%= search_form_for @search, url: path_to_threads, remote: Discussion.ajaxify do |f| %> <%= hidden_field_tag :sent_item, params[:sent_item] %>
<%= f.text_field :subject_cont, placeholder: 'Subject' %>
<%= f.submit "Search" %>
<% end %> <%= link_to_threads link_text: 'All comments' %> | <%= link_to_threads link_text: 'Sent Item', sent_item: true %> <% @threads.each do |thread| %> <% end %>
Subject Initiator <%= sort_link(@search, :created_at, "Initiated on", {}, {remote: Discussion.ajaxify}) %> <%= sort_link(@search, :last_posted_at, "Last post at", {}, {remote: Discussion.ajaxify}) %> <%= sort_link(@search, :total_comments_post, "Total comments post", {}, {remote: Discussion.ajaxify}) %>
<%= link_to_thread thread, link_text: thread.subject.truncate(80, :omission => "... (continued)") %> <%= thread.initiator.try(:email) %> <%= thread.created_at %> <%= thread.last_posted_at %> <%= thread.total_comments_post %> <%= link_to_destroy_thread(thread) %>
<%= paginate @threads, remote: Discussion.ajaxify %>
<%= link_to_new_thread %>