Mercurial > hg > soundsoftware-site
diff app/views/attachments/toggle_active.rhtml @ 257:3ecf99348b9f feature_80
* Enable toggling file active state through the files interface
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Fri, 04 Mar 2011 12:46:26 +0000 |
parents | |
children | ce817f379723 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/views/attachments/toggle_active.rhtml Fri Mar 04 12:46:26 2011 +0000 @@ -0,0 +1,7 @@ +<%= +file = Attachment.find(params[:id]) +active_id = "active-" + file.id.to_s +link_to_remote image_tag(file.active? ? 'true.png' : 'false.png'), + :url => {:controller => 'attachments', :action => 'toggle_active', :project_id => @project.id, :id => file}, + :update => active_id +%>