<%# locals: { answer } %>
<!-- Partial for handling the answer status (e.g. saving, error-saving, data-status) -->
<span class="label label-info status" style="display:none;" data-status="saving"><%= _('Saving...') %></span>
<span class="label label-warning status" style="display: none;" data-status="error-saving"></span>
<% if answer.is_valid? %>
    <span class="label label-info status" data-status="saved-at">
      <%= _('Answered')%> <time class="timeago" datetime="<%= answer.updated_at.iso8601 %>"></time>
      <%= _(' by %{user_name}') %{ :user_name => answer.user.name } if answer.user.present? %>
    </span>
<% end %>