<%# locals: { obj_list, parent_id, schema, readonly, template_locale } %>
<% obj_list.each do |obj| %>
  <tr>
    <td><%= obj.to_s %></td>
    <td class="actions">
      <% if readonly %>
        <%= link_to show_linked_madmp_fragments_url(
              :fragment_id => obj.id
          ), {
              :remote => true, 
              'data-toggle' => 'modal', 
              'data-target' => '#modal-window'
          } do %>
          <%= _('View') %>
        <% end %>
      <% else %>
        <%= link_to new_edit_linked_madmp_fragments_url(
              :fragment_id => obj.id, 
              :parent_id => parent_id, 
              :schema_id => schema.id,
              :template_locale => template_locale
          ), {
              :remote => true, 
              :target => "_self",
              'data-toggle' => 'modal', 
              'data-target' => '#modal-window'
          } do %>
          <%= _('Edit') %>
        <% end %>
        <span class="delete" 
          aria-hidden="true"
          data-confirm-message="<%= d_('dmpopidor', 'Do you want to delete this %{classname}?') % { classname: schema.classname } %>"
          data-url="<%= madmp_fragment_path(obj.id) %>"><%= _('Delete') %></span>
      <% end %>
    </td>
  </tr>
<% end %>