Sha256: e29fe49f8e2a37d5642730e89b9402b65e7cdb79a1828fe7b6924b1dc1b440ff

Contents?: true

Size: 833 Bytes

Versions: 5

Compression:

Stored size: 833 Bytes

Contents

<h1>Search History</h1>
<%- if @searches.blank? -%>
  <h2>You have no search history</h2>
<%- else -%>
  <p>
    <%= link_to "Clear Search History", clear_search_history_path, :method => :delete, :confirm => "Clear your search history?" %>
  </p>
  <h2>Your recent searches</h2>
  <table class="zebra search_history">
  <%-  @searches.each_with_index do |search,index| -%>
    <%= content_tag :tr, :id => "document_#{index + 1}" do %>
      <td class="query"><%= link_to_previous_search(search.query_params) %></td>
      <td class="actions"><%- if current_user && search.saved? -%>
        <%= button_to "forget", forget_search_path(search.id) %>
      <%- else -%>
        <%= button_to "save", save_search_path(search.id), :method => :put %>
      <%- end -%></td>
    <% end #content_tag %>
  <%- end -%>
  </table>
<%- end -%>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
blacklight-3.1.2 app/views/search_history/index.html.erb
blacklight-3.1.1 app/views/search_history/index.html.erb
blacklight-3.1.0 app/views/search_history/index.html.erb
blacklight-3.0.0 app/views/search_history/index.html.erb
blacklight-3.0.0pre8 app/views/search_history/index.html.erb