Displaying 9 results from an estimated 9 matches for "pagination_links_each".
2006 Jan 31
6
Pagination - why is it this hard?
...ge => 20,
:conditions => searchconditions, :order => ''last_name ASC''
render :action => "list"
end
end
View:
<%= link_to "Previous", { :page => @person_pages.current.previous } if
@person_pages.current.previous -%>
<% pagination_links_each(@person_pages, :window_size => 4) do |n| %>
<a href=''?page=<%= n %>''><%= n %></a>
<% end %>
<%= link_to "Next", { :page => @person_pages.current.next } if
@person_pages.current.next -%>
Resources I''ve used to (it...
2006 Apr 18
1
Pagination links with separator
Hi,
I have @result_pages and @results obtained from paginate in an action. I
want to show the pages as
1 | 2 | 3 | 4 >
The fifth page will show:
< 5 | 6 | 7 | 8 >
and so on.
How exactly do I render the paginator to give this effect? I guess I
will have to use pagination_links_each. But being new to Rails, I need
help.
Thanks,
Yash
--
Posted via http://www.ruby-forum.com/.
2006 Jul 22
3
How do you find out what action rendered a page
...at has some rjs templates updating parts of
it including a table of results. i''m trying to put pagination on the
table. thing is lots of different actions update the table and they have
their own paginators.
anyway i have this code at the bottom which worked for another page
<%=
pagination_links_each(@offer_pages,:window_size =>4) do |n|
"<a href=\"#\" onclick=\"new
Ajax.Request(''/user/choose_offer?page=#{n}'', {asynchronous:true,
evalScripts:true}); return false;\">#{n}</a>"
end
%>
but i need to right it so that the...
2006 Jul 23
2
pagination_links and friendly urls
my pagination_links seems to auto generate the links using the current
controller, action and id. The page they''re appearing on however have a
friendly url I have created. I want to be able to make pagination urls
generated by pagination_links "user friendly" as well so that they match
my current naming convention.....i know there must be a way to do
this....any ideas?
2006 Feb 27
0
Simple Namespace Question
...ew
module Helpers
module PaginationHelper
def pagination_links_remote(paginator, page_options={},
ajax_options={}, html_options={})
name = page_options[:name] || DEFAULT_OPTIONS[:name]
params = (page_options[:params] || DEFAULT_OPTIONS[:params]).clone
pagination_links_each(paginator, page_options) do |n|
params[name] = n
ajax_options[:url] = params
link_to_remote(n.to_s, ajax_options, html_options)
end
end
end # PaginationHelper
end # Helpers
end # ActionView
========================
What am I doing w...
2006 Aug 01
3
paginate, search, sort with ajax problem
hello I hope somebody can help me figure this out.
found this great tutorial at http://dev.nozav.org/rails_ajax_table.html.
got it working except for one thing.
I can''t seem to make the pagination work. The link_to_remote defined in
the helper is pointing to the wrong url.
I have set up things like so:
defined a search method in de project_controller located in
apps/admin/project.
2006 Jan 19
8
Pagination_links without "?page=" but with params[:id]
.../infos/3?page=3">3</a>
but i need this :
<a href="/users/infos/1">1</a>
<a href="/users/infos/3">3</a>
I need to remove the "?page=" parameters and rewrite a little the link ( with a link_to ? )
How can I do this ?
Need to use pagination_links_each ? Use options ?
Thanks
controller :
***
@paginate_pages, @users = paginate :users, :per_page => 1, :order =>
"id DESC"
view:
***
<%= pagination_links @paginate_pages, :window_size => 1 %>
in html:
***
<a href="/users/infos/3?page=1">1</a> 2...
2006 Feb 25
31
Ajax Scaffold Generator for Rails Released
I just released a whole new version of the Ajax Scaffold Generator (for Ruby
on Rails). The generator creates a scaffold page like the typical rails one,
except adding, editing and deleting are all done inline. The generated
scaffold is valid XHTML strict and fully styled right out of the box.
Check out the demo:
http://ajaxscaffold.height1percent.com/
And the how-to:
2006 Jan 26
21
pagination_links help
I want append custom query parameters to my pagination links, like
?page=1&foo=bar. I can''t quite figure out how to do this with the
pagination_links helper, although I believe the API says you should be
able to:
pagination_links(paginator, options={}, html_options={})
options are:
:params: any additional routing parameters for page URLs
Has anyone tried this?
thanks,
jeff
--