Sha256: ab606701ac4f07349c911d9956c41ad12c7e0c92df7d444bf004d3cb45ca50f4

Contents?: true

Size: 940 Bytes

Versions: 6

Compression:

Stored size: 940 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>
      <%- if has_user_authentication_provider? -%>
        <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 -%>
    <% end #content_tag %>
  <%- end -%>
  </table>
<%- end -%>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
blacklight-3.4.2 app/views/search_history/index.html.erb
blacklight-3.4.1 app/views/search_history/index.html.erb
blacklight-3.4.0 app/views/search_history/index.html.erb
blacklight-3.3.2 app/views/search_history/index.html.erb
blacklight-3.3.1 app/views/search_history/index.html.erb
blacklight-3.3.0 app/views/search_history/index.html.erb