view app/views/attachments/toggle_active.rhtml @ 414:576a1dca2ee2 bug_152

Check that user is permitted to see subproject, not only parent project. Fixes #152
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Tue, 10 May 2011 10:08:34 +0100
parents ce817f379723
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
%>