scinote-web/app/views/global_activities/_activity_list.html.erb

31 lines
1.3 KiB
Text
Raw Normal View History

<% @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 %>"
data-e2e="e2e-TL-activities-date-<%= date %>">
2023-06-15 21:12:51 +08:00
<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 data-e2e="e2e-TX-activities-counter-<%= date %>"><%= activities.length %></strong>
<%= t("activities.index.#{'activity'.pluralize(activities.length)}_counter_label") %>
</div>
<div class="collapse in activities-group"
id="activities-group-<%= date %>"
data-e2e="e2e-CO-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 %>