noesya/osuny

View on GitHub
app/views/admin/communication/websites/dependencies/index.html.erb

Summary

Maintainability
Test Coverage
<% content_for :title, 'Dépendances' %>
<% content_for :title_right, @dependencies.count %>

<%= osuny_label 'Dépendances par type' %>
<table class="table table-hover mb-5">
  <tbody>
    <% @dependencies.collect(&:class).map{ |klass| klass.to_s }.uniq.sort.each do |dependency_class| %>
      <tr>
        <td><%= dependency_class %></td>
        <td><%= @dependencies.count { |dependency| dependency.class.to_s == dependency_class } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<%= osuny_label 'Dépendances détaillées' %>
<%= render 'admin/communication/websites/dependencies/list', dependencies: @dependencies %>