view app/views/attachments/toggle_active.rhtml @ 258:ce817f379723 feature_80

* Use fav/fav-off instead of true/false icons. False looks too much like delete.
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Fri, 04 Mar 2011 14:50:22 +0000
parents 3ecf99348b9f
children
line wrap: on
line source
<%=
file = Attachment.find(params[:id])
active_id = "active-" + file.id.to_s
link_to_remote image_tag(file.active? ? 'fav.png' : 'fav_off.png'),
  :url => {:controller => 'attachments', :action => 'toggle_active', :project_id => @project.id, :id => file},
  :update => active_id
%>