<% @assigned_repositories.each do |repository| %>
  <div class="assigned-repository panel" data-repository-id="<%= repository.id %>">
    <a class="assigned-repository-caret collapsed"
       role="button"
       data-toggle="collapse"
       href="#assigned-repository-items-container-<%= repository.id %>"
       data-parent="#assigned-items-container"
    >
      <i class="fas fa-caret-right"></i>
      <span class="assigned-repository-title" data-rows-count="<%= repository.assigned_rows_count %>">
        <%= repository.name %>
      </span>
      <% if repository.is_a?(RepositorySnapshot) %>
        <span class="snapshot-tag">
          <%= t('my_modules.repository.snapshots.simple_view.snapshot_tag') %>
        </span>
      <% end %>
      <div class="action-buttons">
        <button class="btn btn-light icon-btn full-screen" data-table-url="<%= assigned_repository_full_view_table_path(@my_module, repository) %>">
          <i class="fas fa-expand"></i>
        </button>
      </div>
    </a>
    <div class="collapse assigned-repository-container"
         id="assigned-repository-items-container-<%= repository.id %>"
         data-repository-url="<%= assigned_repository_simple_view_index_path(@my_module, repository) %>"
         data-footer-label="<%= assigned_repository_simple_view_footer_label(repository) %>"
         data-name-column-id="<%=  assigned_repository_simple_view_name_column_id(repository) %>"
    >
    </div>
  </div>
<% end %>

<template id="myModuleRepositorySimpleTemplate">
  <table class="table hidden">
    <thead>
      <tr>
        <th class="row-name"><%= t("repositories.table.row_name") %></th>
      </tr>
    </thead>
    <tbody></tbody>
  </table>
</template>
