23 lines
997 B
Plaintext
23 lines
997 B
Plaintext
<tr>
|
|
<td><%= timer.date.split(" ")[0] + " " + @weekdays[timer.date.split(" ")[1].to_i] %></td>
|
|
<td><%= timer.summary.to_s.gsub("\n","<br>").html_safe %></td>
|
|
<td>
|
|
<% work_times = timer.get_work_times %>
|
|
<% work_times.each_with_index do |t,i| %>
|
|
<% if i % 2 == 0
|
|
next_t = work_times[i+1]
|
|
else
|
|
next
|
|
end %>
|
|
<%= "#{t} ~ #{next_t.nil? ? "Now" : next_t}" %>
|
|
<br>
|
|
<% end %>
|
|
<%= I18n.t("ruling_timer.total") %>: <%= timer.get_infos["work"] %>
|
|
</td>
|
|
<td>
|
|
<a href="<%=(timer.class == RulingTimerTemp ? edit_temp_timer_admin_ruling_timer_path(:id=>timer.id) : edit_timer_admin_ruling_timer_path(:id=>timer.id))%>" class="btn btn-primary"><%=t("edit")%></a>
|
|
<% if params[:id].nil? || params[:id] == current_user.id.to_s%>
|
|
<a data-id="<%=timer.id.to_s%>" data-type="<%= 'temp' if timer.class == RulingTimerTemp%>" data-history-date="<%=timer.date.to_s.split(' ')[0]%>" class="btn btn-danger delete_history"><%=t("delete_")%></a>
|
|
<% end %>
|
|
</td>
|
|
</tr> |