mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-31 20:19:05 +08:00
Merge pull request #4928 from G-Chubinidze/gc_SCI_7837
Step timestamp display [SCI-7837]
This commit is contained in:
commit
3331c5fa3f
4 changed files with 28 additions and 1 deletions
|
@ -148,6 +148,22 @@
|
|||
.step-elements {
|
||||
padding-left: calc(var(--left-component-padding) * 2);
|
||||
|
||||
.step-timestamp {
|
||||
position: relative;
|
||||
margin-left: 34px;
|
||||
bottom: 17px;
|
||||
width: 356px;
|
||||
height: 15px;
|
||||
font-family: 'Lato';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-size: 10px;
|
||||
line-height: 14px;
|
||||
flex: none;
|
||||
order: 0;
|
||||
flex-grow: 0;
|
||||
}
|
||||
|
||||
.step-element-name {
|
||||
.sci-inline-edit__view,
|
||||
textarea {
|
||||
|
|
|
@ -128,6 +128,7 @@
|
|||
</div>
|
||||
<div class="collapse in" :id="'stepBody' + step.id">
|
||||
<div class="step-elements">
|
||||
<div class="step-timestamp">{{ i18n.t('protocols.steps.timestamp', {date: step.attributes.created_on, user: step.attributes.created_by}) }}</div>
|
||||
<template v-for="(element, index) in orderedElements">
|
||||
<component
|
||||
:is="elements[index].attributes.orderable_type"
|
||||
|
|
|
@ -8,7 +8,8 @@ class StepSerializer < ActiveModel::Serializer
|
|||
|
||||
attributes :name, :position, :completed, :attachments_manageble, :urls, :assets_view_mode, :assets_order,
|
||||
:marvinjs_enabled, :bio_eddie_service_enabled, :bio_eddie_context, :marvinjs_context,
|
||||
:wopi_enabled, :wopi_context, :comments_count, :unseen_comments, :storage_limit
|
||||
:wopi_enabled, :wopi_context, :comments_count, :unseen_comments, :storage_limit, :created_on,
|
||||
:created_by
|
||||
|
||||
def bio_eddie_service_enabled
|
||||
BioEddieService.enabled?(@instance_options[:user])
|
||||
|
@ -99,4 +100,12 @@ class StepSerializer < ActiveModel::Serializer
|
|||
|
||||
urls_list
|
||||
end
|
||||
|
||||
def created_at
|
||||
object.created_at.strftime('%B %d, %Y at %H:%M')
|
||||
end
|
||||
|
||||
def created_by
|
||||
object.user.full_name
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2815,6 +2815,7 @@ en:
|
|||
component_duplicated: "Step content duplicated successfully."
|
||||
step_duplication_failed: "Step could not be duplicated, try again later."
|
||||
component_duplication_failed: "Step content could not be duplicated, try again later."
|
||||
timestamp: "Created at %{date} by %{user}"
|
||||
status:
|
||||
complete: "Mark as done"
|
||||
uncomplete: "Unmark as done"
|
||||
|
|
Loading…
Reference in a new issue