<%=@user.name%>

<%= form_for @history, url: create_history_admin_ruling_timers_path(@history), html: {class: "form-horizontal main-forms previewable"} do |f| %>
<%= f.hidden_field :user_id%> <%= f.hidden_field :time_offset, :id=>"history_timeoffset" %>
<%= f.datetime_picker :date, {:picker_type=>"date",:no_label=>true,:format=>"yyyy/MM/dd"} %>
<%= f.text_area :summary,:id=>"edit_summary" %>
<% work_times = @history.get_work_times(true) %> <% work_times.each_with_index do |t,i| %> <% if i % 2 == 0 next_t = work_times[i+1] else next end %> <%= f.text_field_tag "#{f.object_name}[work_times][]", t ,:id=>nil %> ~ <%= f.text_field_tag "#{f.object_name}[work_times][]", next_t ,:id=>nil %>
<% end %>
<% referer = request.referer rescue nil %> <% referer = get_referer_url if referer.blank? || request.host != URI.parse(URI.encode(referer)).host %> <%= f.submit t('submit'), class: 'btn btn-primary' %> <%= link_to t('cancel'), referer, :class=>"btn" %>
<% end %>