wire up downloading attachments from todo partial

This commit is contained in:
Reinier Balt 2014-07-06 22:29:19 +02:00
parent 4d7c453ca7
commit 6405bf5d1a
5 changed files with 32 additions and 3 deletions

View file

@ -204,6 +204,14 @@ module TodosHelper
link_to(t('todos.convert_to_project'), url, {:class => "icon_item_to_project", :id => dom_id(todo, "to_project")})
end
def attachment_image(todo)
link_to(
image_tag('blank.png', width: 16, height: 16, border:0),
todo.attachments.first.file.url,
{:class => 'todo_attachment', title: 'Get attachments of this todo'}
)
end
def collapsed_notes_image(todo)
link = link_to(
image_tag( 'blank.png', :width=>'16', :height=>'16', :border=>'0' ),