% content_for :head do %> <% end %>
| # | Дата | Сотрудник | Офис | Оборудование | Коммент | Статус | Удалить | ||
|---|---|---|---|---|---|---|---|---|---|
| <%= rep.id %> | <%=rep.date.to_datetime.strftime("%d.%m.%Y")%> | <%= rep.done_materials.first.employee_name if rep.done_materials.size > 0 %> | <%= rep.name %> | <%=rep.done_materials.map{|m| [m.material_name+(m.count.to_i > 1 ? " " +m.count.to_s + " шт. " : "")]}.join(' ')%> |
<%=rep.com_stay_work%> | <% if @boss %><%= select_tag :status, options_for_select(Report.statuss, rep.status), {:onChange => "ChangeStatus( $(this).val(), #{rep.id})" } %> | <%= button_to "Удалить", office_mat_path(rep), :method => :delete, :confirm => "Вы уверены?" %> | <% else %><%= rep.status_name %> | <%= (button_to "Удалить", office_mats_path(rep.id), :method => :delete, :confirm => "Вы уверены?") if rep.status == 0%> | <% end %>