<table class="table repository-dataTable"
       data-id="<%= @repository.id %>"
       data-type="live"
       data-source="<%= index_dt_my_module_repository_path(@my_module, @repository) %>"
       data-default-order="<%= @repository.default_table_order_as_js_array %>"
       data-default-table-columns="<%= @repository.default_table_columns %>"
       data-repository-name="<%= @repository.name %>"
       data-assigned-items-count="<%= @my_module.repository_rows_count(@repository) %>"
       data-load-state-url="<%= repository_load_table_state_path(@repository) %>"
       data-export-url="<%= export_repository_my_module_repository_path(@my_module ,@repository) %>"
       data-versions-sidebar-url="<%= full_view_sidebar_my_module_repository_snapshots_path(@my_module, @repository) %>"
       data-stock-management="<%= @repository.has_stock_management? %>"
       data-stock-consumption-column="<%= include_stock_consumption && @repository.has_stock_management? %>"
       data-stock-consumption-editable="<%= include_stock_consumption && can_update_my_module_stock_consumption?(@my_module) %>">
  <thead>
    <tr>
      <th id="checkbox">
        <div class="sci-checkbox-container">
          <input value="1" type="checkbox" class="sci-checkbox select-all">
          <span class="sci-checkbox-label"></span>
        </div>
      </th>
      <th id="assigned"><%= t("repositories.table.assigned") %></th>
      <th id="row-id"><%= t("repositories.table.id") %></th>
      <th id="row-name"><%= t("repositories.table.row_name") %></th>
      <th id="relationship"><%= t("repositories.table.relationships") %></th>
      <th id="added-on"><%= t("repositories.table.added_on") %></th>
      <th id="added-by"><%= t("repositories.table.added_by") %></th>
      <th id="updated-on" ><%= t("repositories.table.updated_on") %></th>
      <th id="updated-by" ><%= t("repositories.table.updated_by") %></th>
      <th id="archived-on"><%= t("repositories.table.archived_on") %></th>
      <th id="archived-by"><%= t("repositories.table.archived_by") %></th>
      <% if @repository.is_a?(LinkedRepository) %>
        <th id="row-external-id"><%= t('repositories.table.external_id') %></th>
      <% end %>
      <% @repository.repository_columns.order(:id).each do |column| %>
        <th
          class="repository-column <%= 'row-stock item-stock' if column.data_type == 'RepositoryStockValue' %>"
          id="<%= column.id %>"
          data-type="<%= column.data_type %>"
          <% column.metadata.each do |k, v| %>
            <%= "data-metadata-#{k}=#{v}" %>
          <% end %>
        >
          <%= display_tooltip(column.name) %>
        </th>
      <% end %>
      <% if @repository.has_stock_management? && include_stock_consumption %>
        <th class="row-consumption" data-columns-visible="false"><%= t("repositories.table.row_consumption") %></th>
      <% end %>
    </tr>
  </thead>
  <tbody></tbody>
</table>
