Sha256: 91da9fde8517e900db2ddd2d171d2617030f67f4d909e5bd07ea49331a16d5da

Contents?: true

Size: 655 Bytes

Versions: 2

Compression:

Stored size: 655 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

2 entries across 2 versions & 1 rubygems

Version Path
enju_biblio-0.1.0 app/views/manifestations/_paginate_id_store.html.erb
enju_biblio-0.1.0.pre71 app/views/manifestations/_paginate_id_store.html.erb