mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-31 03:59:51 +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
|
||||
# send last activity date of the previus batch
|
||||
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,
|
||||
more_activities_url: more_url,
|
||||
page: page,
|
||||
previous_activity_created_at: I18n.l(previus_date, format: :full_date)
|
||||
previous_activity_created_at: previus_date
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<% end %>
|
||||
<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>
|
||||
<div data-hook="experiment-card-body">
|
||||
<% if experiment.description? %>
|
||||
|
|
Loading…
Reference in a new issue