Greg Hauptmann
2006-Oct-14 11:14 UTC
embedding sort director icons in header using SortingHelper???
Hi,
Can anyone recommend a way to embed the use of sort direction icons in table
headers into the SortingHelper framework, i.e. so one does not have to
manually calcaulate and add the right "down_arrow" /
"right_arrow" images
in?
For example (roughly speaking) I''m doing the follow kind of thing:
<th><%= link_to "#{ image_tag("arrow_right.gif",
{:border => 0}) }
Name", @sorter.to_link("NAME", params) %></th>
Thanks
Greg
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---
Greg Hauptmann
2006-Oct-14 11:19 UTC
Re: embedding sort director icons in header using SortingHelper???
PS. I should say I''m doing something like this at the moment...
<% if params[:sort] == "NAME" %>
<th><%= link_to "#{ image_tag("arrow_down.gif",
{:border => 0}) }
Name", @sorter.to_link("NAME", params) %></th>
<% else %>
<th><%= link_to "#{ image_tag("arrow_right.gif",
{:border => 0}) }
Name", @sorter.to_link("NAME", params) %></th>
<% end%>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---