* traces - added some routes, replicated data access / pagination, but presentation and pending file control not complete * edit - setup so that applet can be loaded + token authorisation enabled * API - tests out ok against applet, but had to change segment-node associations * misc - gems version required upgraded to 1.2.3 (latest stable rails version), changed some find_first to find(:first... calls
19 lines
651 B
Text
19 lines
651 B
Text
<%
|
|
range_start = ((@page - 1) * @traces_per_page) + 1
|
|
range_end = (@page==@max_page ? @max_trace : (@page * @traces_per_page))
|
|
%>
|
|
|
|
Showing page
|
|
<%= @page %> (<%= range_start %><%
|
|
if (@max_trace != range_start) # if more than 1 trace on page
|
|
%>-<%= range_end %><%
|
|
end %>
|
|
of <%= @max_trace %>)
|
|
|
|
<% if @page > 1 %>
|
|
| <%= link_to 'previous page', {:controller => 'trace', :action => @paging_action, :page => @page-1}, {:title => 'previous page'} %>
|
|
<% end %>
|
|
|
|
<% if @page < @max_page %>
|
|
| <%= link_to 'next page', {:controller => 'trace', :action => @paging_action, :page => @page+1}, {:title => 'next page'} %>
|
|
<% end %>
|