scinote-web/app/views/global_activities/_activity_list.html.erb
2023-06-21 14:38:32 +02:00

28 lines
1.1 KiB
Text

<% @grouped_activities.each do |date, activities| %>
<div class="activities-day" data-date="<%= date %>">
<div class="date-container">
<a class="activities-group-expand-button"
href="javascript:void(0);"
id="activities-group-<%= date %>-button"
data-toggle="collapse"
data-turbolinks="false"
data-target="#activities-group-<%= date %>">
<span class="sn-icon sn-icon-right"></span>
<%= l(Time.parse(date), format: :full_date) %>
</a>
</div>
<div class="date-activities">
<div class="activities-counter-label">
<strong><%= activities.length %></strong>
<%= t("activities.index.#{'activity'.pluralize(activities.length)}_counter_label") %>
</div>
<div class="collapse in activities-group"
id="activities-group-<%= date %>"
data-button-link="<%= "#activities-group-#{date}-button" %>">
<% activities.each do |activity| %>
<%= render partial: 'global_activities/activity', locals: { activity: activity } %>
<% end %>
</div>
</div>
</div>
<% end %>