<% content_for :javascript_includes do %> <%= javascript_include_tag "edit_configuration_file_form.js" %> <% end %>

<%= @record.file_type %> file on <%= @record.server.name %>

<%= @record.namehash %>
Version: v<%= @record.last_version.number %> (modified <%= distance_of_time_in_words(@record.last_version.updated_at, Time.now) %> ago)
<%= text_field_tag 'file_path', @record.file_path, class: 'form-control-sm', id: 'visible_file_path' , size: "100%" %>

<%= @record.last_version.content %>


<%= button_tag(type: "button", class: "btn btn-success", id: "save_button") do %>Save as v<%= @record.last_version.number + 1 %> <% end %>

Sync:

<% command = pull_command(@record) %> CHUB -> Your Server
<%= text_field_tag 'command_pull', command, readonly: true, class: 'form-control-sm click-to-select-all', size: command.length %>
<% command = push_command(@record) %> Your Server -> CHUB
<%= text_field_tag 'command_push', command, readonly: true, class: 'form-control-sm click-to-select-all', size: command.length %>
<% @record.file_versions[1..-1].each do |version| %> <% end %>
Version Last Modified
v<%= version.number %> <%= distance_of_time_in_words(version.updated_at, Time.now) %> <%= button_to(file_version_path(version), method: :get, class: "btn btn-default inline") do %> View Diff <% end %>
<%= form_tag(update_by_form_configuration_file_url(@record), method: :put, id: "update_form") do %> <%= hidden_field_tag('content','', id: 'content') %> <%= hidden_field_tag('file_path', @record.file_path, id: 'file_path') %> <% end %>