2019-08-19 19:56:02 +08:00
|
|
|
<% Repository.accessible_by_teams(current_team).order(created_at: :asc).each do |repository| %>
|
2019-01-03 21:11:00 +08:00
|
|
|
<li>
|
|
|
|
<a class="dropdown-item <%= "active-item" if @repository == repository %> help_tooltips"
|
|
|
|
data-tooltiplink="<%= I18n.t('tooltips.link.protocol.inventories') %>"
|
|
|
|
data-tooltipcontent="<%= I18n.t('tooltips.text.protocol.inventories') %>"
|
|
|
|
href="<%= repository_my_module_url(id: @my_module, repository_id: repository) %>"
|
|
|
|
title="<%= repository.name %>">
|
2019-01-11 04:11:20 +08:00
|
|
|
<% if enable_counters %>
|
2019-01-17 22:04:20 +08:00
|
|
|
<% cache [repository, @my_module] do %>
|
2019-01-11 04:11:20 +08:00
|
|
|
<%= 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>
|
2019-08-26 14:56:46 +08:00
|
|
|
<% end %>
|
2019-09-02 16:30:29 +08:00
|
|
|
<%= inventory_shared_status_icon(repository, current_team) %>
|
2019-08-26 14:56:46 +08:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
<% Repository.used_on_task_but_unshared(@my_module, current_team).each do |repository| %>
|
|
|
|
<li>
|
2019-09-05 20:03:08 +08:00
|
|
|
<a class="muted dropdown-item help_tooltips"
|
2019-08-26 16:45:40 +08:00
|
|
|
data-tooltipcontent="<%= I18n.t('tooltips.text.protocol.unshared_inventory') + repository.team.name %>"
|
2019-09-05 20:03:08 +08:00
|
|
|
title="<%= repository.name %>"
|
2019-09-06 19:47:06 +08:00
|
|
|
href="<%= unshared_inventory_my_module_path(inventory_id: repository.id)%>">
|
2019-09-05 20:03:08 +08:00
|
|
|
|
2019-08-26 14:56:46 +08:00
|
|
|
<% if enable_counters %>
|
|
|
|
<% cache [repository, @my_module] do %>
|
|
|
|
<%= truncate(repository.name) %>
|
2019-09-10 19:51:37 +08:00
|
|
|
<span class="assigned-items-counter"><%= "(#{@my_module.repository_rows_count(repository)})" %></span>
|
2019-08-26 14:56:46 +08:00
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<%= truncate(repository.name) %>
|
|
|
|
<span class="assigned-items-counter"><i class="fas fa-spinner fa-spin"></i></span>
|
2019-01-03 21:11:00 +08:00
|
|
|
<% end %>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<% end %>
|