<%= @task.task_name%>

<% if @task.user_ids %> <% user_ids = @task.user_ids user_bson_ids = user_ids.map{|id| BSON::ObjectId(id)} %> <% users = User.find(user_ids).index_by(&:id).slice(*user_bson_ids).values %> <% users.each do |user| %> <% sub_task = @task.ruling_timer_sub_tasks.where(:user=>user).first %> <% klass = (sub_task.status == 'working' ? 'fa-play' : (sub_task.status == 'finish' ? 'fa-flag-checkered' : 'fa-pause') rescue 'fa-pause') %>
<% end %> <% end %>
<%= t("ruling_timer.task_performer") %> <%= t("ruling_timer.task_execution_time") %>
<%=user.name%> <% work_times = sub_task.get_work_times %> <% work_times.each_with_index do |work_time,i| %> <% next if i % 2 == 1 %> <% next_time = work_times[i+1] %> <% next_time = "Now" if next_time.nil? %> <%= "#{work_time} ~ #{next_time}" %>
<% end %>
<%=t("ruling_timer.#{sub_task.status}")%>( <%=t("ruling_timer.total")%>: <%=sub_task.get_infos["work"] rescue "00:00:00" %> )
<%= content_tag :div, class: "bottomnav clearfix" do referer = request.referer rescue nil referer = task_management_admin_ruling_timers_path if referer.blank? || request.host != URI.parse(URI.encode(referer)).host link_to(t('ruling_timer.back'), referer, :class=>"btn") end %>