search for: sort_link_helper

Displaying 11 results from an estimated 11 matches for "sort_link_helper".

2007 Mar 22
2
Inconsistent Invalid Argument Error
I have a view with a table that contains sortable links as headings. Here is the code used to create these sortable links in the application_helper: module ApplicationHelper def sort_link_helper(text, param) key = param key += "_reverse" if @params[:sort] == param link_to(text, :controller => ''sales_orders'', :action => ''list'', :sort => key ) end end Here is the code in my controller where I call the sort_link_helper fun...
2007 Mar 16
1
sort_link_helper and cross-controller partials
Hello Rubyists, I ran into a problem with sorting a table (rendered in a partial) using the sort_link_helper methods after I have submitted data and re-rendered the table through an AJAX request. The setup is a follows: The table is a shared partial of Controller1 and Controller2 accessible via "shared/table". The AJAX''ed sorting using the sort helper works all fine on Controller1. A...
2006 Aug 11
0
SQL sort
...rt = case @params[''sort''] when "login" then "login DESC" when "first_name" then "first_name DESC" when "last_name" then "last_name DESC" end ... to be used in a ''sort_link_helper'' def sort_link_helper(text, param) key = param key += "_reverse" if @params[:sort] == param options = { :url => {:action => ''list'', :params => @params.merge({:sort => key, :page => nil})}, :update => ...
2006 Aug 16
0
sort_link_helper , sorting on date
I am using this helper to sort my table colums, no problem sorting on string but how can I sort a date colum ( in my DB, ) user_helper.rb ---------------------- def sort_link_helper(text, param) key = param key += "_reverse" if @params[:sort] == param options = { :url => {:action => ''list'', :params => @params.merge({:sort => key, :page => nil})}, :update => ''table'', :before => "Ele...
2006 Aug 01
3
paginate, search, sort with ajax problem
...tutorial the method is called list. defined in the item_controller I copy and paste the helper methodes to project_helper in the folder helpers/admin/project_helper The files that create the view are located in views/admin/project Problem is that the helper method pagination_links_remote and sort_link_helper crate a link like the folowing: http://localhost:3001/admin/admin/project/search?query=we&sort=name where is should look like this to make the pagination work: http://localhost:3001/admin/project/search?query=we&sort=name notice the diference near "admin", printed only...
2006 Sep 06
3
url_for , controller routing error
I have an ''account_controller.rb'' in an ''admin'' module I list the accounts with : http://0.0.0.0:3000/admin/accounts/list, and get my table trying to sort it, I use the follwoing sort_link_helper : def sort_link_helper(text, param) key = param key += "_reverse" if @params[:sort] == param options = { :url => {:action => ''list'', :params => @params.merge({:sort => key, :page => nil})}, :update => '...
2009 May 13
1
[PATCH server] Cloud UI V1 (readonly).
...own' if params[key] == param + " DESC" + return result + end + + # pass in an optional symbol for the key you want to use + # TODO: add checking to make sure this is a symbol, possibly as simple as adding a + # to_sym, just not sure what happens if it is already a symbol + def sort_link_helper(text, param, key = :sort) + param += " DESC" if params[key] == param + param_list = params.clone + param_list[key] == param ? param_list[key] = param += " DESC": param_list[key] = param + link_to(text, :action => 'index', :params => param_list) + end +...
2009 Jul 06
0
[PATCH server] UI for accumulated uptime for VMs. (revised2)
...nce/_list.rhtml index 1fa46de..95e5518 100644 --- a/src/app/views/cloud/instance/_list.rhtml +++ b/src/app/views/cloud/instance/_list.rhtml @@ -14,6 +14,9 @@ <th scope="col" class="sortable <%= sort_td_class_helper "state" %>"> <div><%= sort_link_helper "State", "state" %></div> </th> + <th scope="col" class="sortable <%= sort_td_class_helper "calc_uptime" %>"> + <div><%= sort_link_helper "Total Run Time", "calc_uptime" %></...
2009 Jul 02
1
[PATCH server] UI for accumulated uptime for VMs. (revised)
...nce/_list.rhtml index 1fa46de..95e5518 100644 --- a/src/app/views/cloud/instance/_list.rhtml +++ b/src/app/views/cloud/instance/_list.rhtml @@ -14,6 +14,9 @@ <th scope="col" class="sortable <%= sort_td_class_helper "state" %>"> <div><%= sort_link_helper "State", "state" %></div> </th> + <th scope="col" class="sortable <%= sort_td_class_helper "calc_uptime" %>"> + <div><%= sort_link_helper "Total Run Time", "calc_uptime" %></...
2009 Jul 06
2
[PATCH server] UI for accumulated uptime for VMs. (revised3)
...nce/_list.rhtml index 1fa46de..95e5518 100644 --- a/src/app/views/cloud/instance/_list.rhtml +++ b/src/app/views/cloud/instance/_list.rhtml @@ -14,6 +14,9 @@ <th scope="col" class="sortable <%= sort_td_class_helper "state" %>"> <div><%= sort_link_helper "State", "state" %></div> </th> + <th scope="col" class="sortable <%= sort_td_class_helper "calc_uptime" %>"> + <div><%= sort_link_helper "Total Run Time", "calc_uptime" %></...
2009 Jun 29
3
[PATCH server] UI for accumulated uptime for VMs.
...nce/_list.rhtml index 1fa46de..bed7b3b 100644 --- a/src/app/views/cloud/instance/_list.rhtml +++ b/src/app/views/cloud/instance/_list.rhtml @@ -14,6 +14,9 @@ <th scope="col" class="sortable <%= sort_td_class_helper "state" %>"> <div><%= sort_link_helper "State", "state" %></div> </th> + <th scope="col" class="sortable <%= sort_td_class_helper "calc_uptime" %>"> + <div><%= sort_link_helper "Total Run Time", "calc_uptime" %></...