2 range_start = ((@page - 1) * @traces_per_page) + 1
\r
3 range_end = (@page==@max_page ? @max_trace : (@page * @traces_per_page))
\r
7 <%= @page %> (<%= range_start %><%
\r
8 if (@max_trace != range_start) # if more than 1 trace on page
\r
9 %>-<%= range_end %><%
\r
11 of <%= @max_trace %>)
\r
14 | <%= link_to 'previous page', {:controller => 'trace', :action => @paging_action, :page => @page-1}, {:title => 'previous page'} %>
\r
17 <% if @page < @max_page %>
\r
18 | <%= link_to 'next page', {:controller => 'trace', :action => @paging_action, :page => @page+1}, {:title => 'next page'} %>
\r