Sha256: 5f5f59787725df8a2855789c0ffa532adfaed5204341367d39c3a55caad8f171

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

<script>
  $(function(){
    if(typeof sessionStorage === "undefined"){
      return;
    }else{
      var ids = JSON.parse(sessionStorage.getItem("<%= flash[:search_query] %>"));
      var index = $.inArray(<%= manifestation.id %>, ids);
      if(ids[index - 1] > 0){
        $("#prev_link").html('<a href="<%= root_url %>manifestations/' + ids[index - 1] + '"><%= t('page.previous') %></a>');
      };
      if(ids[index + 1] > 0){
        $("#next_link").html('<a href="<%= root_url %>manifestations/' + ids[index + 1] + '"><%= t('page.next') %></a>');
      };
    };
  });
</script>

<%= form_for :manifestations, :url => manifestations_path, :html => {:method => 'get'} do -%>
  <div>
    <span id="next_link"><%= t('page.next') %></span>
    <span id="prev_link"><%= t('page.previous') %></span>
    <%= back_to_manifestation_index -%>
    <%= t('page.search_term') -%>:
    <%= search_field_tag 'query', @query, {:id => 'search_form_top', :class => 'search_form_short', :placeholder => t('page.search_term')} -%>
    <%= submit_tag t('page.search') -%>
    <%= link_to t('page.advanced_search'), page_advanced_search_path -%>
  </div>
<%- end -%>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
enju_biblio-0.0.3 app/views/manifestations/_paginate_id_link.html.erb