<% # USAGE: Displays a version picker for the given object. # # VARIABLES: # * record: The record to show a version picker for. # * target: The DOM id to update when refreshing the version. %> <% if record.versions.present? %>
Version <%= select_tag("version", options_for_select(record.versions.reverse.map { |version| ["#{version.created_at.strftime('%B %d, %Y at %I:%M %p')}", version.id]})) %><%= image_tag "spinner.gif", :alt => "Spinner", :id => "version_loading", :style => "display: none; margin-left: 0.5em;" %>
<% content_for :javascript_insert do %> <% end %> <% end %>