<%=l :work_account%>:
<%= select 'work', 'work_account_id', @work_accounts.map{|wa| [wa.name, wa.id]}.sort %>
<% if @work.work_account -%>
<%=image_detour_to('work_account.png', "#{l(:work_account)} #{@work.work_account.name}", {:controller => 'work_accounts', :action => :edit, :id => @work.work_account}, {:class => 'image-submit', :style => 'vertical-align: bottom'}) %>
<% end -%>
<%=detour_to l(:new_work_account), :controller => 'work_accounts', :action => :new %>
<%=l :task%>:
<% if @work.task %>
<%= text_field 'work', 'started_at', :size => 16, :value => @work.started_at ? @work.started_at.strftime('%Y-%m-%d %H:%M') : nil %>
<%= text_field 'work', 'completed_at', :size => 16, :value => (@work.completed_at && @work.completed_at.strftime('%Y-%m-%d %H:%M')) %>
<%= select 'work', 'user_id', @users.map{|user| [user.login, user.id]} %>
<%= text_field 'work', 'hours_time', :class => :task_hours, :value => t(@work.hours) %>
<%= check_box 'work', 'invoice' %>
<%= text_field 'estimate', 'todo', :class => :task_hours %>
<%= image_tag('checkmark.png', :onclick => "document.getElementById('estimate_todo').value='0'", :style => 'vertical-align: bottom; height: 24px; float: none')%>
<%= check_box 'estimate', 'todo', {:checked => @estimate.todo == 0}, 0, 1 %>