Codeminer42/cm42-central

View on GitHub
app/views/projects/_activities_group.html.erb

Summary

Maintainability
Test Coverage
<% activities_group.reverse_each do |date_group| %>
<ul class="timeline-day">
  <li class="activities-date">
    <%= l date_group.first.to_date, format: :short %>
  </li>

  <ul class="project">
  <% date_group.last.each do |project_group| %>
    <li class="activities-project">
      <%= link_to project_group.first.name, project_path(project_group.first), class: 'project-link' %>
    </li>

    <ul class="subjects">
    <% project_group.last.each do |activities| %>
      <% activities.last.reverse.each do |activity| %>
        <% if activity.description %>
          <li class="activities-subject">
            <i class="timeline-circle"></i>

            <div class="subject">
              <small><%= activity.created_at.strftime("%H:%M") %></small><br>
              <%= activity.description.html_safe %>
            </div>
          </li>
        <% end %>
      <% end %>
    <% end %>
    </ul>
  <% end %>
  </ul>
</ul>
<% end %>