mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-10 08:21:37 +08:00
Fix dates on activities and experiments [SCI-2778]
This commit is contained in:
parent
8d0dbc7076
commit
e89d60785f
2 changed files with 5 additions and 3 deletions
|
|
@ -34,12 +34,14 @@ class ActivitiesController < ApplicationController
|
||||||
end
|
end
|
||||||
# send last activity date of the previus batch
|
# send last activity date of the previus batch
|
||||||
previous_activity = Activity.find_by_id(params[:last_activity])
|
previous_activity = Activity.find_by_id(params[:last_activity])
|
||||||
previus_date = previous_activity.created_at if previous_activity
|
if previous_activity&.created_at
|
||||||
|
previus_date = I18n.l(previous_activity.created_at, format: :full_date)
|
||||||
|
end
|
||||||
{
|
{
|
||||||
activities: activities,
|
activities: activities,
|
||||||
more_activities_url: more_url,
|
more_activities_url: more_url,
|
||||||
page: page,
|
page: page,
|
||||||
previous_activity_created_at: I18n.l(previus_date, format: :full_date)
|
previous_activity_created_at: previus_date
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<span>
|
<span>
|
||||||
<span class="fas fa-calendar-alt" aria-hidden="true"></span>
|
<span class="fas fa-calendar-alt" aria-hidden="true"></span>
|
||||||
<%= localize(experiment.created_at, format: t('time.formats.full_date')) %> - <%= localize(experiment.updated_at, format: t('time.formats.full_date')) %>
|
<%= l(experiment.created_at, format: :full_date) %> - <%= localize(experiment.updated_at, format: :full_date) %>
|
||||||
</span>
|
</span>
|
||||||
<div data-hook="experiment-card-body">
|
<div data-hook="experiment-card-body">
|
||||||
<% if experiment.description? %>
|
<% if experiment.description? %>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue