migrate edit update and destroy to jQuery and refactor it

test for changing state is wip, forgot to mark it with @wip
This commit is contained in:
Reinier Balt 2010-10-07 23:24:50 +02:00
parent ee4ef4ad42
commit 35453acd57
12 changed files with 198 additions and 105 deletions

View file

@ -110,6 +110,12 @@ module ApplicationHelper
def link_to_project(project, descriptor = sanitize(project.name))
link_to( descriptor, project_path(project), :title => "View project: #{project.name}" )
end
def link_to_edit_project (project, descriptor = sanitize(project.name))
link_to(descriptor,
url_for({:controller => 'projects', :action => 'edit', :id => project.id}),
{:id => "link_edit_#{dom_id(project)}", :class => "project_edit_settings"})
end
def link_to_project_mobile(project, accesskey, descriptor = sanitize(project.name))
link_to( descriptor, project_path(project, :format => 'm'), {:title => "View project: #{project.name}", :accesskey => accesskey} )