Sha256: 0eccac56b6b76ffa596c4955809db12a7d3670d2ab4dcd393c6907f21c11f923

Contents?: true

Size: 654 Bytes

Versions: 3

Compression:

Stored size: 654 Bytes

Contents

<% if flash[:search_query] %>
  <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="<%= manifestations_path %>/' + ids[index - 1] + '"><%= t('page.previous') %></a>');
        };
        if(ids[index + 1] > 0){
          $("#next_link").html('<a href="<%= manifestations_path %>/' + ids[index + 1] + '"><%= t('page.next') %></a>');
        };
      };
    });
  </script>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
enju_biblio-0.1.3 app/views/manifestations/_paginate_id_store.html.erb
enju_biblio-0.1.2 app/views/manifestations/_paginate_id_store.html.erb
enju_biblio-0.1.1 app/views/manifestations/_paginate_id_store.html.erb