<div class="editable-toggle">
  <a href="" onclick="showEditable(event);">
    <i class="fa fa-pencil-square-o" aria-hidden="true"></i>
  </a>
</div>

<div class="editable-actions-wrapper">
  <a href="" class="btn btn-default" onclick="cancelEditable(event);">
    <i class="fa fa-times" aria-hidden="true"></i>
  </a>

  <% if v["table"] == @current_table %>
    <a href="" class="btn btn-primary" onclick="updateTableField(event, '<%= v["table"] %>', '<%= v["title"] %>', '<%= params[:record_id] %>');">
      <i class="fa fa-check" aria-hidden="true"></i>
    </a>
  <% else %>
    <a href="" class="btn btn-primary" onclick="updateRelatedTableField(event, '<%= v["table"] %>', '<%= v["title"] %>', '<%= get_foreign_key(@current_table) %>' ,'<%= params[:record_id] %>');">
      <i class="fa fa-check" aria-hidden="true"></i>
    </a>
  <% end %>
</div>
