X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/44e147b16322f9bdd4606cda7deec631b951ab06..c7cf228372bee18d84b14fc4089a758bc157fe76:/apps/workbench/app/views/application/_paging.html.erb diff --git a/apps/workbench/app/views/application/_paging.html.erb b/apps/workbench/app/views/application/_paging.html.erb deleted file mode 100644 index f5677f77ce..0000000000 --- a/apps/workbench/app/views/application/_paging.html.erb +++ /dev/null @@ -1,87 +0,0 @@ -<% content_for :css do %> -.index-paging { -text-align: center; -padding-left: 1em; -padding-right: 1em; -background-color: whitesmoke; -} -<% end %> - -<% if results.result_offset != nil and results.result_limit != nil and results.items_available != nil %> -
- -<% if results.result_offset > 0 %> - <% if results.result_offset > results.result_limit %> - <% prev_offset = results.result_offset - results.result_limit %> - <% else %> - <% prev_offset = 0 %> - <% end %> -<% else %> - <% prev_offset = nil %> -<% end %> - -<% this_offset = results.result_offset %> -<% this_page = results.result_offset / results.result_limit %> - -<% if (results.result_offset + results.result_limit) < results.items_available %> - <% next_offset = results.result_offset + results.result_limit %> -<% else %> - <% next_offset = nil %> -<% end %> - - -<% if results.result_offset > 0 %> - <%= link_to raw(""), {:id => object, :offset => 0, :limit => results.result_limit} %> -<% else %> - -<% end %> - -<% if prev_offset %> - <%= link_to raw(""), {:id => object, :offset => prev_offset, :limit => results.result_limit} %> -<% else %> - -<% end %> - - -<% n = this_page - 10 %> -<% if n >= 0 %> - <% last = this_page + 10 %> - … -<% else %> - <% n = 0 %> - <% last = 20 %> -<% end %> - -<% i = n * results.result_limit %> -<% while i < results.items_available and n < last %> -<% if n != this_page %> - <%= link_to "#{n+1}", {:id => @object, :offset => i, :limit => results.result_limit} %> -<% else %> - <%= n+1 %> -<% end %> -<% i += results.result_limit %> -<% n += 1 %> -<% end %> - -<% if i < results.items_available %> -… -<% end %> - - -<% if next_offset %> - <%= link_to raw(""), {:id => @object, :offset => next_offset, :limit => results.result_limit} %> -<% else %> - -<% end %> - -<% if (results.items_available - results.result_offset) >= results.result_limit %> - <%= link_to raw(""), {:id => @object, :offset => results.items_available - (results.items_available % results.result_limit), - :limit => results.result_limit} %> -<% else %> - -<% end %> - - - -
-<% end %>