scinote-web/app/views/my_modules/_repositories_dropdown.html.erb

19 lines
823 B
Text
Raw Normal View History

<% Repository.accessible_by_teams(current_team).order(created_at: :asc).each do |repository| %>
<li>
2020-04-28 18:30:43 +08:00
<a class="dropdown-item <%= "active-item" if @repository == repository %>"
href="<%= repository_my_module_url(id: @my_module, repository_id: repository) %>"
title="<%= repository.name %>">
<% if enable_counters %>
<% cache [repository, @my_module] do %>
<%= truncate(repository.name) %>
<span class="assigned-items-counter"><%= "(#{@my_module.repository_rows_count(repository)})" %></span>
<% end %>
<% else %>
<%= truncate(repository.name) %>
<span class="assigned-items-counter"><i class="fas fa-spinner fa-spin"></i></span>
<% end %>
<%= inventory_shared_status_icon(repository, current_team) %>
</a>
</li>
<% end %>