annotate app/views/attachments/toggle_active.html.erb @ 1473:0a17b5e486af
bug_370
Close obsolete branch bug_370
author |
Chris Cannam |
date |
Wed, 14 Nov 2012 14:00:01 +0000 |
parents |
04114f36670d |
children |
|
rev |
line source |
chris@257
|
1 <%=
|
chris@257
|
2 file = Attachment.find(params[:id])
|
chris@257
|
3 active_id = "active-" + file.id.to_s
|
chris@258
|
4 link_to_remote image_tag(file.active? ? 'fav.png' : 'fav_off.png'),
|
chris@257
|
5 :url => {:controller => 'attachments', :action => 'toggle_active', :project_id => @project.id, :id => file},
|
chris@257
|
6 :update => active_id
|
chris@257
|
7 %>
|